FCSE
FCSE
Tasck 1: Before studying the automatic control system, several concepts of the control filed need to be
understood clearly. The requirements for this task are that students have to answer the following questions:....2
Task 2: Mathematical Models of the Control System..........................................................................................5
2.1 Find Mathematical Models of the Mechanical and Electrical Systems..................................................5
2.1.1 For a given a Spring-Mass-Daspot system in Fig. 2......................................................................5
2.1.2 For the circuit as follows in Fig 3...................................................................................................7
2.2 Block diagram:........................................................................................................................................8
2.3.......................................................................................................................................................................10
2.4.......................................................................................................................................................................12
Task 3:Transient Response and stability Analysis..............................................................................................15
3.1 Analyse the behaviour and response of the first-order system as follow:.....................................................15
3.2.......................................................................................................................................................................16
3.3.......................................................................................................................................................................18
3.4.......................................................................................................................................................................20
Task4:..................................................................................................................................................................... 23
4.1 Explain PID controller and The poles of The PID control in the control system...................................23
4.2 Let us consider the following System.........................................................................................................24
4.3 Consider a system in the following figure..................................................................................................27
4.4 The DC motor in Fig 13 is modeled in the following transfer function...................................................31
Reference:..............................................................................................................................................................32
1|Page
Tasck 1:
1|Page
Fig 2: Block diagram of Closed-Loop System. [1]
Typical components and their function:
- Controller: A device used in control systems to reduce the difference between the actual value
of the system (process variable) and its desired value (setpoint), serving as the main component
of control engineering.
- Actuator: A device in closed-loop systems, including position feedback. Sensors read the output
signal and send it to the controller for precise system adjustment.
- Algorithm: It is often implemented as a software program on a computer. Like our brain, the
algorithm determines the actions.
- Sensor: It is likened to the eyes of the system. Sensors are used to observe (see, hear, sense,
count) some variables that indicate quality, called Controlled Variables or CV.
- Control Element in the Feedback Loop: It is called the manipulated variable or MV. It is
adjusted to cause a change in the value of the CV.
- Communication System: It will send the sensed information to the computer, then transmit the
output of the algorithm to the final element. In automatic control, the communication system can
be a wired or wireless network or point-to-point connection, but it can use hydraulic, pneumatic,
or other signaling systems. Additionally, the signal can be digital (discrete) or analog
(continuous).
The difference between closed-loop and open-loop systems are mentioned in the following Table:[2]
Closed-loop Open-loop
Definition When the System has a feedback path, When the System has no feedback
it is called a Closed-loop control path, it is called an Open-loop control
system. system
Difference Name Feedback control system Non-Feedback control system
Control action Control operation depends on the Control operation is independent of
system output. the output of the entire system.
Design Comparatively complex Simple
complexity
Main Controller, plant or process, feedback Controller and plant
components element and error detector
(comparator).
Response Slow because it has feedback path. Fast response because there is no
meansure and feedback of output
Reliability More reliable Low reliability
Accuracy Accurate because the response Depends on system calibration.
maintains its accuracy. Therefore be Less.
Stability Comparatively less stable Higher than because The output of
the system remains constant.
Optimization Optimized Not optimized
2|Page
Implementation Relatively Difficult to Implement Easy to Implement
Maintaince and Require more maintenance and Require less maintenance and less
Cost relatively high expensive. expensive.
Noise Less internal noise. More internal noise
Example Refrigerators, toasters, radar tracking Automatic traffic light system,
systems, etc. automatic washing machine,
immersion heater, etc.
Through the table above, we can see many advantages of open loop. But the most significant
difference between open-loop and closed-loop control system is that open-loop control system has no
feedback path, while closed-loop control system has feedback path. However, open and closed loop
control systems are widely used.
3|Page
Task 2: Mathematical Models of the Control System
2.1 Find Mathematical Models of the Mechanical and Electrical Systems
2.1.1 For a given a Spring-Mass-Daspot system in Fig. 2.
4|Page
Fig 1.1.3: Tranfer function Code in MATLAB.
5|Page
When we have the signal off the Tranfer function, We move to draw the system in Simulink:
6|Page
Fig 1.2.2: Loop of the electrical system.
We using Kirchoff’s Voltage Law, we have:
V i=V R 1 +V 0 (t) (because V L=V 0) => V i ( t ) =i R1 +V 0 ( t ) (1)
And then we apply Kirchoff’s Current Law , We have:
1 V0
i=i 1 +i 2 => i=
L
∫ V 0 ( t ) dt +
R2
(2)
8|Page
Fig 2.2.4: Second Step of Transfer Block.
aA .T 1 ( s )
H ( s )= ( )( )
a
.
A
a+b k s
. A ( s )=
k s (T ¿¿ i ( s ) +1)(T d ( s ) +1)(a+ b)¿
(1)
2.3
9|Page
1
G (s ) 2
s + s +4 S +2
G ( k )= = = 3 (1)
1+G( s) H (s ) 1 1 S +3 S
2
+ 6 S +9
1+ 2 .
S + S +4 S+ 2
Now we using Matlab software to Determine Tranfer function for make sure (1) is correct:
10 | P a g e
Fig 2.3.3: Signal Obtained in Scope.
2.4
[ ][ ][ ][ ]
0 1 0
ẋ1 (t ) x 1 (t)
= k b × + 1 u(t) (2)
ẋ2 (t ) − − x 2 (t)
m m m
y ( t ) =[ 1 0 ]
[ ]
x 1 (t)
x 2 (t)
(3)
With { ẋ (t )= Ax ( t ) + Bu(t)
y ( t )=Cx ( t ) + Du(t)
From (2) and (3) we have result:
[ ] []
0 1 0
A= k b ; B= 1 ; C=[ 1 0 ]; D=0
− −
m m m
With m = 1, b = 0,1 and k = 0,15, we have:
A=
[ 0 1
−0 ,15 −0 , 1
B=
0
1 ] []
C=[ 1 0 ] D=0
12 | P a g e
Fig 2.4.2: Setting value of this system.
13 | P a g e
Task 3:Transient Response and stability Analysis.
3.1 Analyse the behaviour and response of the first-order system as follow:
G(s)
1
where G ( s )= , a is the last number of your student ID ( if your last number of the student ID is zero,
4 s+ a
please select a=2).
14 | P a g e
Fig 3.1.1:Signal Obtained and block diagram of this system.
3.2
K 1
G ( s )= =
s + K 1 s+ K 1 s2 + 1 K s+ 1
2
=>
K K 1
1
We have T =
√K
1
=>ω n= T =√ K
K1 k1
=>ξ= =
K .2T 2 √ K
Setting time 5% criterion is 4s:
3
3 4= 6
=>t s=
ξ ωn
=> K1
2√K ( )
.( √ K )
=>4= k
1
=> k 1= 1.5
( √ ( ))
K1
π
2 √K
−
=>15% K1
2
¿e
( −
ξπ
√ 1− ξ2 ).100 %=e 1−
2√K
2 , 25 ( π + ( ln ( 0 , 15 ) ) )
2 2
=> K= 2
=2,105
4 ( ln ( 0 , 15 ) )
We have k=2,105 and k1=1,5, we add to function (1):
16 | P a g e
2,105
G ( s )= 2
s +1 ,5 s
Now we calculate the steady-state error formula:
k p=lim (G ( s ))=∞
s→0
1
=>e ss = =0
1+k p
Now we simulate this system in matlab:
17 | P a g e
v
Fig 3.2.3: Signal obtained in scope.
3.3
s+ 5 1
G ( s )= ; H ( s )=
2
2 s + 4 s+3 s +1
We have transfer function:
s+ 5
G ( s) 2
2 s + 4 s+3
2
s +6 s+5
G ( k )= = = 3
1+G( s) H ( s )
( )( )
2
1 s+5 2 s + 6 s + 8 s +8
1+
s+1 2 s2 + 4 s +3
18 | P a g e
The Zeros of the system:
2
s +6 s+5=0 => X1= -5; X2= -1.
The Poles of the system:
3 2
2 s +6 s +8 s +8=0 => X1= -2; X2= -0,5- 1,323i ; X3= -0,5+1,323i.
19 | P a g e
Fig 3.3.3: Signal Obtained in Scope.
3.4
2Kp 2Kp
G 1 ( s )=G ( s ) .G P ( s )= = 3
s (s +1)(s +4 ) s +5 s 2 +4 s
We have the characteristic equation :
1+G1(s)H(s)=0
2Kp
=> 1+ 3 2
=¿ 0
s +5s +4 s
=> s3 +5 s 2 +4 s+ 2 k p=0 (1)
20 | P a g e
From (1) we have Routh-Hurwirtz Table:
S3 1 4
2
S 5 2kp
1 S1 2kp
a3= 5 4−
5
25 S0 k
a 4=
20 −2 k p
{
k p >0
=>
4−
2kp
5
>0
=> {k p >0
10>k p
=> 0< k p <10
21 | P a g e
Kp=7
Kp=12
22 | P a g e
Task4:
4.1 Explain PID controller and The poles of The PID control in the control system.
PID (Proportional-Integral-Derivative) controller is a type of feedback control system widely used in
industrial control systems. It calculates the error value as the difference between the desired setpoint and
the measured process variable, and applies a correction based on the proportional, integral, and
differential components. [3]
=> Formula of PID control system:
Let Ki=0, Kd=0. Now we use Matlab to simulate the system with kp=1, kp=5, kp=10, kp=200
Let Kp=10, Ki=10. Now we use Matlab to simulate the system with kd=0.1, kd=1, kd=5, kd=15
With Kd=0.1K_d = 0.1Kd=0.1, there is significant overshoot and oscillations, taking a long time to
stabilize. Increasing KdK_dKd to 1 reduces overshoot and oscillations, with a shorter settling time. At
Kd=5K_d = 5Kd=5, the system has minimal overshoot, quickly reaches a steady state, and shows a well-
damped response. With Kd=15K_d = 15Kd=15, the system becomes over-damped, responding very
slowly with no overshoot and a significantly increased rise time.
26 | P a g e
4.3 Consider a system in the following figure.
From The second Method Of ziegler-Nicholsttuning rules, We set T i=∞∧T d =0, We have:
C ( s) kp
G ( k )= =
R ( s ) S ( s +2 ) ( S +6 ) + K p
After that we use Routth's Stability criterion. We have:
3 2
s +8 s +12 s +k p =0
The routh harry becomes:
Table 1:Routh table.
3
s 1 12
2
s 8 kp
1 96 − k p
a 3= 1
s
8 8
64
a 4= 0
s kp
96 − k p
From the first column of Routh table, we can find the sustained oscillation will occur if Kp=96:
=> K cr =96 (1)
Set Equal Kcr=96, The 2nd-order characteristic equation is:
=> 8 S2 +96=0
But S=jw, so we have:
=> 8 ( jw )2 +96=0
=>8 ( 12 −w 2 )=0 =>w=√ 12=2 √ 3
2π
=> T cr = =1.814 (2)
w
From (1),(2) and table below, we have:
27 | P a g e
Table 2: Fomular of PID
( )
2
1 13 , 06 ( S+2 , 21 )
G PID ( s )=K P 1+ +T D s =
Tis S
C ( s) kp 13 , 06. S2 +57 , 6 S+63 , 5
G ( k )= = = 4
R ( s ) S ( s +2 ) ( S +6 ) + K p S +∗ S3 +25 , 06 S 2 +57 , 6 S +63 , 5
Now we simulate this system on MATLAB to verify:
First we have block diagram of this system when we have PID and don’t have PID:
28 | P a g e
Fig 4.3.2: Value of Kp, Ki, Kd in PID block function.
After that, we have the Result :
29 | P a g e
Through the above results in fig 4.3.3 we can see that, when combined with a PID controller, it
will be more stable and reach step value faster. On the contrary, when not combined with PID,
the system will be less stable and take a lot of time to reach the step value.
Because Overshoot of this system higher than 40%, we will tune PID to get Overshoot 25%:
30 | P a g e
After we tune this system, The Overshoot reduce from 61.1% to approximately 25.1% and Ki, Kd, Kp
will change :Kp=28,614; Ki=5,277 and Kd=9,46. Now we see new result in cope:
We have:
di di
V ( t )=L + R I a ( t ) +e (t)=L + R I a ( t ) +k b θ̇ (t)
dt dt
31 | P a g e
The mechanical equation of the DC motor is given by Newton's second law:
2
d θ(t) dθ ( t )
J. 2
+b . =k m I (t)
dt dt
Using laplace transform:
V(s)=L.S.I(s)+R.I(s)+ k b . s .θ (s)
V ( s ) − k b . s . θ(s)
I ( s )= (1)
LS + R
2
J . s . θ ( s ) +b . s .θ (s )=k m I (s )(2)
From(2) and (1), we have:
J . s 2 . θ ( s ) +b . s .θ ( s ) =k m ( LS + R )
V ( s ) −k b . s .θ ( s ) k m V ( s ) − k m k b . s .θ ( s )
=
LS+ R
θ ( s ) ( J . s 2+bs ) ( Ls+ R )=k m V (s) −k m k b . s . θ ( s )
3 2
V ( s ) JL S + ( JR+bL ) S + ( bR+ K m k b ) s
=
θ (s ) Km
θ (s ) km 0.015
G(s) = = =
( )
V s JL S + ( JR+bL ) S + ( bR+ K m k b ) s 0.01 S 3+ 0.14 S 20.4 s
3 2
After that, we Design a block digram for a closed-loop system to control DC motor with PID controller:
32 | P a g e
Fig 4.4.3: Signal Obtaied we Before Tuning PID.
As we saw in Figure 4.4.3, Overshoot is quite high and takes a long time to stabilize. So that , we proceed to tune
the PID to make the system more stable and reduce Overshoot:
33 | P a g e
Fig 4.4.5: Block diagram of both system.
After that, we auto-Tuning this system wit Overshoot 11.2%:
34 | P a g e
Fig 4.4.7: Signal obtain of this system.
=> Looking at fig 4.4.7, we can see that the yellow line is the signal of the system with PID and the red line is
without PID. First with the PID signal, the spike is quite high but at the same time it stabilizes extremely quickly.
Besides, without PID, the system has almost no spikes and the time for the system to stabilize is extremely long.
Reference:
[1] Ashlin (2023) What is an automatic control system? - automationforum, Instrumentation and Control Engineering.
Available at: https://automationforum.co/what-is-an-automatic-control-system/ (Accessed: 22 June 2024).
[2] Difference between open loop and closed loop control system (no date) Tutorialspoint. Available at:
https://www.tutorialspoint.com/difference-between-open-loop-and-closed-loop-control-system#:~:text=Common
%20practical%20examples%20of%20open,%2C%20radar%20tracking%20system%2C%20etc. (Accessed: 22 June
2024).
[3] Libretexts (2023) 3.3: Pi, PD, and Pid Controllers, Engineering LibreTexts. Available at:
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/
Introduction_to_Control_Systems_(Iqbal)/03%3A_Feedback_Control_System_Models/3.3%3A_PI%2C_PD
%2C_and_PID_Controllers (Accessed: 26 June 2024).
35 | P a g e
Turnitine:
36 | P a g e
37 | P a g e