Control System Final Project
By:
Joyce Aoun
Kamil Al Sayegh
Karen Jreige
To:
Prof. Mohammad Khaldi
A report submitted to the Department of Electrical Engineering in partial fulfilment of the
requirements for the Control Systems
University of Balamand
Faculty of Engineering
Submitted on:
1
Table of Contents
I. Introduction:.................................................................................................................................3
II. Problems:......................................................................................................................................3
1. Problem 1.................................................................................................................................3
2. Problem 2.................................................................................................................................6
3. Problem 3.................................................................................................................................7
4. Problem 4...............................................................................................................................12
5. Problem 5...............................................................................................................................17
6. Problem 6:..................................................................................................................................18
a) Introduction............................................................................................................................18
7. Problem 7:..............................................................................................................................23
8. Problem 8:..................................................................................................................................27
III. Conclusion...................................................................................................................................28
IV. Personal Contributions...............................................................................................................29
V. References..................................................................................................................................29
Table of Figures
Figure 1 Plant Block diagram.................................................................................................................3
Figure 2 Plant transfer function block diagram.....................................................................................4
Figure 3 plant SFG..................................................................................................................................5
Figure 4 MATLAB snippet code............................................................................................................10
Figure 5 MATLAB and Simulink problem 3...........................................................................................11
Figure 6 root locus by analysis.............................................................................................................14
Figure 7 zoomed in Root locus problem 4...........................................................................................15
Figure 8 Root locus problem 4.............................................................................................................15
Figure 9 Wso value verification...........................................................................................................16
Figure 10 Simulink PID Model..............................................................................................................20
Figure 11 Simulink before VS after control..........................................................................................20
Figure 12 MATLAB before vs after control...........................................................................................21
Figure 13 Simulink step response comparison on MATLAB.................................................................22
Figure 14 Simulink 1 problem 7...........................................................................................................26
Figure 15 Simulink 2 problem 7...........................................................................................................26
2
I. Introduction:
Modern aircraft systems have changed significantly, with an enhancement in control
mechanism improving efficiency and reliability. Traditionally, aircraft relied on
mechanical linkage to operate primary control surfaces like rudders or elevators. The
introduction of fly-by wire technology marked a major shift, replacing mechanical
connections with electronic controls. This transition enabled the usage of a more
advanced control algorithm.
The objective of this project is to analyze the system’s stability using a simplified
mathematical model. In addition, control strategies covered throughout the semester-
such as PID tuning and state-feedback control-will be applied to enhance the system’s
performance. All simulations will be carried out in MATLAB and Simulink.
Ultimately, this project provides the team with a practical platform to apply the
concepts learned in ELEN350.
II. Problems:
1. Problem 1
θ( y )
a) Analytical Derivation of the plant transfer function G ( s )= using
θ(u)
block diagram algebra (BDA)
Figure 1 Plant Block diagram
3
Figure 2 Plant transfer function block diagram
(1)
The final value is obtained by referring to the values in the Appendix.
4
b)
Analytical
Derivation
of the
plant
θ( y )
transfer function G ( s )= using SFG
θ(u)
Figure 3 plant SFG
5
(2)
Verifying the values of equation (1), MATLAB and Simulink were utilized to implement the
plant transfer function:
2. Problem 2
Substituting with numerical values, the expression becomes after referring to equation
(1):
7
θy 1.5 × 10
θu = [ s 3+ 3408.33 s 2+1501204000 s ]
And so, the governing equation (ODE) is represented by:
y ′′′(t)+3408.33y′′(t)+1501204000y′(t) = 15,000,000u(t)
noting that the input signal u(t) is a unit-step input.
6
3. Problem 3
a) Using the time domain, the unit step response of the closed loop system initially at rest is:
7
8
9
MATLAB code to obtain time domain coefficients:
Figure 4 MATLAB snippet code
OUTPUT
10
c) Verifying the unit step response with both MATLAB and Simulink
Figure 5 MATLAB and Simulink problem 3
11
4. Problem 4
12
13
14
15
Figure 6 root locus by analysis
MATLAB Root locus for verification:
Figure 7 Root locus problem 4
Figure 9 Wso value verification
16
It can be seen that at the intersection of the root locus with the imaginary axis, where x is
approximately equal to zero, the value of the sustained oscillation is Wso= 38748.1 rad/sec
which is approximately equal to the calculated value obtained from the RST table,
Wso(calculated)=38758.25 rad/sec.
17
5. Problem 5
6. Problem 6:
18
a) Introduction
In this problem, we are tasked with tuning a PID controller for a given system using
the Ziegler-Nichols methods. These methods are popular for their simplicity and
practical application in tuning controllers. There are two primary Ziegler-Nicholas
methods:
• The Open-Loop Method
• The Closed-Loop Method
Open Loop Method:
We first put the system in open-loop (no feedback controller active). We then must
apply the step change input. Using the reaction of this input in the system we must
identify key parameters known as Ts0 Ks0 and Ti. by observing the S-shaped response,
and measuring the process delay (L) and constant T and process gain K. Using these
parameters, we use the table to identify the PID gains. These parameters are first
found by drawing a tangent to the inflection point on the graph and measuring. This is
an experimental method. [1]
Closed Loop Method:
We first remove integral and derivative action → set I = 0, D = 0 (P-only control). we
then increase the proportional gain K p slowly. After that at a certain value, the system
begins to oscillate with constant amplitude (sustained oscillations). Once this
happened, we are at the gain known as the ultimate gain K u with oscillation period
known as the ultimate period T u. These parameters are then identified and we Use
Ziegler–Nicholas closed-loop formulas to compute the PID gains. The critical values
can be obtained also by the root locus. [1]
b) Open-Loop Method:
Ks0 = 34133.33
Ws0 = 38758.25
These values were found previously
Kp = 0.6(34133.33) = 204799.99 ≈ 204800
19
2π
Ti = 0.5( ) = 8.1x10-5 Ki = 2528395062
38758.25
2π
Td = 0.125( ) = 2.02x10-5 Kd = 4.13696
38758.25
Using the Ziegler-Nichols Table:
( 4.13696 ) s2 +20480 s +2528395062
Gc =
s
Closed-Loop Method:
Since we have a pole at the origin of the plant (it contains an integrator), the open
loop response will be a straight line and doesn’t reach a steady state response. An S-
shape is not observed so this method cannot be applied
c) MATLAB and Simulink Verification
Figure 10 Simulink PID Model
20
21
Figure 12 MATLAB before vs after control
22
Figure 13 Simulink step response comparison on MATLAB
Fig.10 The first model is used to showcase the open-loop transfer function before applying
any type of control, mainly the PID controller. The second model demonstrates the closed
loop response after applying a PID controller where K, Kd and Kp where specified according
to the calculations done above.
Fig.11 The view of the scope is demonstrated through ‘Data Inspector’ on Simulink, which
shows the response before PID where the system appears to be a line with no steady state.
However, after control, the closed loop response appears to increase fast enough, till it
reaches 1 as the steady state.
Fig. 12 This is a MATLAB code where the Gc was implemented, and a comparison graph was
plotted. MATLAB graphing allowed the use of zooming in, and showcasing the rapid increase
of the response accurately (it appeared as a straight line in Simulink because of the
autoscaling). However, a zoomed in plot is also shown to showcase the slope of the
response before tuning.
Fig.13 The Simulink Graph is showcased using MATLAB plotting function. It appears as a
straight line as Simulink uses autoscaling (not zoomed in), however the overall response is
shown.
23
It can be seen in all figures that the PID Ziegler–Nicholas tuning method proved to be
effective as it elevated the response to a very fast, efficient response with a steady
state at one (reaches 1).
7. Problem 7:
15,000,000
G(s) = 3 2
s + 3408.33 s +150120400 s
for simplicity assumeα =150120400
a) CCF:
0 1 0 0
x(t) = [ 0 0 1 ] x(t) + [ 0 ] u(t)
0 −α −3408.33 1
y(t) = [15,000,000 0 0 ] x(t)
b) OCF:
0 0 0
z(t) = [ 1 0 −α ] z(t) + ¿] u(t)
0 1 −3408.33
y(t) = [0 0 1¿ z(t)
c) 7a. For CCF
Y(s) = [C (SI – A)-1 B +D] U(s)
s 0 0 0 1 0 0
Y(s) = [15,000,000 0 0] ([ 0 s 0 ] - [ 0 0 1 ]-1 [ 0 ]
0 0 s 0 −α −3408.33 1
s −1 0 0
¿ ] [0 s −1 ] [0 ]
-1
0 α s+3408.33 1
24
1 s+3408.33 1
s s∆ ∆
s+3408.33 1
A-1 = 0
∆ ∆
−α s
0
∆ ∆
Knowing that ∆ ( s )=s 3 +3408.33 s 2 +150120400 s
1 s+3408.33 1
s ∆ ∆
0
s+3408.33 1
Y(s) = [15,000,000 0 ¿ ¿ ¿ 0 ] [0 ]
∆ ∆
1
s
0 −α
∆
1
s
1 15,000,000
¿[ ]=[ ¿
∆ ∆
s
∆
15,000,000
y(t) = L-1{ 2 }
s (s +3408.33 s +150120400)
7b. For OCF:
s 0 0 0 0 0
Y(s) = [0 0 1¿ ([ 0 s 0 ] - [1 0 −α ]-1 ¿]
0 0 s 0 1 −3408.33
s 0 0
[0 0 1] ([ −1 s α ] -1 ¿]
0 −1 s +3408.33
1
0 0
s
s +3408.33 s (s +3408.33) −α ∆
A-1 =
∆ ∆ ∆
1 s s2
∆ ∆ ∆
25
Knowing that ∆ ( s )=s ( s2 +3408.33 s+α )
1
0 0
s
][
s (s +3408.33) −α ∆ 15,000,000
s +3408.33
Y(s) = [0 0 1¿ [ 0 ]
∆ ∆ ∆
0
1 s s2
∆ ∆ ∆
2 15,000,000
1 s s
[ ][ 0 ] = ¿]
∆ ∆ ∆
0
15,000,000
y(t) = L-1{ 2 }
s (s +3408.33 s +α )
Partial fraction decomposition for both problems:
15,000,000 A Bs+C
= + 2 .
s (s +3408.33 s +150120400) s s + 3408.33 s+ 150120400
2
Multiply both sides by s(s 2+3408.33 s+150120400):
2
15,000,000=A ( s +3408.33 s +150120400)+s ( Bs+C) .
Expand RHS:
2 2
A( s )+ A( 3408.33 s)+ A(150120400)+ B s + Cs
2
¿( A +B) s +(3408.33 A+C ) s+150120400 A .
Match coefficients with the LHS 15,000,000(which is 0 s2 +0 s+15,000,000 ):
s term: A+ B=0⇒ B=− A
2
s term: 3408.33 A +C=0 ⇒ C=−3408.33 A
1
15,000,000
constant term: 150120400 A=15,000,000 ⇒ A=
150120400
So
15,000,000
A= ≈ 0.0999198 , B=− A , C=−3408.33 A .
150120400
Thus
A −As−3408.33 A A s+3408.33
F (s )= + 2 = −A 2 .
s s +3408.33 s +150120400 s s + 3408.33 s+150120400
Now complete the square in the quadratic:
Let
a=3408.33 , b=150120400.
Then
2
s +as +b=¿
26
Where,
α = =1704.165 , ω= √
a 4 b−a2
≈12133.27 .
2 2
So
2
s +3408.33 s +150120400=¿
Rewrite the numerator:
− A(s+ 3408.33)=− A(s+ α)− Aα .
Hence
− As−3408.33 A s+ α
=−A
2
s + 3408.33 s+ 150120400 ¿¿
Apply inverse Laplace
Use the standard pairs:
−1 1
L { }=1
s
−1 s +α
L {
¿¿
−1 ω
L {
¿¿
So
−1 −αt 1 −αt
L {F (s )}= A− A e cos (ωt)− Aα e sin (ωt).
ω
Now plug numbers:
15,000,000
A= ≈ 0.0999198
150120400
α =1704.165
ω ≈ 12133.27
Aα /ω ≈ 0.01403
y(t)=0.0999198−0.0999198e−1704.165t cos(12133.27t)−0.01403e−1704.165t sin(12133.27t)
d) Simulink:
Figure 14 Simulink 1 problem 7
27
Figure 15 Simulink 2 problem 7
8. Problem 8:
a) Using the CCF SSM:
s 0 0 0 1 0 0 0 0
1) ∆ a(s)= | SI -A+Bk | = | [ 0 s 0 ] – [ 0 0 1 ]+[0 0 0 ]|
0 0 s 0 −α −3408.33 k1 k2 k3
s −1 0
| 0 s −1 |
k 1 α+k2 s +3408.33+k 3
∆ a(s)= s3 +s2(3408.33 + k3) + s(α + k2) + k1
2) We must find the desired characteristic polynomial:
∆ d(s) = s3 + 3s2 + 4s + 2
3) We now equate the 2 polynomials to find the values of the constants:
3408.33 + k3 = 3 k3 = -3405.33
α + k2 = 4 k2 = 4 – α
k1 = 2
And so, the SFG matrix is:
K= [ 2 4 – α -3405.33 ]
4) ess = 0:
P = -C Ak-1 B
0 1 0
= -[15,000,000 0 0] [ 0 0 1 ¿¿ ]
−k 1 −k 2−α −k 3−3408.33
−1
k1 15,000,000
P = -[15,000,000 0 0¿ [ ]=[ ¿
0 2
0
28
b) Also using the CCF:
1) Step 1 stays the same and gives us:
∆ a(s)= s3 +s2(3408.33 + k3) + s(α + k2) + k1
−μπ
2) Knowing Mp = e √ 1−μ and so μ=0.591
2
5
And Ts = =5 wn = 1.69
μwn
And so:
∆ 2(s) = s2 + 2s + 2.86
∆ d(s)= (s2 + 2s + 2.86)(s- 5xRe{Pd})
Roots of ∆ 2 are: -1± 1.363
Pnd = 5(-1)=-5
And so:
∆ d(s)= s3 + 7s2 +12.86s +14.3
3) We now equate the new polynomials:
3408.33 + k3 = 7 k3 = -3401.33
α + k2 = 12.86 k2 = 12.86 – α
k1 = 14.3
And so, the SFG matrix is:
K= [ 14.3 12.86 – α -3401.33 ]
4) ess = 0:
P = -C Ak-1 B
0 1 0
= -[15,000,000 0 0] [ 0 0 1 ¿¿ ]
−k 1 −k 2−α −k 3−3408.33
−1
k1 15,000,000
P = -[15,000,000 0 0¿ [ ]=[ ¿
0 14.3
0
29
III. Conclusion
This project successfully explored the fundamental principles of control systems,
culminating in the design, implementation, and analysis of a system utilizing the
Proportional-Integral-Derivative (PID) control algorithm. Control theory provides the
essential framework for manipulating system behaviour, enabling automated
regulation of the plane. This project highlighted
the critical roles of open-loop and closed-loop feedback mechanisms in achieving
stability and desired performance.
IV. Personal Contributions
In terms of task distribution, Joyce completed Problems 1 and 2, while Karen worked on
Problems 3, 4, and 5, and Kamil handled Problems 6, 7, and 8. Joyce was also responsible for
the MATLAB and Simulink components related to Problems 2 and 3, whereas Karen and
Kamil completed the remaining MATLAB and Simulink exercises. All three team members
contributed to writing the report by developing their assigned sections, and each reviewed the
others’ work to ensure accuracy, coherence, and completeness throughout the project.
V. References
[1] Florius, “PID tuning methods,” Florisera, Jan. 07, 2024. [Online]. Available:
[Link] Florisera+1
[2] [Video]. “PID Controller Design with Ziegler Nichols Method Open & Closed
Loop in MATLAB,” YouTube video, G9un58HjNJ4, 2025 (accessed Dec. 7, 2025).
[Online]. Available: [Link]
[3] [Video]. “(Other PID-tuning video),” YouTube video, 9vZSw_xzC9E, 2025
(accessed Dec. 7, 2025). [Online]. Available: [Link]
si=xCo2PjfOwhO2XatG
30
31