AI 3206: Control Systems
Class Project # 1 (for Modules 2 and 3)
Release date: 20th April, 2024, 9:45 pm (IST)
Due date: 30th April, 2024, 11:59 pm (IST)
Read the following before you move forward:
1. For a vast majority of you (except the ones who did really well in minor 1), this assignment is worth 
15% of your total marks for this course.
2. Late policy: You can be late by a maximum of 3 days. Your assignment will not be accepted more 
than 3 days after the due date. The actual score and received score (received score is actual score 
minus penalty for late submission) are related as follows:
𝑟𝑒𝑐𝑒𝑖𝑣𝑒𝑑 𝑠𝑐𝑜𝑟𝑒 =
{
 
 
 
 
𝑎𝑐𝑡𝑢𝑎𝑙 𝑠𝑐𝑜𝑟𝑒 ; 𝑙𝑎𝑡𝑒 𝑏𝑦 0 𝑑𝑎𝑦𝑠
0.9 ∙ 𝑎𝑐𝑡𝑢𝑎𝑙 𝑠𝑐𝑜𝑟𝑒
0.75 ∙ 𝑎𝑐𝑡𝑢𝑎𝑙 𝑠𝑐𝑜𝑟𝑒
0.5 ∙ 𝑎𝑐𝑡𝑢𝑎𝑙 𝑠𝑐𝑜𝑟𝑒
0
; 𝑙𝑎𝑡𝑒 𝑏𝑦 1 𝑑𝑎𝑦
; 𝑙𝑎𝑡𝑒 𝑏𝑦 2 𝑑𝑎𝑦𝑠
; 𝑙𝑎𝑡𝑒 𝑏𝑦 3 𝑑𝑎𝑦𝑠
; 𝑙𝑎𝑡𝑒 𝑏𝑦 𝑚𝑜𝑟𝑒 𝑡ℎ𝑎𝑛 3 𝑑𝑎𝑦𝑠
3. Plagiarism, if detected, no matter how big or small, will lead to a score of ZERO for all the team 
member; no exceptions! It is ok to take help from AI tools of talk to other teams. But, you cannot 
copy from another team or any AI tools(I can’t believe I have to make this AI tools part so explicit!).
• It is down right stupid to copy-paste from AI tools and think that is acceptable.
• Also, it is a bad idea to keep open another teams work in front of you while you do the 
assignment. While you may think you are just taking help, your reports and your codes will 
get heavily influenced by the other team to the point that it will qualify as being plagiarized.
4. This is a team project. You have to do the project with the team that you selected in the excel 
sheet that was shared with you.
• Only one submission per team.
• Submission must be made using the google drive link that was shared with you.
• Your submission in the google drive link must contain only four files:
i. report.pdf. 
ii. design_process.m. 
iii. simulator.m. 
You MUST NOT submit any other files. You MUST NOT zip/compress these three files. You 
MUST NOT put these three files in a subfolder inside the google drive link. Directly drop 
these files in the google drive folder corresponding to your team.
Read the deliverables section carefully to understand what needs to be submitted. 
Objective
The objective of this class project is to do a full-fledged controller design for a real-world system. Other 
than this main objective, this project has the following side objectives:
a) Using MATLAB for controller design.
b) Using MATLAB to simulate the closed-loop system that you designed.
c) Using Bode plots to design controllers for unstable systems.
d) Getting you acquainted with few new controller architectures that you have not encountered in 
this course.
Problem Statement
The linearized model of an F-16 aircraft is [1]1
,
𝐺(𝑠) =
𝛼(𝑠)
𝛿𝐸
(𝑠)
=
−(0.0717𝑠
3 + 1.684𝑠
2 + 0.0853𝑠 + 0.0622)
𝑠
4 + 1.0604𝑠
3 − 1.1154𝑠
2 − 0.066𝑠 − 0.0512
where 𝛼 is the attack angle, and 𝛿𝐸 is the elevator deflection. Here, the attack angle is the output to be 
controlled and the elevator deflection is the control input. Fig. 1 shows the block diagram of this system.
Fig. 1 
In this project, your task is to design a closed-loop controller for this system that satisfies the following
criteria:
(i) The steady state error is zero for a step input.
(ii) The settling time for 2% settling accuracy is 0.05 𝑠𝑒𝑐𝑜𝑛𝑑𝑠.
(iii) The maximum percentage overshoot is not greater than 20%.
In the next section, you will solve a series of inter-linked tasks that will help you design a closed-loop 
controller for this system.
Controller Design
Task 1 (Basic understanding of the system) 
Whenever you want to design a controller for a system, the first step is to check how the system is 
actually performing. Here are your tasks:
(a) Obtain the unit-step response of 𝐺(𝑠).
To do this in MATLAB, you can use the step() function, or the lsim() function. You can refer to 
lecture 9 folder for some help in this regard.
 
