Assignment 5
Assignment 5
Section: 01
Submitted to:
Eng. Rihab K. Hamza
In the previous lab module, the open loop transfer function that relates the input
voltage to DC motor to the output motor speed, measured by the tachometer, is
identified as a first order transfer function
1) Find the open Loop Transfer function of the DC motor Position from the
above information. [5%]
𝜃(𝑠) 𝜔(𝑠) 1 𝐾𝑜 1 𝐾𝑜
𝐺(𝑠) = = × = × = 2
𝑉𝑖𝑛 𝑉𝑖𝑛 𝑠 𝜏𝑠 + 1 𝑠 𝜏𝑠 + 𝑠
Changing
DC motor
position
Power
potentiometer
Watt (W)
LabVIEW
Non-inverting computer
Op Amp software &
DAQ Measured position
Degree
DC Power supply
3) Design PD-controller gains to control the DC motor position that will satisfy
your design requirements. (show all steps) [15%]
(𝐾𝑝 + 𝐾𝑑 𝑠)𝐺(𝑠)
𝑇(𝑠) =
1 + (𝐾𝑝 + 𝐾𝑑 𝑠)𝐺(𝑠)
𝐾𝑜
(𝐾𝑝 + 𝐾𝑑 𝑠)( )
(𝜏𝑠2 + 𝑠)
𝑇(𝑠) = 𝐾
1 + (𝐾𝑝 + 𝐾𝑑 𝑠)( 2 𝑜 )
(𝜏𝑠 + 𝑠)
𝐾𝑜
(𝐾𝑝 + 𝐾𝑑 𝑠)( )
(𝜏𝑠2 + 𝑠)
𝑇(𝑠) =
(𝜏𝑠2 + 𝑠) 𝐾
+ (𝐾𝑝 + 𝐾𝑑 𝑠)( 2 𝑜 )
(𝜏𝑠2 + 𝑠) (𝜏𝑠 + 𝑠)
(𝐾𝑝 + 𝐾𝑑 𝑠)𝐾𝑜
𝑇(𝑠) =
(𝜏𝑠2 + 𝑠) + (𝐾𝑝 + 𝐾𝑑 𝑠)𝐾𝑜
𝐾𝑜 𝐾𝑝 + 𝐾𝑜 𝐾𝑑 𝑠
𝑇(𝑠) =
(𝜏𝑠2 + 𝑠) + 𝐾𝑜 𝐾𝑝 + 𝐾𝑜 𝐾𝑑 𝑠
𝐾𝑜 𝐾𝑝 + 𝐾𝑜 𝐾𝑑 𝑠
𝑇(𝑠) =
𝜏𝑠2 + 𝑠(1 + 𝐾𝑜 𝐾𝑑 ) + 𝐾𝑜 𝐾𝑝
𝐾𝑜 𝐾𝑝 + 𝐾𝑜 𝐾𝑑 𝑠
𝑇(𝑠) =
𝑠(1 + 𝐾𝑜 𝐾𝑑 ) 𝐾𝑜 𝐾𝑝
𝑠2 + +
𝜏 𝜏
The second order characteristic equation is as follows:
𝜔𝑛2
𝑇(𝑠) =
𝑠 2 + 2𝜁𝜔𝑛 + 𝜔𝑛2
Therefore,
1+𝐾𝑜 𝐾𝑑 𝐾𝑜 𝐾𝑝
2𝜁𝜔𝑛 = 𝜏
& 𝜔𝑛2 = 𝜏
Based on these equations and the characteristic requirements of the lab, 𝐾𝑑 & 𝐾𝑝 can be
obtained mathematically by first finding the values of 𝜁 & 𝜔𝑛 . According to the requirements of
the lab, the rise time should be within 6 seconds, the settling time should be within 10
seconds, and the percent overshoot should be within 5%, so 𝜁 & 𝜔𝑛 are calculated as
follows:
1.8
𝑇𝑟 =
𝜔𝑛
1.8
6=
𝜔𝑛
1.8
𝜔𝑛 = = 0.3 𝑟𝑎𝑑/𝑠
6
4.6
𝑇𝑠 =
𝜁𝜔𝑛
4.6
10 =
𝜁(0.3)
Prepared by Eng. Rihab Hamza Fall 2023
MECH 450 Laboratory Assignment 5 4/3
4.6
𝜁= = 1.533
10(0.3)
Now, 𝐾𝑑 & 𝐾𝑝 can be found as follows:
1 + 𝐾𝑜 𝐾𝑑
2𝜁𝜔𝑛 =
𝜏
1 + 36.39𝐾𝑑
2(1.533)(0.3) =
4.1
By solving for the equation above: 𝐾𝑑 = 0.0762
𝐾𝑜 𝐾𝑝
𝜔𝑛2 =
𝜏
36.39𝐾𝑝
(0.3)2 =
4.1
By solving for the equation above: 𝐾𝑝 = 0.0101
4) State the effect of the Proportional and the derivative controller in a dynamic
system. [10%]
As shown in the figure, the user interface of the program stays the same as
before, except for some small changes. For the input values, instead of the speed
this time it is the desired position. The same thing applies to the measured value.
Also, because the type of controller this time was a PD controller, an adjustment had
to be made to the derivative time to make the system have the derivative controller.
For the block diagram, the gain was changed to the position gain, which is 45
because the range of the system this time will depend on the potentiometer. All
other blocks stay the same. The PID block with its gains and output range coming
out of it. The desired position connected to both the PID controller block and the
Excel file block. The DAQ input is connected to the measured position block after
the gain multiplication and then the measured position is connected to the PID
controller block and the Excel file block. The DAQ output connected to the PID
controller block is to be adjusted according to the new PD controller. All are put in a
while loop.
6) Did the motor move with the controller you got from the calculation? Explain
how did you find the best PD controller for your system? Discuss in details
your tuning procedure. Gives your observation how the system work? ([20%])
No, the motor did not move with the controller that was gotten from the
calculation. The reason behind that is because of the proportional gain value. The
value was very small and thus it did not give enough voltage to the motor to turn it
on. To solve this issue, a 10x increase was made to the proportional gain value.
Then the motor started moving. That is how the proportional gain term was tuned.
After solving the issue of the motor not moving. Some tests were conducted to test
the response of the system and whether the system was giving a measured value
close to the input value or not. In the first few trials, the system had a huge error, but
after some iterations and changing the value of the derivative time by increasing it
with 0.05 increments, the system finally showed some good results. That is how the
best PD controller for the system was found. The observations on how the system
works are as follows. When a position input is typed in the desired position, the
motor starts moving, then when it reaches the desired position, it passes it and goes
back to it. The fluctuations indicate that the system has overshoot, and this is
understandable because it is a second order system. Then after fluctuating several
times – almost 3 to 4 times – the system finally sets on the given value or very close
to it.
7) Test your controlled system by performing step response from min. to max
and from max. to min. For each test result find the system performance
parameters (i.e. rise time, settling time, percentage overshoot, and steady
state error) Show your calculations at the graphs. Discuss your results by
comparing the parameters with the stated design requirements. [20%]
Min to max
200
150
100
50
8.8
9.6
0
10.4
0.4
0.8
1.2
1.6
2
2.4
2.8
3.2
3.6
4
4.4
4.8
5.2
5.6
6
6.4
6.8
7.2
7.6
8
8.4
9.2
10
10.8
-50
Tc
-100
-150 Tr
-200 Ts
Series1 Series2
Max to min
Ts
200
Tr
150
100
50
0
9.5
0.5
1.5
2.5
3.5
4.5
5.5
6.5
7.5
8.5
10.5
11.5
0
10
11
-50
Tc
-100
-150
-200
Series1 Series2
8) Now, does your system satisfy the desired specifications? Is the PD is a good
controller for your system? Discuss. State the final controller you got.[10%]
Assignment Requirements: