SlideShare a Scribd company logo
EE549: Computer Applications in Electrical Engineering
Lecture 10
Applications of MATLAB in Control II
Lecturer
Dr. Karim Ibrahim
1
Lecture (10) Contents
 Control System Response
• The Step Response
• The Impulse Response
• Arbitrary Input Response
• Steady State Response
 Control Design
• Root Locus Plot
• Bode Diagram Plot
• Nyquist Plot of Frequency Response
• Nichols Chart of Frequency Response
• PID Controllers
2
What is System Response?
 The response of a system is the shape and characteristics of the output of this system for a
certain input.
 In the analysis of systems, some basic test input signals are used such as the unit step, the
impulse, and the ramp function.
 To get the step response of a certain system using MATLAB, the system should first be
defined using either block diagrams, transfer functions, or zeros-poles-gain, then use the
proper function syntax.
3
The Step Response
 The response of the system to a step input can be acquired using the next command:
 The response of the system to a unit impulse be acquired using the next command:
4
The Impulse Response
Arbitrary Input Response
 If it is required to check the system response to a sinusoidal input or in general an arbitrary
input signal. In this case, you may use the following command:
5
Example (10-1)
 For the next system transfer function:
Find:
i. The Step Response of the system for 15secs.
ii.The value of the rise time, overshoot and overshoot
time, settling time, and the steady state error.
6
>> sys=tf([1 3],[1 1 4]);
>> t=0:0.01:15;
>> step(sys,t)
% For Manual calculations:
>> y=step(sys,t);
>> Y_analysis = stepinfo(y,t)
Y_analysis =
RiseTime: 0.4688
SettlingTime: 7.9585
SettlingMin: 0.5650
SettlingMax: 1.1664
Overshoot: 55.4905
Undershoot: 0
Peak: 1.1664
PeakTime: 1.2800
>> SSV=y(end) % Steady state value
>> SSE=1-SSV % Steady state error
SSV =
0.7502
SSE =
0.2498
7
Right click your mouse and
then activate the transient
and steady state
characteristics as shown:
8
Example (10-2)
 For the next system transfer function:
Find:
i. The impulse Response of the system for 15secs.
ii.The value of the peak response and the settling time
9
>> sys=tf([1 3],[1 1 4]);
>> t=0:0.01:15;
>> impulse(sys,t)
% For Manual calculations:
>> Y=impulse(sys,t);
>> Y_analysis = lsiminfo(Y,t)
Y_analysis =
SettlingTime: 7.4109
Min: -0.5926
MinTime: 1.9600
Max: 1.3337
MaxTime: 0.3400
>> SSV=Y(end) % Steady state value
>> SSE=0-SSV % Steady state error
SSV =
-8.9451e-04
SSE =
8.9451e-04
10
Example (10-3)
 For the next system transfer function
Find the response of the system for an input signal u(t),
where:
i. U(t) is a unit ramp function, where U(t)=t.
ii.U(t) is a cosine function, where U(t)=cos(t).
11
>> sys=tf([2],[1 2 6]);
>> t=0:0.01:10;
>> u1=t; % Unit Ramp input
>> u2=cos(t); % Cos input
>> figure(1);
>> lsim(sys,u1,t);
>> grid;
>> figure(2);
>> lsim(sys,u2,t);
>> grid;
% For Manual calculations:
>> Y1=lsim(sys,u1,t);
>> Y1_analysis = lsiminfo(Y1,t)
>> SSV1=Y1(end) % Steady state value
>> SSE1=u1(end)-SSV1 % Steady state error
>> Y2=lsim(sys,u2,t);
>> Y2_analysis = lsiminfo(Y2,t)
>> SSV2=Y2(end) % Steady state value
>> SSE2=u2(end)-SSV2 % Steady state error
Example (10-3) – Solution tips
 The time period of analysis should be specified first then the input function is defined and
finally the LINEAR SIMULATION function should be applied on the defined system.
 In the code, “u1” is a ramp function as it increases with time in the same rate as the time
vector “t”, while “u2” is a cosine function.
 Both signals are applied to the same system in a time interval specified by “t” and the output
of each input signal is displayed in a separate figure using the “figure” command.
 Note that the linear simulation function can also display the peak response of the system
output using the right mouse key and then the characteristics option.
 The plots displayed in each figure represent the input signal (in gray) and the output (in blue).
12
13
14
Root Locus Plot
18
Bode Diagram Plot
 The root locus plot of the system can be obtained using the next command:
>> rlocus(sys) Calculates and plots the root locus of the open-loop model sys
 The bode diagram plot of the system can be obtained using the next command:
>> bodeplot(sys) Calculates and plots the root locus of the open-loop model sys
Nyquist Plot of Frequency Response
19
Nichols Chart of Frequency Response
 The Nyquist Plot of the system can be obtained using the next command:
>> nyquist(sys) Creates a Nyquist plot of a dynamic system
 The Nichols Chart of the system can be obtained using the next command:
>> nichols(sys) Creates a Nichols Chart of a dynamic system
Example (10-4)
 For the next feedback system
Plot the Root Locus, Bode Diagram, Nyquist Plot and
Nichols Chart.
20
>> G=tf([2],[1 2 0])
>> H=tf([4],[1 5])
>> Sys=feedback(G,H)
>> figure(1)
>> rlocus(Sys), grid on
>> figure(2)
>> bodeplot(Sys), grid on
>> figure(3)
>> nyquist(Sys), grid on
>> figure(4)
>> nichols(Sys), grid on
21
22
23
24
Simulink - Example (10-5)
 For the next system transfer function:
Using MATLAB Simulink Find:
i. The Step Response of the system for 10secs.
ii.The value of the rise time, overshoot and overshoot time, settling time, and the steady state
error.
25
26
Example (10-5) – Solution (A)
27
Example (10-5) – Solution (B)
Step A
Step B Step C
28
Example (10-5) – Solution (B)
Step D Step E
29
Example (10-5) – Solution (B)
Step F
PID Controller - Example (10-6)
 For the next feedback system
 Analyze the response of the system with step input when adding: Proportional (P), Differential
(D), Integral Controllers (I).
 Finally study the effect of the PID controller on the system
 Tune the PID Controller Manually to enhance the system response.
 Compare between the original and tuned system responses.
