An electric motor is a device that is often employed to provide motion to mechanical systems. There are several classes of electric motors: induction motors [1], Chaps. 10 and 11, PM stepper motors [2], PM synchronous motors [3], switched reluctance motors [4, 5], brushless DC motors [6], chapter 10, etc. However, the PM brushed DC motor is the simplest motor to control. Moreover, as its mathematical model is linear and single–input–single–output, it is the ideal motor for using as an experimental prototype in the first stages of education in automatic control. In this chapter, velocity control of a PM brushed DC motor is studied. Position control of this class of motors is studied in the next chapter.
10.1 Mathematical Model
-
u is the voltage applied at the motor armature terminals.
-
i is the electric current through the armature circuit.
-
Θ is the motor angular position.
-
θ is the load angular position.
-
is the counter electromotive force where k e is the counter electromotive force constant.
-
T = k m i is the generated torque, or electromagnetic torque, where k m is the motor torque constant.
-
T c is the load equivalent torque seen at the motor shaft. This torque opposes the motor movement (it is applied in the opposite sense to the definition of Θ).
-
T L is the torque applied by the motor on the load.
-
T p is the torque due to an external disturbance. It is assumed that this torque opposes the load movement (it is applied in the opposite sense to the definition of θ). If this is not the case, then T p is negative.
-
L is the armature inductance.
-
R is the armature resistance.
-
J m is the inertia of the motor’s rotor.
-
b m is the motor viscous friction coefficient.
-
J L is the load inertia.
-
b L is the load viscous friction coefficient.
-
n 1 and n 2 stand for the teeth number at the motor axis and at the load axis respectively.

A loaded permanent magnet (PM) brushed direct current (DC) motor
Note that a PM brushed DC motor is an electromechanical system with an electrical subsystem and a mechanical subsystem. The corresponding mathematical model is found by analyzing these individual subsystems to join them afterward. The model of each of these parts is obtained in the following.
10.1.1 The Motor Electrical Subsystem Model
10.1.2 The Motor Mechanical Subsystem Model
Newton’s Second Law must be applied separately to each one of the two bodies: the motor’s rotor and its load.
10.1.2.1 Motor’s Rotor Model


10.1.2.2 Load Model








![$$\displaystyle \begin{aligned} \begin{array}{rcl} I(s)&\displaystyle =&\displaystyle \frac{1}{sL+R}[U(s)-n\;k_e\;s\theta(s)],{} \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equ11.png)
![$$\displaystyle \begin{aligned} \begin{array}{rcl} \theta(s)&\displaystyle =&\displaystyle \frac{1}{s^2J + sb }[n\;k_{m}\;I(s)-T_p(s)],{} \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equ12.png)
10.2 Power Amplifier
It is important to stress the necessity of employing a power amplifier. A control system can be divided into two parts: (i) the control part, and (ii) the power part. The control part includes all the hardware devoted to processing information (sensors and control algorithms) to be used to determine the command to be sent to the controlled process. This task requires precise electronic circuits that handle weak electrical signals, i.e., they merely process information but they do not handle high power levels. However, these commands must be capable of producing significant variations of the signal applied at the plant (motor) input. Furthermore, the plant input handles important power levels to be capable of producing the expected changes in the plant. This is the reason for including a power stage in a control system.

10.3 Electric Current Control





Equivalent block diagrams for a PM brushed DC motor provided with a proportional current loop and a power amplifier
![$$\displaystyle \begin{aligned} \begin{array}{rcl} G_1(s)=\frac{nk_m}{\left[\left(\frac{sL+R}{KA_p}+1\right)(sJ+b)+\frac{n^2k_mk_e}{KA_p}\right]s},{} \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equ18.png)
![$$\displaystyle \begin{aligned} \begin{array}{rcl} G_2(s)=\frac{-\left(\frac{sL+R}{KA_p}+1\right)}{\left[\left(\frac{sL+R}{KA_p}+1\right)(sJ+b)+\frac{n^2k_mk_e}{KA_p}\right]s}.{} \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equ19.png)



![$$\displaystyle \begin{aligned} \begin{array}{rcl} \theta(s)=\frac{1}{s^2J+sb}[nk_mI^*(s)-T_p(s)],{} \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equ22.png)
![$$\displaystyle \begin{aligned} \begin{array}{rcl} \theta(s)&\displaystyle =&\displaystyle \frac{1}{s(s+a)}[kI^*(s)-\frac{1}{J}T_p(s)]{}\\ a&\displaystyle =&\displaystyle \frac{b}{J}, k=\frac{nk_m}{J}. \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equ23.png)

