This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

BodePlot

BodePlot[g]
gives the Bode plot of a rational function g in one complex variable.
BodePlot[sys]
gives the Bode plot of a TransferFunctionModel or StateSpaceModel object sys.
BodePlot
gives the plot for frequencies from to .
  • BodePlot consists of a magnitude plot and a phase plot of the sinusoidal transfer function of the model. The frequency is plotted along the horizontal axis.
  • Frequencies are given in radians per time unit.
  • If the frequency range is not specified, an appropriate range is computed automatically.
  • BodePlot has the same options as Plot, with the following changes and additions:
ExclusionsNonefrequencies to exclude
FeedbackType"Negative"the feedback type
FrameTruewhether to draw a frame around each plot
MeshFunctions{{#1&},{#1&}}how to determine the placement of mesh divisions
PlotLayout"VerticalGrid"the layout to be used
PlotRange{{Full,Automatic},{Full,Automatic}}range of values to include
SamplingPeriodNonethe sampling period
ScalingFunctions{{"Log10","dB"},{"Log10","Degree"}}the scaling functions
StabilityMarginsFalsewhether to show the stability margins
StabilityMarginsStyleAutomaticgraphics directives to specify the style of the stability margins
  • The other options of BodePlot can be specified as a list of two elements, with the first element corresponding to the magnitude plot and the second to the phase plot.
  • Option specifications include:
opt->valuse val for both the magnitude and the phase plot
opt->{val}use val for the magnitude plot and the default for the phase plot
opt->{val1,val2}use for the magnitude plot and for the phase plot
opt->{Automatic,val}use the default for the magnitude plot and val for the phase plot
  • The frequency scales magfreqscale and phasefreqscale can be or , which correspond to the base 10 logarithmic scale and linear scale, respectively.
  • The magnitude scale magscale can be or , which correspond to the decibel and absolute values of the magnitude, respectively.
  • The phase scale phasescale can be or .
The Bode plot of a system:
Specify the system as a transfer-function object:
Plot over a wider frequency range:
Bode plot of a state-space model:
The Bode plot of a system:
In[1]:=
Click for copyable input
Out[1]=
 
Specify the system as a transfer-function object:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Plot over a wider frequency range:
In[3]:=
Click for copyable input
Out[3]=
 
Bode plot of a state-space model:
In[1]:=
Click for copyable input
Out[1]=
Bode plot of a constant-gain system:
Bode plot of an integrator:
Bode plot of a differentiator:
Bode plot of a first-order lag:
Bode plot of a first-order lead:
Bode plot of a second-order system:
Specify a system as a transfer-function object:
A discrete-time system:
A discrete-time system given as a transfer-function object:
Specify the frequency range:
The Bode plot of a state-space model:
The Bode plot of a multiple-input, multiple-output system:
To obtain coordinates, select the graphics and press the period key:
Obtain frequency values in Hertz by dividing it by :
Frequency values for each plot in different units:
Frequency values in Hertz, magnitude in absolute units, and phase in radians:
Specify radians as both the displayed and copied value of phase:
Show grid lines:
Show grid lines only on the magnitude plot:
Show specific grid lines:
Specify grid lines style:
Specify different grid lines styles:
By default, the magnitude plot is placed vertically above the phase plot:
Obtain the result in a list:
Specify the sampling period in the system description:
Specify the sampling period in the BodePlot function:
A smaller sampling period results in a higher bandwidth:
Show absolute values of magnitude and phase in radians:
Plot frequency in the linear scale:
Show stability margins:
Show the phase margin only:
Specify the stability margins style:
Specify frequency ticks in Hertz:
Show ticks on the plot:
Obtain the ticks:
Change the frequency ticks to Hertz:
Change the magnitude ticks to absolute values:
Change the phase ticks to radians:
The modified plots:
The static position error constant of a type 0 system is the magnitude at steady state:
Discrete-time type 0 system:
The static velocity error constant of a type 1 system is approximately the intersection of the initial -20 dB/decade segment (or its extension) with the 0 dB line:
Discrete-time type 1 system:
The square root of the static acceleration error constant of a type 2 system is approximately the intersection of the initial -40 dB/decade segment (or its extension) with the 0 dB line:
Discrete-time type 2 system:
Visualize the improvement in phase margin by using a proportional-integral (PI) compensator:
SingularValuePlot generalizes the Bode magnitude plot to MIMO systems:
New in 8