Fernandes 20
Fernandes 20
Abstract — Many industrial systems and processes are non- formulation and the Jacobian linearization technique. The
linear in nature. However, for purposes of control systems design, designed PID controller is then operated within a small range
they are usually treated as linear systems within a defined about the equilibrium point of the system. Thereafter, a NN
operating range. The process of modeling and linearization is Predictive controller is trained and simulated as an alternative
complex, costly and often inaccurate due to uncertainties in to the traditional control approach. The PID controller is first
system parameters. In this paper, a laboratory Ball on Wheel simulated using the determined plant model and then also
system is implemented, modeled and linearized. Thereafter, a executed in Simulink in real-time wirelessly using an OPC
traditional PID controller is designed and performance analyzed. Server/ Client connection for data access and for time analysis
Intelligent control, utilizing Neural Networks (NN) is also
purposes.
considered for control of the non-linear system. The control
systems are further implemented within an industrial controller,
allowing further performance analysis.
II. TRADITIONAL VS INTELLIGENT CONTROL
Keywords—Neural Networks, PID, Non-linear, Ball on Wheel,
PLC, Siemens S7-300, Matlab, Simulink, OPC Server
A. Traditional PID Controller
As discussed in the introduction, the most widely used type of
I. INTRODUCTION controller in industry today in the PID controller. According to
[3], up to 95% of all controlled processes in industry utilize
Simple feedback techniques are often inadequate in the control PID controllers. The PID controller is a robust control
of complex processes. Such processes must be well understood algorithm that can easily be tuned by trial and error methods.
and simulated before they can be properly controlled. A This inherent simplicity makes it favorable in environments
mathematical function, otherwise called a system model, which where the specialized skills required in designing control
accurately describes the dynamics of the system in question, systems are lacking. However, in more complex applications,
must be determined [1]. Only after this step has been taken can this trial and error method for tuning PID controllers is
a suitable control algorithm be applied to the process in order impractical, time consuming and sometimes dangerous. In
to control the system as desired. Many control algorithms and order to design the most suitable PID controller for a
techniques have been devised, studied and tested. The most particular system, simulation is arbitrary and requires the
common of these is the Proportional Integral Derivative (PID) formulation of a system model. Figure 1 shows the basic
controller for its excellent performance on simple control
structure of a closed loop PID control system. Numerous other
systems [2]. Another popular control algorithm that has been
traditional control configurations and strategies also exist that
successfully implemented for control of linear systems is the
Linear Quadratic Regulator (LQR). are not discussed in this paper [5].
B. Intelligent Controller (Neural Network) The NN Predictive controller predicts the plant response over
a specified time horizon. The optimization block in Figure 2
Neural Networks (NN’s) have received widespread attention,
determines the values of u’ that minimize cost function J
especially for their ability to learn non-linear characteristics
according to Equation (2) below. The optimal control signal u
through experimental data, without prior knowledge of the
is then fed in to the plant.
plant [6]. Research has proven that NN’s can estimate every
non-linear function with at least one hidden layer. NN’s are
therefore extensively used in simulation and control of non-
linear processes. The cumbersome process of system modeling
is thus eliminated provided that suitable operational data can (2)
be obtained from the plant for the purpose of training the
1 2
network.
130
III. EXPERIMENTAL SETUP from the Matlab/ Simulink environment. Thoroughly tested
algorithms may later be generated and implemented directly
on to the PLC using Simulink PLC coder. The major benefit
A. The Ball on Wheel System of running the controllers directly from the Matlab/ Simulink
The Ball on Wheel (BOW) system was selected for its strong environment is that relatively complex operations can be
non-linearity (shown in the system equations below) and performed with ease and system data can easily be captured
inherent instability [13]. This system can thus represent any and stored for further analysis. This feature in particular
existing non-linear system. The BOW system further has the makes the BOW system ideal for use as a lecturing aid. If
potential to be used as a teaching aid to demonstrate non-linear required, the architecture can be expanded to include multiple
control theory using traditional and intelligent approaches [15]. PLC stations connected to one main PC over wireless
The implemented controller is designed to balance various connections as shown in Figure 4.
balls of different size, weight and surface texture on the top-
center of the wheel by controlling the torque applied to the
wheel. The apparatus consists of an aluminum wheel coupled
to a servo motor via a tooth belt. The servo motor is controlled
by a Siemens servo drive which acts as a Profibus slave to an
S7-300 PLC. A picture of the setup is shown in Figure 3. A
laser distance sensor is used for feedback of the actual ball
position. The wheel angle and applied torque are calculated by
the drive and retrieved by the PLC over Profibus.
Laser distance
sensor
Ball
131
According to the Lagrangian equation:
And according to (3), the simplified system dynamic equations
are given as:
(3) 7 7 2 5 0
(13)
Where: Lagrangian function, Generalized forces of +
system and Generalized coordinates of system (14)
+ , (5)
2 (15)
(6)
5
(16)
The kinetic energy possessed by the wheel due to rotation is Where:
given by: A = System Matrix
1 (7) B = input Matrix
2 C = output Matrix
D = Feed Forward matrix
Where the wheels moment of inertia is given by:
The Jacobian system matrices are given in (17) and (18).
1
2 (8) 0 1 0 1
.
Therefore the total kinetic energy possessed by the system is .
given by: 0 0 0
.
+ . (17)
(9)
0 0 0 0
Now, since (the rolling angle of the ball) is not .
measurable, it must be expressed in terms of and , .
giving: 0 0 0
+ 0
(10) .
.
The potential energy possessed by the system is given by:
.
(11) . (18)
0
Therefore, according to (4), .
.
(12)
1 0 0 0 (19)
132
Ball A, represented by the graph in Figure 7, returns to its
0 equilibrium (stable) point within 1.6 s of the application of the
(20) first disturbance, then in 2.1 s after the application of the
Where: second disturbance. It is seen that the PID controller works
well to stabilize Ball A for which it was tuned. However, when
Ball B of different mass, size and surface texture is used, the
(21) PID parameters must be re-tuned to attain optimal performance
again. The effects of this parameter change can be seen clearly
seen in Figure 8. The system tends to becomes more unstable.
(22) 30
Setpoint
Disturbance
20
Plant Out (Ball B)
Plant Output (Ball A)
(23) 10
0.00
0.00
0.00
0.02
0.04
0.08
0.11
0.12
0.15
0.19
0.26
0.34
0.43
0.50
0.59
0.67
0.74
0.83
0.91
0.99
1.01
1.04
1.07
1.10
1.12
1.14
1.17
1.23
1.31
1.39
1.48
Time
(24) -10
And, -20
2 2 (25) -30
7 7 (27) 30
20
2 (28)
10
5 (29) 0
0.041
-30
Based on the linearized model, a PID controller was designed Figure 7: Ball angle vs time (Ball A)
for the BOW system in Simulink. Two balls were used in the
experiment according to Table 1. The same PID gains were
used to control both Ball A and Ball B. Simulation results for
the response of Ball A and B are depicted in Figure 6. The PID BALL B ANGLE
controller is then implemented in real-time on the PLC where a 30
BALL B ANGLE
disturbance pulse of 100 ms is applied to the wheel twice at 4s
intervals as shown in Figure 7 and 8. The results of the actual 20
Ball Radius
Type Mass
Name (mm)
-10
A 24.6mm 0.101kg
smooth)
-30
133
Using the determined plant model to produce training data, a REFERENCES
NN Predictive Controller is trained and simulated in Simulink.
The results are shown in Figures 9 and 10. For real time [1] R.J. Richards, An Introduction to Dynamics and Control,
realization, actual plant data must be obtained for use in 1st ed. New York, United Kingdom: Longman Inc., 1979.
training.
[2] B. & Hu, H. Zhao, "A new inverse controller for servo-
30 SETPOINT
system based on neural network model reference adaptive
DISTURBANCE control ," COMPEL, vol. 28, no. 6, pp. 1503-1515, 2009.
20 PLANT OUT (Ball A)
PLANT OUT (Ball B) [3] J.G., & Roy, R.k. Vlachogiannis, "Robust PID controllers
10
by Taguchi's method," The TQM Magazine, vol. 17, no.
5, pp. 456-466, 2005.
Ball Angle (Deg)
0
0.03
0.07
0.11
0.15
0.19
0.23
0.27
0.31
0.35
0.39
0.43
0.47
0.51
0.55
0.59
0.63
0.67
0.71
0.75
0.79
0.83
0.87
0.91
0.95
0.99
1.03
1.07
1.11
1.15
1.19
1.23
1.27
1.31
1.35
1.39
1.43
1.47
TIME
134