[1] Monahemi, Moghen M., Jewel B. Barlow, and Dianne P. O'Leary. "Design of reduced-order observers with precise loop 
transfer recovery." Journal of guidance, control, and dynamics, 1992.
You might have realized after solving part (a) that this system is unstable. To verify the same, do the 
following:
(b) Find the poles and zeros of 𝐺(𝑠). Are there any poles in the RHS of the s-plane?
To do this, you may choose to directly plot the pole-zero chart of 𝐺(𝑠) using the function 
pzmap() of MATLAB.
Task 2 (Making the system compatible for Bode plot based controller design)
 
 Fig. 2 Fig. 3 
Till now, we have learned Bode plot based controller design in this course. However, Bode plot based 
controller design is not applicable for unstable systems. To know why, refer to pages 4 and 7 of lecture 
22_23 notes. To address this issue, we propose a dual feedback loop based control architecture shown 
in Fig. 2. The inner loop has a controller gain 𝐾𝑓 which is tuned such that effective transfer function 𝐺̃(𝑠)
of the inner loop is stable. Formally, 𝐺̃(𝑠) is the transfer function between 𝑢 (refer Fig. 2) and 𝛼. Then, 
we can consider 𝐺̃(𝑠) to be the modified system that needs to be controlled. Since 𝐺̃(𝑠) is stable, we 
can then use Bode plot based controller design to find the controller 𝐶(𝑠) that achieves the three design 
criteria mentioned in the problem statement section. Finally, the controller that we design, including the 
inner and the outer feedback loop, is shown in Fig. 3. The inputs to this controller are the set point2 𝑟, 
and the angle of attack 𝛼. The output of the controller is elevator deflection 𝛿𝐸. Here are your tasks:
(a) Use MATLAB to get the Nyquist plot of 𝐺(𝑠)
3. Then, use the Nyquist plot to find a 𝐾𝑓 such that 
𝐺̃(𝑠) is stable. There can be many values of 𝐾𝑓 for which 𝐺̃(𝑠) is stable. Use your intuition to 
choose 𝐾𝑓 from the Nyquist plot such that 𝐺̃(𝑠) is away from “stability boundaries”4
.
NOTE: The choice of 𝐾𝑓 will affect the subsequent design of 𝐶(𝑠). You may have to do back-andforth between choosing 𝐾𝑓 and designing 𝐶(𝑠).
(b) Ensure that the resultant 𝐺̃(𝑠) (obtained after completing part (a) of task 2) is stable by plotting 
the step response and pole-zero chart of 𝐺̃(𝑠).
(c) Does the step response of 𝐺̃(𝑠) satisfies any of the three design criteria mentioned in the 
problem statement section?
 
 
2
Set point 𝑟 is basically the desired angle of attack.
3
I find the Nyquist plot of 𝐺(𝑠) to be very apt for F-16 aircraft! We can make it a wallpaper! 😊 4
If this statement is not precise, it was meant to be so. Use your imagination to interpret what “stability boundaries” are.
Task 3 (Meeting the steady state error criteria)
Fig. 4 
Just like we did in lecture 26_27 notes, the first step towards Bode plot based controller design is to 
meet the steady state error criteria. And, to do this, we take the same approach as in lecture 26_27 
notes, i.e. we will divide controller 𝐶(𝑠) into 𝐶1
(𝑠) and 𝐶2
(𝑠) such that 𝐶(𝑠) = 𝐶1
(𝑠)𝐶2
(𝑠). This is 
shown in Fig. 4 where 𝐺̃(𝑠) is the transfer function of the modified system that you found after 
completing Task 2. We then find 𝐶1
(𝑠) to meet the steady state error criteria and 𝐶2
(𝑠) to meet the 
settling time and maximum overshoot criteria. Here is your task:
(a) Assuming that 𝐶1
(𝑠) and 𝐶2
(𝑠) are such that the closed-loop system in Fig. 4 is stable, and 𝐶2
(𝑠)
is a Type-0 system, find 𝐶1
(𝑠) such that steady state error of the system shown in Fig. 4 is zero 
when 𝑟(𝑡) is a step-input.
NOTE: The choice of 𝐶1
(𝑠) will affect the subsequent design of 𝐶2
(𝑠). It is wise to choose 𝐶1
(𝑠)
such that the type of 𝐶1
(𝑠) is as low as possible and yet meets the steady state error criteria.
Task 4 (Meeting the settling time and maximum overshoot criteria)
Fig. 5 
In this section, your task is to design 𝐶2
(𝑠) such that the settling time and maximum overshoot criteria is 
met. In order to do so, we will use steps similar to lecture 26_27 notes, i.e. consider 𝐻(𝑠) = 𝐶1
(𝑠)𝐺̃(𝑠)
to be the modified system and then design 𝐶2
(𝑠) using the Bode plot of 𝐻(𝑠). This is shown in Fig. 5.
There is one small difference though:
We will use Bode plot of 𝐻̃(𝑠) = −𝐻(𝑠) and in order compensate for the minus sign, the controller will 
be 𝐶̃
2
(𝑠) = −𝐶2
(𝑠) instead of 𝐶2
(𝑠). The simple reason why this change is necessary is because the 
static gain of 𝐺(𝑠) and hence 𝐺̃(𝑠) is negative, i.e. to increase angle of attack, the elevator should move 
downwards. Therefore, the controller should have a negative gain as well, i.e. is the error between 
desired and actual angle of attack is positive, we need to move the elevator downwards.
Here are your tasks:
(a) Use MATLAB to get the Bode plot of 𝐻̃(𝑠). Also, find the gain and phase margin.
(b) Can you design a proportional controller that meets the settling time and maximum overshoot 
requirement?
(c) Using the Bode plot of 𝐻̃(𝑠), find the structure of 𝐶2
(𝑠) so as to meet the settling time and 
maximum overshoot requirement. Off course, the closed-loop system in Fig. 5 should also be 
stable. Also remember that 𝐶2
(𝑠) should be a Type-0 system (this assumption was made during 
Task 3).
(d) Tune the parameters of 𝐶2
(𝑠) so as to meet the settling time and maximum overshoot 
requirement.
HINTS FOR PARTS (c) AND (d): First, the controller structure is actually quite simple. Second, for this 
problem you can find a controller structure for which the closed-loop system is stable irrespective of 
how high the DC gain of 𝐶2
(𝑠) is! After you have found the correct controller structure, you basically 
have to increase the gain crossover frequency until the settling time criteria is met. Gain crossover 
frequency can be increased by increasing the DC gain of 𝐶2
(𝑠).
Task 5 (Simulate the closed-loop control system) 
 
 Fig. 6 Fig. 7 
