bodeplot
Plot Bode frequency response of dynamic system
Syntax
Description
The bodeplot function plots the Bode magnitude and phase of a
dynamic system model. To customize the plot,
you can return an BodePlot object and modify it using dot notation. For more
information, see Customize Linear Analysis Plots at Command Line (Control System Toolbox).
To obtain frequency response data, use the bode function.
bodeplot( plots the Bode magnitude and
phase of the dynamic system model sys)sys.
If sys is a multi-input, multi-output (MIMO) model, then the
bodeplot function creates a grid of Bode plots with each plot
displaying the frequency response of one input-output pair.
If sys is a model with complex coefficients, then in:
Log frequency scale, the plot shows two branches, one for positive frequencies and one for negative frequencies. The plot also shows arrows to indicate the direction of increasing frequency values for each branch.
Linear frequency scale, the plot shows a single branch with a symmetric frequency range centered at a frequency value of zero.
bodeplot(___, plots
the Bode frequency response with the plotting options specified in
plotoptions)plotoptions. Settings you specify in
plotoptions override the plotting preferences for the current
MATLAB® session. This syntax is useful when you want to write a script to generate
multiple plots that look the same regardless of the local preferences.
bodeplot(___, specifies
response properties using one or more name-value arguments. For example,
Name=Value)bodeplot(sys,LineWidth=1) sets the plot line width to 1. (since R2026a)
When plotting responses for multiple systems, the specified name-value arguments apply to all responses.
The following name-value arguments override values specified in other input arguments.
bodeplot( plots the
Bode response in the specified parent graphics container, such as a
parent,___)Figure or TiledChartLayout, and sets the
Parent property. Use this syntax when you want to create a plot in
a specified open figure or when creating apps in App Designer.
plots the
Bode response and returns the corresponding chart object. To customize the appearance and
behavior of the response plot, modify the chart object properties using dot
notation.bp = bodeplot(___)
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Algorithms
The software computes the frequency response as follows:
Compute the zero-pole-gain (
zpk(Control System Toolbox)) representation of the dynamic system.Evaluate the gain and phase of the frequency response based on the zero, pole, and gain data for each input/output channel of the system.
For continuous-time systems, the
bodeplotfunction evaluates the frequency response on the imaginary axis s = jω and considers only positive frequencies.For discrete-time systems, the
bodeplotfunction evaluates the frequency response on the unit circle. To facilitate interpretation, the command parameterizes the upper half of the unit circle as:where Ts is the sample time and ωN is the Nyquist frequency. The software then uses the equivalent continuous-time frequency ω as the x-axis variable. Because is periodic with period 2ωN, the
bodeplotfunction plots the response only up to the Nyquist frequency ωN. Ifsysis a discrete-time model with an unspecified sample time, thebodeplotfunction uses Ts = 1.
Version History
Introduced before R2006aSee Also
bode | bodeoptions | addResponse | showConfidence
Topics
- Customize Linear Analysis Plots at Command Line (Control System Toolbox)









