Control Theory Project 1 - Barak - Rafael - Graded
Control Theory Project 1 - Barak - Rafael - Graded
Project 1
Question 1
To create the block diagram of the overall system, we first need to find and linearize the
equations of motion in the system, to do this we use the following standard DC motor
relations:
𝑉𝑒
𝑉𝑒 = 𝑅𝐼 + 𝐿𝑖; (𝐿 = 0) → 𝑖 =
𝑅
𝑉𝑒 = 𝑢 − 𝑘𝑏 𝜔𝑚
𝑇𝑚 = 𝑘𝑚 𝑖
Knowing the 𝑉𝑎 (Armature Voltage) is generated with a static gain amplifier (𝑘𝑎 ) and
combining the equations, we find:
𝑘𝑎 𝑉𝑖𝑛 − 𝑘𝑏 𝜔𝑚
𝑇𝑚 = 𝑘𝑚
𝑅
Also given, the ratio of the gear box (𝑁𝑔 ), so that the angular velocity of the motor shaft is:
𝜔𝑚 = 𝑁𝑔 𝜙̇ and 𝑇 = 𝑁𝑔 𝑇𝑚
Therefore:
𝑘𝑎 𝑣𝑖𝑛 − 𝑘𝑏 𝑁𝑔 𝜙̇
𝑇 = 𝑁𝑔 𝑘𝑚
𝑅
The same system can be found by defining new coordinate systems, find the equations of
motion around the centre of mass, finding the equations for kinetic and potential energy
and then linearizing the system.
Let us start off by defining each component of the block diagram as parameters 𝐺1 to 𝐺7 as
defined on the diagram above, in red.
By manipulating the way the system is described, we can easily see the following transfer
functions:
𝐺1 𝐺2 𝐺3 𝐺4 𝐺5
𝑃𝜃𝑢 (𝑠) =
1 + 𝐺2 𝐺3 𝐺7 + 𝐺3 𝐺4 𝐺5 𝐺6
𝑃𝜃𝑢 (𝑠) 𝐺1 𝐺2 𝐺3 𝐺4
𝑃∅𝑢 (𝑠) == =
𝐺5 1 + 𝐺2 𝐺3 𝐺7 + 𝐺3 𝐺4 𝐺5 𝐺6
𝑃∅𝑢 (𝑠)
𝑃∅𝜃 = = 𝐺5
𝑃𝜃𝑢 (𝑠)
We also required to derive 𝑃∅𝑢1 (𝑠)
𝐺1 𝐺2 𝐺3 𝐺4
𝑃∅𝑢1 (𝑠) = lim (𝑃∅𝑢 (𝑠)) →
𝜁→∞ 1 + 𝐺2 𝐺3 𝐺7
Question 3
Part 3
Question 4
We are required to design a minimal- order unity feedback controller 𝐶∅ (𝑠) in the setup
shown in in Fig.2 (a) of the question paper, such that:
• The steady state response/ errors to step d(t) and 𝑟𝜃 (𝑡) vansish,
• The crossover frequency of the loop 𝜔𝑐 ≈ 50 𝑟𝑎𝑑/𝑠𝑒𝑐
• The phase margin 𝜇𝑝ℎ ≈ 45°,
• The magnitude of the complementary sensitivity frequency response 𝑇∅ (𝑗𝜔) ≤ 3𝑑𝐵
• The magnitude of the disturbance sensitivity frequency response 𝑇∅,𝑑 (𝑗𝜔) ≥
−20𝑑𝐵
Most likely, the controller that we will design will either be a PI or PID controller as the
requirements are too much for a proportional controller to handle alone.
We will start off by find the proportional aspect of the controller (𝐶𝑝 ) to move our crossover
frequency from 5.44 rad/sec to 50 rad/sec, as requested. To do this we need a proportional
controller that we found by finding the magnitude of 𝑃∅𝑢 (𝑖𝜔) which was 0.0240. Therefore,
𝟏
𝑪𝒑 = |𝑷(𝒊𝝎𝒄)| = 𝟒𝟏. 𝟔𝟔𝟕
To get rid of the disturbance factor of the system we need to create a lead-lag controller
10𝑠+𝜔𝑐
where 𝑙𝑎𝑔 = 𝜔 . However, as 𝛽 → ∞ the lag controller will be of the form:
10𝑠+ 𝛽𝑐
√𝛼𝑠 + 𝜔𝑚
𝑙𝑒𝑎𝑑 =
𝑠 + √𝛼𝜔𝑚
Where:
1 + sin (𝜙) 1 + sin (47.107)
𝛼= = = 6.4802
1 − sin (𝜙) 1 − sin (47.107)
√6.4802 𝑠 + 47.107
𝑙𝑒𝑎𝑑 =
𝑠 + 119.9163
The following time responses are also plotted for d-u and d-theta, respectively below, as
requested:
Question 5
Let us find the transfer function of the system described in the question i.e. from current
𝑖(𝑡) to angle 𝜙(𝑡) for 𝜉 → ∞, 𝜃 → 0, 𝐴 = 0
𝜙 𝑁𝑔 𝑘𝑚 𝐵 𝑁𝑔𝑘𝑚
𝑃𝑖𝜙 = = =
𝑖 𝑠 (𝐽𝑏 + 𝑚𝑟 2 )𝑠 2 + 𝑓𝑠
However, we need system in the time domain to create our equations of motion:
If we set:
𝐽𝑏 + 𝑚𝑟 2 𝑁𝑔 𝑘𝑚
𝜏= 𝑎𝑛𝑑 𝑘 =
𝑓 𝑓
𝑘𝑎 ((𝐽𝑏 + 𝑚𝑟 2 )𝑠 + 𝑓)
𝑃𝑢−𝑖 (𝑠) =
𝑁𝑔2 𝑘𝑚
2
𝑅 (((𝐽𝑏 + 𝑚𝑟 2 )𝑠 + 𝑓) + 𝑅 )
Now let’s set up and find the switches using the bang bang controller format, for our plant
with only 2 poles, from there the control signal can be found:
𝑡𝑠𝑤 ∈ (0, 𝑡𝑓 )
for
1 − 2𝑒 −𝑠𝑡𝑠𝑤 + 𝑒 −𝑠𝑡𝑓
𝑖(𝑠) = 𝑖𝑚𝑎𝑥 ( )
𝑠
|𝜃𝑓 −𝜃0 |
|𝜃𝑓 − 𝜃0 | √
𝑡𝑠𝑤 = + 𝜏 ∗ ln (1 + 1 − 𝑒 𝜏𝑘𝑖𝑚𝑎𝑥 ) = 0.7794
𝑘 ∗ 𝑖𝑚𝑎𝑥
|𝜃𝑓 −𝜃0 |
|𝜃𝑓 − 𝜃0 | √
𝑡𝑓 = + 2 ∗ 𝜏 ∗ ln (1 + 1 − 𝑒 𝜏𝑘𝑖𝑚𝑎𝑥 ) = 1.2731
𝑘 ∗ 𝑖𝑚𝑎𝑥
After substituting back into 𝑖(𝑠), and as we saw in the step repose of 𝑢 → 𝑑 we have already
found the optimal 𝑖(𝑡), to find the optimal voltage 𝑢(𝑡), we derive the transfer function:
𝑖 𝑘𝑎
𝑃𝑢𝑡 = =
𝑢 𝑅 + 𝑁𝑔2 𝑘𝑚 𝑘𝑏 𝐵
Therefore,
𝑢 𝑅 + 𝑁𝑔2 𝑘𝑚 𝑘𝑏 𝐵
𝑢(𝑠) = 𝑖(𝑠) ∗ = 𝑖(𝑠) ∗
𝑖 𝑘𝑎
Therefore, for interest, the optimal current 𝑖(𝑠) is graphed below:
Now let us find the optimal angle 𝜙(𝑡) and the 𝑡𝑓 that it reaches
𝑁𝑔𝑘𝑚
𝜙(𝑠) = 𝑖(𝑠) ∗ 𝑃𝑖𝜙 (𝑠) = 𝑖(𝑠) ∗
(𝐽𝑏 + 𝑚𝑟 2 )𝑠 2 + 𝑓𝑠
Using inverse Laplace, the optimal angle 𝜙 in the time domain is graphed below:
Where 𝜙 = 𝜋 is reached in 𝑡𝑓 = 1.2731 [𝑠𝑒𝑐]
Question 6
In order to stimulate the response of 𝑢(𝑡), 𝜙(𝑡)𝑎𝑛𝑑 𝜃(𝑡), we must first find the transfer
functions 𝑃𝑢→𝑟𝜙 , 𝑃𝜙→𝑟𝜙 and 𝑃𝜃→𝑟𝜙 :
𝑢(𝑠) 𝐶𝜃
𝑃𝑢→𝑟𝜙 = =
𝑟𝜙 (𝑠) 𝐶𝜃 𝑃𝜙𝑢 + 1
𝜙(𝑠) 𝐶𝜃 𝑃𝜙𝑢
𝑃𝜙→𝑟𝜙 = =
𝑟𝜙 (𝑠) 1 + 𝐶𝜃 𝑃𝜙𝑢
𝜃(𝑠) 𝐶𝜃 𝑃𝜙𝑢
𝑃𝜃→𝑟𝜙 = = 𝑃𝜃𝜙 (𝑠)𝐶𝜃 𝑃𝜙𝑟 (𝑠) = 𝐴
𝑟𝜃 (𝑠) 1 + 𝐶𝜙 𝑃𝜙𝑢
We can further derive the frequency responses of 𝑢, 𝜙 and 𝜃 and then convert them to time
domain to achieve the following figures:
Considering the following figure below, describing a control setup of mind positive feedback,
we will design a minimal order feedback controller 𝐶𝜃 (𝑠) such that:
To construct a controller with a minimum pole excess of 2, we selected two LPF controllers
and their poles were selected according to their crossing frequency, and their bandwidth.
Using the Nichols diagram of the plant, P, and we want to move away from the critical
points.
Now we look at the Nichols plot of the negative of the plant. because we would like to place
Nichols between the 2 critical points. We want the critical phase as not to affect the
amplification at the resonant frequency that is close to it:
We will use the critical point frequency to use the low frequency filter to stay away from the
1
critical points so that our initial controller will be: 𝐶 = (𝑠+4.27)2 and we will get the following
Nichols plot of the loop:
Step response of 𝜃
Question 8
Where:
𝑃𝜙𝑢 (𝑠)𝐶𝜙
𝑇𝜙 =
1 + 𝑃𝜙𝑢 𝐶𝜙
Unfortunately we did not manage to successfully combine the controllers and couldn’t
provide the right step responses and Nichols chart.