You are on page 1of 6

2017 International Conference on Mechanical, System and Control Engineering

Optimal Position Control of a DC Motor Using LQG with EKF

Aravind M. A., Niranjan Saikumar, Dinesh N. S.


Indian Institute of Science
Bangalore, India
e-mail: aravindma1990@gmail.com

Abstract—This paper deals with the implementation of the like the PID Controller and the Fuzzy Logic Controller (FLC)
Linear Quadratic Gaussian (LQG) with an Extended Kalman respectively [3]. LQR has also been used to improve the PID
Filter (EKF) for the position control of a PMDC motor. LQG is model for speed control [4] [5] and other adaptive controllers
a popularly used linear optimal control technique in literature. like feedback linearization [6] and sliding mode [7] for
However, the direct implementation of LQG with the use of the position control of DC motor.
Kalman Filter as the optimal estimator is incapable of However, LQR requires full state feedback which might
adapting to changes in the system parameters which results in not be possible for all systems and might require the use of
a deviation from the expected optimal performance. EKF an estimator. Kalman filter (KF) is an optimal estimator
allows for the estimation of the system parameter values along popularly used in the industry for a variety of applications.
with the unknown states of the system. The estimated values Linear Quadratic Gaussian (LQG) is a linear optimal
are used to constantly update the plant model and calculate the
controller which combines LQR for control and KF for state
gains for optimal performance. The effectiveness of this
estimation. LQG has been implemented for position and
technique on the DC motor position control system for various
speed control of DC servo motor without adaptation [8].
changes in system parameter values is studied in this paper
and compared with the performance of a simple Kalman Filter
While LQG is capable of providing robust and optimal
to show the improvement in performance. The results show control of the system, the controller is inherently non-
improvements in both step responses and tracking adaptive. Significant changes in the system parameters can
performances with the use of the EKF estimator along with the lead to deterioration in the performance of the system, since
LQG controller. the internal mathematical model used for state estimation and
gain calculation will deviate from the actual external system.
Keywords–optimal control system; linear quadratic gaussian; An Extended Kalman Filter (EKF) which considers the
extended kalman filter; position control; DC motor parameters of the system as states and can be used for
parameter value estimation has been studied in literature for
various systems [9]. However, these concepts have not been
I. INTRODUCTION
studied for the development of an adaptive robust optimal
DC motors are used commonly in many velocity and controller.
position control applications, especially in the field of In this paper, the design of an LQG controller with an
robotics. Many different control algorithms exist for the EKF for parameter estimation is studied on position control
robust control of position and velocity of the DC motor. The for a DC motor system. Sec. II introduces design of the LQR
Proportional Derivative (PD) algorithm is the most widely controller for position control system and Kalman filter for
used controller for position control because of ease of state estimation along with simulation results. In Sec. III,
implementation and cost effectiveness. However, the main these concepts are extended to obtain the design of the EKF
disadvantage of PD algorithm is that it requires precise for parameter estimation. The results are presented and
tuning and cannot adapt to changes in system parameters. discussed for step responses and tracking in Sec. IV.
While the PD algorithm is either tuned manually or using
response based software in the industry even today, several II. LINEAR QUADRATIC REGULATOR
other control techniques in literature make use of the A typical state space equation in its discrete form is as
mathematical model of the system to achieve accurate shown in (1).
control. (1)
The DC motor position control system is a well-studied
system in literature, where the system transfer function and
state space equations are well known. In such cases, A. State Space Model of DC Motor
controllers which utilize the system model knowledge to A DC motor translates voltage applied across its
derive the control law offer the advantages of design terminals, to rotary motion as shown in Fig. 1. The equations
complexity, hardware realization and adaptivity [1] [2]. governing the dynamics of the DC motor system [10] are
Linear Quadratic Regulator (LQR) is a linear optimal
controller that uses the state space model for deriving the
control. The measured state variables of the system are used (2)
to derive the control law. Position control of DC motors
using LQR has been found to be more robust in comparison
to other non-adaptive controllers and adaptive controllers

978-1-5090-6530-1/17/$31.00 ©2017 IEEE 149


where Vin is the applied input voltage to the motor, θm is the The weight matrix Qlqr is chosen as CTC and Rlqr is
position as measured by the sensor, Lm and Rm are the chosen to be 0.5 for best response. The gain K, is generated
armature inductance and resistance respectively, Jm and Bm in MATLAB using the DARE function by passing matrices
are the total inertia and viscous friction coefficient as A, B, Qlqr and Rlqr as function parameters. K is obtained as a
experienced by the motor respectively, Kt is the torque vector [0.1942, 0.8989, 129.6455].
constant, Kb is the back emf constant and Vemf is the back emf The response to step changes in demand can be seen in
voltage. Fig. 2. Static friction was changed at the load by using a
In SI Units, Kt = Kb. For the state space model, the variable transmission block in SIMULINK. LQR control
measurable states are current Ia in Amperes, shaft speed ωm shows robust response for various changes in friction like
in radians/s and θm in radians. The equivalent state space pulse and sine, as shown respectively in Fig. 3 and Fig. 4.
model is
D. Kalman Filter Design
The Kalman filter is a robust state estimator which
provides optimal estimation even in the presence of system
and measurement noises.
To account for system and sensor measurement noise, the
estimation is done in two steps. The first step is the time
update which is used to obtain the intermediate estimate as
x is the vector of the measured state variables of the system. shown below using the state space model of the system.
B. Design of LQR
LQR is designed to minimize the error square while
simultaneously minimizing the energy required to achieve
the same. The cost function used for this purpose is given in TABLE I. DC MOTOR SYSTEM PARAMETERS
(4) where the first term inside the summation deals with the Parameter Value
minimization of the state errors and the second term deals Rm 9.5 Ω
with the principle of minimum energy. Lm 1.1 mH
Jm 17.6×10-7 Kgm2
Bm 10-3 Nm/(rad/s)
Kt 37.7 mNm/A

