Real Time Implementation and Design of Predictive Controller For Fast Dynamic System
Real Time Implementation and Design of Predictive Controller For Fast Dynamic System
.
Abstract—Generalized Predictive Controller is a one type of In [1] Generalized Predictive controller results for DC motor
Model Predictive Controller. Speed Control of DC motor is is compared to Discrete time Predictive Controller. More
taken as a Case study for validation of GPC controller detail and survey on Model Predictive Controller is given in
algorithm implementation on Real Time Hardware. There is a
much gap between theoretical solution and real time [2]. In [3] MPC is implemented for PMSM motor,
implementation of MPC. Basically MPC works better for slow Generalized Predictive Controller is applied to control the
dynamic system, so here efforts are made to Implement MPC Position of Induction Motor in [4]. Robust Model Predictive
for Fast Dynamic System. System Identification of DC motor is Controller is implemented for Fast Dynamic Vehicle System
done using a LABVIEW and system identification tool of in [5]. Above all MPC is designed particularly for specific
MATLAB. First of all ARIX model based GPC controller is application.
designed in MATLAB for Model Obtained from System
Identification of DC motor. Then the control law of GPC In Section II GPC control Strategy is given, In Section III
controller is implemented on ATMEGA328P and Results shows description of DC motor is given, Section IV Describes the
that GPC controller gives better results than discrete time PID System Identification of the System. In Section V Simulation
controller for Set Point Tracking as well as for Disturbance result and effect of tuning parameter of GPC on System
Rejection. Output is shown. Section VI describes the real time
implementation of GPC and PID controller for DC motor
Index Terms—MPC (Model Predictive Controller), GPC
Speed Control is given.
(Generalized Predictive Controller), ARIX Model (Auto
Regressive Integrated Exogenous Model, FDS (Fast Dynamic
System). II. GENERALIZED PREDICTIVE CONTROLLER
GPC is based on minimizing a weighted sum of the Set
I. INTRODUCTION Point error and the control effort and it allows plant models to
Model Predictive Controller is basically suitable only for be updated frequently.GPC makes use of the j-step ahead
Slow Dynamic Systems like Chemical Process, Oil prediction error model.
Refineries, etc. Design of MPC for Fast Dynamic system is
difficult because MPC takes long time to calculate the value ARIX model based Generalized Predictive Control law is
of control action and if the sampling time of control action is given by the following equation,
larger than the FDS like DC motor will not reach at the
Desired Set Point. So MPC with small sampling time and less 𝑢 = 𝑘𝑟 − 𝑘𝐻2 𝑦𝑜𝑙𝑑 − 𝑘𝐻1 𝑢𝑜𝑙𝑑
computation time will be used for FDS.
𝑔𝑘,0 0 …0
There are many types of MPC control algorithms used.
Some of them are listed here: 1) GPC (Generalized Predictive 𝑔𝑘+1,1 𝑔𝑘+1,0 ⋯0
Where G = ,
Controller), 2) DMC (Dynamic Matrix Controller), 3) Steady ⋮ ⋮ ⋮
State Weighted Generalized Predictive Control, etc. 𝑔𝑘+𝑁,𝑁 𝑔𝑘 +𝑁,𝑁−1 ⋯ 𝑔𝑘 +𝑁,0
Generally GPC controller is used for Fast Dynamic System.
Here GPC controller results are compared with PID 𝑔𝑘 ,1 ⋯ 𝑔𝑘,𝑑𝐺 𝑘
controller for DC motor Speed Controller. PID and PI 𝑔𝑘 +1,2 ⋯ 𝑔𝑘+1,𝑑𝐺 𝑘 +1
controller are also used for Fast Dynamic System. 𝐻1 = ,
⋮ ⋮ ⋮
There is much gap between real time implementation and 𝑔𝑘+𝑁,𝑁+1 ⋯ 𝑔𝑘+𝑁,𝑑𝐺 𝑘 +𝑁
theoretical solution of MPC. So here, effort is made for real
time implementation of GPC for DC motor Speed Control. 𝑓𝑘 ,0 ⋯ 𝑓𝑘,𝑑𝐴
More detail on MPC and GPC control algorithm is given in
𝑓 ⋯ 𝑓𝑘+1,𝑑𝐴
[2] and [6]. Now a day’s many researchers tries to reduce the 𝐻2 = 𝑘 +1,0 ,
computation time of MPC. ⋮ ⋮ ⋮
𝑓𝑘 +𝑁,0 ⋯ 𝑓𝑘+𝑁,𝑑𝐴
Manuscript received June, 2015.
Sumit G. Vyas1Student of M.E., Instrumentation and Control Engineering,
L.D. College of Engineering, Ahmedabad,Gujarat, India
Vinodkumar P. Patel2 Associate Professor, Instrumentation and Control 𝑦𝑜𝑙𝑑 = [𝑦 𝑛 … … … … 𝑦(𝑛 − 𝑑𝐴)]𝑇 ,
Engineering, L.D. College of Engineering, Gujarat, India
2401
ISSN: 2278 – 7798 All Rights Reserved © 2015 IJSETR
International Journal of Science, Engineering and Technology Research (IJSETR), Volume 4, Issue 7, July 2015
𝑇
𝑢𝑜𝑙𝑑 = ∆𝑢 𝑛 − 1 … … … ∆𝑢 𝑛 − 𝑘 + 1 − 𝑑𝐵 ,
𝑇
𝑢 = ∆𝑢 𝑛 … … … … … … . ∆𝑢 𝑛 + 𝑁 ,
III. DC MOTOR
To validate the proposed MPC algorithm, Speed Control of
DC Motor is taken as a Case Study for Fast Dynamic System.
DC Motor Specification is given below. Generally the MPC
gives better results for Slow Dynamics System so here efforts
are made to Implement GPC control algorithm for DC motor
Speed Control.
A. DC Motor Specification
Fig (1) show the DC motor used to validate the GPC
algorithm. Rotating Magnet mechanism on the pulley is put
on motor to give the load on the DC motor to checks whether
the GPC controller can rejects the disturbance or not.
Specifications:
2402
ISSN: 2278 – 7798 All Rights Reserved © 2015 IJSETR
International Journal of Science, Engineering and Technology Research (IJSETR), Volume 4, Issue 7, July 2015
identification tool of the MATLAB. Figure (3) show the V. SIMULATION RESULTS
output and input waveform of the motor stored in the File This section shows the simulation Results of the DC motor
using LABVIEW. Figure (4) shows the estimated output of model with GPC controller and its results are compared with
the obtained model of the DC motor. discrete time PID controller. Sampling time Ts = 0.059s
The Estimated model of the DC motor is obtained as below, taken to implement the PID and GPC controller. PID tuning
is done using Ziegler Nichols closed loop Method.
0.5957 𝑆 + 0.0683 Obtained value of PID tuning parameter are Kp = 6.02, Ti =
𝐺 𝑆 = 0.05 and Td = 0.019. Then this parameter are used to
𝑆 2 + 3.248 𝑆 + 0.339 implement the discrete time PID controller using following
With one zero and two pole and the estimated transfer Equation,
𝑇𝑠 𝑇𝑑
function fits the data by 89.54%. 𝑆0 = 𝐾𝑝 1 + +
Transfer function of DC motor in Z domain is obtained as 2𝑇𝑖 𝑇𝑠
below,
𝑇𝑠 2𝑇𝑑
0.0321 z − 0.03187 𝑆1 = 𝐾𝑝 −1 + −
G z = 2 2𝑇𝑖 𝑇𝑠
z − 1.825 z + 0.8256
𝑇𝑑
𝑆2 = 𝐾𝑝
𝑇𝑠
1 − 𝑍 −1 𝑢 𝑛 = 𝑆0 + 𝑆1 𝑍 −1 + 𝑆2 𝑍 −2 𝑒(𝑛)
2403
ISSN: 2278 – 7798 All Rights Reserved © 2015 IJSETR
International Journal of Science, Engineering and Technology Research (IJSETR), Volume 4, Issue 7, July 2015
the GPC and PID Controller, it is concluded that settling time Figure (8) shows the Control action Response of PID and
of GPC controller is 4 seconds while PID Controller takes GPC Controller. Because of Disturbance, Oscillation occurs
3seconds. So from settling time perspective PID is better than in both controllers at time of 10 seconds. It shows that both
GPC controller but PID controller have large Oscillation then controllers reject the Disturbance effectively. Time taken to
GPC controller. GPC controller gives smooth tracking of the remove the disturbance is almost same for both controller and
Set Point as compared to PID controller. it is approximately 2 to 2.5 seconds.
Fig – 6: Control Action Responsewithout Disturbance Fig –8: Control action Response with Disturbance
C. Set Point Tracking Results of DC Motor
Figure (6) shows the Control action response of the PID and
GPC Controller. In this case variation in the Set Point is given. For 25
seconds Set Point value is 700 rpm and for another 25
B. DC Motor’s Response with Disturbance seconds Set Point value is taken be 0. Figure (9) shows Set
In this case step disturbance is applied after 10 seconds. point tracking of GPC controller is very smooth while PID
Both the Controller takes almost same time to rejects the controller oscillated Set Point Tracking.
disturbance. System Response with Disturbance is shown in
figure (7).
2404
ISSN: 2278 – 7798 All Rights Reserved © 2015 IJSETR
International Journal of Science, Engineering and Technology Research (IJSETR), Volume 4, Issue 7, July 2015
Fig – 10: Control Action Response for Set Point Tracking Fig – 12: Effect of Starting Point of Prediction Horizon (N1)
on System Output
Figure (13) shows the effect of End Point of Prediction
D. Effect of GPC Tuning Parameter on the System
Horizon. For all cases N2 = 10 is taken. For N2 = 6 system
Output
output is very slow and it takes more time to reach at set
In this section effect of GPC tuning parameters on the point. For N2 = 13 continuous oscillation occurs in the
System Output is shown. Figure (11) shows the effect of system output. So Small value of N2 makes system very slow
control horizon on System Output. For in all case Control and large value of N2 makes system oscillated. So for N2 =
Horizon Nu = 5 is taken. Decreasing the value of Nu gives 10 it gives system output have neither slow response nor
oscillated output while increasing the value of Nu makes oscillated response.
system slow. For Nu = 5 it gives better results for system
output.
2405
ISSN: 2278 – 7798 All Rights Reserved © 2015 IJSETR
International Journal of Science, Engineering and Technology Research (IJSETR), Volume 4, Issue 7, July 2015
2406
ISSN: 2278 – 7798 All Rights Reserved © 2015 IJSETR
International Journal of Science, Engineering and Technology Research (IJSETR), Volume 4, Issue 7, July 2015
B. Discrete Time PID Control Algorithm There is large oscillation in PID Controller for Set Point
DC Motor’s Response for Disturbance Rejection Using Tracking. It takes 15 to 16 seconds to settle at a desired set
Discrete time PID Controller is shown in figure (18). Set point which is larger than GPC controller. Overshoot is also
Point is 800 RPM is taken. From the results it is concluded larger in Discrete time PID Controller than GPC controller.
that GPC Controller have better results than Discrete time There is also a difference between Simulation Results and
PID Controller. There is large oscillation occurs in Discrete Real Time Implementation Results of GPC and PID
time PID Controller. DC Motor takes 15 seconds initially to Controller for DC Motor Speed Control.
reach at the desired Speed using PID Controller. Disturbance
on DC motor generates large oscillation and it takes more VII. CONCLUSION
time to rejects the Disturbance than GPC Controller. Settling From the Results of Real Time Performance and
time and Overshoot both are large in PID Controller than Simulation of the DC Motor, it is concluded that GPC
GPC Controller. controller gives better results for both the Set Point Tracking
and Disturbance Rejection than Discrete Time PID
controller. DC Motor using GPC Control takes only 3 to 4
seconds to reach at the Desired Set Point while Discrete Time
PID Controller takes approximately 15 seconds to reach at
the Desired Set Point which is larger than the GPC Control.
In Disturbance Rejection case study, Discrete Time PID
Controller have more effects of Disturbance and it takes
more time to reject that disturbance while GPC control rejects
Disturbance and Continuous Load effects in small time than
PID controller. GPC gives Smooth and Stable Performance
than Discrete Time PID Control Algorithm. GPC control
algorithm performance depends on the proper selection of
tuning parameters which are Control Horizon (Nu), Starting
and End point of Prediction Horizon, Control Weighting
parameter (rho). As Shown in simulation results, for taking
Nu = 2 System have oscillated output while taking Nu = 7
settlingtime of System is increases. For Nu = 5, System has
smooth response. neither it has slow response nor has
oscillated Response. For End point of Prediction Horizon N2
Fig – 18: Motor Response for Disturbance Rejection Using = 13, system have continuous oscillation and for N2 = 6,
PID Controller settling time of system is increases. So for N2 = 10, system
has smooth response neither it is slow nor oscillated
DC Motor’s Output Results for Set Point Tracking using response. Generally Starting Point of Prediction Horizon N1
PID Controller is shown in figure (19). Same as GPC = 0 is taken. After proper selection of tuning parameters,
controller, here also two Set Point values are given to DC GPC control algorithm gives smooth and stable response for
Motor for Set Point Tracking. Results show that for Set Point DC Motor Speed Control.
Tracking GPC controller gives better performance than PID
controller. REFERENCES
2407
ISSN: 2278 – 7798 All Rights Reserved © 2015 IJSETR
International Journal of Science, Engineering and Technology Research (IJSETR), Volume 4, Issue 7, July 2015
2408
ISSN: 2278 – 7798 All Rights Reserved © 2015 IJSETR