Real Time DC Motor Control
  • Lab : Real Time DC motor control
  • Getting Started
  • DC motor modeling and control loop design
  • Simulation
  • Experimentation
Powered by GitBook
On this page
  • Motor description
  • System modeling
  • Motor Bloc Diagram
  • Motor control : cascaded strategy
  • Electrical dynamics control
  • Mechanical dynamics control
  • References

Was this helpful?

DC motor modeling and control loop design

PreviousGetting StartedNextSimulation

Last updated 6 years ago

Was this helpful?

Motor description

System modeling

Electric equation:

From kirchhoff's voltage law :

Mechanical equation:

By Newton's law:

Electro-mechanical coupling:

The back EMF is proportional to speed :

The motor torque is proportional to current :

Motor Bloc Diagram

Motor control : cascaded strategy

The control synthesis is inspired by Permanent Magnet Synchronous Motor control synthesis based on cascaded control synthesis. Due to frequency separation the control can be divided into two control loops. The inner loop control the electrical dynamic while the outer loop treats the mechanical dynamic. Generally the the electrical dynamics is neglected and the mechanical dynamics is considered only. However in the case where motor resistance is low, this strategy can damage the motor.

Electrical dynamics control

With the assumption that the mechanical dynamic is slower the the electrical one, one has :

Feedback control with integral action

The electrical dynamics is given by

From the figure one gets :

The system dynamics can be described by

with the control

The closed loop system leads to :

The closed loop dynamics depends on the eigenvalues of the matrix :

One has

It leads to a characteristic equation

to be identified with the classical second order characteristic equation

Mechanical dynamics control

Assuming the electrical control has been correctly synthesized with respect to frequency separation principle, which means that the closed loop electrical dynamics is faster than the mechanical desired dynamics, then the mechanical dynamics control synthesis can be designed without considering the closed loop electrical system. The control scheme can be simplified as :

The mechanical dynamics is

with the control

By analogy, it leads to a characteristic equation

to be identified with the classical second order characteristic equation

References

(Chiasson2005) Chiasson, J.-N. (2005). Modeling and High-Performance Control of Electric Machines (IEEE Press).

(Ogata2010) Ogata, K. (2010). Modern Control Engineering. Prentice Hall.

Ldi(t)dt=v(t)−Ri(t)−e(t)L\frac{di(t)}{dt} =v(t) - Ri(t) - e(t)Ldtdi(t)​=v(t)−Ri(t)−e(t)
Jdω(t)dt=∑T(t)=Tm(t)−fω(t)J\frac{d\omega(t)}{dt} = \sum T(t) = T_m(t)-f\omega(t)Jdtdω(t)​=∑T(t)=Tm​(t)−fω(t)

where T(t)T(t)T(t) is the total torque applied on the rotor.

e(t)=Keω(t)e(t) = K_e \omega(t)e(t)=Ke​ω(t)

KeK_eKe​ : electromotive constant (V.rad−1.s)(V.rad^{-1}.s)(V.rad−1.s)

Tm(t)=KTi(t)T_m(t) = K_T i(t)Tm​(t)=KT​i(t)

KTK_TKT​ : Torque constant (N.m.A−1)(N.m.A^{-1})(N.m.A−1)

The mechanical power produced by the DC motor is Tmω=KTiωT_m\omega = K_Ti\omegaTm​ω=KT​iω. The electric power Pe=viP_e = viPe​=vi delivered by the source goes into heat loss in the resistance RRR, into stored magnetic energy in the inductance LLL and the remaining quantity iKeωiK_e\omegaiKe​ω is converted in mechanical energy TmωT_m\omegaTm​ω. It leads to Tmω=KTiω=KeiωT_m\omega = K_Ti\omega = K_ei\omegaTm​ω=KT​iω=Ke​iω whether KT=Ke=KϕK_T = K_e = K_\phiKT​=Ke​=Kϕ​ (Chiasson2005).

The objective is to control the motor torque Tm(t)T_m(t)Tm​(t). Indeed Tm(t)=Kϕi(t)T_m(t) = K_\phi i(t)Tm​(t)=Kϕ​i(t) the motor torque is imposed by the current.

τelec=LR<<τmeca=Jf\tau_{\rm elec} = \frac{L}{R}<<\tau_{\rm meca} = \frac{J}{f}τelec​=RL​<<τmeca​=fJ​

The velocity ω\omegaω can then be considered as constant from the point of view of the electrical dynamics.

i˙=−RLi+1Lv−KϕLw=−1τei+Keτev−KϕLw\begin{array}{lcl} \dot{i} &=& -\frac{R}{L} i + \frac{1}{L}v -\frac{K_\phi}{L}w\\ &=& -\frac{1}{\tau_e} i + \frac{K_e}{\tau_e}v -\frac{K_\phi}{L}w \end{array}i˙​==​−LR​i+L1​v−LKϕ​​w−τe​1​i+τe​Ke​​v−LKϕ​​w​

The control objective is to ensure i⋆=irefi^\star =i_{\rm ref}i⋆=iref​, where i⋆i^\stari⋆ is the current steady state and irefi_{\rm ref}iref​ is the current reference. To ensure zero steady state error, an integral action is necessary. The principle is to insert an integral action the the feed-forward loop between the error compactor and the process (Ogata2010). The control scheme is given by :

i˙=−RLi+1Lv−KϕLwε˙=iref−iv=−Ki+KIε\begin{array}{lcl} \dot{i} & = & -\frac{R}{L} i + \frac{1}{L}v -\frac{K_\phi}{L}w \\ \dot{\varepsilon} & = & i_{\rm ref} - i \\ v & = & -Ki+K_I\varepsilon \end{array}i˙ε˙v​===​−LR​i+L1​v−LKϕ​​wiref​−i−Ki+KI​ε​

