# Robust Position Control of a DC Motor by Sliding Mode

Gabriela Mamani, Jonathan Becedas, Vicente Feliu Batlle

► To cite this version:

Gabriela Mamani, Jonathan Becedas, Vicente Feliu Batlle. Robust Position Control of a DC Motor by Sliding Mode. First IFIP WG 5.5/SOCOLNET Doctoral Conference on Computing, Electrical and Industrial Systems (DoCEIS), Feb 2010, Costa de Caparica, Portugal. pp.493-502, 10.1007/978-3-642-11628-5_55. hal-01060775

HAL Id: hal-01060775

https://inria.hal.science/hal-01060775

Submitted on 16 Nov 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Robust Position Control of a DC Motor
by Sliding Mode

Gabriela Mamani¹, Jonathan Becedas² and Vicente Feliu Battle¹

¹ Universidad de Castilla-La Mancha, E.T.S.I. Industriales,
Av. Camilo José Cela S/N, Ciudad Real, Spain

² Department of Engineering, University of Leicester, LE1 7RH, Leicester, United Kingdom
{glmamani, Vicente.Feliu}@uclm.es, jbr6@le.ac.uk

**Abstract.** The position of the DC motor is controlled by using a continuous sliding mode control (SMC), which is highly robust to the Coulomb friction torque and to high unknown payload variations, which involve changes in the rotational inertia of the motor shaft. The main contribution of the work is the experimentation of a SMC control which does not requires the knowledge of the payload variation range, i.e., the system is quite robust to any unknown change in the payload mass value.

**Keywords:** Robust control, sliding mode control, DC motor.

## 1 Introduction

Many of the developed controllers depend strongly on the exact modelling of the mechanical system. Any change in the plant parameters reduces the controller performance, making the system lose the desired specifications. The discrepancies between the actual plant and the mathematical model may be due to un-modelled dynamic, variation in system parameters or the approximation of complex plant behaviour by a straightforward model. We must ensure that the resulting controller has the ability to produce the required performance levels in practice despite such plant/model mismatches. This has led to an intense interest in the development of so-called robust control methods which seek to solve this problem. One particular approach to robust controller design is sliding model control methodology.

Several SMC approaches have been applied to different types of motors. The authors in [1] apply discrete time sliding-mode methodology in order to develop an induction motor position controller. In [2] an adaptive observer and a higher order sliding-mode framework are combined to control induction motors without mechanical sensors. In [3] the sliding-mode approach is developed to control an induction motor fed by a three-level voltage source inverter. In the paper of [4] discuss current decoupling and controller design for sensorless vector-controlled induction motor drives. They present a method, which does not require speed estimation, for decoupled current control based on integral sliding mode. Another contribution concerned with electric drive control is the paper by [5], which presents a
cascade control scheme, based on multiple instances of a second-order SMC algorithm for the speed/position control of permanent-magnet motors.

A (SMC) design methodology based on the control law described in [6] and [7] is applied here to a DC servo motor model. A rigorous interpretation of the relationship between the equivalent control law and the low frequency components of the discontinuous control action maintaining a sliding motion is described in [8].

## 2 Contributions to Technological Innovation

This work presents an easily implemented robust controller applied to DC motor model, since the motor is the basis of many applications in present-day industry, as is the case of manipulator robots. A simple demonstration of the control method's robustness to variations in the inertia is provided. The analysis presented shows that the system correctly performs for any type of payload and for any variation in it. Unlike other existing control methods in which to define the range in which the inertia may vary is necessary, in this paper this is not, which permits greater versatility and security upon its implementation in any type of electro-mechanical systems. Moreover the control method is robust to Coulomb friction, one of the non-linear types of friction which is still of current scientific interest since it affects the control accuracy

## 3 Modeling of the DC Motor Model and Problem Statement

A common electromechanical actuator in many control systems is constituted by the DC motor [9]. We can write its dynamic equation by using Newton's Second law:

$$kV = J\ddot{\theta}_m + v\dot{\theta}_m + \hat{\Gamma}_{Coul}(\dot{\theta}_m) \quad (1)$$

