0% found this document useful (0 votes)
31 views6 pages

Fernandes 20

Uploaded by

satabi4510
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views6 pages

Fernandes 20

Uploaded by

satabi4510
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

2013 6th Robotics and Mechatronics Conference (RobMech)

Durban, South Africa, October 30-31, 2013

Implementation of an Industrial Controller


for a Ball-on-Wheel System
John Manuel Fernandes and Theo van Niekerk
Mechatronics Department, Faculty of Engineering, Built Environment and Information Technology,
Nelson Mandela Metropolitan University, Port Elizabeth, South Africa
John.Fernandes@nmmu.ac.za

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].

In recent years, “Intelligent” – Neural Network (NN) based


controllers and/ or Adaptive PID controllers have been used
extensively in solving more complex industrial control
problems. The complexity of such systems comes primarily
from their non-linear nature for which there is no straight
forward solution. All chemical processes for instance are non-
linear. Integrated intelligent control has the added advantage of
being able to adapt to an ever changing environment and is
therefore desirable for use in the control of dynamic, non-linear
systems. Figure 1: Basic closed loop system with PID controller
In this paper, a traditional, linear PID controller is applied to a
‘strongly’ non-linear Ball on Wheel (BOW) system. The
system model is then determined using the Lagrangian

978-1-4799-1518-7/13/$31.00 ©2013 IEEE 129


Unlike traditional controllers, intelligent NN controllers are
. . . . (1) able to adapt to parameter changes in the plant. Thus the need
Equation (1) shows the standard PID algorithm. Depending on for regular retuning is eliminated [4]. It has also been shown
the complexity of the system being modeled, the process of that sensor noise has little effect on NN’s [11]. Special care,
modeling can be both time consuming and costly, requiring however, must be taken when training MNN’s to ensure that
special equipment to measure system parameters accurately. they do not over fit the training data and then fail to generalize
Furthermore, for systems that have non-linear characteristics, well in new situations [12]. Since NN’s can have several
the PID controller will only work on an equivalent linear inputs and outputs they may also be used for multiple input
approximation of the non-linear system and only within a and multiple output systems (MIMO) [11]. The downside of
small operating range about the equilibrium point/s [6] [7]. using a NN as a controller is that:
Again, depending on the complexity of the plant, linearization
techniques can be mathematically involving. The existence of • During the training process, the control system is not
a unique solution is never guaranteed and in many cases, operational or performs poorly
numerical approximations for such systems are not always • The training can take a long time
sufficient. A more intelligent approach to non-linear systems • Unpredictable disturbances cannot be eliminated
is thus required [8]. • Training data may be hard to attain and the training
process does not always guarantee the best results
Various linearization techniques exist, namely: Jacobian
Linearization, Carleman Linearization, Lie Series, Iteration In this paper a NN Predictive controller is considered. In the
technique and feedback linearization. This paper considers first step of operation, a neural network is trained to represent
only the Jacobian Linearization technique. A non-linear the forward dynamics of the BOW system. The prediction
system is a system in which the output is not directly error between the system output and the neural network output
proportional to the input. Depending on the degree of non- is used as the training signal for the neural network. The
linearity, such systems are usually unpredictable in their neural network plant model uses previous inputs and previous
response and pose serious challenges to control engineers. plant outputs to predict future values of the plant output.
Non-linearity can easily be seen from a system’s dynamic
equations; particularly if trigonometric or high order terms
exist.

Once a system has been modeled and linearized, Matlab and


Simulink may be used to simulate the systems response to
various types of input, e.g. a step, ramp or parabolic input, and
then also design an appropriate controller [10]. There are a
number of methods used to design PID controllers including:
time response method, root-locus design method, frequency
response method and State Space (SS) method [10]. Figure 2: NN-Predictive Controller [12]

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.

Feed-forward Multilayer Neural Networks (MNN’s) are the


Where: N1, N2 and Nu define the horizons over which the
most prevalent neural network architectures for identification
tracking error and control increments are evaluated, u’ is the
and control applications. A widely used training method for
tentative control signal, yr is the desired response and ym is the
feed-forward MNN’s is Back Propagation (BP) [12]. The
network model response, determines the contribution that
Levenberg-Marquardt algorithm is very efficient for training
the sum of the squares of the control increments has on the
small to medium sized networks and it also uses BP.
performance index [13].

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

Aluminium Figure 4: Expandable Development Architecture


Wheel
D. Modelling the ball on Wheel System
Tooth belt and
gear assembly The Euler Lagrange formulation is used to derive the BOW
system model. Figure 5 shows the free body diagram for the
system.
Servo Motor

Figure 3: Ball on Wheel (BOW) System

B. Preparing the Ball on Wheel System for use


The distance feedback from the laser sensor is calibrated to
give the angular displacement of the ball on the periphery of
the wheel. The wheel surface is rubberized to increase ball-
wheel friction and slow down the natural response of the
system to cater for processing delays in the drive and PLC. The
laser distance sensor is wired to a high speed analog card on
the S7-300 PLC.
C. Control and Data capture via Matlab and Simulink
In order to capture experimental data for analysis and
comparison and also execute the controllers in Matlab, the S7- Figure 5: Free body diagram of BOW system
300 PLC is linked wirelessly using Siemens wireless
technology to a computer running Matlab/ Simulink. OPC With reference to Figure 5, the BOW system has 2 degrees of
Server and Client software running on this computer then give freedom represented by and . For the dynamic model to
Matlab exclusive access to all PLC I/O’s and memory areas be accurate, the assumption taken is that the ball is rolling on
within a 1ms time frame. This feature provides the flexibility the surface of the wheel and not sliding [13].
needed to design, implement and execute controllers directly

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)

