Engineering, Technology & Applied Science Research Vol. 8, No. 5, 2018, 3416-3420 3416 www.etasr.com Ndje et al.: Dynamic Matrix Control and Tuning Parameters Analysis for a DC Motor System Control Dynamic Matrix Control and Tuning Parameters Analysis for a DC Motor System Control Martial Ndje National School of Agro-Industrial Sciences University of Ngaoundere Ngaoundere, Cameroon ndjemartial@gmail.com Jean Maurice Nyobe Yome Faculty of Industrial Engineering University of Douala Douala, Cameroon nyobeyome@yahoo.fr Alexandre Teplaira Boum Higher Technical Teachers Training College University of Buea Kumba, Cameroon boumat2002@yahoo.fr Laurent Bitjoka National School of Agro-Industrial Sciences University of Ngaoundere Ngaoundere, Cameroon lbitjoka@univ-ndere.cm Jean Claude Kamgang National School of Agro-Industrial Sciences University of Ngaoundere Ngaoundere, Cameroon jckamgang@gmail.com Abstract—Model predictive control (MPC) in system control industry overrides the challenges of conventional controllers in controlling complex systems. However, for efficient control, it is essential to find the best combination of parameter values. In this paper, we present the implementation of a multivariable dynamic matrix control (DMC) algorithm. An industrial system consisting of a DC motor, coupled to a mechanical load, the assembly associated with an electronic speed variator was considered to test the implemented DMC controller. DMC’s tuning parameter analysis on the manipulated inputs and their variations on the controlled outputs was performed. Results guarantee that efficient control was presented. Keywords-model predictive control (MPC); dynamic matrix control (DMC); tuning parameters; DC motor control I. INTRODUCTION Advances in the system control industry have led engineers to develop robust controllers with higher performance than conventional ones (LQR, IMC, PID) [1-3]. DMC is a subset of the MPC algorithms that refers to a class of computer control algorithms that use an explicit process model to predict the future response of a system [4, 5]. The ability of this controller to drive multivariable, non-linear and constrained systems, and its ease of tuning gives it a prominent place in industrial processes [6-9]. However, the best combination of controller parameter values that ensures efficient tuning has often been very difficult to find [8, 10-12] because of the effect of each of these parameters on the controller's control signals and system outputs [9, 10]. In this paper, in addition to the simulation, we propose a DMC’s tuning parameter analysis approach for efficient tuning. Figure 1 presents the principle of the moving horizon of [13], which is at the heart of any MPC algorithm. II. DMC ALGORITHM DMC [14] is part of the first generation of MPC, consisting of algorithms that provide a systematic means of controlling systems more efficiently while count multivariable cases, for which the step responses of the system are used as a predictive model [4, 15]. For a given system, let the value of step response at each sample time be   ,2,1 ,  iiTaai and n the length of the horizon of the system model, then  Tnaaa 1 is called the predictive model of the system. Choosing the length of the control horizon as m and the length of optimal horizon as p, the dynamic matrix of DMC can be written according to (1). 1 1 1 0 m p p m a a a a a A - + é ù ê ú ê ú ê ú ê ú = ê ú ê ú ê ú ê ú ê ú ë û      (1) For a multiple input–multiple output (MIMO) system with nu inputs and ny outputs, any input-output i-j pair can be represented by a matrix Aij of coefficients ia in every way similar to (1) so that the complete system is finally represented by a MIMO dynamic matrix of control Aij composed of elementary matrices according to (2): Fig. 1. Principle of the moving horizon of model predictive control. Engineering, Technology & Applied Science Research Vol. 8, No. 5, 2018, 3416-3420 3417 www.etasr.com Ndje et al.: Dynamic Matrix Control and Tuning Parameters Analysis for a DC Motor System Control            nyny nu AA AA A 11 11   (2) At time k, assume the control input increment is  kum . By using dynamic matrix A, it can be obtained that      kuAkyky mpopm  ~~ , where  ky pm~ represents the predictive outputs at future under the control of increment  kum , and  ky po~ the predictive outputs at future when  kum =0. For DMC, the vector  ky po~ can be obtained by shifting the predictive vector output at the last time instant ahead one step. The online optimization problem of the DMC controller without constraints can be formulated according to:         22 21 ~ WmWpmp kukykkJMin   (3) where J is the cost function to minimize compared to the control law  kum ,  kp is the reference at time k, W1 and W2 are the weight matrices of output errors and control input increments respectively. Authors in [16] point out that the DMC is a least-squares optimization problem with a quadratic performance objective and penalty on manipulated variable variations. Thus, the problem of (3) can be written in the form of (4): ( ) ( ) ( ) ( ) ( ) ( ) ( ) 1 1 2 2 11 2 1 T T m T T m m m Min J k A u k e k W W A u k e k u kW W u k D D D D = é ùé ùê ú- + ´ê úë ûê ú ê úé ù- + +ê úê úë ûë û (4) where  1ke represent the predicted future errors between the predicted outputs and the practical outputs. By solving the optimization problem (3), DMC controller can obtain the solution vector. The details of the derivation of (4) to search the MIMO optimal control law of DMC can be found in [16, 17], where the solution (5) is found.     )1(111211   keWWAWAWWAku TTTTTm (5) It should be noted that only the first element of the control law of (5)  ku is sent to the plant. Then, the vector of the future system outputs predicted by the predictive model is written according to (6):      kuakyky nn  01 ~~ (6) Since there are always model errors or unknown disturbances for practical applications, the DMC will adjust the predicted outputs of (6) based on the practical outputs  1ky . The error vector between the predicted outputs and the practical outputs is written according to (7): ( ) ( ) ( )11 1 1e k y k y k k+ = + - + (7) Choosing the adjustment coefficient vector h, the adjusted predictive vector is written according to (8): ( ) ( ) ( ) 1 1 h 1 cor n y k y k e k+ = - +  (8) At time k+1, the whole procedure mentioned above is repeated. Figure 2 presents the diagram of DMC's general principle. Figure 3 presents the key building steps of the MIMO DMC algorithm without constraints.  ( )u k ( )u k ( )y k p 1 ny ( )e k   cory 1 1 1 I z 1 ny Fig. 2. Block diagram of DMC's general principle. Begin Calculate the step response coefficients ( ) of system Build the dynamic matrix of control A Calculate the vector of predicted future errors e(k+1) Calculate the vector of future control signals u(k+1) Send future control signals to the real system and the model approximated system End 60 ?k yes Initialization: Set the initial parameters Retrieve future responses of the real system y(k + 1) and the approximated system for updates Calculate the vector of control law Δu(k) a Calculate the vector of predicted future outputs Calculate the vector of predicted future outputs k=k+1 corrected to the next sample  kyn1 ~  1~ kycor  1~1 ky Fig. 3. Flowchart of MIMO DMC algorithm without constraints. III. SYSTEM MODEL To test our DMC controller algorithm, the DC motor system of [18] was considered. In this system, the separately Engineering, Technology & Applied Science Research Vol. 8, No. 5, 2018, 3416-3420 3418 www.etasr.com Ndje et al.: Dynamic Matrix Control and Tuning Parameters Analysis for a DC Motor System Control excited DC motor system drives a load and the assembly is coupled to an electronic variator speed drive. Previously used models of the DC motor to test control algorithms [19-24] were unrealistic and limited to electromechanical models. In the model of [18], the electromechanical model is associated with an electronic speed variator, consisting of a simple chopper which allows the whole system to function in the first quadrant (Q1) of the couple-speed plane. The principle of operation of the whole system is illustrated in Figure 4. The system parameter values taken into account in simulations are given in Table I. Fig. 4. Operating principle of the system. TABLE I. DESIGN SPECIFICATIONS OF THE DC MOTOR SYSTEM Symbol System parameter Value Uα Supply voltage 24V Rα Armature circuit resistance 2 Lα Armature circuit inductance 0.5H Ke Voltage constant 0.1Vs/rad km Torque constant 0.1Nm/A kf Viscous friction 0.2Nms J Total moment of inertia 0.02kgm2 The discrete average state model of the system is given by (9) with a sampling step of T=0.1 s: ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) 1 1 2 2 1 1 2 2 0 3656 0 2516 2 38821 0 0101 0 6676 3 98301 1 0 0 1 . . . . . . x k u k x k u k y k x k y k x k ìé ù é ùé ù é ùï -+ïê ú ê úê ú ê úï = +ïê ú ê úê ú ê úï -+ê ú ê úï ê ú ê úï ë û ë ûë û ë ûíé ù é ùé ùïïê ú ê úê úï =ïê ú ê úê úïê ú ê úê úï ë ûë û ë ûïî (9) It is then a MIMO 2×2 linear time invariant (LTI) state space model of the DC motor system, where the manipulated inputs (u1) and (u2) are respectively the load-resisting torque (Tr) and the duty cycle of the electronic speed converter (D). The controlled outputs (y1) and (y2) are respectively the armature current (i) and the motor angular speed (). The problem is to use the duty cycle of the chopper and the resistive torque of the load to control the rotational speed and the induced current of the motor. IV. ANALYSIS OF DMC TUNING PARAMETERS The MIMO 2×2 DMC controller program presented in this paper has been developed in MATLAB with simulation time of 6s. In this program, the references of the induced current and the angular speed of the motor are respectively 10A and 60rad/s. The effects of the DMC tuning parameters are analyzed on the manipulated inputs and their variations, and on the controlled outputs of the plant. A. Effect of Prediction Horizon (p) Figure 5 shows the DMC simulation results obtained at different values of prediction horizon while keeping the other parameters constant according to Table II. We find that the controlled outputs of the plant (Figures 5(a) and 5(b)) are faster for the lower values of p [2]. However, large control actions (Figures 5(c)-5(f)) are required. This makes it possible to compensate for the uncertainties of the model of our system. Thus, the prediction horizon must be consistent with the response time of the process [16]. TABLE II. EFFECT OF PREDICTION HORIZON (p). Parameter Value Model horizon (n) 60 Prediction horizon (p) 3, 6, 10 Control horizon (m) 1 Error weight matrix (W1) 1 Control weight matrix (W2) 0 Fig. 5. Effect of prediction horizon p: (a) and (b) controlled outputs, (c) and (d) manipulated inputs, (e) and f) variations of manipulated inputs. B. Effet of Control Horizon (m) Figure 6 shows the DMC simulation results obtained at different values of control horizon m while keeping the other parameters constant according to Table III. TABLE III. EFFECT OF CONTROL HORIZON (m). Parameter Value Model horizon (n) 60 Prediction horizon (p) 3 Control horizon (m) 1, 2 Error weight matrix (W1) 1 Control weight matrix (W2) 0 We find that the controlled outputs of the plant (Figures 6(a) and (b)) are slow for the low values of control horizon (m=1), with control actions (Figures 6(c)-6(f)) soft and progressive, while m=2 produces fast responses but with raw control actions. The controller becomes more sensitive to Engineering, Technology & Applied Science Research Vol. 8, No. 5, 2018, 3416-3420 3419 www.etasr.com Ndje et al.: Dynamic Matrix Control and Tuning Parameters Analysis for a DC Motor System Control external noise for large values of the control horizon. Thus, the large values of the control horizon are not recommended for our system. Fig. 6. Effect of control horizon m: (a) and (b) controlled outputs, (c) and (d) manipulated inputs, (e) and (f) variations of manipulated inputs. C. Effect of Model Horizon (n) Figure 7 shows the DMC simulation results obtained at different values of model horizon while keeping the other parameters constant according to Table IV. We find that the controlled outputs (Figures 7(a) and 8(b)), the manipulated inputs (Figures 7(c) and 7(d)) and the manipulated input variations (Figures 7(e) and (f)) of the system are partially unstable for n=20 and n=40. However, they become perfectly stable for n=60. Thus, the model horizon must be chosen such that the dynamics of the system are sufficiently captured by the controller. In general, large model horizons are recommended [25, 26]. TABLE IV. EFFECT OF MODEL HORIZON (n). Parameter Value Model horizon (n) 20, 40, 60 Prediction horizon (p) 3 Control horizon (m) 1 Error weight matrix (W1) 1 Control weight matrix (W2) 0 D. Effect of Error Weight Matrix W1 and Control Weight Matrix W2 Figure 8 shows the DMC simulation results obtained at different values of the control weight matrix when the weight matrix of the error is set to W1=1. The other parameters stay constant according to Table V. We find that the responses of the system (Figure 8(a) and 8(b)) are faster for the lower values of W2 with progressive control signals (Figures 8(c) and 8(d)). However, there is a lot of contact on control variations (Figures 8(e) and 8(f)). Thus, error and control weight matrices are the most important DMC parameters and must be used to control the rise time of responses, and to produce progressive responses to control variations [10, 16]. Fig. 7. Effect of model horizon n: (a) and (b) controlled outputs, (c) and (d) manipulated inputs, (e) and (f) variations of manipulated inputs. TABLE V. EFFECT OF ERROR WEIGHT MATRIX (W2). Parameter Value Model horizon (n) 60 Prediction horizon (p) 3 Control horizon (m) 1 Error weight matrix (W1) 1 Control weight matrix (W2) 1, 8, 15 Fig. 8. Effect of error weight matrix W1 and control weight matrix W2: (a) and (b) controlled outputs, (c) and (d) manipulated inputs, (e) and (f) variations of manipulated inputs. V. DMC CONTROLLER RESULTS IN RESPONSE TO AN EFFICIENT TUNING From the previous analysis of the effects of the DMC's parameters, a set of parameter values that guarantees efficient tuning of the implemented DMC controller is proposed (Table VI). The simulation results of the MIMO DMC in response to this setting are shown in Figure 9. The results of Figures 9(a) and 9(b) show that the controlled outputs follow their respective setpoints, while the manipulated inputs (Figures 9(c) and 9(d)) and their variations (Figures 9(e) and 9(f)) provide smooth and progressive control actions. Thus, for our system, the prediction horizon must be consistent with the response time of the process [16]. Engineering, Technology & Applied Science Research Vol. 8, No. 5, 2018, 3416-3420 3420 www.etasr.com Ndje et al.: Dynamic Matrix Control and Tuning Parameters Analysis for a DC Motor System Control TABLE VI. OPTIMAL VALUES OF THE DMC PARAMETERS. Parameter Value Model horizon (n) 60 Prediction horizon (p) 3 Control horizon (m) 1 Error weight matrix (W1) 1 Control weight matrix (W2) 0 Fig. 9. MIMO DMC Controller results for an efficient tuning: (a) and (b) controlled outputs, (c) and (d) manipulated inputs, (e) and (f) variations of manipulated inputs. VI. CONCLUSIONS In this paper, MIMO DMC algorithm applied to control speed and current of a DC motor system has been implemented. An approach to analyze the effect of each tuning parameter and its variations on manipulated inputs and on controlled outputs has been presented. Obtained results showed that the combination of the values of DMC tuning parameters such as prediction horizon (p), control horizon (m), model horizon (n), error and control weight matrices (W1) and (W2), which guarantees efficient control can be found through an individual and systematic analysis of the influence of each of these parameters on the outputs of the controller and the system. In this way, the MIMO DMC controller algorithm drives the outputs of the plant to their desired setpoints. REFERENCES [1] A. T. Boum, “Observer based and quadratic dynamic matrix control of a fluid catalytic cracking unit: A comparison study”, International Journal of Computer Applications, Vol. 80, No. 3, pp. 1-8, 2013 [2] J. M. Lopez-Guede, B. Fernandez-Gauna, M. Grana, F. Oterino, “On the Influence of the Prediction Horizon in Dynamic Matrix Control”, International Journal of Control, Vol. 3, No. 1, pp. 22-30, 2013 [3] E. F. Camacho, C. Bordons, Model Predictive Control in the Process Industry, Springer Science & Business Media, 2012 [4] S. Joe Qin, T. A. Badgwell, “A survey of industrial model predictive control technology”, Control Engineering Practice, Vol. 11, No. 7, pp. 733-764, 2003 [5] J. Richalet, A. Rault, J. Testud, J. Papon, “Model predictive heuristic control: Applications to industrial processes”, Automatica, Vol. 14, No. 5, pp. 413-428, 1978 [6] N. Vatsa, Tuning Parameters of Dynamic Matrix Control, PhD Thesis, National Institute of Technology Rourkela, India, 2011 [7] G. M. de Almeida, M. A. de S. L. Cuadro, R. P. P. Amarai, J. L. F. Salles, “Optimal tuning parameters of the dynamic matrix predictive controller with ant colony optimization”, 11th IEEE/IAS International Conference on Industry Applications, Juiz de Fora, Brazil, December 7- 10, 2014 [8] P. Bagheri, A. K. Sedigh, “Robust tuning of dynamic matrix controllers for first order plus dead time models”, Applied Mathematical Modelling, Vol. 39, No. 22, pp. 7017-7031, 2015 [9] A. S. Yamashita, A. C. Zanin, D. Odloak, “Tuning of model predictive control with multi-objective optimization”, Brazilian Journal of Chemical Engineering, Vol. 33, No. 2, pp. 333-346, 2016 [10] D. Dougherty, D. J. Cooper, “Tuning guidelines of a dynamic matrix controller for integrating (non-self-regulating) processes”, Industrial & Engineering Chemistry Research, Vol. 42, No. 8, pp. 7039-7052, 2003 [11] C. M. Reverter, J. Ibarrola, J. M. Cano-Izquierdo, “Tuning rules for a quick start up in Dynamic Matrix Control”, ISA Transactions, Vol. 53, No. 2, pp. 612-627, 2014 [12] P. Acharya, Performance Analysis of Model Predictive Control For Distillation Column, PhD Thesis, National Institute of Technology Rourkela, India, 2016 [13] R. E. Kalman, “Contributions to the theory of optimal control”, Boletin de la Sociedad Matematica Mexicana, Vol. 5, No. 2, pp. 102-119, 1960 [14] C. R. Cutler, B. L. Ramaker, “Dynamic matrix control-a computer control algorithm”, The National Meeting of the American Institute of Chemical Engineers, Houston, USA, April 1979 [15] N. R. Ruchika, “Model predictive control: History and development”, International Journal of Engineering Trends and Technology, Vol. 4, No. 6, pp. 2600-2602, 2013 [16] R. Shridhar, D. J. Cooper, “A novel tuning strategy for multivariable model predictive control”, ISA Transactions, Vol. 36, No. 4, pp. 273- 280, 1998 [17] C. R. Cutler, Dynamic Matrix Control, An Optimal Multivariable Control Algorithm with Constraints, PhD Thesis, University of Houston, USA, 1983 [18] L. Bitjoka, M. Ndje, A. T. Boum, J. Song-Manguelle, “Implementation of quadratic dynamic matrix control on arduino due ARM cortex-M3 microcontroller board”, Journal of Engineering Technology, Vol. 6, No. 2, pp. 682-695, 2017 [19] A. A. Kheriji, F. Bouani, M. Ksouri, M. B. Ahmed, “A microcontroller implementation of model predictive control”, International Journal of Electrical and Information Engineering, Vol. 5, No. 5, pp. 600-606, 2011 [20] A. K. Abbes, F. Bouani, M. Ksouri, “A microcontroller implementation of constrained model predictive control”, International Journal of Computer, Electrical, Automation, Control and Information Engineering, Vol. 5, No. 8, pp. 878-885, 2011 [21] C. Ekaputri, A. Syaichu-Rohman, “Model predictive control (MPC) design and implementation using algorithm-3 on board SPARTAN 6 FPGA SP605 evaluation kit”, IEEE 3rd International Conference on Instrumentation Control and Automation, Ungasan, Indonesia, August 28-30, 2013 [22] L. Malouche, A. K. Abbes, F. Bouani, “Automatic model predictive control implementation in a high-performance microcontroller”, IEEE 12th International Multi-Conference on Systems, Signals & Devices, Mahdia, Tunisia, March 16-19, 2015 [23] R. Nagarajan, S. Sathishkumar, S. Deepika, G. Keerthana, J. K. Kiruthika, R. Nandhini, “Implementation of Chopper Fed Speed Control of Separately Excited DC Motor Using PI Controller”, International Journal of Engineering and Computer Science, Vol. 6, No. 3, pp. 20631- 20633, 2017 [24] V. H. Haji, C. A. Monje, “Fractional-order PID control of a chopper-fed DC motor drive using a novel firefly algorithm with dynamic control mechanism”, Soft Computing, Vol. 22, No. 18, pp. 6135-6146, 2018 [25] S. Li, K. Y. Lim, D. G. Fisher, “A state space formulation for model predictive control”, AIChE Journal, Vol. 35, No. 2, pp. 241-249, 1989 [26] E. F. Camacho, C. Bordons, Model Predictive Control, Springer-Verlag, 1998