Draw the transient response of the above system with unit step function as input for the time interval t=0÷10s to illustrate the conclusion in c.. Gain crossover : Locate the frequency
Trang 1HO CHI MINH UNIVERSITY OF TECHNOLOGY AND EDUCATION
FACULTY OF INTERNATIONAL EDUCATION
REPORT 2 and 3: APPLICATION OF MATLAB IN STABILITY
AND QUALITY OF THE SYSTEM
SUBJECT: AUTOMATIC CONTROL SYSTEMS IN PRACTIC
COURSE ID: PACS320246E
Lecturer: MSc Nguyễn Trần Minh Nguyệt
Student ‘s name- ID number: Võ Hoàng Việ – 21151436 t
Nguyễn Trần Thanh Thủy-21151433
Trang 2I APPLICATION OF MATLAB IN STABILITY OF THE SYSTEM
1 Investigation of a unit negative feedback system with an open-loop transfer function of G(s) by Bode Criterion
e With K=400, repeat the requirements from question a→d
Trang 3b Based on the Bode diagram, find Gain crossover ( ) Phase crossover ( ),
Gain margin ( Gm) Phase margin , ( 𝐏𝐦)
Trang 4Gain crossover ( ): Locate the frequency at which the magnitude of the
openloop transfer function is equal to 1 or 0 dB on the bode diagram
According to Bode Diagram, we have = 0.45rad/s
Phase crossover ( ): Locate the frequency at which the phase of the open-loop transfer function crosses -180
According to Bode Diagram, we have =4.64 rad/s
Trang 5Add command margin(G)to the code, we have
Based on Bode Diagram, Gain crossover ( ) Phase crossover ( ), Gain margin ( Gm), Phase margin ( Pm) which calculated are roughly the same as using the command ‘margin’
c Consider the stability of a closed system, explain
Trang 6The step response reaches and stays within 0.714% of its steady-state value
Hence the system is stable and the conclusion when using Bode diagram is right
Trang 7Result:
- Based on the Bode diagram, find the Gain crossover ( ) Phase crossover ( ) , Gain margin ( Gm), Phase margin ( 𝑷𝒎)
Trang 8Apply the same method question b we have:of ,
Gain crossover: = 6.64 rad/s
Phase crossover : = 4.67 rad/s
Trang 10conclusion when using bode diagram right.is
2 Investigation of a unit negative feedback system by Nyquist Criterion
2.1 Investigate a unit negative feedback system with an open-loop transfer
Trang 11b Based on the Nyquist chart, find the phase margin and gain margin (dB)
c Consider the stability of a closed system and explain
d With K=400, repeat the requirements from a→c4
Trang 12To find the Phase margin, we find the intersection point between the Nyqusist diagram and the unit circle O with radius is 1
Phase Margin = 103 (deg)
To find gain Margin , we locate the phase crossing of the −180◦-line and draw a vertical line up to the corresponding magnitude plot The distance between the 0-dB line and the magnitude plot is the gain margin
c Consider the stability of a closed system and explain
-We first considerer values of poles of the opened-loop transfer function G Matlab code:
G=tf([10], conv([1 0.2], [1 8 20]))
pzplot(G)
Result:
Trang 13All the poles lay on the negative side of Imaginary Axis, so the opened-loop transfer function G is stable
-Secondly, we eventually define the stability of closed-loop transfer function G by relying on Nyquist graph of the opened-loop transfer function G
Matlab code:
G=tf([10], conv([1 0.2], [1 8 20]))
nyquist(G)
Result:
Trang 14The Nyquist graph of the opened-loop transfer function G does not encircle the point 1,0) in coordinate system
(-Conclusion: Combining two conditions (opened-loop transfer function G is stable and
The Nyquist graph of it does not encircle the point (-1,0)), we jump to a conclusion that the closed-loop transfer function G is stable
Comparing the value of Gain Margin and Phase Margin found from (b), both GM and PM are positive, so the closed-loop transfer function G is stable
Therefore, in two ways to define the stability of the closed-loop transfer function G show
us the same consequence that the closed-loop transfer function G is stable
e With K=400, repeat the requirements from a→c
-Draw the Nyquist plot of the system
Matlab code:
G=tf([400], conv ([1 0.2], [1 8 20]))
nyquist(G)
grid on
Trang 15Result:
- Based on the Nyquist chart, find the phase margin and gain margin (dB)
Trang 16Use method similar to answer 2.b, we have
Gain Margin : = − − = − − = − = −
Phase Margin = -23.4 (deg)
=> Compared to the result in request 2.1.2, both values of Gain Margin and Phase Margin are equal, regardless of using two types of graphs to demonstrate
- Consider the stability of a closed system and explain
We first considerer values of poles of the opened-loop transfer function G Matlab code:
G=tf([400],conv([1 0.2],[1 8 20]))
pzplot(G)
Result:
Trang 17• The opened-loop transfer function G is stable because all the poles lay on the negative side of Imaginary Axis
Similarly, relying on Nyquist graph of the opened-loop transfer function G to find out the stability of closed-loop transfer function G
Trang 18• The Nyquist graph of the opened-loop transfer function G surrounds the point 1,0) in coordinate system
(-Conclusion: Combining two conditions (opened-loop transfer function G is stable and
The Nyquist graph of it surrounds the point (-1,0)), we jump to a conclusion that the closed-loop transfer function G is unstable
Gain Margin and Phase Margin, which may be calculated from (b), both have negative values, indicating that the closed-loop transfer function G is unstable
As a result, both definitions of the closed-loop transfer function G's stability led to the same conclusion: the function is unstable
2.2 Consider the stability of a unit negative feedback system with an open-loop transfer function of:
Trang 20• The Nyquist graph of the opened-loop transfer function G(s) does not encircle the point (-1,0) in coordinate system
Conclusion: The closed-loop transfer function G(s) is stable resulting from two
consequences (the opened-loop transfer function G(s) is stable, and The Nyquist graph
of it does not encircle the point (-1,0))
Using Bode diagram to make a comparation:
Trang 21The values of Gain Margin and Phase Margin of the opened-loop transfer function are positive, so the closed-loop transfer function is stable
Both ways expose the same result that the closed-loop transfer function is stable
Trang 22• The opened-loop transfer function G(s) is stable because one pole is located on the opposite side of the imaginary axis from the positive side and one pole at origin of grid
Nyquist graph of the opened-loop transfer function G(s):
Matlab code:
G=tf([1],conv([1 0 0],[1 1]));
nyquist(G)
Result:
Trang 23• The point (-1,0) in the coordinate system is surrounded by the Nyquist graph of the opened-loop transfer function G
Conclusion: The closed-loop transfer function G is assumed to be unstable by combining
two conditions: that the opened-loop transfer function G is stable and that its Nyquist graph surrounds the point (-1,0)
Using Bode diagram to make a comparation:
Trang 24The closed-loop transfer function is unstable because the value of Gain Margin is infinite, and the value of Phase Margin is negative (the opened-loop transfer function) The closed-loop transfer function is unstable, and this is revealed in both ways
3 Implementation the system using Root Locus method
Investigation the unit negative feedback system with an open-loop transfer function of G(s)
=
a Draw the root locus of the system Base on Root Locus to find K limit of the system, indicate this value on the figure
b Find K so that the system has a natural oscillation frequency ωn = 4
c Find K so that the system has a damping coefficient = 0.7
d Find K so that the system has an overshoot σmax% = 25%
e Find K so that the system has a settling time (2% standard) = 4s
Solution in Matlab
Trang 25a Draw root locus of the system Find K limit
Trang 26Hence K limit of the system is 174
b Find K to the system has natural oscillation frequency ωn = 4
In root locus, we have the decision poles: = − −
To Find K with ωn = 4, we find intersection of the root locus with circle with
center O and radius 4 Choose the intersection near the virtual axis so that this K value makes the system oscillate
Trang 27Hence with frequency ωn = 4, K=8 and K=119
c Find K to the system has mping ξ = 0.7 Da
To find K with ξ = 0.7 we find the point that Damping is 0.7,
Trang 28Hence with ξ = 0.7, The Gain K=23
d Find K to the system has Overshoot σmax% = 25%
To σmax% = 25% we find the point which damping=0.404 ,
Hence the Gain K=43.6
e Find K to the system has settling time (2% standard) =4s
Trang 32Conclusion: Comparing the consequence of Matlab with the calculated result by
Theory formulas, both of them are the same
= =
Trang 332.4 Analysis the control system by Root locus with transfer function
b Find K so that the system has a natural oscillation frequency ωn = 4
c Find K so that the system has a damping coefficient ξ = 0.7
d Find K so that the system has an overshoot σmax% = 25%
e Find K so that the system has a settling time (standard 2%) = 4s Investigate the above system using Bode and Nyquist diagrams when 𝐾 = 𝐾 limit/2
Trang 34To find K limit, we find the intersection points between aginary is and Root LocusIm ax
Trang 35K limit the system is of 103
b Find K so that the system has a natural oscillation frequency ωn = 4
To Find K with ωn = 4, we find intersection of the root locus with circle with
center O and radius 4 Choose the intersection near the virtual axis so that this K value makes the system oscillate
Trang 36From the result, we have K=78.5
c Find K so that the system has a damping coefficient = 0.7
To find K with =0.7, we find the point at which Damping is 0.7
Trang 37From Root Locus, there is no point whic damping coefficient = 0.7 Hence K h does t exist no
d Find K so that the system has an overshoot σmax% = 25%
To find K that σmax% = 25%, we find points which Damping equals to 0.404
From the result, we have K=9
d Find K so that the system has a settling time (2% standard) = 4s
Trang 38From the result, we have K=19
Trang 44Result:
Comment:
Gain Margin Gm=6.06dB>0
Phase Margin Pm=38.5 deg>0
Hence the system is stable
Using Nyquist Criterion:
Apply Code:
G=tf([51 51], conv([1 5 0],[1 3 9]))
nyquist(G)
grid on
Trang 45Result:
Comment:
- No pole lying in the right-hand side of the complex plane
– The Nyquist plot does not encircle the point (-1; j0)
Hence the the close-loop system is stable by Nyquist criterion
Open question:
1 Compare control system survey methods
-Frequency method: Including Bode plot and Nyquist plot Bode plots examine a system's frequency response and are often used to assess its stability and frequency performance The Nyquist plot also shows frequency response information, but it uses a complicated graph that allows for the determination of system stability and transients
Trang 46-Feedback Metho Using Feedback from the system to evaluate its performance and d:stability This method includes investigating the system's transfer function and inverse transfer function, as well as improving performance with tools such as PID tuning -Timing method: In the time domain, it uses the input signal to measure the system's output signal This method includes Time series analysis, time response graphs, and the application of Laplace transformation equations to determine system parameters
2 When to use control system survey methods?
-Frequency method: using in automatic control systems, electronics, and applications with high-frequency variations It allows for the evaluation of performance and stability at different frequencies
-Feedback method Using to test the actual performance of the system under real : operating conditions, and when you need to adjust the controller to improve performance or ensure stability
-Timing method: Typically used in applications that require high real-time responses and control, such as robotics control and ship or aircraft control systems
3 Show the relationship between Bode and Nyquist plots
Both Bode and Nyquist plots provide information about a system's frequency response The Bode plot represents the frequency response by representing the system's transfer function as a log-log plot with amplitudes and phase (oscillation) plots Meanwhile, the Nyquist plot represents the frequency response using a complex graph, in which the real and imaginary parts of the transfer function are plotted on the complex plane
- The key relationship between these two graphs is that information from the Bode plot may be used to draw a Nyquist plot The Bode plot can be used to detect frequency crossovers (oscillations) and phase offsets, which can determine the shape
of the Nyquist plot and the system's stability
Trang 47II APPLICATION OF MATLAB IN QUALITY OF THE SYSTEM
Investigate a unit negative feedback system with an open-loop transfer function of G(s)
a With the K limit value found above, draw the transient response with the input as a unit step function Verify that the output fluctuates?
b With the K value found in question 3.3 d of experiment number 2, draw the transient response of the closed system with the input to the unit step function in the time range from 0 ÷ 5s Find the overshoot and steady-state error of the system Verify that the system has σmax% = 25%?
c With the K value found in question 3.3 e of experiment number 2, draw the transient response of the closed system with the input to the unit step function in the time range from 0 ÷ 5s Find the overshoot and steady-state error of the system Verify that the system has txl = 4s?
d Draw the two transient responses of questions b and c on the same figure Note on the figure which response corresponds to that K
Trang 48Result:
Figure 3.1: Step response of Gk when K equals to Klimit
The output wave oscillates with the input as a step input Because K equals Klimit, the system is still stable but needs a lot of time to be at steady state
b With the K value found in question 3.3 d of experiment number 2, draw the transient response of the closed system with the input to the unit step function in the time range from 0 ÷ 5s Find the overshoot and steady-state error of the system Verify that the system has σmax% = 25%?
With σmax% = 25% -> K= 43.6 substituting value of K= 43.6into:
Matlab code:
G=tf([43.6],conv([1 0.2],[1 8 20]))
Gk=feedback(G,1)
Trang 49Result:
Figure 3.2: Step response of Gk when K equals to 43.6
Overshoot (%): 21.8 or value POT max= 21.8% meanwhile the theory equals to 25% because of errors in the calculation process
Steady-state error: |1-Final value| = 1 – 0.916 = 0.084 = 8.4%
c With the K value found in question 3.3 e of experiment number 2, draw the transient response of the closed system with the input to the unit step function in the time range from 0 ÷ 5s Find the overshoot and steady-state error of the system Verify that the system has txl = 4s
With Settling time = 4s -> K= 53 substituting value of K= 53 into:
Trang 50Figure 3.2: Step response of Gk when K equals to 53
Settling time equals 3.8s, approximately, the theory settling time which’s value is 4s POT max= 29.2%
Steady-state error: |1-Final value| = 1 – 0.93 = 0.07 = 7%
d Draw the two transient responses of questions b and c on the same figure Note on the figure which response corresponds to that K