with ε\varepsilonε the output of the integrator.

[i˙ε˙]=[−RL0−10][iε]+[1L0]v+[KϕL0]ω+[01]iref\begin{bmatrix} \dot{i}\\\dot{\varepsilon} \end{bmatrix} = \begin{bmatrix} -\frac{R}{L} & 0\\-1 &0 \end{bmatrix} \begin{bmatrix} {i}\\{\varepsilon} \end{bmatrix}+ \begin{bmatrix} \frac{1}{L}\\0 \end{bmatrix}v+ \begin{bmatrix} \frac{K_\phi}{L}\\0 \end{bmatrix}\omega+ \begin{bmatrix} 0\\1 \end{bmatrix}i_{\rm ref}[i˙ε˙​]=[−LR​−1​00​][iε​]+[L1​0​]v+[LKϕ​​0​]ω+[01​]iref​
v=−Ki−KIεv = -Ki-K_I\varepsilonv=−Ki−KI​ε
[i˙ξ˙]=([−RL0−10]−[1L0][KKI][iε])+[KϕL0]ω+[01]iref\begin{bmatrix} \dot{i}\\\dot{\xi} \end{bmatrix} = \left(\begin{bmatrix} -\frac{R}{L} & 0\\-1 &0 \end{bmatrix} - \begin{bmatrix} \frac{1}{L}\\0 \end{bmatrix} \begin{bmatrix}K&K_I\end{bmatrix}\begin{bmatrix}i\\\varepsilon\end{bmatrix}\right)+ \begin{bmatrix} \frac{K_\phi}{L}\\0 \end{bmatrix}\omega+ \begin{bmatrix} 0\\1 \end{bmatrix}i_{\rm ref}[i˙ξ˙​​]=([−LR​−1​00​]−[L1​0​][K​KI​​][iε​])+[LKϕ​​0​]ω+[01​]iref​
([−RL0−10]−[1L0][KKI])=[−R+KL−KIL−10]\left(\begin{bmatrix} -\frac{R}{L} & 0\\-1 &0 \end{bmatrix} - \begin{bmatrix} \frac{1}{L}\\0 \end{bmatrix} \begin{bmatrix}K&K_I\end{bmatrix}\right)= \begin{bmatrix} -\frac{R+K}{L} & -\frac{K_I}{L}\\-1 &0 \end{bmatrix}([−LR​−1​00​]−[L1​0​][K​KI​​])=[−LR+K​−1​−LKI​​0​]
eig([−R+KL−KIL−10])=det(sI−[−R+KL−KIL−10]){\rm eig}\left( \begin{bmatrix} -\frac{R+K}{L} & -\frac{K_I}{L}\\-1 &0 \end{bmatrix}\right) = {\rm det}\left(sI-\begin{bmatrix} -\frac{R+K}{L} & -\frac{K_I}{L}\\-1 &0 \end{bmatrix}\right)eig([−LR+K​−1​−LKI​​0​])=det(sI−[−LR+K​−1​−LKI​​0​])
P(s)=s2+K+RLs−KIP(s) = s^2+\frac{K+R}{L}s -K_IP(s)=s2+LK+R​s−KI​
P(s)=p2+2ζωns+ωn2P(s) = p^2+2\zeta\omega_n s +\omega_n^2P(s)=p2+2ζωn​s+ωn2​

where ωn\omega_nωn​ is the desired closed loop natural frequency and ζ\zetaζ the damping coefficient.

ω˙=1JTm−fJω=KϕJi−fJω\begin{array}{lcl} \dot{\omega} &=& \frac{1}{J}T_m-\frac{f}{J}\omega\\ &=& \frac{K_\phi}{J}i-\frac{f}{J}\omega \end{array}ω˙​==​J1​Tm​−Jf​ωJKϕ​​i−Jf​ω​

where Tm=KϕiT_m = K_\phi iTm​=Kϕ​i

The control synthesis is similar than the one proposed for the electrical dynamics with ε˙ω=ωref−ω\dot\varepsilon_\omega = \omega_{\rm ref}-\omegaε˙ω​=ωref​−ω leading to

[ω˙εω˙]=[−fJ0−10][ωεω]+[KϕJ0]i+[01]ωref\begin{bmatrix} \dot{\omega}\\\dot{\varepsilon_\omega} \end{bmatrix} = \begin{bmatrix} -\frac{f}{J} & 0\\-1 &0 \end{bmatrix} \begin{bmatrix} {\omega}\\{\varepsilon_\omega} \end{bmatrix}+ \begin{bmatrix} \frac{K_\phi}{J}\\0 \end{bmatrix}i+ \begin{bmatrix} 0\\1 \end{bmatrix}\omega_{\rm ref}[ω˙εω​˙​​]=[−Jf​−1​00​][ωεω​​]+[JKϕ​​0​]i+[01​]ωref​
i=−Kωω−Kω,Iεωi = -K_\omega \omega-K_{\omega,I}\varepsilon_\omegai=−Kω​ω−Kω,I​εω​
P(s)=s2+KϕKω+fLs−KϕKω,IP(s) = s^2+\frac{K_\phi K_\omega+f}{L}s -K\phi K_{\omega,I}P(s)=s2+LKϕ​Kω​+f​s−KϕKω,I​
P(s)=p2+2ζωns+ωn2.P(s) = p^2+2\zeta\omega_n s +\omega_n^2 .P(s)=p2+2ζωn​s+ωn2​.
Motor Scheme
Variables and parameters table
DC Motor Bloc Diagram
Closed loop electrical system
Electrical dynamics state feedback
Closed loop cascaded system
Closed loop mechanical system