Comparison between Compensated and Uncompensated PD with Cascade Controller Design of PMDC Motor: Real Experiments

,


Introduction
DC motors have wide applications in industrial control system (mechatronics system, robotics and low to medium power machine tools) because they are easy to model and control.The PMDC machines have a simpler construction since the field winding of a DC motor is replaced by permanent magnet (PM).Consequently, they have become one of the most commonly used machines in many applications such as electrical vehicles, robotic manipulators, trams, or motion-controlled devices, etc [1]- [11].Each low-cost PMDC motor produced may have different dynamical and electrical properties such as back electromotive force and torque constant, rotor resistance, friction coefficients.
As stated in [12]- [14], over the year, several methods are used to estimate these unknown parameters of DC motors such as hybrid equivalent circuit model, step response, dynamic load variation, closed-loop error approach, least-square parametric estimation, least-squares approximation technique, and a closed-loop disturbance observer.Some of the mentioned methods may need applying a varying voltage to the motor and recording the motor data shown on the measuring equipment before calculating the unknown parameters by comparing motor data with the model equation of the motor.One obstacle of using this method is the need to have third-party measuring equipment for recording data which demands high cost.
There is a large number of parameter identification methods, namely: the algebraic identification methods, the recursive least square method, the inverse theory, the least square method, the moments method [15]- [21].When applying to DC motor parameter identification, these methods work so well for steady state response, but only some parameters can be identified.The first difficulty with these methods is to conduct many experiments at different steady state responses.Another difficulty is that in order to get all parameters for complete modeling, there needs to be distinct experiment setup to conduct for obtaining transient responses.The last disadvantage of these methods is that they require 3 measurements such as voltage, current, and angular velocity.For our method, only angular velocity measurement is needed.That thanks to the simplification technique.Furthermore, we can estimate all the lumped parameters with one-go experiment.
For control method, there are as follows: Proportional-Integral (PI), Proportional-Integral-Derivative (PID) or bipositional, Continuous PID Control Design Method, A state-space Control Design Method, Discrete PID Control Design Method [22]- [25].The most popular among them is the PID controller since it is quite simple and easy to be implemented in a real hardware system [26].However, in [27] the PID controller also has some weaknesses.Any slightest change in setpoint will affect the whole system's performance, and it is very hard to tune the parameters for PID controller.With our simplified model, simpler controller like PD is very suitable.
As implemented in [28]- [38], the hybrid unscented Kalman filter is used to estimate the effect of Stribeck + viscous friction of a DC motor.The estimated parameters compensate to the controller of the motor.The findings reveal that the system with friction compensation shows much better performance.It shows that by using one or another variance of the Kalman filter, it is possible to effectively estimate the unknown parameters of the DC motor.In this paper, all of the parameters are lumped, and we choose Unscented Kalman Filter for parameter estimation because the stateparameter model of the dynamic is nonlinear.
We have seen numerous previous researches comparing only two types of controllers but they never subdivide them into subtypes-compensated and uncompensated respectively.Therefore, our research problem is to investigate the different outcomes between PD controller (compensated and uncompensated) and Cascade controller (compensated and uncompensated).The results will help us conclude which control architecture is superior to the others.This paper is structured as follows: Section 2 presents the dynamics modeling, controller design and describes the obtained UKF algorithm for parameters estimation.Section 3 presents the experiment results, discussion and conclusion are stated in section 4.

Model DC Motor
The following DC motor model and controller design are derived based on the work as seen in [15], [16], [39]- [44].
In Fig. 1 both the back EMF (electromotive-force voltage) and the electromagnetic torque depend direct in proportionality with speed and current: where   is torque constant and   is back EMF constant.Electromagnetic theory and classical mechanics form the basis for the development of electromechanical system models.The differential equation of the armature circuit is In many practices of PMDC motor, the inductance   in the armature circuit is very small which cause the dynamic response of the electrical part to be much faster than that of mechanical part (usually 100 to 1000 times faster).Therefore, only the dynamic of the mechanical part is of importance.Once inductance is ignored (  ≈ 0), then (3) becomes Application of Newton's second law of motion yields the torque balance equation where   friction torque effected by Coulomb friction   and viscous friction ().Then the friction torque is modeled as Substituting ( 6) into (5) yields Using (1), ( 2), (4), and (7) the dynamic of the DC motor can be written as where   is voltage applied to the armature,   is the internal resistance of the armature,  is the moment of inertia of the motor Then ( 8) can be reduced to We see that the equation ( 9) is a nonlinear state equation for velocity model of a DC motor.The parameters , , and  of the models can be numerically estimated by using UKF.From the equation ( 9), we can sketch block diagram for velocity model as Fig. 2.

