User`s guide

Table Of Contents
bode
11-19
11bode
Purpose Compute the Bode frequency response o f LTI models
Syntax bode(sys)
bode(sys,w)
bode(sys1,sys2,...,sysN)
bode(sys1,sys2,...,sysN,w)
bode(sys1,'PlotStyle1',...,sysN,'PlotStyleN')
[mag,phase,w] = bode(sys)
Description bode computes the magnitude and phase of the frequency response of LTI
models.Wheninvokedwithoutleft-handarguments,
bode producesaBodeplot
on the screen. The magnitude is plotted in decibels (dB), and the phase in
degrees. The decibel calculation for
mag is computed as
20*log10(abs(frsys))
,wherefrsys is the frequency response of sys.Bode
plots are used to analyze system properties s uch as the gain margin, phase
margin, DC gain, bandwidth, disturbance rejection, and stability.
bode(sys) plots the Bode response of an arbitrary LTI model sys. This model
can be continuous or discrete, and SISO or MIMO. In the MI MO case,
bode
produces an array o f Bode plots, each plot showing t he B ode response of one
particularI/O channel.Thefrequencyrange isdeterminedautomaticallybased
on the system poles and zeros.
bode(sys,w) explicitly specifies the frequency range or frequency points to be
used for the plot. To focus on a particular frequency interval
[wmin,wmax],set
w = {wmin,wmax}. To use part icular frequency points, set w to the vector of
desired frequencies.
Use logspace to generate logarithmica lly spaced
frequency v ectors. All frequencies should be specified in radian s/sec.
bode(sys1,sys2,...,sysN) or bode(sys1,sys2,...,sysN,w) plots the Bode
responses of several LTI models on a single figure. All systems must have the
same number of inputs and outputs, but may o therwise be a mix of continuous
and discrete systems. This syntax is useful to compare the Bode responses of
multiple systems.
bode(sys1,'PlotStyle1',...,sysN,'PlotStyleN') specifies which color,
linestyle, and/or marker should be used to plot each system. For example,
bode(sys1,'r--',sys2,'gx')