DC Motor Controller
DC Motor Controller
DC Motor Controller
Faculty of engineering
Electrical power engineering
Dec 2022
Prepared by
Under supervision of
1
Table of figures
2
a) Open loop transfer function:
Given that:
𝟑𝟎𝟎
= )𝐒(𝐆 ؞ 𝐒𝟑 +𝟓𝟔.𝟏𝟐∗𝐒𝟐 +𝟑𝟖𝟎.𝟖𝟖𝟕𝟓∗𝐒
3
b) Root locus of the system:
4
c) Range of gain to ensure system’s stability:
𝟑𝟎𝟎
The system : 𝐆(𝐒)𝐇(𝐒) = , c/cs equation: 1 + KG(S)H(S) = 0,
𝐒 𝟑 +𝟓𝟔.𝟏𝟐∗𝐒 𝟐 +𝟑𝟖𝟎.𝟖𝟖𝟕𝟓∗𝐒
By using Routh-Hurwitz:
𝑆3 1 380.8875
𝑆2 56.12 300K
300𝐾−56.12∗380.8875
𝑆1
56.12
𝑆0 300K
5
d) Controller gain to satisfy:
ii. Settling time less than 0.75 sec, 2 sec ( by using sisotool(sys) )
• Less than 0.75 sec: Doesn’t exist as the minimum settling time is 0.785
which occurs at gain = 3.617.
7
iii. Natural frequency equals to 5 rad/sec: K = 4.0671
8
d
e.3 Control action
f) Calculate the error steady state error for unit step and unit ramp input using
this gain controller in (e)
1 1
s.s.e= = . 𝟓𝟒𝟗𝟐 s.s.e= =0
𝐾𝑣 1+𝐾𝑝
9
𝒔+𝟏𝟓
g) the system is cascaded by a controller C(s) = 7∗
𝒔+𝟐𝟓
g.1 Control action
10
h) Design a compensator to achieve maximum percent overshoot less
than 5 % and settling time less than 0.4 sec.
𝑷𝒄 = -27.4 𝒁𝒄 = -7.899 K = 39
Using these values for the lead compensator the system could achieve
the required performance
• The controller given in g does not satisfy the required
performance because there is no applicable gain can achieve
these conditions
11
i) Plot the closed loop output and control action using the controller
in (h)
12
i.2 Control action
0 1 0
𝜃̇ −𝑏 𝐾𝑣 𝜃 0
0
= ] ̈𝜃 [؞ 𝐽 𝐽 [𝜃̇] + [ 01 ] ∗ 𝑉
𝑑𝑖 −𝐾𝑣 −𝑅𝑎
𝑖
𝑑𝑡 [0 𝐿𝑎 𝐿𝑎 ] 𝐿𝑎
13
𝜃
𝜃 = [1 0 0] [𝜃̇] ,
𝑖
❖ Let 𝜽 = 𝒙𝟏 , 𝜽̇ = 𝒙𝟐 , 𝒊 = 𝒙𝟑 , 𝑽 = 𝒖, 𝒘𝒉𝒆𝒓𝒆 𝒐𝒖𝒕𝒑𝒖𝒕 𝒚 = 𝜽 , then:
𝒙𝟏̇ 𝟎 𝟏 𝟎 𝒙𝟏 𝟎
[𝒙𝟐̇ ] = [𝟎 −𝟕. 𝟑𝟕 𝒙
𝟕. 𝟐 ] [ 𝟐 ] + [ 𝟎 ] ∗ 𝒖
𝒙𝟑̇ 𝟎 −𝟑 −𝟒𝟖. 𝟕𝟓 𝒙𝟑 𝟒𝟏. 𝟔𝟔𝟕
𝒙𝟏
𝒚 = [𝟏 𝟎 𝟎] [𝒙𝟐 ]
𝒙𝟑
𝟎 𝟏 𝟎
؞A = [𝟎 −𝟕. 𝟑𝟕 𝟕. 𝟐 ]
𝟎 −𝟑 −𝟒𝟖. 𝟕𝟓
𝟎
؞B = [ 𝟎 ]
𝟒𝟏. 𝟔𝟔𝟕
؞C = [𝟏 𝟎 𝟎]
State space representation using MATLAB:
14
Fig. 16 MATLAB code
fig 18 MATLAB code
Fig.17 State
space result
space
fig 81 State
space
Fig.17 State
k) Check controllability and observability: space
fig 82 State
i. Check controllability: space
𝑀 = [ 𝐵 𝐴𝐵 𝐴2 𝐵 ] ,
Fig.17 State
space
0 0 300
؞M = [ 0 300
fig 83 State
−16836] , = |𝑀|؞−3.75 ∗ 106 ≠ 0 ,
41.667 −2031 98123 space
𝐶
N = [ 𝐶𝐴 ] ,
𝐶𝐴2
1 0 0
؞N = [0 1 0 ] , = |𝑁|؞7.2 ≠ 0 ,
0 −7.37 7.2
17
Fig.19 Results of controllability and observability tests
l) Design a state feedback controller in order to stabilize the system
and achieve settling time less than 0.4 sec (consider that the states
are measurable). Compare between the controller performance in
(h) and (I). Implement your design using the SIMULINK considering
that the reference position is 90° Draw the states and output versus
time. Comment on your results.
L.1 getting the feedback controller
K1 K2 K3
Fig.20 feedback controller K value
1152 101.4 7.5811
fig 267 Results of controllability and observability tests
18
19
Fig. the output of the system
Fig 22 the speed curve
Comment: at the beginning armature current raised roughly for a while, that
increased the motor's speed until the position is equal to 90° with no overshoot
and settling time less than 0.4 seconds as required, and comparing with the
controller in h this controller is better as It achieves the required condition with
no overshoot Fig. the speed curve
20
m)Without measuring the states, design a full state observer to
estimate the states. Choose appropriate poles for the observer.
Plot the real and estimated states. Comment on your results.
𝑘𝑒 = acker(a',c',8*p); MATLAB code “multiply the poles by 8 to make
the observer faster than the system “
Ke1 Ke2 Ke2
0.0003*10^7 0.1956*10^7 1.1182*10^7
m.1 circuit implementation
m.2 the output and the states(real & estimated from the observer)
21
23
n.2 output and states (real & estimated from the observer)
27