1
<?xml version="1.0" encoding="UTF-8"?>
3
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
6
* This file must be used under the terms of the CeCILL.
7
* This source file is licensed as described in the file COPYING, which
8
* you should have received as part of this distribution. The terms
9
* are also available at
10
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:id="bode" xml:lang="en">
15
<refname>bode</refname>
16
<refpurpose>Bode plot</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>bode(sl,[fmin,fmax] [,step] [,comments] )
21
bode(sl,frq [,comments] )
22
bode(frq,db,phi [,comments])
23
bode(frq, repf [,comments])
27
<title>Arguments</title>
33
<literal>syslin</literal> list (SISO or SIMO linear system)
34
in continuous or discrete time.
39
<term>fmin,fmax</term>
41
<para>real (frequency bounds (in Hz))</para>
47
<para>real (logarithmic step.)</para>
53
<para>vector of character strings (captions).</para>
59
<para>row vector or matrix (frequencies (in Hz) ) (one row for each
67
<para>row vector or matrix ( magnitudes (in Db)). (one row for each
75
<para>row vector or matrix ( phases (in degree)) (one row for each
83
<para>row vector or matrix of complex numbers (complex frequency
91
<title>Description</title>
92
<para>Bode plot, i.e magnitude and phase of the frequency response of
93
<literal>sl</literal>.
96
<literal>sl</literal> can be a continuous-time or discrete-time SIMO
97
system (see <literal>syslin</literal>). In case of multi-output the
98
outputs are plotted with different symbols.
101
The frequencies are given by the bounds <literal>fmin,fmax</literal>
102
(in Hz) or by a row-vector (or a matrix for multi-output)
103
<literal>frq</literal>.
106
<literal>step</literal> is the ( logarithmic ) discretization step.
107
(see <literal>calfrq</literal> for the choice of default value).
110
<literal>comments</literal> is a vector of character strings
114
<literal>db,phi</literal> are the matrices of modulus (in Db) and
115
phases (in degrees). (One row for each response).
118
<literal>repf</literal> matrix of complex numbers. One row for each
122
Default values for <literal>fmin</literal> and
123
<literal>fmax</literal> are <literal>1.d-3</literal>,
124
<literal>1.d+3</literal> if <literal>sl</literal> is continuous-time or
125
<literal>1.d-3</literal>, <literal>0.5</literal>/sl.dt (nyquist frequency)
126
if <literal>sl</literal> is discrete-time. Automatic discretization of
127
frequencies is made by <literal>calfrq</literal>.
132
<link linkend="datatips">datatips</link>
135
to display data along the phase and modulus curves.
139
<title>Examples</title>
140
<programlisting role="example"><![CDATA[
142
h=syslin('c',(s^2+2*0.9*10*s+100)/(s^2+2*0.3*10.1*s+102.01))
143
clf();bode(h,0.01,100);
148
h=syslin('c',(s^2+2*0.9*10*s+100)/(s^2+2*0.3*10.1*s+102.01))
149
clf();bode(h,0.01,100);
152
<programlisting role="example"><![CDATA[
154
h1=syslin('c',(s^2+2*0.9*10*s+100)/(s^2+2*0.3*10.1*s+102.01))
155
num=22801+4406.18*s+382.37*s^2+21.02*s^3+s^4;
156
den=22952.25+4117.77*s+490.63*s^2+33.06*s^3+s^4
157
h2=syslin('c',num/den);
159
clf();bode([h1;h2],0.01,100,['h1';'h2'])
164
h1=syslin('c',(s^2+2*0.9*10*s+100)/(s^2+2*0.3*10.1*s+102.01))
165
num=22801+4406.18*s+382.37*s^2+21.02*s^3+s^4;
166
den=22952.25+4117.77*s+490.63*s^2+33.06*s^3+s^4
167
h2=syslin('c',num/den);
169
clf();bode([h1;h2],0.01,100,['h1';'h2'])
173
<refsection role="see also">
174
<title>See Also</title>
175
<simplelist type="inline">
177
<link linkend="black">black</link>
180
<link linkend="nyquist">nyquist</link>
183
<link linkend="gainplot">gainplot</link>
186
<link linkend="repfreq">repfreq</link>
189
<link linkend="g_margin">g_margin</link>
192
<link linkend="p_margin">p_margin</link>
195
<link linkend="calfrq">calfrq</link>
198
<link linkend="phasemag">phasemag</link>
201
<link linkend="datatips">datatips</link>