The final task is to design a simulator to test the performance of the controller that you have designed. 
The output of the simulator is the time response, 𝛼(𝑡), for the system shown in Fig. 6 where:
(i) 𝐾𝑓 is what you found in task 2. 𝐶(𝑠) = −𝐶1
(𝑠)𝐶2
(𝑠) where 𝐶1
(𝑠) is what you found in task 3, 
and 𝐶2
(𝑠) is what you found in task 4. The reason for the minus sign is mentioned in the 
description of task 4. 
(ii) The reference signal 𝑟(𝑡) is shown in Fig. 7.
(iii) The disturbance input 𝜀(𝑡) = 𝐴 ∙ 𝑠𝑖𝑛(𝜔𝑡) where 𝐴 and 𝜔 are specified by the user.
(iv) 𝛼(0) and 𝛼̇(0) can be non-zero values that are specified by the user. Basically, the simulator 
should be able to deal with non-zero initial conditions. Except 𝛼(0) and 𝛼̇(0), assume zero 
initial conditions.
The best way to design this simulator will be through state space approach. Here are your tasks:
(a) Find the state space model of the controller shown in Fig. 6. The input to the state space model 
is the attack angle, 𝛼, and the reference signal, 𝑟. The output of the state space model is 𝛿𝐸
𝐶
shown in Fig. 6.
(b) Find the state space model of the F-16 aircraft, 𝐺(𝑠). This can be done using tf2ss() function of 
MATLAB.
(c) Having found the state space model of the controller and 𝐺(𝑠), combine them to find the state 
space model of the closed-loop system shown in Fig. 6. The solution to question 3 of problem set 
2 may be helpful.
(d) Write MATLAB script simulator.m that simulates the state space model found in part (c) using 
ode45() solver. You can refer to main_SS.m in lecture 9 folder for some help.
IMPORTANT: You cannot use any additional MATLAB functions; all the helper functions should be 
inside simulator.m as local functions (look into the concept of local functions for MATLAB). Also, 
simulator.m should accept 𝐴, 𝜔, 𝛼(0), and 𝛼̇(0) as user inputs, and in a click of button should 
generate a plot of the time response 𝛼(𝑡).
Deliverables
You must submit the following in the google drive link that was shared with you:
(i) report.pdf. This file should document the necessary steps of your design process. You should 
the answers to all the tasks (including the sub tasks), justification behind your answers, the 
required plots, and mathematical derivations.
(ii) design_process.m. This is a MATLAB script that should contain the necessary MATLAB codes
that is required for me to follow your design process. You MUST NOT dump all the codes that 
you have written; just the most relevant ones (similar to final answer sheet that you submit 
during exams). You MUST comment the codes so that I can understand which task and which 
part it corresponds to, e.x. if the code is for Task 2-part (a), you must write % Code for Task 2 –
part (a) in top of that piece of code.
(iii) simulator.m. The instruction for this is clearly mentioned in Task 5-part (d).
You MUST NOT submit any other files.
You MUST NOT zip/compress these three files.
You MUST NOT put these three files in a subfolder inside the google drive link. Directly drop these files 
in the google drive folder corresponding to your team.