* Bug #12793 fixed (proposal 2) - Cacsd: improve the bode() plots
[scilab.git] / scilab / modules / cacsd / help / en_US / plot_display / bode_asymp.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
5  * Copyright (C) 09/2013 - A. Khorshidi
6  *
7  * This file must be used under the terms of the CeCILL.
8  * This source file is licensed as described in the file COPYING, which
9  * you should have received as part of this distribution.  The terms
10  * are also available at
11  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
12  *
13  -->
14 <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"  xml:id="bode_asymp" xml:lang="en">
15     <refnamediv>
16         <refname>bode_asymp</refname>
17         <refpurpose>Bode plot asymptote</refpurpose>
18     </refnamediv>
19     <refsynopsisdiv>
20         <title>Calling Sequence</title>
21         <synopsis>
22             bode_asymp(sl, [wmin, wmax])
23         </synopsis>
24     </refsynopsisdiv>
25     <refsection>
26         <title>Arguments</title>
27         <variablelist>
28             <varlistentry>
29                 <term>sl</term>
30                 <listitem>
31                     <para>
32                         <literal>syslin</literal> list (SISO or SIMO linear system)
33                         in continuous time (type state-space or rational).
34                     </para>
35                 </listitem>
36             </varlistentry>
37             <varlistentry>
38                 <term>wmin, wmax</term>
39                 <listitem>
40                     <para>Real scalars: lower and upper frequency bounds (in rad/s).</para>
41                 </listitem>
42             </varlistentry>
43         </variablelist>
44     </refsection>
45     <refsection>
46         <title>Description</title>
47         <para>Plots the asymptote of the system
48             <literal>sl</literal>.
49         </para>
50         <para>
51             The optional arguments <literal>wmin</literal> and <literal>wmax</literal> (in rad/s) can be used to plot asymptote in a specific range of frequency.
52         </para>
53         <para>
54             <note>
55                 Note that the function <code>bode()</code> or <code>gainplot()</code> must be called before <code>bode_asymp()</code>.
56             </note>
57         </para>
58         <para>
59             <warning>
60                 Warning: this function is not applicable when the first input argument is a real matrix.
61             </warning>
62         </para>
63     </refsection>
64     <refsection>
65         <title>Examples</title>
66         <programlisting role="example"><![CDATA[
67 s = poly(0, "s");
68 h = syslin("c", (s^2+2*0.9*10*s+100)/(s^2+2*0.3*10.1*s+102.01));
69
70 clf(); bode(h, 0.01, 100); bode_asymp(h);
71  ]]></programlisting>
72         <para>
73             <scilab:image localized="true">
74                 s = poly(0, "s");
75                 h = syslin("c", (s^2+2*0.9*10*s+100)/(s^2+2*0.3*10.1*s+102.01));
76                 clf(); bode(h, 0.01, 100); bode_asymp(h);
77             </scilab:image>
78         </para>
79         <programlisting role="example"><![CDATA[
80 s = poly(0, "s");
81 h1 = syslin("c", (s^2+2*0.9*10*s+100)/(s^2+2*0.3*10.1*s+102.01));
82 h2 = syslin("c", (10*(s+3))/(s*(s+2)*(s^2+s+2)));
83
84 clf(); bode([h1; h2], 0.01, 100, ["h1"; "h2"]); bode_asymp([h1; h2]);
85  ]]></programlisting>
86         <para>
87             <scilab:image localized="true">
88                 s = poly(0, "s");
89                 h1 = syslin("c", (s^2+2*0.9*10*s+100)/(s^2+2*0.3*10.1*s+102.01));
90                 h2 = syslin("c", (10*(s+3))/(s*(s+2)*(s^2+s+2)));
91                 clf(); bode([h1; h2], 0.01, 100, ["h1"; "h2"]); bode_asymp([h1; h2]);
92             </scilab:image>
93         </para>
94         <programlisting role="example"><![CDATA[
95 s = %s;
96 G = (s+10)/(s*(s+100)); // A rational matrix
97 sys = syslin("c", G); // A continuous-time linear system in transfer matrix representation.
98 f_min = .0001; f_max = 1600; // Frequencies in Hz
99
100 clf(); bode(sys, f_min, f_max, "rad"); // The optional argument "rad" converts Hz to rad/s
101 bode_asymp(sys, 10, 1000); // Plots asymptotes in the given range of frequency (in rad/s).
102  ]]></programlisting>
103         <para>
104             <scilab:image localized="true">
105                 s = %s;
106                 G = (s+10)/(s*(s+100));
107                 sys = syslin("c", G);
108                 f_min = .0001; f_max = 1600;
109                 clf(); bode(sys, f_min, f_max, "rad");
110                 bode_asymp(sys, 10, 1000);
111             </scilab:image>
112         </para>
113         <programlisting role="example"><![CDATA[
114 s = poly(0, "s");
115 h = syslin("c", (s^2+2*0.9*10*s+100)/(s^2+2*0.3*10.1*s+102.01));
116 h = tf2ss(h);
117
118 clf();
119 gainplot(h, 0.01, 100, "$\frac{s^2+18 s+100}{s^2+6.06 s+102.1}$"); // Frequencies in Hertz
120 bode_asymp(h)
121  ]]></programlisting>
122         <para>
123             <scilab:image localized="true">
124                 s = poly(0,"s");
125                 h = syslin("c",(s^2+2*0.9*10*s+100)/(s^2+2*0.3*10.1*s+102.01));
126                 h = tf2ss(h);
127                 clf();
128                 gainplot(h, 0.01, 100, "$\frac{s^2+18 s+100}{s^2+6.06 s+102.1}$");
129                 bode_asymp(h)
130             </scilab:image>
131         </para>
132     </refsection>
133     <refsection role="see also">
134         <title>See Also</title>
135         <simplelist type="inline">
136             <member>
137                 <link linkend="bode">bode</link>
138             </member>
139             <member>
140                 <link linkend="black">black</link>
141             </member>
142             <member>
143                 <link linkend="nyquist">nyquist</link>
144             </member>
145             <member>
146                 <link linkend="gainplot">gainplot</link>
147             </member>
148             <member>
149                 <link linkend="repfreq">repfreq</link>
150             </member>
151             <member>
152                 <link linkend="g_margin">g_margin</link>
153             </member>
154             <member>
155                 <link linkend="p_margin">p_margin</link>
156             </member>
157             <member>
158                 <link linkend="calfrq">calfrq</link>
159             </member>
160             <member>
161                 <link linkend="phasemag">phasemag</link>
162             </member>
163             <member>
164                 <link linkend="datatips">datatips</link>
165             </member>
166             <member>
167                 <link linkend="show_margins">show_margins</link>
168             </member>
169         </simplelist>
170     </refsection>
171     <refsection>
172         <title>History</title>
173         <revhistory>
174             <revision>
175                 <revnumber>5.5.0</revnumber>
176                 <revremark>bode_asymp() function introduced.</revremark>
177             </revision>
178         </revhistory>
179     </refsection>
180 </refentry>