![$$\displaystyle \begin{aligned} \begin{array}{rcl} \omega(s)=s\theta(s)=\frac{1}{s+a}[kI^*(s)-\frac{1}{J}T_p(s)].{}\vspace{-4pt} \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equ24.png)
10.4 Identification
In this section we are interested in performing an experiment that allows us to compute the values of the constants k and a present in the model (10.24). This experiment is described in the following.



Velocity evolution in a PM brushed DC motor when a constant i ∗ = A is applied




![$$\displaystyle \begin{aligned} \begin{array}{rcl} \tau=2{.}7\mathrm{[s]},\omega_f=2\mathrm{[V]}.{} \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equ27.png)


Experimental identification of a PM brushed DC motor
10.5 Velocity Control
The main objective of control design is to ensure that the desired transient and steady-state response specifications are achieved. The transient response specifications refer to how fast the closed-loop system is desired to respond. This is achieved by suitably assigning the closed-loop poles. On the other hand, the steady-state specifications refer to the difference that is desired to exist between the measured velocity ω and the desired velocity ω d when time increases. Moreover, this must stand despite the presence of the external disturbance T p (s). The controller is the device responsible for ensuring that all these specifications are satisfied.
Suppose that the desired velocity is a constant, i.e., a step function. Then, ω d is a constant that may be positive, negative or zero. As the plant in (10.24) has no poles at s = 0, then the system type is 0. This means that the use of a proportional velocity controller with the form i ∗ = k p (ω d − ω), with k p > 0, cannot achieve ω = ω d in a steady state even if no external torque disturbance is present, i.e., even when T p = 0. The solution to this problem is a controller with an integral action to render the system type 1, i.e., a proportional–integral (PI) controller. However, as explained in Sect. 5.2.4, a PI controller cannot simultaneously achieve the desired transient response specifications and a satisfactory rejection of external disturbances T p (s). It is for this reason that the design of a modified PI velocity controller is presented in the following, which is capable of simultaneously achieving these requirements.
10.5.1 A Modified PI Controller




![$$\displaystyle \begin{aligned} \begin{array}{rcl} \dot\omega+(a+k_p^{\prime}k)(\omega-\omega_d)+k_ik\int_0^t(\omega(r)-\omega_d)dr&\displaystyle &\displaystyle \\ +k_1k[\omega-\omega_d-(\omega(0)-\omega_d)]&\displaystyle =&\displaystyle -\frac{1}{J}T_p. \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equf.png)


![$$\displaystyle \begin{aligned} \begin{array}{rcl} \dot\omega+(a+k_p^{\prime}k)(\omega-\omega_d)&\displaystyle +&\displaystyle k_1k\int_0^t\left[k_i^{\prime}(\omega(r)-\omega_d)+(\dot\omega(r)-\dot\omega_d)\right]dr\\ &\displaystyle &\displaystyle =-\frac{1}{J}T_p.{} \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equ31.png)

![$$\displaystyle \begin{aligned} \begin{array}{rcl} k_i^{\prime}&\displaystyle =&\displaystyle a+k_p^{\prime}k,\\ \xi&\displaystyle =&\displaystyle \int_0^t\left[\dot\omega(r)+k_i^{\prime}(\omega(r)-\omega_d)\right]dr, \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equi.png)





![$$\displaystyle \begin{aligned} \begin{array}{rcl} \lim_{t\to\infty}\dot\xi(t)&\displaystyle =&\displaystyle \lim_{s\to 0}s\left[s\xi(s)\right],\\ &\displaystyle =&\displaystyle \lim_{s\to 0}s\left[\frac{-\frac{1}{J}s}{s+k_1k}\frac{t_d}{s}\right]=0. \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equm.png)



![$$\displaystyle \begin{aligned} \begin{array}{rcl} \frac{d}{dt}\int_0^t\left[\dot\omega(r)+k_i^{\prime}(\omega(r)-\omega_d)\right]dr=\dot\omega+k_i^{\prime}(\omega-\omega_d)\to 0. \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equn.png)



