GRD Journals | Global Research and Development Journal for Engineering | International Conference on Innovations in Engineering and Technology (ICIET) - 2016 | July 2016
e-ISSN: 2455-5703
Design of Optimal Controllers For a Ball & Beam System 1
S. Nagammai 2V. Akalya 3P. Vinitha 1 Professor 2U.G student 1,2,3 Department of Electronics and Instrumentation Engineering 1,2,3 K.L.N. College of Engineering, Pottapalayam, India Abstract One of the bench mark problem used by many researchers in the area of control engineering is the Ball and Beam system (BBS) which possess severe nonlinearity and instability characteristics. The BBS connected with servo motor results in an open loop unstable system due to the presence of multiple poles at the origin. This process has the difficulty in controller design because of assumed nonlinear relation between beam angle and ball displacement. This paper deals with design methodology of full state feedback (FSFB) controller with pre compensator and the performance of which is compared with linear quadratic controller (LQC). The state feedback controller with pre compensator yields better performance in terms of transient response specifications compared with linear quadratic controller. A simulation is carried out using MATLAB to evaluate the proposed control algorithm on the modelled Ball and Beam system. Keyword- BBS, State-Space model, full state feedback controller, linear quadratic controller __________________________________________________________________________________________________
I. INTRODUCTION In order to understand the concepts of modern control theory the BBS connected with servo motor is considered as an illustrative example. The two degrees of freedom of the proposed system are namely, the rolling of the ball back along the beam, and the beam rotation. The controller design for an unstable system is a difficult task for control engineers and researchers. The mathematical modelling of the system becomes simpler when the beam deflects a small angle from the horizontal position which leads to insignificant nonlinear property. Appreciable research work had been done on this laboratory test bench. A feedback linearization controller is proposed by Hauser et al. A Linear Quadratic Regulator (LQR) for stabilization is designed by Pang et al. H.Verrelst et al used Neural Network for stabilization of BBS. S.K Oh et al proposed Fuzzy based cascade control and Chang et al designed a tracking control strategy using fuzzy sliding-mode controllers. Further all the intelligent controllers are knowledge based and the stability of the system is not guaranteed. In this proposed work controller is designed for positioning the ball along the beam by manipulating the servomotor voltage. The mathematical modelling of BBS connected with servo motor is obtained from the force balance equation expressed using Newtonâ€&#x;s law of motion. The state space modelling of the plant is obtained so as to design optimal controllers. An implementation of FSFB controller with set point gain and linear quadratic controller for the modelled system is carried out. The paper is organized as follows. Section II gives details about the mathematical modelling of BBS and servomotor. In Section III the concepts of full-state feedback controller for a desired specification is presented. In Section IV the design of Linear Quadratic controller is discussed. The stability analysis of the closed loop system is presented in section V. The simulated results are given in section VI. Finally conclusion is given in section VII.
II. MATHEMATICAL MODELLING A. Modelling of Ball and beam system The Ball and Beam system (BBS) is driven by the servomotor and the schematic is shown in Fig. 1. The beam consists of a steel rod in parallel with a nickel-chromium wire-wound resistor forming a track upon which a metal ball slides. One end of the beams is connected to the servomotor through a lever arm and gear train while the other end is fixed.
All rights reserved by www.grdjournals.com
249
Design of Optimal Controllers For a Ball & Beam System (GRDJE / CONFERENCE / ICIET - 2016 / 040)
Fig. 1: Schematic of ball and beam system
The two forces influencing the motion of the ball are Ftx Force due to translational motion
Frx
Force due to ball rotation The force due to translational motion is
Ftx m
d2x mx dt 2
The force due to rotational motion is
Frx J
Tr J d b J d (vb / R) J 2x R R dt R dt R
2 mR 2 5
Where the moment of inertia of the Ball is, Substituting for the moment of inertia of the ball, we get
Frx
2 mx 5
Applying the Newton‟s second law for forces along the inclination, we have
Frx Ftx mg sin
2 mx mx mg sin 5
Or
x
5 g sin 7
(1)
1) For small angle, sin , and (1) becomes
x
5 g 7
(2)
2) The arc distance traversed by the gear at radius r is equated to the arc distance traversed by the beam at radius L , hence
r L or
r L
x X ( s)
( s)
Where is Beam angle is Angle of gear m is Mass of the Ball R is Radius of the Ball
K S2
5 gr K 7L (3)
All rights reserved by www.grdjournals.com
250
Design of Optimal Controllers For a Ball & Beam System (GRDJE / CONFERENCE / ICIET - 2016 / 040)
B. Modelling of Servomotor The armature voltage equation is, Va t La
The torque balance equation is,
dia t dt
Ra ia t K m m
K g K m ia t J L BL
J L BL K g Km Ignoring armature inductance the armature voltage equation becomes, ia t
J BL Va t Ra L K g K m
K m Kg
2 K g K mVa S Ra J L S 2 BL S K m Kg S (S )
The transfer function of the servo motor including inertia and friction of load shaft is Km K g
(s) Va ( s )
Ra J eq 2 Beq K m2 K g2 S J Ra J eq eq
(4)
S
Or equivalently,
( s) Va ( s)
am S ( S bm )
(5)
Where
am
Km K g Ra J eq
,
bm
Beq J eq
K m2 K g2 Ra J eq
bm amVa
(6)
Parameter Beam length (L) in meter Lever arm offset (r) in meter Acceleration due to Gravity ( g ) in m/S2
Value 0.1675 0.0254
Armature resistance ( Ra ) in Ohms
2.6
Motor voltage constant ( K m )
0.00767
gear ratio ( K g )
70
9.84
Efficiency ( )
0.8
Equivalent moment of inertia ( J eq )Kg m
2
0.0023
Equivalent viscous friction B in Nm/rad/sec eq
4 103
Table 1: System parameters
The overall transfer function of the system is given as below: X ( s) 73 3 Va ( s) S ( S 40) The transfer function indicates that the open loop system is unstable due to the presence of multiple poles at origin. T
Let the state vector of the process be
x x and using equation (3) & (6) the state space model is obtained. x 0 x 0 0 0
1
0
0 K 0
0
0
0
0 x 0 0 x 0 V 1 0 a bm am
All rights reserved by www.grdjournals.com
251
Design of Optimal Controllers For a Ball & Beam System (GRDJE / CONFERENCE / ICIET - 2016 / 040)
x x y 1 0 0 0 The system parameters given in Table.1 are used for simulation purpose.
III. DESIGN OF FULL STATE FEEDBACK CONTROLLER The concept of feed-backing all the state variables back to the input of the system through a suitable feedback gain matrix in the control strategy is known as the full-state feedback (FSFB) control technique. In this approach, the desired location of the closedloop Eigen values (poles) of the system is assumed to attain the desired transient behaviour. Thus, the aim is to design a feedback controller that will move some or all of the open-loop poles of the measured system to the desired closed-loop pole location as specified. Hence, this approach is often known as the pole-placement control design. In order to perform the pole-placement design technique, the system must be a “completely state controllable”. The design algorithm is formulated on an assumption that the system is linear and parameters are precisely known, with constant coefficients.
Fig. 2: FSFB controller with pre compensator
The block diagram of FSFB controlled system is shown in Fig.2, which is composed of plant, state feedback gain matrix and a pre compensator which provides a set point gain factor. The primary need for adding set point gain is to compute new reference input that increases the speed of system response thus reduces the steady-state error to zero. The controllability property reveals that the system under consideration is controllable. n
4 30 ts
It is desired to have overshoot of less than 3% and settling time less than 0.2 seconds, which corresponds to a 30 . The closed loop poles p p p and p are thus chosen as 30 j30, 50, 200 .Now, the state feedback gains are and d 1, 2, 3 4 obtained by solving the equation given below
det sI A B K ( s p1 )( s p2 )( s p3 )( s p4 ) 0
The closed loop response with FSBF controller results in large steady state error, and in order to compensate for this error, a reference input compensation is included. The state space model and output equation of the closed loop system with set point gain is, x 0 1 0 0 x 0 x x 0 0 1.1 0 0 Va 0 0 0 1 0 16360000 954500 26800 310 16360000
y = 1
0 0 0 x x θ θ The state space model given above is used to carry out simulation as shown in Fig.2. The state feedback gains for various pole locations are evaluated and listed in Table 2, which indicates that as the dominant poles are moved farther from imaginary axis, the speed of response increases. The state space model given above is used to carry out simulation as shown in Fig.2. Closed loop pole location
50, 200 & 30 j 30
T
State feedback gains
246070
14350 400 3
Set point gain
VGM in dB
246070
8.5
All rights reserved by www.grdjournals.com
252
Design of Optimal Controllers For a Ball & Beam System (GRDJE / CONFERENCE / ICIET - 2016 / 040)
50, 200 & 10 j10 50, 200
27341
3418 229 3
27341
10.6
6835.3 1538 188.7 3 6835.3 12.4 & 5 j5 Table 2: Full state feedback controller gains for various pole locations
IV. LINEAR QUADRATIC CONTROLLER DESIGN Linear Quadratic controller plays a vital role in many control design methods (Wilson 1996; Zadeh 1963; Ogata 2002). The theory of optimal control is concerned with operating a dynamic system at minimum cost. In linear quadratic problem the system dynamics are described by a set of linear differential equations and the cost is described by a quadratic function. Linear Quadratic controller ensures better system stability than pole placement design. The performance index (PI) is given by,
J [ xT Qx u T Ru ]dt
0 (7) Where Q is a nonnegative-definite matrix that penalizes the departure of system states from the equilibrium and R is a positive-definite matrix that penalizes the control input. The objective is to select the optimal state feedback controller gains. The selection of matrix Q & R is designer‟s choice. Depending on the choice of these matrices, the closed loop system will exhibit different set point tracking responses. Selecting „Q‟ large, keeps „J‟ small so that the states are smaller. Small values of „R‟ make the control effort less, so that the performance index „J‟ given in equation (7) becomes small. Larger values of „Q‟ and smaller values of „R‟ results in location of closed loop poles far away from the origin which guarantees relative stability. Consider a system described by the state space equation
X A X B u & y C X d u The optimal control minimising „J‟ is given by the linear feedback law U (t ) K X (t ) 1 T with K R B P ,where ‟P‟ is the unique positive definite solution to the Algebraic Ricattic Equation (ARE) given by equation
AT P PA Q PBR1BT P 0 T Let the scalar function be, V ( x) X PX with V ( x) 0
V ( x) is, V ( x) X T PX X T PX T T Now , V ( x) ( AX Bu ) PX X P( AX Bu ) The time derivative of
V ( x) X T ( AT P PA) X uT BT PX X T PBu T 1 T From ARE we have, A P PA Q PBR B P T T T T 1 T We get, V ( x) ( X QX u Ru ) ( B PX Ru ) R ( B PX Ru )
Integrating
V ( x) we get
0
0
T T 1 T V ( x)dt J (B PX Ru) R (B PX Ru)dt
J X T (0) PX (0) ( BT PX Ru )T R 1 ( BT PX Ru )dt 0 1
Minimum value of „J‟ is achieved when
U R B PX KX .The design procedure is described by the following steps: T
The weighting matrices Q and R are selected. The Algebraic Ricatic Equation (ARE) is solved to get P matrix. The linear quadratic controller gain (K) is computed. The time response of the system is simulated. If the transient specifications are not met, then the weight matrices are tuned. The value of Q is chosen as, Q diag[5, 0, 0, 0] and R is varied as R=0.1, 0.01, 0.001. With this setting the linear quadratic controller gains and Eigen values are evaluated using the command [K,P,E] = lqr(A,B,Q,R)and listed in Table.3 which indicates that small values of „R‟ moves the Eigen values farther from imaginary axis, thereby increases the speed of response
All rights reserved by www.grdjournals.com
253
Design of Optimal Controllers For a Ball & Beam System (GRDJE / CONFERENCE / ICIET - 2016 / 040)
R
LQR gains
0.1
7.07
6.2 3 0.071
0.01
22.36
13.52 4.5 0.104
0.001
70.7
29.7 6.84 0.152
Eigen Values
Set point gain
40, 2.35 & 1.17 j 2.03
VGM in dB
7.07
30.87
22.36
17.59
70.71
6.87
40, 3.45 & 1.71 j 2.98 40, 5.1 & 2.5 j 4.37
Table.3: Linear quadratic controller gains for various weight matrices.
V. STABILITY ANALYSIS According to Franklin et al (2006), vector gain margin (VGM) is a single margin parameter that combines gain and phase margins into a single measure. This quantity eliminates the ambiguities that exist with the gain margin and phase margin combination in relation to analyzing stability of a system. The original idea of VGM was proposed by Smith (1958) as cited in the work by Franklin et al (2006) is adopted in this work. The vector margin or stability margin is the minimum distance from the Nyquist plot to the point (-1+j0) and the idea is illustrated graphically n Fig.3. Recent advances in computing facility have made measurement of VGM feasible which was not been used in the past extensively due to difficulties in computing it.
Fig. 3: Robustness measure using vector gain margin
S
1 1 G ( s )Gc ( s )
VGM is linked with sensitivity function as the maximum of Equation . The reasonable values of VGM for good closed loop system stability is
1 9.5 dB 3.5 dB max 1 L( j pc ) Where
L( j pc )
1 1 L( j pc )
as given in
(8)
is the loop gain at the phase cross over frequency. The above VGM-based stability assessment is carried out for the proposed control schemes and the results are tabulated in Table 2 & 3. The tabulation shows that the state feedback controller with greater dominant pole value and linear quadratic controller with very small „R‟ value yields VGM value which is well within the tolerance as specified in equation (8).
VI. SIMULATION RESULTS The state feedback gains and pre compensator gains are evaluated using MATLAB code. The open loop response of the designed system is shown in Fig.4.and which indicates that, the open loop system is stable but set point tracking is not achievable. The response of the FSFB controller with and without set point gain for various values of pole location is shown in Fig.5& Fig.6 respectively for step change in set point. The response of the linear quadratic controller for various values of „R‟ is shown in Fig.7& Fig.8 respectively for step change in set point. The magnitude plot of the closed loop system for various values of pole location and for various values of „R‟ is shown in Fig.9&10. Further the magnitude plot indicates that greater dominant pole value and very small „R‟ value yields increased gain margin (GM). The higher GM results in greater bandwidth which leads to increase in speed of response. The Nyquist plot
All rights reserved by www.grdjournals.com
254
Design of Optimal Controllers For a Ball & Beam System (GRDJE / CONFERENCE / ICIET - 2016 / 040)
of the closed loop system with proposed controllers is presented in Fig.11 & Fig.12. As all the contours corresponding to the loop transfer function does not encloses the -1+j0 point, stability is assured
Fig. 4: Open loop step response of BBS connected with servo motor
Fig. 5: FSFB controller Servo response without pre compensator
Fig. 6: FSFB controller Servo response with pre compensator
All rights reserved by www.grdjournals.com
255
Design of Optimal Controllers For a Ball & Beam System (GRDJE / CONFERENCE / ICIET - 2016 / 040)
Fig. 7: Linear Quadratic controller servo response without pre compensator
Fig. 8: Linear Quadratic controller servo response with pre compensator
Fig. 9: Bode magnitude plot of FSFB controller with pre compensator
All rights reserved by www.grdjournals.com
256
Design of Optimal Controllers For a Ball & Beam System (GRDJE / CONFERENCE / ICIET - 2016 / 040)
Fig. 10: Bode magnitude plot of LQC with pre compensator
Fig. 11: Nyquist plot of FSFB controller with pre compensator
Fig. 12: Nyquist plot of LQC with pre compensator
All rights reserved by www.grdjournals.com
257
Design of Optimal Controllers For a Ball & Beam System (GRDJE / CONFERENCE / ICIET - 2016 / 040)
VII.
CONCLUSION
The proposed algorithm is demonstrated for BBS with servomotor. It has been shown that, FSFB controller with pre compensator tracks the set point with desired settling time. Also it exhibits less overshoot than LQC. The performance summary given in Table 4 indicates that, the time domain specifications are close to the desired specifications with FSFB controller than with LQC. The stability of the closed loop system is more for LQC than with FSFB controller. Parameter
FSFBC
LQC
Settling time Rise time
0.15 sec 0.07 sec
1.33 sec 0.455 sec
Peak time % overshoot
0.146 sec 2.04%
1 sec 8.22%
Table 3: Comparison of Time domain Specifications
REFERENCES [1] J. Hauser, S. Sastry, and P. Kokotovic, “Nonlinear control via approximate input-output linearization the ball and beam example,” Institute of Electrical and Electronics Engineers, Transactions on Automatic Control, vol. 37, no. 3, pp. 392–398, 1992. [2] Z.H Pang, G. Zheng and C.X. Luo, “Augmented State Estimation and LQR Control for a Ball and Beam System”, Proc. of the 6th IEEE Conference on Industrial Electronics and Applications., pp.1328-1332, June 21-23, 2011. [3] H. Verrelst, K. Van Acker, J. Suykens, B. Motmans, B. De Moor and J. Vandewalle, “Neural Control Theory: Case Study for a Ball and Beam System”, Proc. of the European Control Conference Brussels, Belgium, July –4, 1997. [4] S.K Oh, H.J. Jang and W. Pedrycz, “The Design of a Fuzzy Cascade Controller for Ball and Beam System: A Study in Optimization with the Use of Parallel Genetic Algorithms”, Engineering Applications of Artificial Intelligence, Vol. 22, pp. 261–271, 2009. [5] Y.H. Chang, C.W. Chang, C.W. Tao, H.W. Lin and J.S. Taur, “Fuzzy Sliding-mode Control for Ball and Beam System with Fuzzy ant Colony Optimization”, Expert Systems with Applications, Vol. 39, No. 3, pp. 3624-3633, 2012. [6] “Ball and Beam Experiment and Solution,” Quanser Consulting, 1991.
All rights reserved by www.grdjournals.com
258