where Qlqr and Rlqr are positive definite Hermitian matrices


used to provide different weights to both the terms. The
values of Qlqr and Rlqr can be adjusted to obtain the required
rise-time and overshoot compromise values.

Figure 1. Equivalent circuit for a DC motor system


Figure 2. Simulation results for LQR
The values of Qlqr and Rlqr can be chosen using Bryson’s
Rule where Qlqr is chosen to be CTC and Rlqr is later tuned
using practical experimentation.
The optimal control gain matrix of the system is given by
(5).

where P is positive definite and is obtained from the solution


to the Discrete Algebraic Ricatti Equation [1] given below.

C. Simulation Results for LQR


A DC motor model was constructed on SIMULINK with Figure 3. Simulation results for LQR - Step change in Static Friction
the parameters as in Table I.

150
more importantly in the estimation of states using KF. The
effect of this can be seen in Fig. 5, Fig. 6, Fig. 7 and Fig. 8.
A. Extended Kalman Filter
The Extended Kalman Filter has been studied in
literature for the estimation of the system parameters which
cannot be done manually.

Figure 4. Simulation results for LQR – Sine wave change in static friction

The second is the measurement update step where the


final estimate of the system is obtained using the output
measurement as shown below.

Figure 5. Simulation results for LQG and LQR – Change in Static


Friction
where Gk+1 is the Kalman gain.
The Kalman gain is calculated in every iteration based on
the state error covariance P which in turn depends on the
matrices Q and R which are the system noise and
measurement noise co-variance matrices respectively. The
set of equations provided below are used in each iteration to
update G, P and the values of estimated states x.ɪ

Figure 6. Simulation results for LQG and LQR – Change in Inertia


E. Simulation Results for LQG
From the simulation figures, Fig. 5 and Fig. 6, it can be
seen that LQG performs as good as LQR. The settling time is
slower and the overshoots are more than that of LQR at
lower static friction values, but the steady state error is
within 1% of the demand. The difference in the settling time
and overshoots can be attributed to the inaccuracy of the
estimator’s prediction since non-linearities such as static
friction cannot be modeled into a state space equation. In Fig.
5, it can be seen that the performance of the LQG model
matches closely with that of the LQR model at higher static
friction value in comparison to the lower static friction value.
The overshoots seen in both the figures are due to the change
in system parameters which have not been accounted for in
the calculation of gain. Figure 7. Simulation results for LQG and LQR – Change in Static
Friction with Viscous Friction = 10-5 Nm/(rad/s)
III. CHANGE IN SYSTEM PARAMETERS
EKF is an augmented Kalman Filter matrix with the
The physical system can undergo changes in the system parameters appended as additional states [9] [11]. The A
parameters. The position control system can experience matrix which is used in the measurement update part of the
changes in inertia, friction etc. This results in a deviation in Kalman estimation is also modified to take into account that
the internal state space model of the system and causes non- system parameters are to be additionally estimated. The
optimal conditions for the calculation of K in LQR and also matrix x is appended with the new extended states as shown

151
in (10). The extended states are chosen based on the in the response and also has nearly the same settling time as
expected system parameters that change in actual operation that of LQR and LQG. Fig. 12 and Fig. 13 show robust
of the position control system. The representation of the performance of LQG with EKF for change in viscous friction
states (shown direct or as a reciprocal) is based on the ease of along with change in static friction and inertia.
differentiation of the state space equations (2). The final state
matrix of the EKF is φ.

The measurement update process is now modified to


include the change in the A matrix as shown in Eqn. (11).
Once the states are estimated, the A matrix is updated by the
values from ψ. The LQG gain can be re-calculated by
solving the Ricatti equation with the new A matrix. The gain
is applied on the error to get the output. Figure 9. Expanded view of comparison results for LQG with EKF, LQG
and LQR

Figure 10. Simulation results for LQG with EKF and comparison with
LQG and LQR – Change in Inertia

Figure 8. Simulation results for LQG with EKF and comparison with
LQG and LQR–Change in Static Friction

IV. SIMULATION RESULTS FOR LQG WITH EKF