-
If no perturbation exists (T p = 0 and
for all t ≥ 0), the velocity response is as that of a first-order system with time constant
. The velocity ω reaches the desired velocity ω d (which is constant) in a steady state.
-
If a constant disturbance appears (T p = t d ≠ 0), the deviation produced by such a disturbance vanishes as time increases. Moreover, if a larger k 1 is chosen (such that the product k 1 k > 0 is larger), then the deviation due to the disturbance vanishes faster. If once the deviation due to the disturbance is taken to zero (when ω = ω d ), a step change is commanded in the desired velocity ω d (a change in ω d is commanded when the disturbance T p is present), then the velocity responds as if the disturbance T p is not present, i.e., as in the previous item: with
as the time constant and velocity ω reaches its desired value ω d in a steady state.


-
is chosen to define the desired time constant
, which is always less than the time constant of the plant to be controlled
, i.e., a very convenient feature.
-
k 1 > 0 is chosen large for a fast rejection of the disturbance effects. This can be done by trial and error or it can be computed recalling that
is the time constant of the filter in (10.32), which is responsible for the elimination of the deviation due to the disturbance.
Another, better known, way of designing a PI controller with the same advantages found above is by using two-degrees-of-freedom controllers. These are presented in the following section.
10.5.2 A Two-Degrees-of-Freedom Controller



















Closed-loop system with a two-degrees-of-freedom controller
10.6 Experimental Prototype
-
Microcontroller PIC16F877A [9].
-
Digital/analog converter, DAC0800LCN, 8 bits.
-
2 PM brushed DC motors. Nominal voltage 24[V], nominal current 2.3[A].
Both motor shafts are coupled such that one motor is employed as a generator. The generated voltage is used as measurement of the other motor’s velocity which is controlled according to the control law in (10.33).

Electric diagram of the complete velocity control system for a PM brushed DC motor
In the following, the way in which the microcontroller PIC16F877A can be used as a controller is described. It is stressed that it is not the purpose to present detailed information on the microcontroller operation. A simple description is presented on how the components of this microcontroller are employed to implement the control law being tested.
The motor velocity is measured through canal 0 of the microcontroller analog/digital converter. Only the eight highest bits of the converter are employed. The input analog range of the converter is [0, +5][V]. Hence, the datum delivered by the converter t_0 is used to compute w=0.0196*t_0 (where 0.0196 = 5∕255) to retrieve, as the variable w, voltage at the analog input of the analog/digital converter. This voltage is delivered by the motor used as a generator and it is proportional to the velocity of the motor to be controlled. Hence, it is assumed that this voltage represents the measured velocity. Note that before entering the analog/digital converter (through microcontroller pin 2), the generator voltage passes through a tension divisor used to adapt the maximal generated voltage (12.3[V] at maximal velocity) to 5[V]. This is the upper limit of the analog input of the analog/digital converter. The operational amplifier TL081 is used to protect the microcontroller.



Conditioning of the signal i ∗, which must be sent to the digital/analog converter
The circuit MAX232 is devoted to sending the measured velocity ω and the control signal i ∗ to a portable computer (through a USB to a series adapter) whose unique purpose is the graphical representation of those variables. This is performed through the variables “cuentaH=0x00” and “cuentaL=t_0” (to send velocity) or “cuentaH=0x00” and “cuentaL=(iastd) &(0xFF)” (to send the control signal). These data are sent to the portable computer through the instructions: putc(0xAA); putc(cuentaH); putc(cuentaL);. Finally, the timer TMR0 is employed to fix the sample time T = 0.002[seg] (40 counts of timer 0).
10.6.1 Electric Current Control
The electrical loop shown in (10.14) is implemented as follows. A 1[Ohm] power resistance is series connected to the motor armature. Hence, voltage between terminals of this resistance is numerically equal to the electric current i flowing through the motor. Then, the operational amplifier at the block “current control” in Fig. 10.6 performs the operation indicated in (10.14) with K = 100.
10.6.2 Power Amplifier
According to Sect. 9.1.2, the block labeled “power amplifier,” in Fig. 10.6, allows us to reduce the dead zone introduced by the power transistors in a complementary symmetry connection. Moreover, with the indicated values A p = 1 is accomplished in (10.13) and (10.15). This results in A p K = 100. This value has been chosen because a good performance was obtained. It is important to stress that large values such as A p K = 700 are employed in commercial drivers for industrial applications [8].
10.7 Simulation Results



MATLAB/Simulink diagram used to obtain the results in Fig. 10.9

Simulation results when using the controller in (10.33)
10.8 Experimental Results