PD Controller Design by Root locus
Consider a position controller architecture with the PD controller as shown Fig. 2. The governing equation of the control system Fig. 2 can be written as Let the error between desired and actual position   =   − , then   ̇=   ̇−  ̇ and ̈ =  ̈ −  ̈.
The equation ( 10) can be rewritten as Equation ( 11) is a second order differential equation which has characteristic solution as follow.
Equation ( 12) has roots which can be real or complex numbers defined as below.
Let   =   .The roots of ( 12) can be analyzed in terms of parameter as below.
When   = 0, then  1 = 0, and  2 = −.There are two double roots (Delta = 0) as illustrated by root locus in Fig. 3. we choose the left double root because we prefer the critically-damped response that is the fastest one without overshoot [45].
For the friction compensation block, the velocity  ̇ is taken from the desired output of the motor.From root locus techniques, we can sketch a set of solutions of characteristic equations by parameter   as in Fig. 3. Here, we see that all solution of characteristic equation is on the left side of s-plane.Hence the designed system is stable.
By selecting the value of  in terms of , (e. g. , z = 1.2|| → 1.5||), proportional gain   and derivative gain   for the designed PD controller can be found using equation (13).

Cascade Controller Design
Consider a position controller architecture with the Cascade controller as shown in Fig. 4. The governing equation of the control system Fig. 4 can be written as and its characteristic form is Comparing (15) to the standard form of second order differential equation 1 and  2 can be found as

Unscented Kalman Filter Algorithm
Unscented Kalman filter (UKF) is a variant of Kalman filter that is used to estimate state of a nonlinear dynamical system.The dynamical system is modeled as stochastic differential equation with assumption that both state dynamic and measurement are disturbed by Gaussian noises.Unlike other variants of Kalman filter that compute the state propagation and output estimation based on linear mapping function directly or obtained from linearization, UKF uses unscented transform to propagate generated sigma points via nonlinear function directly.

Unscented Transformation
UKF consists of two steps, time update and measurement update.The proceeding step to these two is for the selection of sigma points.The points are taken from the source assumed to be Gaussian and map them on the target Gaussian through some nonlinear functions, and the new mean and variance of the transform are calculated.The process is called Unscented Transformation (UT).The UT is presented as the following steps ) computing set of sigma points, ) assigning weights to each sigma point, ) transforming the points through nonlinear function, ) computing weighted and transformed points, ) Computing mean and variance of the new Gaussian [ ], [ 7].
• The selection of sigma points and weight

Sigma points generation
) Mean contraction weights Covariance contraction weight where  is sigma points matrix with dimension . has mean  ̂ and covariance matrix P x . is to be propagated through  = (). =  2 ( + ) −  is a scaling parameter. determines the spread of the sigma points around  ̂, usually set to a small value. is a secondary scaling parameter, and  is used to incorporate prior knowledge of the distribution of X .(√( + )P x ) is th row of the matrix square root.It is to be propagated through the nonlinear function.
• Transform sigma points through nonlinear function • Mean and covariance approximation where  ̂ and P y are mean and covariance of  respectively.They are approximated using a weighted sample mean and covariance of the posterior sigma points.

UKF State Estimation
The UKF algorithm is provided below.The full algorithm explanation can be found in [ ], [ ] [ ].In this paper, we only give a brief explanation of the algorithm.The time update and measurement update are like those of the standard Kalman filter except for the sigma points and weight calculation.
We have the state space model • Measurement update equations Creating the sigma points as shown in equation ( ) The sigma points are transformed through the nonlinear function Calculating the mean in measurement space from the propagated points where Calculating the covariances in measurement space where Computing the Kalman gain Correcting the mean and covariance | =  |−1 +    ,|−1    (38) • Time update equations Creating the set of sigma points where  | () is the set of resampled sigma points.
Propagating the sigma points Calculating the predicted mean and covariance

Experiment Results
In Fig. 5 shows the Apparatus, which was built with a low-cost PMDC motor, H-bridge driver, and Arduino Due microcontroller, is used for the experiment with hardware testing in MATLAB Simulink.The PMDC motor has gear ratio 10.2, optical encoder 100 ppr and maximum 24 voltage.The other parameters of the PMDC motor are unknown.The desired dynamic angular velocity is chosen as   = 10 sin(2 × 0.1) () for observation during the experiment.The desired velocity is mathematically calculated from the desired position.compensation for dynamic reference.The block diagram for overall system description is shown in Fig. 5.In this block, the main hardware components are implemented for this research.Arduino Due microcontroller is to control the position of DC motor by controlling the input voltage to the motor.PD and Cascade tuning algorithms is implemented in microcontroller to execute the PWM signal for DC motor drive.A 24VDC gear-motor is a powerful motor to drive the position control system.It comes with the photoelectric encoder output, planetary gear reducer and 10.2 gear ratio, which provide 100 rpm with 24VDC rated voltage.H-Bridge motor driver which is allows controlling the direction and position of DC motor.

