6.8. BODE DIAGRAMS USING MATLAB [7]
In the previous section, several Bode diagrams were illustrated whose amplitude plots were obtained from hand-drawn straight-line asymptotic slopes and whose phase characteristics were calculated from the appropriate trigonometric fucntions. Additionally, several Bode diagrams were also illustrated which were obtained using MATLAB. In this section, the reader will be shown how to obtain the Bode diagrams very easily and accurately using MATLAB.
Let us practice creating Bode diagrams using MATLAB. There are many examples to practice with for creating Bode diagrams on the Modern Control System Theory and Design (MCSTD) Toolbox. Two functions exist that assist in Bode diagrams:
- “bode” returns/plots the Bode response of a system.
- “margins” is described in the MCSTD toolbox. This, in my opinion, has an advantage over the professional version of the Control System toolbox’s “margin” routine. Margins analytically calculates, with analytic precision, the gain and phase margins and their associated frequencies (versus interpolating a single value from a plot).
When trying to find the proper syntax to call the “bode” utility, either use the help feature or look in the reference manual. I personally prefer the help feature, unless I need an example.
Valid syntax for the “bode” utility, for transfer functions, is:
- [mag,phase,w] = bode(num,den)
- [mag,phase,w] = bode(num,den,w)
- [mag,phase] = bode(num,den,w)
- bode(num,den,w)
- bode(num,den)
The left-hand arguments ...
Get Modern Control System Theory and Design, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.