30
31
Example (10-6) – Original Response
G=tf([2],[1 2 0])
H=tf([4],[1 5])
figure(1)
Sys=feedback(G,H)
step(Sys)
grid on
title('Original Step response’)
legend('Original’)
struct2table([stepinfo(Sys)])
Proportional Control (P-control)
Proportional Gain: Kp*e(t)
Consider a system, G(s) with 2 real poles (-z1, -z2)
KP
As Kp increases:
• Damping decreases
• Overshoot occurs
• Rise time decreases
• Too much gain can cause instability
33
Example (10-6) – (P-Control)
G=tf([2],[1 2 0])
H=tf([4],[1 5])
Sys=feedback(G,H)
figure(2)
GS=tf([5],[1]) % Static Gain
GS_Sys=feedback(G*GS,H)
step(GS_Sys)
grid on
hold on
step(Sys)
title('Step response with adding Gain
"P-control"')
legend('With P-control','Original')
struct2table([stepinfo(Sys)
stepinfo(GS_Sys)])
Static Gain =5
Differential Control (D-control)
Differential Gain:
Kd*S
• Adds a zero to system
• Decrease overshoot
• Increases damping
• Decreases settling time
35
Example (10-6) – (D-Control)
G=tf([2],[1 2 0])
H=tf([4],[1 5])
Sys=feedback(G,H)
figure(3)
DS=tf([1 0],[1]); % Differentiator
DS_Sys=feedback(G*DS,H)
step(DS_Sys)
grid on
hold on
step(Sys)
title('Step response with adding
Diffrentiator "D-control"')
legend('With D-control','Original')
struct2table([stepinfo(Sys)
stepinfo(DS_Sys)])
Differentiator = S
Integral Control (I-control)
Differential Gain:
KI
𝑺
• Adds a pole at the origin
• Increases overshoot
• Decreases rise time
• Eliminates steady state error
37
Example (10-6) – (I-Control)
G=tf([2],[1 2 0])
H=tf([4],[1 5])
Sys=feedback(G,H)
figure(4)
IS=tf([1],[1 0]); % Integrator
IS_Sys=feedback(G*IS,H)
step(IS_Sys)
grid on
hold on
step(Sys)
title('Step response with adding
Integratortor "I-control"')
legend('With I-control','Original')
struct2table([stepinfo(Sys)
stepinfo(IS_Sys)])
Integrator = 1/S
Combining PID Components
39
Example (10-6) – (PID-Control) G=tf([2],[1 2 0])
H=tf([4],[1 5])
Sys=feedback(G,H)
figure(5)
GS=tf([5],[1]); % Static Gain
DS=tf([1 0],[1]); % Differentiator
IS=tf([1],[1 0]); % Integrator
All_Sys=feedback(G*(GS+DS+IS),H);
step(All_Sys)
grid on
hold on
step(Sys)
title('Step response with adding
Integratortor "PID-control"')
legend('With PID','Original')
struct2table([stepinfo(Sys)
stepinfo(All_Sys)])
PID = 5 + S + 1/S
40
Example (10-6)-(PID-Control)-Manual Tuning
G=tf([2],[1 2 0])
H=tf([4],[1 5])
Sys=feedback(G,H)
figure(6) % Manually Tuned
GS=tf([2.5],[1]); % Static Gain
DS=tf([2 0],[1]); % Differentiator
IS=tf([0.01],[1 0]); % Integrator
All_Sys=feedback(G*(GS+DS+IS),H);
step(All_Sys)
grid on, hold on
step(Sys)
title('Step response with adding
Integratortor "PID-control"')
legend('With PID','Original')
struct2table([stepinfo(Sys)
stepinfo(All_Sys)])
PID = 2.5 + 2*S + 0.01/S

More Related Content

PDF
PID Tuning using Ziegler Nicholas - MATLAB Approach
PDF
Control tutorials for matlab and simulink introduction pid controller desig...
PDF
Chapter10
DOCX
Ayush exp 2
PPTX
Chapter 4 time domain analysis
PDF
control system lab 02 - PID tuning
PPT
5_2019_01_12!09_25_57_AM.ppt
PID Tuning using Ziegler Nicholas - MATLAB Approach
Control tutorials for matlab and simulink introduction pid controller desig...
Chapter10
Ayush exp 2
Chapter 4 time domain analysis
control system lab 02 - PID tuning
5_2019_01_12!09_25_57_AM.ppt

Similar to Applications of MATLAB in Control Part II.pdf (20)

PPTX
Control system with matlab Time response analysis, Frequency response analysi...
PDF
Frequency Response with MATLAB Examples.pdf
PDF
Analysis and Design of PID controller with control parameters in MATLAB and S...
PDF
Linear Control Hard-Disk Read/Write Controller Assignment
DOCX
Lab 3
PDF
Modeling, simulation and control of a robotic arm
PPT
KNL3353_Control_System_Engineering_Lectu.ppt
PDF
Signal System Experiment 7,8,9, (1).pdf
PDF
Signal _system_ experiment _lab_1.0. pdf
PDF
Signal System Ex 7,8,9,.pdf aahgagahgqg
PPTX
Control System - Stability of a control system
PDF
Modern Control - Lec 03 - Feedback Control Systems Performance and Characteri...
PDF
control system Lab 01-introduction to transfer functions
PPTX
EE-371 Lecture 02 introductionsssssssss.pptx
PDF
Digitalcontrolsystems
PPTX
lecture4signals-181130200508.pptx
PPTX
STEP RESPONSE OF FIRST ORDER SYSTEM PART 1.pptx
PDF
The Controller Design For Linear System: A State Space Approach
DOCX
Ece 415 control systems, fall 2021 computer project 1
PDF
Lecture 4: Classification of system
Control system with matlab Time response analysis, Frequency response analysi...
Frequency Response with MATLAB Examples.pdf
Analysis and Design of PID controller with control parameters in MATLAB and S...
Linear Control Hard-Disk Read/Write Controller Assignment
Lab 3
Modeling, simulation and control of a robotic arm
KNL3353_Control_System_Engineering_Lectu.ppt
Signal System Experiment 7,8,9, (1).pdf
Signal _system_ experiment _lab_1.0. pdf
Signal System Ex 7,8,9,.pdf aahgagahgqg
Control System - Stability of a control system
Modern Control - Lec 03 - Feedback Control Systems Performance and Characteri...
control system Lab 01-introduction to transfer functions
EE-371 Lecture 02 introductionsssssssss.pptx
Digitalcontrolsystems
lecture4signals-181130200508.pptx
STEP RESPONSE OF FIRST ORDER SYSTEM PART 1.pptx
The Controller Design For Linear System: A State Space Approach
Ece 415 control systems, fall 2021 computer project 1
Lecture 4: Classification of system
Ad

Recently uploaded (20)

PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Geodesy 1.pptx...............................................
PPTX
Construction Project Organization Group 2.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
PPT on Performance Review to get promotions
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
web development for engineering and engineering
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
CYBER-CRIMES AND SECURITY A guide to understanding
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Geodesy 1.pptx...............................................
Construction Project Organization Group 2.pptx
OOP with Java - Java Introduction (Basics)
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPT on Performance Review to get promotions
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Foundation to blockchain - A guide to Blockchain Tech
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
web development for engineering and engineering
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Internet of Things (IOT) - A guide to understanding
Operating System & Kernel Study Guide-1 - converted.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Ad

Applications of MATLAB in Control Part II.pdf

  • 1. EE549: Computer Applications in Electrical Engineering Lecture 10 Applications of MATLAB in Control II Lecturer Dr. Karim Ibrahim 1
  • 2. Lecture (10) Contents  Control System Response • The Step Response • The Impulse Response • Arbitrary Input Response • Steady State Response  Control Design • Root Locus Plot • Bode Diagram Plot • Nyquist Plot of Frequency Response • Nichols Chart of Frequency Response • PID Controllers 2
  • 3. What is System Response?  The response of a system is the shape and characteristics of the output of this system for a certain input.  In the analysis of systems, some basic test input signals are used such as the unit step, the impulse, and the ramp function.  To get the step response of a certain system using MATLAB, the system should first be defined using either block diagrams, transfer functions, or zeros-poles-gain, then use the proper function syntax. 3
  • 4. The Step Response  The response of the system to a step input can be acquired using the next command:  The response of the system to a unit impulse be acquired using the next command: 4 The Impulse Response
  • 5. Arbitrary Input Response  If it is required to check the system response to a sinusoidal input or in general an arbitrary input signal. In this case, you may use the following command: 5
  • 6. Example (10-1)  For the next system transfer function: Find: i. The Step Response of the system for 15secs. ii.The value of the rise time, overshoot and overshoot time, settling time, and the steady state error. 6 >> sys=tf([1 3],[1 1 4]); >> t=0:0.01:15; >> step(sys,t) % For Manual calculations: >> y=step(sys,t); >> Y_analysis = stepinfo(y,t) Y_analysis = RiseTime: 0.4688 SettlingTime: 7.9585 SettlingMin: 0.5650 SettlingMax: 1.1664 Overshoot: 55.4905 Undershoot: 0 Peak: 1.1664 PeakTime: 1.2800 >> SSV=y(end) % Steady state value >> SSE=1-SSV % Steady state error SSV = 0.7502 SSE = 0.2498
  • 7. 7 Right click your mouse and then activate the transient and steady state characteristics as shown:
  • 8. 8
  • 9. Example (10-2)  For the next system transfer function: Find: i. The impulse Response of the system for 15secs. ii.The value of the peak response and the settling time 9 >> sys=tf([1 3],[1 1 4]); >> t=0:0.01:15; >> impulse(sys,t) % For Manual calculations: >> Y=impulse(sys,t); >> Y_analysis = lsiminfo(Y,t) Y_analysis = SettlingTime: 7.4109 Min: -0.5926 MinTime: 1.9600 Max: 1.3337 MaxTime: 0.3400 >> SSV=Y(end) % Steady state value >> SSE=0-SSV % Steady state error SSV = -8.9451e-04 SSE = 8.9451e-04
  • 10. 10
  • 11. Example (10-3)  For the next system transfer function Find the response of the system for an input signal u(t), where: i. U(t) is a unit ramp function, where U(t)=t. ii.U(t) is a cosine function, where U(t)=cos(t). 11 >> sys=tf([2],[1 2 6]); >> t=0:0.01:10; >> u1=t; % Unit Ramp input >> u2=cos(t); % Cos input >> figure(1); >> lsim(sys,u1,t); >> grid; >> figure(2); >> lsim(sys,u2,t); >> grid; % For Manual calculations: >> Y1=lsim(sys,u1,t); >> Y1_analysis = lsiminfo(Y1,t) >> SSV1=Y1(end) % Steady state value >> SSE1=u1(end)-SSV1 % Steady state error >> Y2=lsim(sys,u2,t); >> Y2_analysis = lsiminfo(Y2,t) >> SSV2=Y2(end) % Steady state value >> SSE2=u2(end)-SSV2 % Steady state error
  • 12. Example (10-3) – Solution tips  The time period of analysis should be specified first then the input function is defined and finally the LINEAR SIMULATION function should be applied on the defined system.  In the code, “u1” is a ramp function as it increases with time in the same rate as the time vector “t”, while “u2” is a cosine function.  Both signals are applied to the same system in a time interval specified by “t” and the output of each input signal is displayed in a separate figure using the “figure” command.  Note that the linear simulation function can also display the peak response of the system output using the right mouse key and then the characteristics option.  The plots displayed in each figure represent the input signal (in gray) and the output (in blue). 12
  • 13. 13
  • 14. 14
  • 15. Root Locus Plot 18 Bode Diagram Plot  The root locus plot of the system can be obtained using the next command: >> rlocus(sys) Calculates and plots the root locus of the open-loop model sys  The bode diagram plot of the system can be obtained using the next command: >> bodeplot(sys) Calculates and plots the root locus of the open-loop model sys
  • 16. Nyquist Plot of Frequency Response 19 Nichols Chart of Frequency Response  The Nyquist Plot of the system can be obtained using the next command: >> nyquist(sys) Creates a Nyquist plot of a dynamic system  The Nichols Chart of the system can be obtained using the next command: >> nichols(sys) Creates a Nichols Chart of a dynamic system
  • 17. Example (10-4)  For the next feedback system Plot the Root Locus, Bode Diagram, Nyquist Plot and Nichols Chart. 20 >> G=tf([2],[1 2 0]) >> H=tf([4],[1 5]) >> Sys=feedback(G,H) >> figure(1) >> rlocus(Sys), grid on >> figure(2) >> bodeplot(Sys), grid on >> figure(3) >> nyquist(Sys), grid on >> figure(4) >> nichols(Sys), grid on
  • 18. 21
  • 19. 22
  • 20. 23
  • 21. 24
  • 22. Simulink - Example (10-5)  For the next system transfer function: Using MATLAB Simulink Find: i. The Step Response of the system for 10secs. ii.The value of the rise time, overshoot and overshoot time, settling time, and the steady state error. 25
  • 23. 26 Example (10-5) – Solution (A)
  • 24. 27 Example (10-5) – Solution (B) Step A Step B Step C
  • 25. 28 Example (10-5) – Solution (B) Step D Step E
  • 26. 29 Example (10-5) – Solution (B) Step F
  • 27. PID Controller - Example (10-6)  For the next feedback system  Analyze the response of the system with step input when adding: Proportional (P), Differential (D), Integral Controllers (I).  Finally study the effect of the PID controller on the system  Tune the PID Controller Manually to enhance the system response.  Compare between the original and tuned system responses. 30
  • 28. 31 Example (10-6) – Original Response G=tf([2],[1 2 0]) H=tf([4],[1 5]) figure(1) Sys=feedback(G,H) step(Sys) grid on title('Original Step response’) legend('Original’) struct2table([stepinfo(Sys)])
  • 29. Proportional Control (P-control) Proportional Gain: Kp*e(t) Consider a system, G(s) with 2 real poles (-z1, -z2) KP As Kp increases: • Damping decreases • Overshoot occurs • Rise time decreases • Too much gain can cause instability
  • 30. 33 Example (10-6) – (P-Control) G=tf([2],[1 2 0]) H=tf([4],[1 5]) Sys=feedback(G,H) figure(2) GS=tf([5],[1]) % Static Gain GS_Sys=feedback(G*GS,H) step(GS_Sys) grid on hold on step(Sys) title('Step response with adding Gain "P-control"') legend('With P-control','Original') struct2table([stepinfo(Sys) stepinfo(GS_Sys)]) Static Gain =5
  • 31. Differential Control (D-control) Differential Gain: Kd*S • Adds a zero to system • Decrease overshoot • Increases damping • Decreases settling time
  • 32. 35 Example (10-6) – (D-Control) G=tf([2],[1 2 0]) H=tf([4],[1 5]) Sys=feedback(G,H) figure(3) DS=tf([1 0],[1]); % Differentiator DS_Sys=feedback(G*DS,H) step(DS_Sys) grid on hold on step(Sys) title('Step response with adding Diffrentiator "D-control"') legend('With D-control','Original') struct2table([stepinfo(Sys) stepinfo(DS_Sys)]) Differentiator = S
  • 33. Integral Control (I-control) Differential Gain: KI 𝑺 • Adds a pole at the origin • Increases overshoot • Decreases rise time • Eliminates steady state error
  • 34. 37 Example (10-6) – (I-Control) G=tf([2],[1 2 0]) H=tf([4],[1 5]) Sys=feedback(G,H) figure(4) IS=tf([1],[1 0]); % Integrator IS_Sys=feedback(G*IS,H) step(IS_Sys) grid on hold on step(Sys) title('Step response with adding Integratortor "I-control"') legend('With I-control','Original') struct2table([stepinfo(Sys) stepinfo(IS_Sys)]) Integrator = 1/S
  • 36. 39 Example (10-6) – (PID-Control) G=tf([2],[1 2 0]) H=tf([4],[1 5]) Sys=feedback(G,H) figure(5) GS=tf([5],[1]); % Static Gain DS=tf([1 0],[1]); % Differentiator IS=tf([1],[1 0]); % Integrator All_Sys=feedback(G*(GS+DS+IS),H); step(All_Sys) grid on hold on step(Sys) title('Step response with adding Integratortor "PID-control"') legend('With PID','Original') struct2table([stepinfo(Sys) stepinfo(All_Sys)]) PID = 5 + S + 1/S
  • 37. 40 Example (10-6)-(PID-Control)-Manual Tuning G=tf([2],[1 2 0]) H=tf([4],[1 5]) Sys=feedback(G,H) figure(6) % Manually Tuned GS=tf([2.5],[1]); % Static Gain DS=tf([2 0],[1]); % Differentiator IS=tf([0.01],[1 0]); % Integrator All_Sys=feedback(G*(GS+DS+IS),H); step(All_Sys) grid on, hold on step(Sys) title('Step response with adding Integratortor "PID-control"') legend('With PID','Original') struct2table([stepinfo(Sys) stepinfo(All_Sys)]) PID = 2.5 + 2*S + 0.01/S