Microsoft Word - 10-2708_s_ETASR_V9_N3_pp4125-4130 Engineering, Technology & Applied Science Research Vol. 9, No. 3, 2019, 4125-4130 4125 www.etasr.com Aydogdu & Levent: Kalman State Estimation and LQR Assisted Adaptive Control Of a Variable Loaded … Kalman State Estimation and LQR Assisted Adaptive Control Of a Variable Loaded Servo System Omer Aydogdu EEE Department Konya Technical University Konya, Turkey oaydogdu@ktun.edu.tr Mehmet Latif Levent EEE Department Faculty of Engineering, Hakkari University Hakkari, Turkey. mehmetlatiflevent@hakkari.edu.tr Abstract—This study actualized a new hybrid adaptive controller design to increase the control performance of a variable loaded time-varying system. A structure in which LQR and adaptive control work together is proposed. At first, a Kalman filter was designed to estimate the states of the system and used with the LQR control method which is one of the optimal control servo system techniques in constant initial load. Then, for the variable loaded servo (VLS) system, the Lyapunov based adaptive control was added to the LQR control method which was inadequate due to the constant gain parameters. Thus, it was aimed to eliminate the variable load effects and increase the stability of the system. In order to show the effectiveness of the proposed method, a Quanser servo module was used in Matlab-Simulink environment. It is seen from the experimental results and performance measurements that the proposed method increases the system performance and stability by minimizing noise, variable load effect and steady-state error. Keywords-adaptive control; Lyapunov method; LQR; Kalman filter; VLS system I. INTRODUCTION Estimating the state variables in state feedback control systems at trust values is very important in terms of system performance and efficiently working of the system. Immeasurable state variables are generally obtained by the state observers. If the system is stable, the observer used is called a deterministic observer. Otherwise, it becomes a random observer. Luenberger and Kalman type observers are widely used. Luenberger observer (LO) belongs to the deterministic observer class and Kalman filter (KF) to the random observer class. Basic KFs can only be applied to linear random systems [1]. Accordingly, KFs are expressed as a mathematical method that can minimize the disruptive effects and estimate the states by reducing the root-mean-square error. This filter’s structure is especially used in space and military technology, robotics and trajectory control applications, artificial neural networks and different hybrid controller designs [2-5]. LQR that aims to minimize the errors that occur in state output value can also be called as linear optimal state feedback control in time-invariant systems. This is a technique that increases system performance and stability [6]. At the same time, the optimal control input is produced by using controller gain coefficients computed by the LQR method. And so, a response curve close to the desired reference value is obtained [7, 8]. LQR control is used with a KF that estimates the real states of the system in noisy environments in state feedback servo control systems [9, 10]. Lyapunov stability criteria and MIT rule are frequently used methods in designing traditional adaptive control systems to increase the system stability in time varying systems. This method organizes the parameter values based on a reference model output value and aims to increase the system performance against destructive effects [11]. Lyapunov based adaptive control method is generally more effective on system performance and is preferred in various fields and control mechanisms, e.g. position control of permanent magnet synchronous motor [12], X-Y table experimental platforms control [13, 14], and DC motor speed control [15]. II. MODELLING OF THE VLS SYSTEM A rotary servo system that can change the load in time was used in the experiments. In industrial applications, permanent magnet DC (PMDC) motors are widely used as actuators for electromechanical energy conversion [16]. They directly provide rotary motion or moment and, coupled with wheels or drums and cables, can provide transitional motion or force. VLS plant and PMDC motor parameters are given in Table I. The differential equations based on Newton's law combined with Kirchhoff's law regarding the system are: ( ) ( ) ( ) ( ) a a b di t u t R i t L e t dt = + + (1) ( ) ( ) ( ) ( )mm m m m l dw t t J B w t t dt τ τ= + + (2) ( ) ( ) mm d t w t dt θ = (3) where ( )i t is the armature current, ( )be t is the back EMF voltage, ( )m tτ is the produced motor torque, ( )l tτ is the load torque, ( )m tθ is the angle of the armature, ( )mw t is the angular velocity of the armature [17]. The produced motor torque ( )m tτ is related to the armature current ( )i t by a constant factor tk , and the back EMF ( )be t Corresponding author: Omer Aydogdu Engineering, Technology & Applied Science Research Vol. 9, No. 3, 2019, 4125-4130 4126 www.etasr.com Aydogdu & Levent: Kalman State Estimation and LQR Assisted Adaptive Control Of a Variable Loaded … is related to the rotational velocity of the armature ( )mw t by a constant factor mk as given by (4)-(5): ( ) ( ) m t t k i tτ = (4) ( ) ( )b m me t k tω= (5) TABLE I. VLS SYSTEM AND LOAD PARAMETERS Symbol Definition Value u(t) PMDC motor voltage 6Volt Ra Motor armature resistance 2.6Ohm La Motor armature inductance 0.18mH kt Motor torque constant 0.00767N.m/A kb Motor back-EMF constant 0.00767Volt/(r/s) n Total gear ratio (N1/N2) 70 g η Gearbox efficiency 0.90 Jm Motor inertia 4.6x10 -7 kg.m 2 Bm Motor viscous coefficient ≅0 (negligible) Jl_in Initial load and gearbox moment of inertia 4.83x10 -7 kg.m 2 Jl_sub Subsequent load and gearbox moment of inertia 3.41x10 -3 kg.m 2 Bl_in Initial load viscous damping coefficient 4.41x10 -6 N.m/(r/s) Bl_sub Subsequent load viscous damping coefficient 4x10 -2 N.m/(r/s) In the VLS system, angular velocity of the load, ( )lw t , transmitted by the gear box from armature velocity, ( )mw t and equivalent armature load torque ( )l tτ , may be expressed as: 1 ( ) ( ) l m w t w t n = (6) 2 ( )1 ( ) ( ( )) m l l l m g dw t t J B w t dtn τ η = + (7) where η is the total gear ratio and ηg is the gearbox efficiency. If (7) is substituted in (2), the general moment expression for the motor is obtained as: 2 2 ( ) ( ) ( ) ( ) ( ) l m l m m m m g g J dw t B t J B w t dtn n τ η η = + + + (8) The following equations are obtained for the state space expression of the system by using (1), (3), (4), (5) and (8): ( ) 1 ( ) ( ) ( ) a b m a a a R kdi t i t w t u t dt L L L = − − + (9) ( ) ( ) eqm t m eq eq Bdw t k i t w dt J J = − (10) ( ) ( )m m d t w t dt θ = (11) where 2η = + leq m g J J J n and 2η = + leq m g B B B n . If (9)-(11) are arranged in the state space model and the armature angle is accepted as the output, the state space expression of the servo system is obtained as (12) and (13): ( ) ( ) ( )x t Ax t Bu t= +� (12) ( ) ( )y t Cx t= (13) where state variables are defined as: 1 1 2 3 ( ) ( ) ( ) ( ) ( ) ( ) ( ) m m x t i t x t x t w t x t tθ        = =           and the state, input and output matrices are obtained as; [ ] 0 1 0 , 0 , 0 0 1 . 0 0 1 0 a b a a a eqt eq eq R k L L L Bk A B C J J   − −           = − = =                III. STATE ESTIMATION WITH KALMAN FILTER Kalman filter is a method that estimates the states and the desired output of the system by using the control input signal u(t) and the noisy system output signal y(t). Figure 1 shows the basic block diagram of this method, where ˆ( )x t represents the estimation state output, ˆ( )y t shows the estimation position (trajectory) output, ( )w t shows the process noise stemming from the deviations occur in the system model and ( )v t indicates the measurement noise stemming from the problems in measurements. Fig. 1. Block diagram of the state estimation with Kalman filter Linear difference equations (14) and (15) were used to estimate the states of the discrete-time Kalman filter [18]: 1 1 1k k k kx Ax Bu w− − −= + + (14) k k kz Hx v= + (15) where kz refers the real measurement value, kw shows the process noise and kv represents the measurement noise. Kalman filter has two different equation groups. One of them consists of the time update equations that perform estimations of current situations and available error covariance. The other type of equations is the measurement update equations that perform the estimations of states to be used for the feedback. Time update equations are known as “estimating equations” and the measurement update equations are known as the “corrector equations”. Time and measurement updating systems of the cycle belonging to the Kalman filter are given in Engineering, Technology & Applied Science Research Vol. 9, No. 3, 2019, 4125-4130 4127 www.etasr.com Aydogdu & Levent: Kalman State Estimation and LQR Assisted Adaptive Control Of a Variable Loaded … summary in Figure 2, where ˆkx shows the estimated states and ˆ− kHx indicates the measurement value estimated. Kk matrix known as the gain value, with n×m dimensions, minimizes the next error covariance equality. In addition, noise covariance matrix Q and measurement noise covariance matrix R should be defined for the estimation. Fig. 2. Kalman filter cycle IV. LQR ASSISTED, LYAPUNOV BASED, ADAPTIVE CONTROL OF A VLS SYSTEM The block diagram of the system performed in this study is given in Figure 3. The system consists of Kalman state estimation, LQR control and adaptive control sub-blocks. As the Figure shows, adaptive control is added to the LQR controlled system. In this way, the control signal (u) is the sum of the adaptive control signal u1 and the LQR signal u2. In the system, servo system’s states that are purified from the noise are estimated by the KF and the state space feedback of the system is actualized by the optimal K value computed by LQR for initial load [10]. In addition, adaptive control was added to eliminate the effects of the changing load parameters. Proper selection of the parameter values that affect the system response is crucial for the system stability and performance in Lyapunov’s stability theory. The transfer function of the servo system by taking the Laplace transformation of (1), (3), (8) is obtained as (16). La is neglected because it is very small [19]. ( ) ( ) ( ) = + Y s b U s s s a (16) where b and a coefficients are obtained as: t a eq k b R J = , . a eq t b a eq R B k k a R J + = Fig. 3. State estimation with KF and LQR assisted adaptive control system Accordingly, there is a need to know a quadratic system, a quadratic reference model, and the mathematical definitions belonging to the control input based on the controller parameters. Let’s assume that these are defined as reference model in (17), plant model in (18) and adaptive control signal in (19) [20]: 2 2 m m m m d y dy a b r dtdt = − + (17) 2 12 d y dy a bu dtdt = − + (18) 1 1 2 dy u r dt θ θ= − (19) where, θ1 and θ2 refer the control parameters, y is the plant output, ym is the reference model output, and r is the reference input signal. The tracking error of the control system is given in (20): me y y= − (20) By subtracting the (17) from (18), we get: 2 12 ( ) m m m dyd e dy a bu a b r dt dtdt = − + − − + (21) Equation (22) is obtained as below if (19) is written instead of u1 statement in (21): 2 1 22 m m m dyd e dy dy a b r a b r dt dt dtdt θ θ   = − + − + −    (22) If we add and subtract m dy a dt statement to both sides of equilibrium in (22) and necessary mathematical operations are performed, the derivative equation of the error is found in (23): ( ) ( )2 1m m m de a e b a a y b b r dt θ θ= − − + − + − (23) In (23), the required conditions need to be found for trajectory error to converge to zero. Those conditions are provided by 2 mb a aθ = − and 1 mb bθ = equations. Control parameters should be well organized to increase system performance. Lyapunov function that is given in (24) is used to obtain the desired parameter values: ( ) ( ) ( ) 22 1 2 2 1 2 1 2 1 1 , , ( 2 1 ) θ θ θ γ θ γ = + + − + + − m m v e e b a a b b b b (24) In (24), Lyapunov adaptation gain values are defined by γ1 and γ2. Because they are greater than zero, 1bγ and 2bγ values are greater than zero. In this case, (25) can be written: ( ) ( ) ( )22 12 1 2 1 2 1 , , 2 2 2 m mb a a b b v e e b b θ θ θ θ γ γ + − − = + + (25) According to Lyapunov stability theory, the Lyapunov function needs to be bigger than zero for the system to be stable Engineering, Technology & Applied Science Research Vol. 9, No. 3, 2019, 4125-4130 4128 www.etasr.com Aydogdu & Levent: Kalman State Estimation and LQR Assisted Adaptive Control Of a Variable Loaded … [11]. Moreover, the derivative of the same function needs to be smaller than zero. The following equations can be obtained when the derivative of this function is taken: ( ) ( ) 2 2 1 1 1 2 1 1 θ θ γ θ θ γ = + + − + − m m ddV de e b a a dt dt dt d b b dt (26) ( ) ( ) 2 2 2 1 1 1 2 2 1 θ θ γ θ θ γ γ   = − − + − − +      + − +    m m m ddV a e b a a ye dt dt d b b re dt (27) By reference to (27), the derivative expression of the function becomes smaller than zero if the parameter values are obtained. Accordingly, the stability condition of the system is ensured, if the parameters are updated as follows: 1 2 θ γ= − d re dt (28) 2 1 θ γ= d ye dt (29) 2 1 γ θ = re s (30) 1 2 γ θ = ye s (32) where θ1 and θ2 are the control parameters with adjustable gains γ1 and γ2. In conclusion, the system becomes stable if a proper controller design is provided in (30) and (31). Adaptation gain parameters should be selected according to the adaptation rate of the system [21]. Linear quadratic regulator (LQR) provides an optimal control law for a linear system with a quadratic performance index. The LQR gain value (K), that provides optimal state feedback in the system is found in the solution of the Riccati equation given by (32) [22]: 1 0 T T PA A P Q PBR B P −+ + − = (32) The matrix P obtained from the solution of the Riccati equation is replaced by (33) and the LQR gain value K is calculated. Then using this K value, the u2 control signal is calculated as given in (34). 1 T K R B P −= (33) 2 ˆ( ) ( )u r t Kx t= − (34) where ˆ( )x t is the estimation state vector, Q is the state weighting matrix and R is the input weighting matrix as in KF. V. SIMULATION RESULTS The block diagram of the Kalman state estimation and the LQR assisted adaptive control system is given in Figure 3. As seen from the figure, the control signals (u) is the sum of the adaptive controller output signal (u1) and LQR output signal (u2) given by (19) and (34). LQR and adaptive controllers are designed for initial load (Jl_in, Bl_in) in the experimental system. The load was kept constant at the first experiment, and the system output responses were obtained separately for LQR (not included adaptive control) and proposed LQR assisted adaptive control. In the second experiment, the system load was changed to Jl_sub and Bl_sub at 110 seconds and the response curve was obtained for the LQR assisted adaptive control system. The initial load values are given as 7 2 _ 4.83 10 −=l inJ x kgm and 6 _ 4.41 10 / ( / s) −=l inB x Nm r in Table I. In this case the VLS system parameters A, B, C are obtained as: [ ] 4 14444, 44 42.61 0 5555.56 16670 21.73 10 0 , 0 0 1 0 0 0 0 1 . A x B C − − −       = − =          = Also, if we choose the R and Q parameters for the Kalman filter and LQR control as follows, the LQR gain is found as [ ]1.1036 0.9926 1=K . 3 0 0 0 3 0 , 3. 0 0 3 Q R    = =     In the design of the Lyapunov based adaptive control system, a 2 nd order system given in (35) is used as a reference model. 2 60 ( ) 15 60 mG s s s = + + (35) In the first experiment, while the load was kept constant at the initial value, performance measurements of the LQR control and LQR assisted adaptive control were obtained as given in Table II. It is seen that the proposed LQR assisted adaptive control system gives better performance values than the pure LQR control. The effects of the LQR and LQR assisted adaptive control on the system are shown in Figure 4 and a zoom area of Figure 4 is shown in Figure 5. Error change is shown in Figure 6 and parameter changes are given in Figure 7 for the LQR assisted Lyapunov based adaptive control method. Fig. 4. Results obtained from the LQR and LQR assisted adaptive control method in a time-unvarying system Engineering, Technology & Applied Science Research Vol. 9, No. 3, 2019, 4125-4130 4129 www.etasr.com Aydogdu & Levent: Kalman State Estimation and LQR Assisted Adaptive Control Of a Variable Loaded … Fig. 5. A magnified area of Figure 4 Fig. 6. Error change in LQR assisted adaptive control system Fig. 7. Parameter changes in LQR assisted adaptive control system In the second experiment, the load values are changed to 3 2 _ 3.41 10 −= l sub J x kgm and 2 _ 4 10 / ( / s) −=l subB x Nm r in the 110 th second to generate variable load. Adaptation gains were taken the same as 1 30.5γ = and 2 21.2γ = (Table II). The response of the LQR assisted adaptive control system is given in Figure 8. The effect of the variable load occurring at the 110 th second is clearly seen. The effect of variable load on parameter changes is shown in Figure 9 and the error change is given in Figure 10 for the LQR assisted Lyapunov based adaptive control method. Fig. 8. Result obtained from the LQR assisted adaptive control method in variable load at the 110 th second Fig. 9. Effect of variable load on parameter changes in the 110 th second Fig. 10. Error change in LQR assisted adaptive control system for varying load at the 110 th second TABLE II. PERFORMACE MEASUREMENTS Method γ1 γ2 ISE IAE ITAE LQR Control - - 3,058 7.802 885.5 LQR adaptive control 30.5 21.2 1,2 3.029 294.2 VI. CONCLUSIONS This research designed a new control system with LQR assisted, Lyapunov based, adaptive control that compensates disruptive effects like noise and variable load and increases system performance. This controller structure has been successfully used in the trajectory control of a servo system that can change the load over time. The system can estimate the states of the time-varying servo system, so, the disruptive effects can be minimized. A stable system design that can comply with the environmental conditions was prepared. It is seen by the experimental results that the proposed method gives very good results in controlling systems that are exposed to the adverse effects like variable load. Actually, the proposed system compensates well in time-varying systems, so, the system is beneficial in optimal controlling of the system. The error between the system output response and the reference input signal is minimized in time as shown in Figure 10. It is understood from the results that the system control parameters can adapt in time. REFERENCES [1] G. Bishop, G. Welch, An Introduction to the Kalman Filter, ACM, 2001 [2] B. O. Teixeira, M. A. Santillo, R. S. Erwin, D. S. Bernstein, “Spacecraft tracking using sampled-data Kalman filter”, IEEE Control Systems Magazine, Vol. 28, No. 4, pp. 78-94, 2008 [3] M. E. Hough, “Precise orbit determination using satellite radar ranging”, Journal of Guidance, Control, and Dynamics, Vol. 35, No. 4, pp. 1048- 1058, 2012 Engineering, Technology & Applied Science Research Vol. 9, No. 3, 2019, 4125-4130 4130 www.etasr.com Aydogdu & Levent: Kalman State Estimation and LQR Assisted Adaptive Control Of a Variable Loaded … [4] J. R. Vetter, “Fifty years of orbit determination”, Johns Hopkins APL Technical Digest, Vol. 27, No. 3, pp. 239-252, 2007 [5] H. Chen, G. Chen, E. Blasch, K. Pham, “Comparison of several space target tracking filters”, in: Sensors and Systems for Space Applications III, Vol. 7330, pp. 73300I-1 - 73300I-12, SPIE, 2009 [6] H. H. Bilgic, M. A. Sen, A. Yapici, M. Kalyoncu, “Dofrusal Ters Sarkacin Denge Kontrolu Icin Yapay Sinir Agi Tabanli Bulanik Mantik & LQR Kontrolcu Tasarimi”, Otomatik Kontrol Ulusal Toplantisi Bildiriler Kitabi, Kocaeli, Turkey, July 11-13, 2014 (in Turkish) [7] J. Arslan, G. Muhurcu, “Speed Control of Direct Current Motor with Linear Quadratic Gaussian Control”, Elektrik – Elektronik – Bilgisayar ve Biyomedikal Muhendisligi Sempozyumu–(ELECO 2014), Bursa, Turkey, November 27-29, 2014 [8] D. Grewal, “Kalman Filtering”, in: International Encyclopedia of Statistical Science, Springer, 2011 [9] S. Tunyasrirut, V. Kinnares, J. Ngamwiwit, “Performance improvement of a slip energy recovery drive system by a voltage-controlled technique”, Renewable Energy, Vol. 35, No. 10, pp. 2235-2242, 2010 [10] Y. Zhi, G. Li, Q. Song, K. Yu, J. Zhang, “Flight control law of unmanned aerial vehicles based on robust servo linear quadratic regulator and Kalman filtering”, International Journal of Advanced Robotic Systems, Vol. 14, No. 1, 2017 [11] S. Pankaj, J. S. Kumar, R. K. Nema, “Comparative analysis of MIT rule and Lyapunov rule in model reference adaptive control scheme”, Innovative Systems Design and Engineering, Vol. 2, No. 4, pp. 154-162, 2011 [12] F. J. Lin, S. G. Chen, I. F. Sun, “Adaptive backstepping control of six‐ phase PMSM using functional link radial basis function network uncertainty observer”, Asian Journal of Control, Vol. 19, No. 6, pp. 2255-2269, 2017 [13] H. Wang, X. Zhao, Y. Tian, “Trajectory tracking control of XY table using sliding mode adaptive control based on fast double power reaching law”, Asian Journal of Control, Vol. 18, No. 6, pp. 2263-2271, 2016 [14] W. L. Mao, C. W. Hung, S. Suprapto, “Adaptive fuzzy trajectory control for biaxial motion stage system”, Advances in Mechanical Engineering, Vol. 8, No. 4, 2016 [15] B. Rashidi, M. Esmaeilpour, M. R. Homaeinezhad, “Precise angular speed control of permanent magnet DC motors in presence of high modeling uncertainties via sliding mode observer-based model reference adaptive algorithm”, Mechatronics, Vol. 28, pp. 79-95, 2015 [16] O. Aydogdu, O. Alkan, “Adaptive control of a time-varying rotary servo system using a fuzzy model reference learning controller with variable adaptation gain”, Turkish Journal of Electrical Engineering & Computer Sciences, Vol. 21, No. 2, pp. 2168-2180, 2013 [17] C. Kasnakoglu, “Modeling and control of flow problems by adaptation- based linear parameter varying models”, Turkish Journal of Electrical Engineering & Computer Sciences, Vol. 18, No. 5, pp. 819-852, 2010 [18] F. L. Lewis, L. Xie, D. Popa, Optimal and Robust Estimation, CRC Press, 2007 [19] E. Flores, R. E. Castro, L. F. Chaves, “Conventional compensators design using Newton's method”, 11th World Congress on Intelligent Control and Automation, Shenyang, China, June 29-July 4, 2014 [20] M. Pal, G. Sarkar, R. K. Barai, T. Roy, “Design of different reference model based model reference adaptive controller for inversed model non-minimum phase system”, Mathematical Modelling of Engineering Problems, Vol. 4, No. 2, pp. 75-79, 2017 [21] P. Swarnkar, S. Jain, R. K. Nema, “Effect of Adaptation Gain in Model Reference Adaptive Controlled Second Order System”, Engineering, Technology & Applied Science Research, Vol. 1, No. 3, pp. 70-75, 2011 [22] S. B. Roland, Advanced Control Engineering, Burterworth-Heinemann, 2001 AUTHORS PROFILE O. Aydogdu received his BE from the Department of Electrical and Electronics Engineering, Selcuk University, Konya, Turkey, in 1995, and his MSc and PhD degrees from Graduate School of Natural Sciences, Selcuk University, Konya, Turkey, in 1999 and 2006, respectively. Currently he is an Associate Professor in the Faculty of Engineering and Natural Sciences at Konya Technical University. He has many publications in different areas of control engineering. M. L. Levent received his BSc degree from the Department of Electronics and Communication Engineering, Kocaeli University, Kocaeli, Turkey, in 2011, and his MSc degree from the Graduate School of Natural Sciences, Selcuk University, Konya, Turkey, in 2016. He continues his PhD. studies at the Institute of Graduate Education, Konya Technical University, Konya, Turkey. Currently he is an Research Assistant in Hakkari University, Hakkari, Turkey. His fields of interest are learning control, adaptive control and optimal state feedback control.