Table of Contents
- 1. Review
- 1.1. Complex Numbers
- 1.2. Bode Plots
- 1.3. Basic Factors
- 1.4. Constant K
- 1.5. Integrator \(1/s\)
- 1.6. First Order \(1/(\tau s+1)\)
- 1.7. Second Order \(1/((s/\omega_n)^2+2\zeta(s/\omega_n)+1)\)
- 1.8. Bode Plots of Complex Function
- 1.9. Frequency Domain Modeling
- 1.10. Nyquist Contour and Plot
- 1.11. Nyquist Stability Criterion
- 1.12. Sketch Nyquist Plot (Segment 1)
- 1.13. Sketch Nyquist Plot (Segment 2&3)
- 1.14. Gain Margin
- 1.15. Phase Margin
- 1.16. Stable System
- 1.17. Unstable System
- 1.18. Loop Shaping
- 1.19. Desirable Magnitude Plot Shape
- 1.20. Lead and Lag Compensator
- 1.21. Lead Compensator Design Procedure
- 1.22. Lead Compensator Example
- 1.23. Lag Compensator Design Procedure
- 1.24. Lag Compensator Example
- 1.25. PID Controller
- 1.26. Step Response Method
- 1.27. Self-Oscillation Method
1 Review
1.1 Complex Numbers
- \(a+bi = r\angle \phi\).
- \(r = \sqrt{a^2+b^2}\) and \[\phi=\begin{cases}\tan^{-1}(b/a)&a > 0\\ \tan^{-1}(b/a) + 180^\circ &a <0\\ 90^\circ& a=0,\,b>0\\ -90^\circ &a=0,b<0 \\indeterminate &a=b=0\end{cases}.\]
- \((a+bi)^n = r^n\angle n\phi\). (This is true even when \(n\) is negative.)
- \[\frac{1}{a+bi} = \frac{a-bi}{a^2+b^2}.\]
1.2 Bode Plots
- Bode plots of a transfer function \(G(s)\) include two graphs:
- Magnitude plot: \(20\log_{10}|G(j\omega)|\) (dB) in linear scale v.s. \(\omega\) in log scale.
- Phase plot: \(\angle G(j\omega)\) (degree) in linear scale v.s. \(\omega\) in log-scale.
1.3 Basic Factors
- A complex polynomial can always be factorized in to basic terms
- \(K\)
- \(s\)
- \(\tau s + 1\)
- \[\left(\frac{s}{\omega_n}\right)^2 + 2\zeta \left(\frac{s}{\omega_n}\right) + 1.\]
1.4 Constant K
1.5 Integrator \(1/s\)
1.6 First Order \(1/(\tau s+1)\)
1.7 Second Order \(1/((s/\omega_n)^2+2\zeta(s/\omega_n)+1)\)
1.8 Bode Plots of Complex Function
- Decompose the Transfer Function into Basic Factors
- Determine the Plot at the Low Frequency
- Add First and Second Order Terms
- Verify the results in Matlab
1.9 Frequency Domain Modeling
- Determine an asymptotic magnitude plot by approximating the actual gain plot by a sequence of straight lines with slopes of \(20N\).
- From the low frequency plot, determine the number of integrator \(1/s^N\) and the constant term \(K\).
- Determine the corner frequency from the intersection of two consecutive lines.
- From the change of slopes of the consecutive lines, determine the associated basic factor.
- Determine the damping ratio for second order zeros and poles.
- The phase plot can be used to verify your results.
1.10 Nyquist Contour and Plot
1.11 Nyquist Stability Criterion
A feedback system is stable if and only if \(N=-P\), i.e. the number of the counterclockwise encirclements of \(–1\) point by the Nyquist plot in the \(G\)-plane is equal to the number of the unstable poles of the open-loop transfer function.
1.12 Sketch Nyquist Plot (Segment 1)
- We need to find 4 types of point from the Bode plots:
- \(\omega = 0\);
- Real intersection: Phase = \(180N^\circ\);
- Imaginary intersection: Phase = \(180N+90^\circ\);
- \(\omega = +\infty\);
- We can also deduce the trend of the plot around those points:
- If the phase is decreasing, the plot goes clockwise
- If the phase is increasing, the plot goes counterclockwise
- Plot those points on the \(G\)-plane and draw a smooth line to connect them.
1.13 Sketch Nyquist Plot (Segment 2&3)
- Segment 2 is the origin point for strictly proper function. It is a constant for proper function.
- Segment 3 is the mirror reflection of segment 1 around the real axis.
1.14 Gain Margin
- Define \(\omega_{\phi}\) to be the smallest frequency, where the phase of the open-loop transfer function is \(-180^\circ\).
- \(\omega_{\phi}\) is called the phase crossover frequency.
- For most minimum phase system, the gain margin for the system is given by \[K_g = \frac{1}{|G(j\omega_\phi)H(\omega_\phi)|}.\]
- In terms of decibles,\[K_g(dB) = -20\log|G(j\omega_\phi)H(\omega_\phi)|.\]
1.15 Phase Margin
- Define \(\omega_{g}\) to be the smallest frequency, where the magnitude of the open-loop transfer function is \(1\) or \(0dB\).
- \(\omega_{g}\) is called the gain crossover frequency.
- For most minimum phase system, the phase margin for the system is given by \[\phi_m = 180^\circ+\angle G(j\omega_g)H(\omega_g).\]
1.16 Stable System
1.17 Unstable System
1.18 Loop Shaping
- In the low frequency, the gain should be high to have good steady state accuracy.
- Around the gain crossover frequency, the slope of the magnitude plot should be about \(-20\) and extend over a sufficient range of frequency
- In the high frequency, the gain must be small in order to have good noise attenuation and robustness against model uncertainty.
1.19 Desirable Magnitude Plot Shape
1.20 Lead and Lag Compensator
- The transfer function of a lead compensator is \[C(s) = K\frac{Ts+1}{\alpha Ts+1},\,0<\alpha<1.\]
- The transfer function of a lag compensator is \[C(s) = K\frac{Ts+1}{\beta Ts+1},\,\beta > 1.\]
1.21 Lead Compensator Design Procedure
- Determine the gain \(K\) to satisfy the steady state error requirement.
- Draw the Bode plots of \(KG(s)\), derive the phase margin \(\phi_0\).
- From \(\phi_0\) and the required phase margin \(PM\), determine the phase lead \(\phi\): \[\phi = PM - \phi_0 + 5^\circ\sim 10^\circ.\]
- Derive \[\alpha = \frac{1-\sin \phi}{1+\sin \phi}.\]
- To achieve the maximum phase lead, place the gain crossover frequency \(\omega_g\) at \(1/\sqrt{\alpha}T\). Therefore, \[20\log|G(j\omega_g)| + 20\log K = 10\log \alpha,\] and we can derive \(\omega_g\).
- Choose \[T = \frac{1}{\sqrt{\alpha}\omega_g}.\]
- Verify the result using Matlab.
1.22 Lead Compensator Example
1.23 Lag Compensator Design Procedure
- Determine the compensator gain \(K\) to meet the steady state error requirement.
- Draw the Bode plots of \(KG(s)\).
- From the Bode plots, find the frequency \(\omega_g\) at which the phase of \(KG(s)\) is \[\angle KG(\omega_g) = PM -180^\circ + 5^\circ\sim 10^\circ.\]
- Calculate \(\beta\) to make \(\omega_g\) the gain crossover frequency, \[20\log\beta = 20\log K + 20\log |G(j\omega_g)|.\]
- Choose \(T\) to be much greater than \(1/\omega_g\), for example, \(T = 10/\omega_g\).
- Verify the results using matlab.
1.24 Lag Compensator Example
1.25 PID Controller
The standard form of PID controller is \[C(s) = K_p\left(1+\frac{1}{T_is}+T_ds\right) = K_p+\frac{K_I}{s}+K_Ds.\]
1.26 Step Response Method
- Find the maximum slop tangent line
- Read \(K\), \(T\) and \(L\) from the plot
- Compute \(K_p\), \(T_i\) and \(T_d\) from the table
1.27 Self-Oscillation Method
- The critical gain \(K_{cr}\) is the gain margin
- The critical period \(P_{cr} = 2\pi/\omega_\phi\)
- Compute \(K_p\), \(T_i\) and \(T_d\) from the table