UKF Implementation
We use the UKF algorithm to estimate parameters a, b, and c of the velocity model.For defining parameters as state variables, Let  1 =  ̇ ,  2 =   ,  3 =   ,  4 =   and  = [ 1 ,  2 ,  3 ,  4 ]  ,   = 0.01,   = 1 − 6 × diag([1; 0.1; 0.1; 0.1]) and R = 1 − 6 × diag([2; 2]).We performed the estimator tuning by selecting an appropriate ratio between   and R. Choosing a smaller   means that we have greater confidence in our model while choosing smaller R show greater confidence in the measurement.The velocity model ( 9) is rewritten as a stochastic nonlinear system as processing (State equation) and measuring (Output equation) model below.

Experiment Lumped Parameter Estimation
In Fig. 6 illustrates the model of parameter estimation for the experiment.We used input signal   = 10 sin(2 × 0.1) () with velocity model in (9).The signals of the state equation and output equation are eliminated and substituted by angular velocity signal and it is fed to UKF block.The angular velocity is approximated from angular position at shaft of gearbox of DC motor as shown in Fig. 6.
Experimental results as shown in Fig. 8, Fig. 9, and Fig. 10 reveal that estimated parameter   ,   and   of the DC motor converge to 12.23 (1 s ⁄ ), 51.31 (rad s 2 ∕ v ⁄ ) and 27.99 ( Nm kg.m 2 ⁄ ) at the time of 30 second respectively with the appropriately tuned parameters of the UKF algorithm.These values are used to compensate for the feed-forward controller.We have shown that UKF could estimate the value of these parameters satisfactorily.In Fig. 12 shown the experiment results for position control using PD controller with friction compensation.We see that the actual position   is starting to converge to the desired position   at a time of 2 seconds while the error values of the experiment result for error position control architecture with Compensated PD controller with the largest error within 0.028 (rad) from the actual value has shown in Fig. 14.
In Fig. 13 shown the experiment results for position control using PD controller without friction compensation.We see that the actual position   is starting to converge to the desired position   at a time of 2 seconds while the error values of the experiment result for error position control architecture with uncompensated PD controller with the largest error within 0.24 (rad) from the actual value has shown in Fig. 15.In Fig. 17 shown the experiment results for position control using Cascade controller with friction compensation.We see that the actual position   is starting to converge to the desired position   at a time of 2 seconds while the error values of the experiment result for error position control architecture with compensated Cascade controller with the largest error within 0.029 (rad) from the actual value has shown in Fig. 19.
In Fig. 18 shown the experiment results for position control using Cascade controller without friction compensation.We see that the actual position   is starting to converge to the desired position   at a time of 2 seconds while the error values of the experiment result for error position control architecture with uncompensated Cascade controller with the largest error within 0.8 (rad) from the actual value has shown in Fig. 20.
In Fig. 21 shown the final experiment results of the combination of all the 4 controllers (2 compensated controllers and other 2 uncompensated controllers).We see that the dark green curve of the Uncompensated Cascade controller surges highly to 0.8 (rad) while the orange graph of the

Conclusion
In this research, we derive models of a DC motor with three lumped parameters   ,   , and   for estimation by using UKF.To simplify the complexity of the parameter estimation, we approximate the models including the Coulomb frictional effect.Then, we use the three estimated parameters to design PD controller by root locus for position control and Cascade controller.In the parameter estimation, dynamic reference is used to capture all possible physical properties of the motor.The real experiment was conducted.Based on this experiment, the Uncompensated graphs show bigger errors than the compensated ones.In spite of trying our best to tune the Uncompensated ones, they are not still as good as the compensated ones.Therefore, the compensated controllerseither PD or Cascade-outperform the Uncompensated controllers.The maximum estimation bias of the compensated PD controller is only within 0.28% whereas that of the compensated Cascade

Fig. 1 .
Fig. 1.The schematic of permanent magnet DC motor

Fig. 3 .
Fig. 3. Root locus of position control system with PD controller

Fig. 11 .
Fig. 11.Experiment model for position control with PD controller

Fig. 16 .
Fig. 16.Experiment model for position control with Cascade controller

Fig. 20 .Fig. 21 .
Fig. 20.Experiment results for position error of uncompensated Cascade controller error Compensated Cascade controller error Uncompensated P controller error Uncompensated Cascade controller error