![$$\displaystyle \begin{aligned} \begin{array}{rcl} \frac{k_i}{k_p}=a, \tau=\frac{1}{k_pk}=0{.}6231\mathrm{[s]},{} \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equ43.png)
-
Although the transient response is close to the desired one, it is not as good as that in Fig. 10.10 (the thin line represents the desired transient response).
-
The measured velocity reaches the desired velocity in a steady state when no external disturbance is applied, i.e., before t = 8[s].
-
The deviation produced by the external disturbance is much larger than in Fig. 10.10 and it vanishes much more slowly. In fact, this deviation is not compensated for before a new change in the desired velocity appears at t = 12[s]. The same is observed when the disturbance disappears at t = 17[s]. According to Sect. 5.2.4, this is because the dynamics of the disturbance rejection has a dominant time constant that is equal to the motor open-loop time constant,
, which is 2.7[s] as indicated in (10.27).

Classical proportional–integral (PI) velocity control using the tuning rule in (10.43)

-
The deviation due to the disturbance vanishes almost as fast as in Fig. 10.10.
-
Although the transient response to the reference of velocity is very fast, it does not correspond to the desired transient response represented by the thin line in Fig. 10.12. As explained in Sect. 5.2.4, this is because the closed-loop system has two poles, one assigned at s = −p 1, but the other is far to the left of this point. Moreover, the pole located at
is very close to the zero at s = −d = −1.4, i.e., its effects are significantly compensated for (cancelled) and only the dynamics of the fast pole located far to the left is observed.

Classical PI velocity control using the tuning rule in (10.44)
The experimental results in Figs. 10.11 and 10.12 corroborate the observations presented in Sect. 5.2.4 on classical PI velocity control: there is no tuning rule allowing us to compute the proportional and integral gains to simultaneously achieve the desired specifications for the transient response to a velocity reference and for a satisfactory disturbance rejection. This motivates the design of the modified PI controller presented in (10.33) whose experimental results are shown in Fig. 10.10.
10.9 Microcontroller PIC16F877A Programming

Flow diagram for microcontroller PIC16F877A programming when controlling velocity in a PM brushed DC motor
10.10 Frequency Response-Based Design
10.10.1 Model Identification
- 1.
The following voltage signal has been applied at the motor armature terminals
[V] and the measured velocity of the motor has been observed to have the following form
[rad/s], where ω 0 is a constant. The variable ω is used to designate the motor angular velocity and
to designate the angular frequency. ω is used to designate any of these variables when it is evident from the context which of these variables is referred to.
- 2.
This experiment has been performed for several values of frequency ω, and the results are presented in Table 10.1. Note that only the amplitude of the sinusoidal functions is taken into account. Moreover, the phase ϕ is not considered.Table 10.1
Frequency response experimental data for model identification of a PM brushed DC motor
[rad/s]
2A [V]
2B [rad/s]
0.1
1
18.68
0.2
1
18.85
0.3
1
18.85
0.4
1
18.07
0.5
1
17.68
0.6
1
18.46
0.7
1
18.46
0.8
1
18.46
0.9
1
17.67
1
1
17.67
2
1
16.1
3
1
14.14
4
1
12.17
5
1
11
6
1
9.42
7
1
8.25
8
1
7.46
9
1
6.68
10
1
6.29
20
1
3.15
30
1
2.35
40
1
1.96
50
1
1.57
60
1
1.18
70
1
1.18
80
1
0.79
90
1
0.79
100
1
0.79
- 3.
The Bode diagrams obtained from Table 10.1 are presented in Fig. 10.14. One 0[dB/dec] asymptote and one − 20[dB/dec] asymptote fit these experimental data well. This means that the velocity motor model must have the following structure:(10.45)Fig. 10.14
Bode diagrams from the experimental data used for model identification. Continuous: asymptotes. Dashed: experimental data (Table 10.1)
- 4.
From the intersection of these asymptotes,
it is concluded that:(10.46) - 5.
From the zero frequency response magnitude:
[dB], i.e.,
(10.47)
10.10.2 Proportional–Integral Control Design

Proportional–integral control of velocity




Integral control of velocity k i = 1, k p = 0

Experimental response of the control system in Fig. 10.16, i.e., an integral controller of velocity with k i = 1, k p = 0





![$$\displaystyle \begin{aligned} \begin{array}{rcl} \vert k_pb(z+1)\vert_{\mathrm{dB}}=20\log(k_pb)+\vert z+1\vert_{\mathrm{dB}}=0\mathrm{[dB]}, \end{array} \end{aligned} $$](/epubstore/G/V-M-Guzman/Automatic-Control-With-Experiments/OEBPS/images/454499_1_En_10_Chapter/454499_1_En_10_Chapter_TeX_Equaf.png)




