Professional Documents
Culture Documents
Feedback Systems Report
Feedback Systems Report
Dr. BASIL
MATRICLE: FE21A434
Controllers in feedback systems constantly analyze the system's output and compare it to a de-
sired state. This difference called the error, is what the controller uses to adjust the system's in-
put, ensuring it steers toward the target.
The different types of controllers include:
Proportional (P) Controller: This is the simplest type. It directly adjusts the input based on the
error's magnitude. Bigger error, bigger adjustment. Easy to understand, but may lead to a persis-
tent error (the system might not quite reach the target).
Integral (I) Controller: This one focuses on eliminating the overall error over time. It accumu-
lates the error and factors it into the input adjustment. Great for getting the system to exactly
match the target, but can be slow to react to initial changes.
Derivative (D) Controller: This controller anticipates future errors by considering the rate of
change of the error. It helps the system respond quickly to changes and disturbances. However, it
can be sensitive to noise in the system.
PID Controller: It combines the best of all previously mentioned controllers for a robust and
versatile solution. By adjusting the weightage of each term, we can fine-tune the controller for
optimal performance in a specific system.
Each controller goes into do a certain change in the system, the table below summarizes this;
Each question under this lab will contain 3 parts, the analytical analysis, the MATLAB
code, and finally our conclusion
Question 1
ANALYSIS
1) Now to find the value of Kp for a steady state error of a step input;
For the step input 𝑅(𝑠)=1/𝑠, the steady-state error 𝑒𝑠𝑠 for a unity feedback system is given by:
1
ess = lim
1+ KpG ( s )
s→0
1
= lim 1
1+ Kp( )
1+20 S
s→0
1
=
1+ Kp
Given that the steady-state error must be less than or equal to 1%;
ess ≤ 0.01
1
≤ 0.01
1+ Kp
1+Kp ≥ 100
Kp ≥ 99
2) Settling Time Analysis;
Ts = 4 / pole
4
2 ≥ 1+ Kp
20
80
2≥
1+ kp
1+kp ≥ 40
kp ≥ 39
But using Kp as 99 and verifying if this value meets our required conditions;
From ess = 1/1+Kp
ess = 1 / 1+99
= 0.01
MATLAB CODING
Output
CONCLUSION
By using the value of Kp obtained from our calculation within our Matlab code, we can see that
the settling time of the system becomes greatly improved and lies within our required condition
margins indicating that our analysis is correct
Question 2
ANALYSIS
Using the same system from question 1, for designing a proportional integrator controller we
have;
1
G ( s )=
1+20 S
The controller now has the function
Ki
C(s) = Kp+
S
C ( s)G (s)
Now T(s) =
1+ C(s)G ( s ) H ( s)
But H(s) = 1
T ( s )=
( Kp+ )(
S 1+ 20 S )
Ki 1
1+ ( Kp+ )(
S 1+20 S )
Ki 1
To meet the settling time requirement (𝑇𝑠 ≤ 4 seconds), we need to ensure the dominant pole of
the closed-loop system places the system's response within the desired settling time.
Characteristic Equation and Pole Placement
Taking the denominator in order to get the characteristic equation of the closed loop TF:
(
1+ Kp+
Ki
S )( 1+ 120 S )=0
( )
Ki
Kp+
S
1+ =0
1+ 20 S
ANALYSIS
Given:
100
G(s) =
s (s+2)
Desired specifications:
- Zero steady-state error to a step input.
- Damping ratio of 0.5
PD Controller Design
A PD controller has the form:
C(s) = Kp + Kds
For this system, the closed-loop transfer function with the PD controller is:
T ( s )=
( Kp+ Kds )
( 100
2
s +2 s )
1+ ( Kp+ Kds )
( s100+2 s )
2
100 ( k d . s +k p )
T ( s) = 2
s + ( 2+100 k d ) s+100 k p
For a second-order system with a damping ratio (𝜁) of 0.5 the desired characteristic equation is:
S2 + 2𝜁ωnS + ωn2 = 0
S2 + ωnS + ωn2 = 0
Kp = 0.25
MATLAB CODING
CONCLUSION
Using the calculated values for our controller in our MATLAB code we get the exact desired
output implying our analysis and code coincide with each other perfectly.
Question 4
ANALYSIS
Given:
100
G(s) =
s (s+2)
a)
Desired specifications:
- 𝜁 = 0.7
- ωn = 400 rad/s
For a second-order system, the characteristic equation is:
S2 + 2𝜁ωnS + ωn2 = 0
S2 + 2(0.7)(400)S + (400)2 = 0
S2 + 560s + 160000 = 0
( S ( s +2s )
Kp+ Kds+ )
Ki 100
2
T ( s )=
S ( s +2 s )
1+ ( Kp+ Kds+ )
Ki 100
2
And simplifying to get the characteristic equation then comparing the coefficients we get;
S2 +(2+100Kd)s + 100Kp + 100Ki = S2 + 560s + 160000
Kd = 5.58
100(Kp+Ki) = 160000
Kp = 800
Ki = 800
b)
MATLAB CODING
Simulink block connection
Using the tuner tool and varying the response time to 2s and transient behavior to 5%
New step plot
Kp=1.2/a;
Ki=Kp/Ti;
Kd=Kp*Td;
Step response with tangent plotted
From;
T = 0.28
L = 0.05
K = 1.8
Output
Therefore
Kd =0.0767
Kp = 3.07
Ki = 30.7
Step response
CONCLUSION
From this question’s analysis we can see that all the different methods we used to calculate the
parameters of the controller yields different results. By comparing these results we can see that
only the values gotton by use of the Simulink tuner actually provides us with a good step
response output, Therefore our parameters shall be;
Kd =0.00192
Kp = -0.0219
Ki = -0.004
END