程序代写代做代考 graph Module-8:Frequency Domain Analysis of Linear Systems

Module-8:Frequency Domain Analysis of Linear Systems
Bode Plot
Akshya Swain
Department of Electrical, Computer & Software Engineering, The University of Auckland,
Auckland, New Zealand.
Akshya Swain
Module-8:Frequency Domain Analysis of
Linear Systems 1 / 41
Learning Outcome of This Module
I After completion of this module, the student must be able to do the following: 1. Plot Bode Magnitude and Phase Plot.
2. Determine the stability information about the system from gain and phase margins.
3. Relative stability analysis
Akshya Swain
Module-8:Frequency Domain Analysis of
Linear Systems 2 / 41

Bode Plot (Corner Plot) of a Transfer Function
I The Bode plot of the function G(jω) is composed of two plots.
1. Amplitude Plot: Plot of the amplitude of G(jω) in decibels (dB) versus log10ω or ω and
2. Phase Plot: The plot is of the phase of G(jω) in degrees as a function of log10ω or ω.
I A Bode plot is also known as a corner plot or an asymptotic plot of G(jω). These names stem from the fact that the Bode plot can be constructed by using straight-line approximations that are asymptotic to the actual plot.
Advantages of Bode Plot
a. Since the magnitude of G(jω) in the Bode plot is expressed in decibels, the product and division factors in G(jω) become additions and subtractions, respectively. The phase relations are also added and subtracted from each other in a natural way.
b. The magnitude plot of the Bode plots of most G(jω) functions encountered in control systems may be approximated by straight-line segments. This makes the construction of the Bode plot very simple.
Akshya Swain
Module-8:Frequency Domain Analysis of
Linear Systems 3 / 41
Bode Plot of a Transfer Function-2
Consider the function
G(s) = K1(s + z1)(s + z2)……(s + zm)e−Tds (1) sN(s+p1)(s+p2)……(s+pn)
where K1 and Td are real constants, and the z′s and the p′s may be real or
complex (in conjugate pairs) numbers.
I Note that, Eq. (1) is the preferred form for root-locus construction, because the
poles and zeros of G(s) are easily identified.
I However, for constructing the Bode plot manually, G(s) is preferably written in
the following form:
G(s)= K(1+T1s)(1+T2s)……(1+Tms)e−Tds (2) sN(1+Tas)(1+Tbs)……(1+Tns)
where K is a real constant, the T′s may be real or complex (in conjugate pairs) numbers, and Td is the real time delay.
Example: The transfer function
G(s) = 150(s + 2)
s2(s + 3)(s + 5)(s + 10)
should be represented as
G(s) = 150×2(1+0.5s) = 2(1+0.5s)
s2 × 3 × 5 × 10(1 + 0.333s)(1 + 0.2s)(1 + 0.1s) s2(1 + 0.333s)(1 + 0.2s)(1 + 0.1s)
Akshya Swain
Module-8:Frequency Domain Analysis of
Linear Systems 4 / 41

Bode Plot of a Transfer Function-3
I The magnitude of G(s) in dB and its phase angle φ(ω) can be expressed as:
|G(jω)|dB = 20log10|G(jω)|
= 20log10|K| + 20log10|1 + jωT1| + . . . + 20log10|1 + jωTm|
−20Nlog10ω − 20log10|1 + jωT1| − . . . − 20log10|1 + jωTn| I The phase of G(jω) is
φ(ω) = \G(jω) = \K +\1+jωT1 +\1 = jωT2 +…+\1+jωTm −900N −\1+jωTa −\1+jωTb −···−−\1+jωTn
Note:
The magnitude and phase angle of the complex factor 1 + jωT is given as:
|1 + jωT| = 􏰁1 + ω2T2, \1 + jωT = tan−1ωT
Akshya Swain
Module-8:Frequency Domain Analysis of
Linear Systems 5 / 41
Bode Plot of a Transfer Function-4
I In general, G(jω) can contain just five simple types of factors:
1. Constant factor :K
2. Poles or zeros at the origin of order N: (jω)±N.
3. Polesorzerosats=−1 oforderq: (1+jωT)±q. T
4. Complex poles and zeros of order r: (1 + 2ζω/ωn − ω2/ωn2 )±r.
5. Pure time delay e−jωTd, where Td, N,q, and r are positive integers.
I Once we become familiar with the logarithmic plots of these basic factors, it is possible to utilize them in constructing a composite logarithmic plot for any general form of G(jω)H(jω) by sketching the curves for each factor and adding or subtracting the individual curves graphically, because adding the logarithms of the gains corresponds to multiplying them together.
Akshya Swain
Module-8:Frequency Domain Analysis of
Linear Systems 6 / 41

Bode Plot of a Pure Constant I Here G(s) = K
I The magnitude of G(jω) in dB is given by
|G(jω)|dB = 20 log10| G(jω)| = 20 log10K
I The phase angle of G(jω) is given by

Example:
Let G(s) = K = 15. Then
|G(jω)| = 15
|G(jω)|dB = 20 log10(15) = 23.5218
\G(jω) = \15 = 00
Bode Plot of Pure Differentiator Pure Differentiator:
G(s) = s
I The magnitude of G(jω) in dB is given by
|G(jω)|dB = 20 log10| G(jω)|
= 20 log10|jω| = 20 log ω dB
I The log-magnitude curve is a straight line with a slope of +20 dB/decade.
I The phase angle of G(jω) = jω is constant and equal to 900
I The figures show the Bode magnitude and phase plot for pure differentiator.
Bode Magnitude and Phase plot for G(s) = K
Bode Magnitude and Phase Plot for Pure Differentiatior
\G(jω) = \K =
 00 K>0 −1800 K < 0 Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 7 / 41 Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 8 / 41 Bode Plot of Pure Integrator Pure Integrator: G(s) = 1 s Bode Magnitude and Phase Plot for Pure Integrator I The magnitude of G(jω) in dB is given by |G(jω)|dB = 20 log10| G(jω)| =20log10| 1 |=20log 1 jω ω = −20 log ω dB I The log-magnitude curve is a straight line with a slope of −20 dB/decade. I The phase angle of G(jω) = 1 is constant and jω equal to −900 Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 9 / 41 Bode Plot of Simple Zero, (1 + jωT )-1 Consider the function G(jω) = 1 + jωT where T a positive real constant. I The magnitude of G(jω) in dB is given by |G(jω)| = 20 log | G(jω)| = 20 log 􏰁1 + ω2T2 dB 10 10 I To obtain asymptotic approximations of |G(jω)|dB, we consider both very large and very small values of ω. 1. At very low frequencies where ωT ≪ 1, then ω2T2 is very very small compared to 1 and can be neglected. Hence |G(jω)|dB ∼= 20 log101 = 0 dB 2. At very high frequencies where ωT ≫ 1, we can approximate 1 + ω2T2 by ω2T2. Thus ∼√22 |G(jω)|dB = 20 log10 ω T = 20 log10 ωT Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 10 / 41 Bode Plot of Simple Zero, (1 + jωT )-2 I Thus the Bode magnitude plot at the low frequencies ( i.e. ωT ≪ 1,) is the constant 0-dB line. I The Bode magnitude plot at high frequencies (i.e. ωT ≫ 1,), is a straight line with a slope of +20 dB/decade of frequency. I The frequency at which the two straight lines ( called as aymptotes) meet is called the corner frequency or break frequency and is given by ω=1 T I The corner frequency divides the frequency-response curve into two regions:a curve for the low-frequency region and a curve for the high-frequency region. I Note: The corner frequency is very important in sketching logarithmic frequency-response curves. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 11 / 41 Bode Plot of Simple Zero, (1 + jωT )-3 Advantages of Approximate Bode Plot using Asymptotes 1. The asymptotes are quite easy to draw and are sufficiently close to the exact curve. 2. The use of such approximations in drawing Bode diagrams is convenient in establishing the general nature of the frequency-response characteristics quickly with a minimum amount of calculation and may be used for most preliminary design work. 3. The actual |G(jω)| dB plot is a smooth curve and deviates only slightly from the straight line approximation. 4. If accurate frequency-response curves are desired,corrections may easily be made. 5. The error between the actual magnitude curve and the straight-line asymptotes is symmetrical with respect to the corner frequency ω = 1/T . 6. In practice, an accurate frequency-response curve can be drawn by introducing a correction of 3 dB at the corner frequency and a correction of 1dB at points one octave below and above the corner frequency and then connecting these points by a smooth curve. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 12 / 41 Bode Plot of Simple Zero, (1 + jωT )-4 Phase Angle I The exact phase angle φ of the factor 1 + jωT is φ = tan−1ωT I At zero frequency,the phase angle is 00. I At the corner frequency,the phase angle is φ=tan−1T =tan−1 1=+450 T I At infinity,the phase angle becomes +900. Since the phase angle is given by an inverse tangent function, the phase angle is skew symmetric about the inflection point at φ = +450. I Similar to the magnitude curve, a straight-line approximation can be made for the phase curve. I Because the phase of G(jω) varies from 00 to 900, we can draw a line from 00 at 1 decade below the corner frequency to 900 at 1 decade above the corner frequency. I The maximum deviation between the straight-line approximation and the actual curve is less than 60. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 13 / 41 Bode Plot of Simple Zero, (1 + jωT )-5 Figure: Bode Magnitude plots together with the asymptoes and phase angle curve for G(s) = 1 + T s I To draw a phase curve accurately,we have to locate several points on the curve.The phase angles of (1 + jωT ) are +450 atω=1 T +26.60 at ω= 1 2T +5.70 at ω= 1 10T +63.40 atω=2 T +84.30 atω=10 T Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 14 / 41 Bode Plot of Simple Pole, 1 -1 (1+jωT) Consider the function G(jω) = 1 1+jωT where T a positive real constant. I The magnitude of G(jω) in dB is given by |G(jω)| = 20 log | G(jω)| = −20 log 􏰁1 + ω2T2 dB10 10 I To obtain asymptotic approximations of |G(jω)|dB, we consider both very large and very small values of ω. 1. At very low frequencies where ωT ≪ 1, then ω2T2 is very very small compared to 1 and can be neglected. Hence |G(jω)|dB ∼= −20 log101 = 0 dB 2. At very high frequencies (ωT ≫ 1), approximate 1 + ω2T2 by ω2T2. Thus ∼√22 |G(jω)|dB = 20 log10 ω T = −20 log10 ωT Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 15 / 41 Bode Plot of Simple Pole, 1 -2 (1+jωT) I Thus the Bode magnitude plot at the low frequencies ( i.e. ωT ≪ 1,) is the constant 0-dB line. I The Bode magnitude plot at high frequencies (i.e. ωT ≫ 1,), is a straight line with a slope of −20 dB/decade of frequency. I The frequency at which the two straight lines ( called as aymptotes) meet is called the corner frequency or break frequency and is given by ω=1 T I The corner frequency divides the frequency-response curve into two regions:a curve for the low-frequency region and a curve for the high-frequency region. I The corner frequency is very important in sketching logarithmic frequency-response curves. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 16 / 41 Bode Plot of Simple Pole, 1 -4 (1+jωT) Phase Angle I The exact phase angle φ of the factor 1 + jωT is φ = −tan−1ωT I At zero frequency,the phase angle is 00. I At the corner frequency,the phase angle is φ=tan−1T =tan−1 −1=−450 T I At infinity,the phase angle becomes −900.Since the phase angle is given by an inverse tangent function, the phase angle is skew symmetric about the inflection point at φ = −450. I Similar to the magnitude curve, a straight-line approximation can be made for the phase curve. I Because the phase of G(jω) varies from 00 to −900, we can draw a line from 00 at 1 decade below the corner frequency to −900 at 1 decade above the corner frequency. I The maximum deviation between the straight-line approximation and the actual curve is less than 60. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 17 / 41 Bode Plot of Simple Pole, 1 -5 (1+jωT) I To draw a phase curve accurately,we have to locate several points on the curve.The phase angles of 1/(1 + jωT ) are −450 atω=1 T −26.60 at ω= 1 2T −5.70 at ω= 1 10T −63.40 atω=2 T −84.30 atω=10 T Figure: Bode Magnitude plots together with the asymptoes and phase angle curve for G(s) = 1 1+T s Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 18 / 41 Bode Plot of Quadratic Factors-1 I Consider the function wn2 1 G(s) = s2 +2ζωns+ωn2 = 1+(2ζ/ωn)s+(1/ωn2)s2 I We are interested only in the case when ζ < 1, because otherwise G(s) would have two unequal real poles, and the Bode plot can be obtained by considering G(s) as the product of two transfer functions with simple poles. I Now by letting s = jω, the above function can be written as: G(jω)= 1 = 1 1 + (2ζ/ωn)jω + (1/ωn2 )(jω)2 1 + j(2ζ/ωn)ω − (1/ωn2 )ω2 =1 [1 − (ω/ωn)2] + j2ζ(ω/ωn) I The magnitude of G(jω) in dB is given by 1 |G(jω)|dB = 20 log10|G(jω)| = 20 log10 􏰁[1 − (ω/ωn)2]2 + 4ζ2(ω/ωn)2 􏰑2 =−20log10 [1−(ω/ωn)2] +4ζ2(ω/ωn)2 Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 19 / 41 Bode Plot of Quadratic Factors-2 I Asymptotic approximations to the frequency-response curves are not accurate for a factor with low values of ζ. I This is because the magnitude and phase of the quadratic factor depend on both the corner frequency and the damping ratio ζ. I To obtain the asymptotic frequency-response curve, we consider the two cases as follows: 1. At very low frequencies such that ω ≪ ωn, i.e (ω/ωn) ≪ 1 then the log magnitude |G(jω)|dB becomes |G(jω)|dB ∼= −20 log101 = 0 dB - The low-frequency asymptote is thus a horizontal line at 0dB 2. At very high frequencies where ω ≫ ωn, i.e. (ω/ωn) ≫ 1, then the log magnitude |G(jω)|dB becomes ∼ ω2 ω |G(jω)|dB = −20 log10 ωn2 = −40 log ωn - The equation for the high-frequency asymptote is a straight line having the slope ̆40dB/decade Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 20 / 41 Bode Plot of Quadratic Factors-3 I The high-frequency asymptote intersects the low-frequency one at ω = ωn. I This frequency,ωn,is the corner frequency for the quadratic factor considered. I Note that the two asymptotes just derived are independent of the value of ζ. I Near the frequency ω = ωn, a resonant peak occurs. I The damping ratio ζ determines the magnitude of this resonant peak. I There exist errors in the approximation by straight-line asymptotes. I The actual magnitude curve of G(jω) differ strikingly from the asymptotic curve. I Because, the amplitude and phase curves of the second-order G(jω) depend not only on the corner frequency ωn but also on the damping ratio ζ, which does not enter the asymptotic curve. I The magnitude of the error depends on the value of ζ. It is large for small values of ζ. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 21 / 41 Bode Plot of Quadratic Factors-4 I The phase angle of the quadratic factor 􏰋1 + 2ζ(jω/ωn) + (jω/ωn)2􏰌−1 is φ = \ 1 1+2ζ(jω/ωn)+(jω/ωn)2 = −tan−1 􏰏2ζω 􏰐 ωn 1−􏰉 ω 􏰊2 ωn I The phase angle is a function of both ω and ζ. I At ζ = 0,the phase angle equals 00. I At the corner frequency ω = ωn,the phase angle is ̆900 regardless of ζ, because −1 􏰍2ζ􏰎 −1 0 φ = −tan 0 = −tan ∞ = −90 Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 22 / 41 Bode Plot of Quadratic Factors-5 I The Bode plot for the quadratic function G(s) = ω2 is shown below s2 +2ζ ωn s+ωn2 Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 23 / 41 Rules for Drawing Bode Magnitude Plots with Simple Poles and Zeroes I First determine all the break points (pole and zero locations) and arrange in order of increasing frequency. I Choose a frequency range for the plot that encompasses all these points, adding an extra decade of frequency above and below this range. I Based on the poles and zeroes, make a quick sketch of the expected shape of the Bode plot. This will help you find the appropriate vertical scales. I For a simple pole or zero of the form (s + a),the slope of the uncorrected Bode plot changes at the break point ω = a, increasing by 20 dB/decade for a zero, and decreasing by 20dB/decade for a pole. I For a repeated pole or zero (s + a)r ,the slope changes by 20rdB/decade, or 20 dB for each time the pole or zero is repeated. I To find a reference level we first consider the behavior of the function for low frequencies ( ω → 0) or high frequencies ( ω → ∞). If the limiting behavior approaches a constant value at these extremes that is a good starting point. Otherwise, we must evaluate the function numerically at some particular frequency, preferably in a region with a constant-value “plateau”. I Once the uncorrected Bode plot is finished, a corrected version can be drawn. For simple/repeated roots the true response passes through a point that is 3r dB below the uncorrected curve at the break point, or 3dB for each time the pole is repeated. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 24 / 41 Example-1 I Plot the Bode magnitude and phase plot for the system with open-loop transfer function G(s) = 100 s + 1 (s + 10)(s + 100) Step-1: Rewrite the transfer function in proper form. I This is done by making the lowest order term in the numerator and denominator unity. This gives G(s) = 100 1 + s = 0.1(1 + s) 10 × 100 (1 + 0.1s)(1 + 0.01s) (1 + 0.1s)(1 + 0.01s) Step-2: Determine the corner frequencies and arrange them in increasing order and mark which correspond to poles and which correspond to zeros. I The corner frequencies are at 1 rad/sec,(zero) 10rad/sec(pole),100 rad/sec (pole). Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 25 / 41 Example-1: Detail Plot Figure: Bode Magnitude and Phase plots Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 26 / 41 Example-1: Complete Plot I The Figure below shows complete plot for the system G(s) = 0.1(1 + s) (1 + 0.1s)(1 + 0.01s) Figure: Bode Magnitude and Phase plots Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 27 / 41 Example-2 I Plot the Bode magnitude and phase plot for the system with open-loop transfer function G(s) = 10 s + 10 s2 + 3s Step-1: Rewrite the transfer function in proper form. I This is done by making the lowest order term in the numerator and denominator unity. This gives G(s) = 10×10 1+0.1s = 33.33(1+0.1s) 3 s(1 + 0.33s) s(1 + 0.33s) Step-2: Determine the corner frequencies and arrange them in increasing order and mark which correspond to poles and which correspond to zeros. I The corner frequencies are at 0 rad/sec,(pole) 3 rad/sec(pole),10 rad/sec (zero). Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 28 / 41 Example-2: Detail Plot Figure: Bode Magnitude and Phase plots Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 29 / 41 Example-2 I The Figure below shows complete plot for the system G(s) = 10×10 1+0.1s = 33.33(1+0.1s) 3 s(1 + 0.33s) s(1 + 0.33s) Figure: Bode Magnitude and Phase plots Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 30 / 41 Relative Stability Analysis using Bode Plot Motivation: I In practice it is not enough that a system is stable due to modelling uncertainties. I There must also be some margins of stability that describe how stable the system is. I We shall concentrate on minimum phase systems I In time-domain, the closer the dominant closed-loop poles to the imaginary axis, the poorer the system relative stability. Gain Crossover Frequency: I The frequency at which the magnitude of the open loop transfer function gain (|G(jω)|) is unity or 0dB is called the Gain Cross Over frequency. It is denoted by ωgc and its unit is rad/sec. Phase Crossover Frequency: I The frequency at which the phase angle of the open loop transfer function equals −1800 is called the Phase Cross Over frequency. It is denoted by ωpc and its unit is rad/sec. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 31 / 41 Measures of Relative Stability: Gain Margin & Phase Margin Gain Margin: I The gain margin is the reciprocal of the magnitude |G(jω)| at the frequency at which the phase angle is −1800 i.e. at phase crossover frequency ωpc. I It is the amount of gain that can be allowed to increase in the loop at the phase crossover frequency, before the closed-loop system reaches instability. I If Kg denotes the gain margin of the system. Then Kg = 1 , Kg dB=20logKg =−20log|G(jωpc)| |G(j ωpc )| I The gain margin, expressed in decibels, is positive if Kg is greater than unity and negative if Kg is smaller than unity. I Thus,a positive gain margin (in decibels) means that the system is stable, and a negative gain margin (in decibels) means that the system is unstable. I For a stable minimum-phase system,the gain margin indicates how much the gain can be increased before the system becomes unstable.For an unstable system,the gain margin is indicative of how much the gain must be decreased to make the system stable. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 32 / 41 Measures of Relative Stability: Gain Margin & Phase Margin Phase Margin: I The phase margin γ is 1800 plus the phase angle φgc (in degree) of the open-loop transfer function at the gain crossover frequency,or γ = 1800 + φgc I The following figure shows the phase margin, gain margin in Bode plot. I The phase margin is the amount of additional phase lag at the gain crossover frequency required to bring the system to the verge of instability. Akshya SFwiagiunre: Gain anMdodPuhlea-8s:eFrMeqauerngciyn DoofmsatianbAlenaalynsdis uofnLsitnaebarleSyssytsetmesms 33 / 41 Example: Relative Stability Analysiis using Bode Plot Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 34 / 41 Figure Example-1: Relative Stability Analysis using Bode Plot Obtain the phase and gain margins of the system shown in Figure for the two cases where K =10 and K =100. I The phase and gain margins for K = 10 are Phase margin=210, Gain margin=8 dB. Therefore,the system gain may be increased by 8 dB before the instability occurs. I Increasing the gain from K = 10 to K = 100 shifts the 0-dBaxis down by 20dB,as shown in Figure(b). I The phase and gain margins are Phase margin=−300, Gain margin=−12 dB .Thus,the system is stable for K = 10, but unstable for K =100. Figure: Bode diagrams of the system shown in Figure;(a) with K = 10 and (b) with K = 100. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 35 / 41 Frequency Domain Stability: Summary I The stability of the control system based on the relation between the phase cross over frequency and the gain cross over frequency is listed below. 1. If the phase cross over frequency ωpc is greater than the gain cross over frequency ωgc, (ωpc > ωgc), then the control system is stable.