The co-variance matrix Q is chosen carefully assuming a
Gaussian distribution of the change in system parameters as
shown below.

Figure 11. Simulation results for LQG with EKF and comparison with
LQG and LQR – Change in Static Friction with Viscous Friction = 10-5
Nm/rad/s

This allows for better estimation of the extended states.


LQG with EKF system gives a robust performance for
different types of frictional and inertial changes, as seen in
Fig. 9 and Fig. 11. We can notice that the LQG with EKF
algorithm performs better than the LQG without EKF, in
terms of overshoot and adaptation to changes in system
parameters. Fig. 10 shows a zoomed in view of the step
Figure 12. Simulation results for LQG with EKF and comparison with
response seen in Fig. 9. LQG with EKF shows no overshoot LQG and LQR – Change in Inertia with Viscous Friction = 10-5 Nm/rad/s

152
A. Tracking where r is the position reference input to the controller for
Several applications exist where the controller is tracking and y is the position output of the system obtained
expected to ensure that the output of the system tracks the from the sensor and N is the number of samples over which
changing demand effectively. The performance of LQG with the RMS error is calculated.
EKF is measured with the RMS error in tracking. The RMS The results are shown in Fig. 14 and Fig. 16. Fig. 15
error is calculated as in (13). shows a zoomed view where LQG with EKF can be clearly
seen performing better than LQR. The ERMS values also show
the robust performance of LQG with EKF compared to the
other two.

Figure 13. Tracking simulation results for LQR, LQG, LQG with EKF – Change in Static Friction and ERMS = 0.0141, 0.0176, 0.148 rads respectively

control of a DC motor. A LQG based position control system


is designed with Kalman filter as the estimator. Adaptation to
system parameter changes was improved by adding selected
system parameters as augmented states to the existing
Kalman filter design. The responses of the EKF based
controller, to various changes of system parameters such as
static friction, inertia and viscous friction are compared with
LQG and LQR. Results show that LQG with EKF, which
uses only one state as feedback and predicts the other states,
as well as the system parameters, is seen to be a robust
controller for optimal position control of DC motor.
Tracking results show that LQG with EKF can be applied for
Figure 14. Expanded view of simulation results for LQR, LQG, LQG with
EKF high precision position control as well as for faster response
with the least RMS error compared to the other two
controllers.
REFERENCES
[1] M.Ruderman, J. Krettek, F. Hoffmann, and T. Bertram, “Optimal
state space control of DC motor,” in Proceedings of the 17th World
Congress The International Federation of Automatic Control, Seoul,
Korea, Jul. 2008, pp. 5796–5801.
[2] L.Umanand, Power electronics essentials and applications. New
York, NY: Wiley Publishers, 2009.
[3] A. Bature, M. Muhammad, and A. M. Abdullahi, “Position control of
a DC motor: An experimental comparative assessment between fuzzy
and state feedback controller,” ARPN Journal of Engineering and
Applied Sciences, vol. 8, no. 12, pp. 984–987, Dec. 2013.
Figure 15. Tracking simulation results for LQR, LQG, LQG with EKF – [4] G.R. Yu and R.C. Hwang, “Optimal pid speed control of brushless dc
Change in Inertia and ERMS = 0.0236, 0.0289, 0.0205 rads respectively motors using lqr approach,” Systems, Man and Cybernetics, 2004
IEEE International Conference, vol. 1, pp. 473–478, Oct. 2004.
[5] J.B. He, Q. G. Wang, and T.H. Lee, “PI/PID controller tuning via
V. CONCLUSION LQR approach,” Proceedings of the 37th IEEE Conference on
Decision and Control, vol. 1, pp. 1177–1182, Dec. 1998.
This paper demonstrates a design of a robust optimal [6] M. Morteza, A. Ahmad, and A. Sara, “Optimal control based
controller using an extended Kalman Filter for position feedback linearization for position control of DC motor,” Advanced

153
Computer Control (ICACC), 2010 2nd International Conference, vol. [9] L. Loron and G. Laliberte, “Application of the extended kalman filter
4, pp. 312–316, Mar. 2010. to parameters estimation of induction motors,” Fifth European
[7] G.R. Yu, M.H. Tseng, and Y.K. Lin, “Optimal positioning control of Conference on Power Electronics and Applications, pp. 85–90, 1993.
a dc servo motor using sliding mode,” Proceedings of the 2004 IEEE [10] B. Kuo, Automatic control systems. Upper Saddle River: Prentice
International Conference on Control Applications, vol. 1, pp. 272– Hall PTR, 1981.
277, 2004. [11] T. Iwasaki and T. Kataoka, “Application of an extended kalman filter
[8] W. W. Syahidah, O. Rosli, M. Joraimee, and A. Norhidayah, “Linear to parameter identification of an induction motor,” Industry
quadratic gaussian (LQG) controller design for servo motor,” Applications Society Annual Meeting, 1989., Conference Record of
Australian Journal of Basic and Applied Sciences, vol. 8, no. 4, pp. the 1989 IEEE, pp. 248–253, 1989.
700–713, Apr. 2014.

154

You might also like