Bode diagrams of the factor z + 1. The horizontal axis represents



Experimental response when using the control scheme in Fig. 10.15, with gains k p = 0.0619 and k i = 0.8821


Note that the disturbance rejection with
both controllers is not so different than what happens with the
responses obtained in Sect. 10.8 for a classical PI controller and
controller in (10.33). The key to understanding this is to
recall that the PI controller in Sect. 10.8 is designed by
imposing , which results in a slow rejection of
external disturbances, as explained in Sect. 5.2.4. On the other hand, the
classical PI controller in the present section is designed without
imposing such a constraint. Thus, a faster disturbance rejection is
accomplished. Note, however, that this design has been performed
without taking into consideration the desired specifications for
the disturbance rejection response.
Figures 10.14, and 10.18 to 10.21, in addition to all computations involved in controller design, were performed using the following MATLAB code in an m-file:
10.10.3 Prototype Construction
The electric diagram, in addition to the computer program used to evaluate control algorithms, is identical to the electric diagram and the Builder 6 C+ + code listed in Chap. 12. The only difference is that in Chap. 12, two encoders have to be read, whereas in the present chapter only one encoder is to be read. The sampling period used in the present section was 0.01[s]. Also, a microcontroller PI16F877A is used in Chap. 12 and in the present chapter. The code for programming this microcontroller is identical in both chapters. Again, in the present chapter, only one encoder has to be read. Thus, the code of the program is simpler in the present case.
In particular, the frequency response
experiments performed for model identification in Sect.
10.10.1
require the following voltage [V] to be applied at the armature
terminals of the motor. This is accomplished by writing the program
line “iast=2.0+A*sin(w t);,” provided that A=0.5 and w are defined
as constants in the non-executable part of the program. This is all
we need, because, according to Chap. 12, the control program and hardware
are so contrived that the numerical value of the variable “iast”
appears as a voltage signal at the motor armature terminals.
This prototype has been built because it presents some advantages when performing the frequency response experiments described in Sect. 10.10.1. When using the prototype depicted in Fig. 10.6 for frequency response identification, the velocity of the motor has a large drift, which poses difficulties for the measurement of the velocity amplitude. Such a problem is eliminated with the new prototype.
10.11 Summary
Two velocity controllers for a PM brushed DC motor have been experimentally tested: a classical PI controller and a modified PI controller. The latter controller has been motivated by some of the drawbacks of the former and the experimental results have corroborated the good performance of the new controller. Clear explanations have also been provided on how to build the interfaces required by the complete control system and how a microcontroller can be programmed to implement the designed controller.
It is important to stress that it is common in the motor control literature to assume that either torque or electric current are the motor input signal, despite it the voltage being the actual motor input signal and torque being a variable that results from the evolution of the motor’s electrical dynamics. It has been explained in this chapter that use of an internal electric current loop makes it possible to use electric current, or the generated torque, as the input variable.
A significant problem that must be solved before designing a controller is to determine the numerical values of the plant parameters. Two ways of solving this problem in a PM brushed DC motor are presented in this chapter. The fundamental idea in the first approach is to apply a step input to the motor and to observe its response. This response is found to be similar to that of a first-order system. As this response is well known, then the parameters of a first-order system are identified from such a time response. In the second approach, a frequency response experiment is performed: (1) Several sinusoidal voltages are applied at the motor terminals, each one with a different frequency. (2) The ratio between the output and the input amplitudes are plotted with respect to frequency. (3) From this magnitude Bode diagram, it is possible to estimate the numerical parameters of the DC motor model.
10.12 Review Questions
- 1.
What is an electric current loop and what is it used for?
- 2.
Why does a PI controller suffice to regulate velocity in a PM brushed DC motor? Why not use a proportional–integral–derivative (PID) controller?
- 3.
Is a PI velocity controller useful for taking the steady-state error to zero when the desired velocity is not constant? What happens if the disturbance is not constant? Explain.
- 4.
How would you use the ideas in the present chapter to regulate voltage produced by an electric generator that is actuated by a PM brushed DC motor?
- 5.
How would you use the ideas in the present chapter to control a temperature control system and a level control system?
- 6.
What controllers would you use for the control systems in the previous question? Would you use a PID controller? Why?
- 7.
If a classical PI controller slowly compensates for the effect of a disturbance, what changes would you make to the controller gains?
- 8.
What are the effects of the proportional and the integral gains in a classical PI controller?