2. If the phase cross over frequency ωpc is equal to the gain cross over frequency ωgc,(ωpc = ωgc) then the control system is marginally stable.
3. If the phase cross over frequency ωpc is less than the gain cross over frequency ωgc,(ωpc < ωgc) then the control system is unstable. I The stability of the control system based on the relation between gain margin and phase margin is listed below. 1. If both the gain margin GM and the phase margin PM are positive, then the control system is stable. 2. If both the gain margin GM and the phase margin PM are equal to zero, then the control system is marginally stable. 3. If the gain margin GM and / or the phase margin PM are/is negative, then the control system is unstable. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 36 / 41 Example-2: Relative Stability Analysis using Bode Plot I Consider a system with open loop transfer function G(s) = K s(s2 +2s+5) a. Plot the Bode plot for K = 100. b. What are the phase and gain margins? Is the system stable ? c. From your plot estimate the value of K which is necessary to obtain a phase margin of +450. What is the resulting gain margin ? I The bode plot for K = 100 is shown below I From the plot, we found that, the gain margin is −20dB, and the phase margin is −62.20. The system is unstable. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 37 / 41 Example-2: Relative Stability Analysis using Bode Plot I From the plot, at the frequency ω = 1.45 the phase is −1350 (corresponding to a phase margin of 450). The gain at that frequency is 24.5 dB. To obtain a phase margin of 450, we must reduce the loop gain by 24.5 dB. I The bode plot for K = 100 is shown below 24.5 = 20logKold − 20logKnew or, 24.5 = 20log Kold Knew Knew = Kold1024.5/20 = 5.96 Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 38 / 41 Frequency Domain Analysis using Bode Plot in MATLAB I Some commonly used MATLAB functions which are used to plot the bode plot, determine the gain and phase margins are bode, and margin I Plot the Bode plot and determine the gain and phase margin of the system with the open-loop transfer function considering K = 1. Use the frequency range from 0.01 rad/sec to 103 rad/sec. G(s)H(s) = K(s + 20) (s+1)(s+2)(s+50) I The MATLAB code K=1.0; num=[K 20*K]; % Numerator den=conv([1 0],conv([1 2],[1 50])); % Denominator sys=tf(num,den); w=logspace(-2,3,200)’;% 200 number of points bode(sys,w) grid [Gm, P m, W cg, W cp] = margin(sys); figure(2); margin(sys) grid Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 39 / 41 Frequency Domain Analysis using Bode Plot in MATLAB I The Bode plot and the gain and phase margins computed from MATLAB for K = 1 are shown below. FRom the result it is obvious that both phase and gain margin of this system with K = 1 are infinity. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 40 / 41 Frequency Domain Analysis using Bode Plot in MATLAB I The Bode plot and the gain and phase margins computed from MATLAB for K = 100 are shown below. FRom the result it is obvious that gain margin of this system with K = 100 is infinity. However, the phase margin is 75.70. Akshya Swain Module-8:Frequency Domain Analysis of Linear Systems 41 / 41