Where $\theta_m$ is the angular position of the motor (rad). $\ddot{\theta}_m$ stands for the acceleration of the motor (rad/s²) and $\dot{\theta}_m$ is the velocity (rad/s). J is the unknown inertia of the motor (kg·m²), v is the viscous friction coefficient (N·m·s) and $\hat{\Gamma}_{Coul}$ is the unknown friction torque (N·m). This nonlinear friction term is considered as a perturbation. When the motor rotates ($\dot{\theta}_m \neq 0$) this only depends on the sign of the angular velocity of the motor: $\hat{\Gamma}_{Coul} = \xi \text{sign}(\dot{\theta}_m)$ with $\xi$ an unknown constant value, denoted as Coulomb friction coefficient (N·m). When the velocity is zero ($\dot{\theta}_m = 0$) the friction opposes to the torque produced by the input
voltage, depending on its sign: $\hat{\Gamma}_{Coul} = \xi \text{sign}(V)$. The parameter $k$ is the electromechanical constant of the motor ($N \cdot m/V$). The constant factor $n$ is the reduction ratio of the motor gear; thus $\theta_m = \hat{\theta}_m / n$ and $\Gamma_{Coul} = \hat{\Gamma}_{Coul} n$, note that the magnitude seen from the motor side of the gear are written with an upper hat and the magnitude seen from the other side of the gear are written with standard letters. $V$ is the motor input voltage ($V$) acting as the control variable for the system. This is the input to a servo-amplifier, which controls the input current to the motor by means of an internally PI current controller. The electrical dynamic can be neglected because this is much faster than the mechanical dynamic of the motor.

The motor angle $\theta_m(t)$ is measured by an incremental encoder and is used in this feedback control. The design requirement is to regulate the motor position $\theta_m(t)$ to track a given smooth reference trajectory $\theta_m^*(t)$. The unmeasured state is estimated by computing a finite number of time derivatives of output signal.

The nominal system equation of the motor dynamics (1) can be written in state-space form as

$$ \dot{x}(t) = \begin{bmatrix} 0 & 1 \\ 0 & -\frac{v}{J} \end{bmatrix} x(t) + \begin{bmatrix} 0 \\ \frac{k}{Jn} \end{bmatrix} u(t) - \begin{bmatrix} 0 \\ 1 \end{bmatrix} \mu \text{sign}(\dot{\theta}_m) \quad (2) $$

$$ \text{With } \mu = \frac{\xi}{Jn} \left( \frac{N \cdot m}{kg \cdot m^2} \right) $$

Note that the uncertainty represented by $\mu \text{sign}(\dot{\theta}_m)$ acts in the input channel (i.e. in the second of the pair of the differential equations). The variable structure control system with a sliding mode have the ability to completely reject the effect of the bounded uncertainty acting in the input channels which is referred to as matched uncertainty, (see [8]).

## 4 Sliding Mode Control: State Feedback

Consider the following state representation of an uncertain Linear Time Invariant (LTI) dynamic system $\forall t \ge 0$

$$ \dot{x}(t) = Ax(t) + Bu(t) + f_m(t, x, u) \quad (3) $$

$$ y(t) = Cx(t) \quad (4) $$
Where the state $x \in \mathbb{R}^n$, $A \in \mathbb{R}^{n \times n}$, $B \in \mathbb{R}^{n \times m}$ and $C \in \mathbb{R}^{p \times m}$ with $1 \le m \le n$. The variables $u \in \mathbb{R}^m$ and $y \in \mathbb{R}^p$ will be refereed to as the input and output respectively. The matrices $A, B, C$ will be termed the system, input and output distribution matrices respectively. The uncertain vector function $f_m(t, x, u)$ represents the lumped sum of matched nonlinearities and/or uncertainties.

In this paper, the following is assumed:

A.1: The pair $A, B$ is controllable.

A.2: The input distribution matrix $B$ is full rank.

As is well known, SMC design consists of a two-step procedure. The first one is the description of the control objective in terms of a space state surface (called the sliding surface). The surface choice is developed such that the system trajectories satisfy the performance specifications, when the sliding variable lies on the sliding surface. The second step (controller design) is represented by the definition of a control action which steers the state trajectories onto the sliding surface, after a finite transient.

## 4.1 Sliding Surface Design

By assumption $rank(B) = m$, then an orthogonal similarity transformation $x \to T_r x = z$ exists such that the state and input matrices have the following structure:

$$ T_r A T_r^T = \begin{bmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{bmatrix}, T_r B = \begin{bmatrix} 0 \\ B_2 \end{bmatrix} \qquad (5) $$

Where $A_{11} \in \mathbb{R}^{(n-m) \times (n-m)}$, $A_{12} \in \mathbb{R}^{(n-m) \times m}$, $A_{21} \in \mathbb{R}^{m \times (n-m)}$, $A_{22} \in \mathbb{R}^{m \times m}$ and $B_2 \in \mathbb{R}^{m \times m}$ are assumed to be known constant matrices. The square matrix $B_2$ is non-singular because the input distribution matrix is assumed to be of full rank. The new coordinates are defined as $z = [z_1 \quad z_2]^T$, where $z_1 \in \mathbb{R}^{n-m}$ and $z_2 \in \mathbb{R}^m$.

The sliding surface design $\sigma$

$$ \sigma = \{x \in \mathbb{R}^n : s(t) = Sx(t) = 0 \} \qquad (6) $$

where $s(t) \in \mathbb{R}^m$ is the switching function and $S \in \mathbb{R}^{m \times m}$ is the switching gain matrix to be designed.

If $s(t) = 0$, and $z_2(t)$ in term of $z_1(t)$ yields $z_2(t) = -Mz_1(t)$. Define the gain matrix $M$ as
$$M = S_2^{-1}S_1 \qquad (7)$$

where $S_1 \in \mathbb{R}^{m \times (n-m)}$ and $S_2 \in \mathbb{R}^{m \times m}$ has the property $\det(S_2) \neq 0$.

Hence, the reduced-order sliding mode dynamic is given by

$$\dot{z}_1(t) = (A_{11} - A_{12}M)z_1(t) \qquad (8)$$

In the context of designing a regulator, the matrix governing the sliding motion $(A_{11} - A_{12}M)$ must have stable eigenvalues. The switching surface design problem can therefore be considered to be one of choosing a state feedback matrix $M$ to stabilize the reduced order system $(A_{11}, A_{12})$. Therefore, to find a gain matrix $M$ by using any available linear state feedback method will always be possible, e.g. pole placement, quadratic minimization or direct eigenstructure assignment (more details of this approach can be found in [8].

## 4.2 Control Law Design

A common control structure is divided into two parts:

$$u(t) = u_l(t) + u_n(t) \qquad (9)$$

where $u_l(t)$ is a state feedback control law, often the nominal equivalent control $(u_{eq}(t))$ and $u_n(t)$ is a discontinuous or switched component.

The control signal is assumed to have the following form, [8]:

$$u(t) = -(SB)^{-1}SAx(t) + u_n(t) \qquad (10)$$

The nonlinear component is given by $u_n(t) = \rho sign(s(t))$ where the signum function exhibits the property that $sign(s) = |s|$. In order to smooth the control action, a small positive scalar, $\gamma$ is added to the denominator of the control law to yield

$$u_n(t) = \rho \frac{s}{|s| + \gamma} \qquad (11)$$

The scalar function $\rho$, which depend only on the magnitude of the uncertainty and satisfies the $\eta$-reachability condition, [8].
# 5 Experiments

The experimental platform consists of a three legged metallic chassis that supports an Harmonic Drive mini servo DC motor RH-8D-6006-E036AL-SP(N) which has a reduction relation $n = 50$, an electromechanical constant $k = 0.21(N \cdot m/V)$ an inertia $J = 6.87 \cdot 10^{-5}(\text{kg} \cdot \text{m}^2)$, viscous friction $v = 1.041 \cdot 10^{-3}(N \cdot m \cdot s)$ and Coulomb friction coefficient $\xi = \mu m J = 0.119(N \cdot m)$. The frame makes the stable and free rotation of the motor around the vertical axis of the platform possible. The motor shaft is capable of turning either right or left around the Z axis. Furthermore, a servo-amplifier is used to supply the DC motor. This amplifier accepts control inputs from the computer in the range $[-10,10](V)$. Finally, the sensor system is integrated by an encoder embedded in the motor, which allows us to know the motor position with a precision of $7 \cdot 10^{-5}(\text{rad})$. The sample interval in the signals processing support was set at $T = 1 \cdot 10^{-3}(s)$. The real time experiments are carried out under the Real Time Workshop®, which allows us to generate and execute C code from SIMULINK® models and embedded MATLAB® code. The controller is implemented in a PC with the real time software. A data acquisition card is used to establish the communication with the real platform: execution of the control law and reading of the sensorial system described above.

## 5.1 Experimental Results

The demonstration of the robustness with regard to payload changes is carried out by changing the ratio between the inertia value used to design the control algorithm, $J_a$, and the real value of the motor, $J : \delta = J_a / J$. The experiments are developed by changing this ratio from $\delta = 20$ to $\delta = 1/20$. Fig. 1 depicts the results when $1 \le \delta \le 20$. The signals $\theta_m$ to $\theta_m^*$ correspond to the different values of $\delta$, (see first and second column of Table 1; the third column represents the percentage of $J$ with regard to $J_a$). Note that the control the control is robust with regard to the inertia change: the controller never becomes unstable and the steady state error is null. Nevertheless, the trajectory tracking error increases when the inertia of the motor decreases with regard to that used to design the control. Observe that when $\delta = 1$, i.e. $J_a = J$ the delay of the trajectory $\theta_m$ with regard to the reference $\theta_m^*$ is insignificant, and when that ratio increases from 2 to 20, the delay is more notorious. Nevertheless, the system is always stable and the steady state error is null, which demonstrates the robustness of the control law.
The maximum trajectory tracking errors in each trajectory ($\theta_m$ to $\theta_{m7}$) $\epsilon\% = (|\frac{\theta_m^* - \theta_m}{\Theta}|)$, where $\Theta$ represents the amplitude of the signal $\theta_m^*$ (in this case $\Theta = 1(rad)$), are represented in the fourth column of Table 1. Note that the error $\epsilon\%$ increases if $\delta$ increases. Such values vary from 2.25%, for $\theta_m$, to 80.84%, for $\theta_{m7}$. Note that the steady state error is null in both cases, although the maximum trajectory tracking error $\epsilon\%$ increases with the $\delta$ value.

<figure><img src="image_2.png" /><figcaption>Fig. 1. Results when $1 \le \delta \le 20$.</figcaption></figure>

<table><caption>Table 1. Result 1.</caption><thead><tr><th>Signal</th><th>δ</th><th>J = %J<sub>a</sub></th><th>ε%</th></tr></thead><tbody><tr><td>θ<sub>m</sub></td><td>1</td><td>100%</td><td>2.25</td></tr><tr><td>θ<sub>m2</sub></td><td>2</td><td>50%</td><td>2.92</td></tr><tr><td>θ<sub>m3</sub></td><td>3</td><td>33.33%</td><td>18.13</td></tr><tr><td>θ<sub>m4</sub></td><td>5</td><td>25%</td><td>51.78</td></tr><tr><td>θ<sub>m5</sub></td><td>10</td><td>10%</td><td>69.20</td></tr><tr><td>θ<sub>m6</sub></td><td>15</td><td>6.67%</td><td>76.74</td></tr><tr><td>θ<sub>m7</sub></td><td>20</td><td>5%</td><td>80.84</td></tr></tbody></table>

Fig. 2 shows the experimental results obtained when $1/20 \le \delta \le 1$. In this case, the signals $\theta_{m8}$ to $\theta_{m13}$ correspond to those experiments carried out with $\delta$ varying between the values of 1 and 1/20. This signifies that in the following experiments the real inertia of the motor is from 1 to 20 times greater than the controller design inertia, or that it is the same to increase the inertia of the motor shaft. The first and
second column of Table 2 depicts the correspondence between the signals $\theta_m$ to
$\theta_{m13}$ with regard to the ratio $\delta$. The third column of this table shows the
percentage $\frac{J}{J_a} \cdot 100$. Note that the most unfavourable case $\delta = 1/20$ corresponds to
inertia of the motor which is 20 times greater than the controller design inertia.
Observe that the trajectories $\theta_m$ to $\theta_{m13}$ are superimposed on the reference trajectory
$\theta_m^*$. All the trajectories have null steady state error and the trajectory tracking errors
$\epsilon\%$ do not increase (see fourth column of Table 2).

These results permit us to affirm that the trajectory tracking error is almost the
same for all cases in which $J \ge J_a$, and these errors correspond to that obtained
when $J = J_a$.

This demonstrates the good performance of the presented method, which can be
used in experimental platforms for trajectory tracking tasks in which the payload may
change. Such a robustness is obtained in these experiments for very extreme
cases $J_a \ge J \ge J_a$, which means that there is no boundary in the $\delta$ value, with the
exception of physical limitations such as the saturation of the servo-amplifier, i.e. the
maximum and minimum $\delta$ values are given by the maximum voltage value supported
by the servo-amplifier (in these experiments $10(V)$ which is delimited for every
application.

The authors want to highlight that due to the (SMC) nature is that of a switch
changing from one state to the other, the control action signals has not been included,
because the control action presents a high frequency chattering effect which makes
quite difficult the visualization. Since the nature of this paper is wanted to be
maintained essentially practical and experimental by the authors, theoretical analysis
of the system under the effect of the different types of noise has not been included.
Nevertheless, notice that the results are obtained from a real platform, means that the
sensors measurement and the system dynamics are affected by unstructured noise.
Even in presence of these types of noise the control system works properly with high
accuracy as shown with these experimental results, which demonstrate a high
robustness to unstructured measurement and system noises.
<figure><img src="image_3.png" /><figcaption>Fig. 2. Results when $1/20 \le \delta \le 1$</figcaption></figure>

<table><caption>Table 2. Result 2.</caption><thead><tr><th>Signal</th><th>δ</th><th>J = %J<sub>a</sub></th><th>ε%</th></tr></thead><tbody><tr><td>θ<sub>m</sub></td><td>1</td><td>100%</td><td>2.25</td></tr><tr><td>θ<sub>m8</sub></td><td>1/2</td><td>200%</td><td>2.18</td></tr><tr><td>θ<sub>m9</sub></td><td>1/3</td><td>300%</td><td>2.24</td></tr><tr><td>θ<sub>m10</sub></td><td>1/5</td><td>500%</td><td>2.21</td></tr><tr><td>θ<sub>m11</sub></td><td>1/10</td><td>1000%</td><td>2.21</td></tr><tr><td>θ<sub>m12</sub></td><td>1/15</td><td>1500%</td><td>2.18</td></tr><tr><td>θ<sub>m13</sub></td><td>1/20</td><td>2000%</td><td>2.15</td></tr></tbody></table>

## 6 Conclusion

A SMC based on the equivalent control approach has been presented and designed for the DC motor model. This approach allows matched uncertainties in DC motor model to be dealt with. These results advise the use of a control scheme insensitive to payload variations, to fulfil the requirements imposed to the system for the whole range of inertias due to the controller design does not require bounded uncertainties. Further computer simulations and experiments were carried out to test the robustness property of the SMC, considering different combination of uncertain parameters. The experimental results demonstrate the good performance of the method: the responses of the control system in trajectory tracking tasks are quite fast and the steady state errors are null. Therefore, in light of the experimental results obtained, we demonstrate that the SMC control method proposed in this paper solves the problem of high payload changes in DC motors and electromechanical actuators, since the control design is robust with regard to the friction in the motor dynamics and high
varying payloads with no restriction in the variation, i.e. this method does not require
the *a priori* knowledge of the varying range of the load, being this, the main
contribution of this work. Furthermore, the control law is very well suited for
trajectory tracking tasks with. This characteristic makes the control here designed able
to control robot manipulators, in which the trajectory tracking is an essential problem
since the accelerations must be slow enough not to damage the electrical actuators nor
the mechanical structure and joints.

On the other hand, a chattering reduction technique is part of the future research to
be done and also the design and development of a sliding mode controller to solve the
tracking problem of an uncertain very lightweight single-link flexible arm with high
varying payload

**Acknowledgments.** This research was supported by the Spanish Government Research Programme via Project Ref.: PBI-05-057, by the Consejería de Educación y Ciencia de la Junta de Comunidades de Castilla-La Mancha and European Social Fund.

References

1. Veselic, B., Perunicic-Drazenovic, B., Milosavljevic, C.: High-Performance Position Control of Induction Motor Using Discrete-Time Sliding-Mode Control. IEEE Transactions on industrial electronics. 55, 11, pp. 3809--3817 (2008)

2. Traore, D., Plestan, F., Glumineau, A., De Leon, J.: Sensorless Induction Motor: High-Order Sliding-Mode Controller and Adaptive Interconnected Observer. IEEE Transactions on Industrial Electronics. 55, 11, pp. 3818--3827 (2008)

3. Ryvkin, S., Schmidt-Obermoeller, R., Steimel, A.: Sliding-Mode-Based Control for a Three-Level Inverter Drive. IEEE Transactions on Industrial Electronics.55, 11, pp. 3828--3835 (2008)

4. Comanescu, M., Longya Xu, Batzel, T.D.: Decoupled Current Control of Sensorless Induction-Motor Drives by Integral Sliding Mode. IEEE Transactions on Industrial Electronics. 55, 11, pp. 3836--3845 (2008)

5. Pisano, A., Davila, A., Fridman, L., Usai, E.: Cascade Control of PM DC Drives Via Second-Order Sliding-Mode Technique. IEEE Transactions on Industrial Electronics. 55, 11, pp. 3846--3854 (2008)

6. Young, K.D., Utkin, V.I., Ozguner, U.: A Control Engineers Guide to Sliding Mode Control. IEEE Transactions on Control Systems Technology. 7, 3, pp. 328--342, (1999).

7. Edwards, C., Spurgeon, S. K.: Sliding Mode Control -Theory and Applications. Taylor and Francis, U.K. (1998)

8. Utkin, V.: Sliding Modes in Control Optimization. Springer-Verlag, Berlin (1992)

9. Begamudre, R. D.: Electro-Mechanical Energy Conversion with Dynamics of Machines. Wiley New York (1998)