Chapter four
Classical control design techniques
Section four: Gain and Phase Margins
This chapter is on the theme of linear feedback control, for example with G(s) representing a system, M(s) a compensator and d an input disturbance signal:
This section focuses on Gain and Phase Margins. What are margins and how do I compute them? How do margins give insight into expected closed-loop behaviour? What insights do they give which can be used to support systematic compensator design and specifically, lead and lag compensation?
Some relatively quick overview videos and notes introducing the core topics are here:
Summary notes on Margins (PDF, 592 KB)
Summary notes on Lead and lag compensation (PDF, 725 KB)
Detailed resources are below.
1. Motivation and illustration of impact
Illustration of how the position of the Nyquist diagram relative to the -1 point is related to the closed-loop behaviour. Uses examples to show that being close to -1 tends to result in poor behaviour and also indicates that some formal measure of distance from -1 could be useful.
A talk through video is on YouTube. View the notes (PDF, 528 KB).
2. Definition of gain margin
Introduces a definition of the distance of the Nyquist plot from the -1 point, that is the gain margin. Gives examples and pictures to help students understand this visually and a number of numerical examples to emphasise the procedure for computing the gain margin.
A talk through video is on YouTube. View the notes (PDF, 471 KB).
3. Definition of phase margin
Introduces a definition of the distance of the Nyquist plot from the -1 point, that is the phase margin. Gives examples and pictures to help students understand this visually and a number of numerical examples to emphasise the procedure for computing the phase margin.
A talk through video is on YouTube. View the notes (PDF, 544 KB).
4. Using the bode diagram and MATLAB
Shows how gain and phase margins can be deduced directly from the Bode diagram and estimated by inspection. Links margins to closed-loop stability to give visual insight into what from of Bode diagram is 'good' and what form is usually 'bad'. Demonstrates MATLAB tools.
A talk through video is on YouTube. View the notes (PDF, 466 KB).
5. Tutorial sheet
Goes through a number of examples, to demonstrate the computation of gain and phase margins. Some examples are analytic and some make use of Bode diagrams.
A talk through video is on YouTube. Minor typo at about 11min 40 sec where a superscript is wrong side of a bracket - should be (4-5.64²) = -31.8.
View the notes (PDF, 450 KB).
6. Effect of changing compensator gain on the gain margin
Shows how change in compensator gain has a simple affect on the gain margin. Presents simple formulae for this effect and several illustrations. Emphasises the use of Bode diagrams for margin computation and shows how to achieve a specified gain margin with an elementary computation.
A talk through video is on YouTube. View the notes (PDF, 471 KB).
7. Effect of changing compensator gain on the phase margin
A change in compensator gain has a non-simple but obvious affect on the phase margin using the Bode diagram. Shows how it is very simple to specify the required gain to achieved a desired phase margin. Examples demonstrate this both analytically and using Bode diagrams.
A talk through video is on YouTube. View the notes (PDF, 482 KB).
8. Example designs changing compensator gain to achieve desired phase margin
Develops the previous two videos by giving a number of worked examples showing how to achieve a desired phase margin just by changes in gain. Uses analytic methods, Bode diagrams and MATLAB tools.
A talk through video is on YouTube. View the notes (PDF, 551 KB).
9. The affect of lag compensators on margins
Reviews the impact of a lag compensator on the Bode diagram and margins. Insight is used to develop good and bad practice in lag compensator design. Finishes with a mechanistic rule base for lag compensator design; useful for very rapid rough tuning but not necessarily a final design.
A talk through video is on YouTube. View the notes (PDF, 469 KB).
10. Mechanistic lag compensation design with MATLAB
Shows how MATLAB tools can be used quickly and efficiently to implement, and illustrate, the mechanistic design procedure for a lag compensator. Designs are based on a target phase margin and desired steady-state gain recovery. Further fine tuning would be needed in practice.
A tutorial sheet with key facts and problems (PDF, 431 KB).
A talk through video is on YouTube.
MATLAB files overlaymany.m and margin10.m.
11. The affect of lead compensators on margins
Reviews the impact of a lead compensator on the Bode diagram and hence shows how this affects the margins. This insight is used to develop good and bad practice in lead compensator design. The video finishes with a mechanistic rule base for lead compensator design - something that is useful for very rapid rough tuning (but not necessarily a final design).
A talk through video is on YouTube. View the notes (PDF, 474 KB).
12. Mechanistic lead compensation design with MATLAB
Shows how MATLAB tools can be used to implement, and illustrate, the mechanistic design procedure for a lead compensator. Designs are based on a target gain cross over frequency and a target phase margin. Further fine tuning would be needed in practice.
A tutorial sheet with key facts and problems (PDF, 448 KB).
A talk through video is on YouTube. Obvious typos: (i) 5min 30 (square root of beta instead of beta); (ii) 13min 30 (cross over frequency of 9.75 as opposed to 9.43).
MATLAB files with key data is in margin12.m.
13. Affect of lead-lag compensation on margins
Reviews the impact of lead and lag compensators and presents an argument for compensators which include both these components. Proposes and illustrates a simple mechanistic design procedure for lead-lag compensators, assuming the specification includes:
gain cross over frequency
phase margin, and
low frequency gain.
A talk through video is on YouTube.
14. Lead-lag compensation with MATLAB
Shows how MATLAB tools can be used quickly and efficiently to implement, and illustrate, the mechanistic design procedure for a lead-lag compensator. Designs are based on a target gain cross over frequency and a target phase margin. Further fine tuning would be needed in practice.
A talk through video is on YouTube.
15. What is an ideal phase margin
Presents analysis which explains the basis for the use of a 60 degree phase margin as a good target. Illustrates the limitations of this assumption through numerous examples.
A talk through video is on YouTube.
16. Exam question 1 on margins and and compensators
Presents a typical examination questions for students to attempt. Covers basic analysis tools of Nyquist, Bode and root-loci and analysis of potential lead/lag compensators. Also gives a worked solution.
A talk through video is on YouTube. Typo in construction of Bode gain plot - asymptote drawn to w=root(3) rather than w=3.
17. Exam question 2 on margins and compensators
Presents a typical examination questions for students to attempt. Covers basic analysis tools of Nyquist, Bode and root-loci and analysis of potential lead/lag compensators. Also gives a worked solution.
A talk through video is on YouTube.
19. Performance criteria and lead-lag compensation
Presents an overview of performance criteria and how these can be used to underpin systematic lag, lead and lead-lag compensation.
Overview file (PDF, 983 KB)
20. Aeroplane roll example with lead compensator design
This GUI is focussed on finding a lead compensator for roll control in an aircraft. Students are able to see the Bode and root-loci diagrams and select the lead parameters as well as viewing the impact on behaviour. The aeroplane time constant and gain can also be changed.
A short video introduction to the GUI
A summary of the GUI and context (PDF, 376 KB)