These two equations are only true as long as the centripetal


Then; force is large enough to maintain circular motion of the ball on
(4) the wheel. The system must be defined and modeled in the
state space form if the Jacobian linearization method is to be
Where: the kinetic energy of the system and the used; hence the state variables are declared as follows:
potential energy of the system

Total kinetic energy possessed by the ball due to translational


motion plus rolling motion is given as:

+ , (5)

Where, the balls moment of inertia is given by:

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

Ball angle (Deg)


0

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

5 5 Figure 6: Ball angle vs time simulation


1 2 (26)
2 5 BALL ANGLE vs TIME BALL ANGLE

7 7 (27) 30

20

2 (28)
10

5 (29) 0
0.041

At the equilibrium point, is equal to zero. The system can -10

therefore be linearized at this point. -20

-30

IV. SIMULATION AND EXPERIMENTAL RESULTS

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

implementation differ from the simulation results because of


hardware limitations and delays that exist in the plant that 10

could not be incorporated in to the plant model.


0

Ball Radius
Type Mass
Name (mm)
-10

Rubber (Hard & -20

A 24.6mm 0.101kg
smooth)
-30

Rubber (Soft with


B 21.3mm 0.0245Kg
grip)
Figure 8: Ball angle vs time (Ball B)

Table 1: Ball specifications

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

-10 [4] H. Jack, Dynamic System Modelling, 1st ed. USA,


August 2001.
-20
[5] Herman Wahid and Norhaliza Abdul Wahab Mohd Fuaad
-30
Rahmat, "Application of Intelligent Controller in Ball and
-40 Beam Controller," Smart Sensing and Intelligent Systems,
vol. 3, March 2010.
Figure 9: Response of Ball A and B to pulse disturbance [6] M., & Misra, P. Nikolaou, Linear and Nonlinear
(Simulation result) Processes: Recent Developments and Future Direction,
2001.
A similar scenario is created to test the capability of the NN [7] P.J. Olver. (2012) University of Minnesota - College of
Predictive controller. The controller is trained using plant input Science and Engineering. [Online].
and output data obtained from a plant model that has Ball A’s http://www.math.umn.edu/~olver/am/ne.pdf
parameters of mass and radius incorporated. Figure 9 shows the [8] G.F., Powel, J.D., & Emami-Naeini, A Franklin,
systems responses with the NN controller applied as the ball is Feedback Control of Dynamic Systems, 5th ed., Craig
changed. It can be seen that the predictive controller does not Little, Ed. New Jersey, USA: Pearson Prentice Hall,
fair so well in rejecting disturbances as compared with the 2006.
simulation results of the PID controller in Figure 7. It is also a
lot slower. However, the NN controller handles changes in [9] Jin-wook H., Chang-goo L. Woo-young H., Development
plant parameters quite well. The major benefit of the intelligent of a Self-tuning PID Controller based on Neural Network
controller is that it can be trained from historical data collected for Nonlinear Systems. Korea, 1999.
from the plant. There is also no modelling or tuning required. If [10] F., Fanaei, M.A., & Arjomandzadeh, A. R. Shahraki,
necessary, the controller can always be re-trained to improve Adaptive System Control with PID Neural Networks.
performance. Iran.
V. CONCLUSION [11] G., & Kim, P. Cho, "A Precise Control ofAC Servo
Motor using Neural Network PID," Current Science, vol.
In this paper, a strongly non-linear system is considered 89, pp. 23-29, July 2005.
namely the Ball on Wheel system. The system was [12] M. T., & Demuth, B.H. Hagan, Neural Neteorks for
constructed and a PID controller implemented via Matlab. It Control.
was shown that the traditional control approach (PID) is robust
[13] H. & Beale, M. Demuth. (2004) Neural Network
especially when it comes to overcoming disturbances.
Toolbox. Document.
However, it falls short when plant parameters change even
slightly. Simulations show that the NN Predictive controller, [14] H., YI-WEI, T., & Hao-Shuan, L. Ming-Tzu, Controlling
though not as robust as the PID controller is able to adapt to a Ball and Wheel System Using Full State Feedback
parameter changes (i.e. change in mass and radius of ball) Linearization: A Testbed for Nonlinear Control Design.
quite well. The setup is a suitable platform for teaching non- Michigan, USA, 2009.
linear control theory and principles of neural networks for the [15] S., Crai, K. C. Awtar, Mechatronic Design of a Ball on
purpose of control. Plate Blancing Syatem. New York, USA.
[16] R.C., & Bishop, H.R. Dorf, Modern Control Systems,
ACKNOWLEDGEMENTS 10th ed. USA: Pearson Education International, 2005.
[17] Unknown, Ball and Beam Dynamics., Handout.
All the equipment and resources used to carry out this research
[18] S. Thompson, Control Systems Engineering & Design,
was provided by the AMTC (Advanced Mechatronic Training
Centre), NMMU. 1st ed. New York, USA: Longman Scientific &
Technical, 1989.

134

You might also like