22
22
* See the file ./license.txt
24
24
<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" version="5.0-subset Scilab" xml:id="PID">
26
<refname>PID</refname>
27
<refpurpose>PID regulator</refpurpose>
30
<title>Block Screenshot</title>
34
<imagedata align="center" fileref="../../../../images/palettes/PID.png" valign="middle"/>
39
<refsection id="Contents_PID">
40
<title>Contents</title>
44
<link linkend="PID">PID regulator</link>
51
<xref linkend="Palette_PID">Palette</xref>
56
<xref linkend="Description_PID">Description</xref>
61
<xref linkend="Dialogbox_PID">Dialog box</xref>
66
<xref linkend="Defaultproperties_PID">Default
73
<xref linkend="Interfacingfunction_PID">Interfacing function</xref>
78
<xref linkend="CompiledSuperBlockcontent_PID">Compiled Super Block content</xref>
83
<xref linkend="Example_PID">Examples</xref>
90
<refsection id="Palette_PID">
91
<title>Palette</title>
95
<link linkend="Continuous_pal">Continuous time systems
102
<refsection id="Description_PID">
103
<title>Description</title>
104
<para>This block implements a PID (Proportional-Integral-Differential)
105
controller. It calculates an "error" value Ue as the difference between a
106
measured process variable Upr and a desired setpoint Ur.
111
<imagedata align="center" fileref="../../../examples/pid_error.gif" valign="middle"/>
115
<para>The purpose is to make the process variable Up follow the setpoint
116
value Ur. The PID controller is widely used in feedback control of
117
industrial processes.
119
<para>The PID controller calculation (algorithm) involves three separate
120
parameters; the Proportional Kp, the Integral Ki and Derivative Kd values.
121
These terms describe three basic mathematical functions applied to the
122
error signal Ue. Kp determines the reaction to the current error, Ki
123
determines the reaction based on the sum of recent errors and Kd
124
determines the reaction to the rate at which the error has been
127
<para>The weighted sum of these three actions is used to adjust the
128
process via a control element such as the position of a control valve or
129
the power supply of a heating element. The basic structure of conventional
130
feedback control systems is shown below:
135
<imagedata align="center" fileref="../../../examples/pid_structure.png" valign="middle"/>
139
<para>PID law is a linear combinaison of an input variable Up(t), its time
140
integral Ui(t) and its first derivative Ud(t). The control law Ucon(t) has
146
<imagedata align="center" fileref="../../../examples/pid_law.gif" valign="middle"/>
151
<refsection id="Dialogbox_PID">
152
<title>Dialog box</title>
156
<imagedata align="center" fileref="../../../../images/gui/PID_gui.gif" valign="middle"/>
164
<emphasis role="bold">Proportional</emphasis>
166
<para>The value of the gain that multiply the error.</para>
167
<para>Properties : Type 'vec' of size -1.</para>
171
<emphasis role="bold">Integral</emphasis>
173
<para>The value of the integral time of the error.(1/Integral)</para>
174
<para>Properties : Type 'vec' of size -1.</para>
178
<emphasis role="bold">Derivation</emphasis>
180
<para>The value of the derivative time of the error.</para>
181
<para>Properties : Type 'vec' of size -1.</para>
185
<refsection id="Defaultproperties_PID">
186
<title>Default properties</title>
190
<emphasis role="bold">always active:</emphasis> no
195
<emphasis role="bold">direct-feedthrough:</emphasis> no
200
<emphasis role="bold">zero-crossing:</emphasis> no
205
<emphasis role="bold">mode:</emphasis> no
210
<emphasis role="bold">regular inputs:</emphasis>
213
<emphasis role="bold">- port 1 : size [-1,-2] / type
220
<emphasis role="bold">regular outputs:</emphasis>
223
<emphasis role="bold">- port 1 : size [-1,-2] / type
230
<emphasis role="bold">number/sizes of activation
238
<emphasis role="bold">number/sizes of activation
246
<emphasis role="bold">continuous-time state:</emphasis>
252
<emphasis role="bold">discrete-time state:</emphasis> no
257
<emphasis role="bold">object discrete-time state:</emphasis>
263
<emphasis role="bold">name of computational function:</emphasis>
264
<emphasis role="italic">csuper</emphasis>
269
<refsection id="Interfacingfunction_PID">
270
<title>Interfacing function</title>
273
<para>SCI/modules/scicos_blocks/macros/Linear/PID.sci</para>
277
<refsection id="CompiledSuperBlockcontent_PID">
278
<title>Compiled Super Block content</title>
282
<imagedata align="center" fileref="../../../images/PID_img3_eng.gif" valign="middle"/>
287
<refsection id="Example_PID">
288
<title>Example 1</title>
289
<para>This example illustrates the usage of PID regulator. It enables you
290
to fit the output signal Upr(t) to the required signal Ur(t)
293
<para>In this example the control system is a second-order unity-gain
294
low-pass filter with damping ratio ξ=0.5 and cutoff frequency fc= 100 Hz.
295
Its transfer function H(s) is:
300
<imagedata align="center" fileref="../../../examples/pid_filter.gif" valign="middle"/>
304
<para>To model this filter we use Continuous transfer function block (CLR)
305
from Continuous time systems Palette.
307
<para>The PID parameters Kp, Ki and Kd are set to 100, 0.1 and 0.</para>
311
<imagedata align="center" fileref="../../../examples/pid_filter_parameters.png" valign="middle"/>
315
<para>The scope displays the waveforms of system error Ue (black),
316
reference signal Ur (blue) and process signal Upr(red). It shows how
317
initially the process signal Upr(t) does not follow the reference signal
323
<imagedata align="center" fileref="../../../examples/pid_example.png" valign="middle"/>
328
<refsection id="Example_PID">
329
<title>Example 2</title>
331
<link type="scilab" linkend="scilab.xcos/xcos/examples/continuous_pal/PID_Example.xcos">
334
<imagedata align="center" fileref="../../../../examples/continuous_pal/PID_Example.png" valign="middle"/>
340
<refsection id="Example_2_PID">
341
<title>Example 3</title>
343
<link type="scilab" linkend="scilab.xcos/xcos/examples/continuous_pal/PID2_Example.xcos">
346
<imagedata align="center" fileref="../../../../examples/continuous_pal/PID2_Example.png" valign="middle"/>
26
<refname>PID</refname>
27
<refpurpose>PID regulator</refpurpose>
30
<title>Block Screenshot</title>
34
<imagedata align="center" fileref="../../../../images/palettes/PID.png" valign="middle"/>
39
<refsection id="Contents_PID">
40
<title>Contents</title>
44
<link linkend="PID">PID regulator</link>
51
<xref linkend="Palette_PID">Palette</xref>
56
<xref linkend="Description_PID">Description</xref>
61
<xref linkend="Dialogbox_PID">Dialog box</xref>
66
<xref linkend="Defaultproperties_PID">Default
73
<xref linkend="Interfacingfunction_PID">Interfacing function</xref>
78
<xref linkend="CompiledSuperBlockcontent_PID">Compiled Super Block content</xref>
83
<xref linkend="Example_PID">Examples</xref>
90
<refsection id="Palette_PID">
91
<title>Palette</title>
95
<link linkend="Continuous_pal">Continuous time systems
102
<refsection id="Description_PID">
103
<title>Description</title>
104
<para>This block implements a PID (Proportional-Integral-Differential)
105
controller. It calculates an "error" value Ue as the difference between a
106
measured process variable Upr and a desired setpoint Ur.
111
<imagedata align="center" fileref="../../../examples/pid_error.gif" valign="middle"/>
115
<para>The purpose is to make the process variable Up follow the setpoint
116
value Ur. The PID controller is widely used in feedback control of
117
industrial processes.
119
<para>The PID controller calculation (algorithm) involves three separate
120
parameters; the Proportional Kp, the Integral Ki and Derivative Kd values.
121
These terms describe three basic mathematical functions applied to the
122
error signal Ue. Kp determines the reaction to the current error, Ki
123
determines the reaction based on the sum of recent errors and Kd
124
determines the reaction to the rate at which the error has been
127
<para>The weighted sum of these three actions is used to adjust the
128
process via a control element such as the position of a control valve or
129
the power supply of a heating element. The basic structure of conventional
130
feedback control systems is shown below:
135
<imagedata align="center" fileref="../../../examples/pid_structure.png" valign="middle"/>
139
<para>PID law is a linear combinaison of an input variable Up(t), its time
140
integral Ui(t) and its first derivative Ud(t). The control law Ucon(t) has
146
<imagedata align="center" fileref="../../../examples/pid_law.gif" valign="middle"/>
151
<refsection id="Dialogbox_PID">
152
<title>Dialog box</title>
156
<imagedata align="center" fileref="../../../../images/gui/PID_gui.gif" valign="middle"/>
164
<emphasis role="bold">Proportional</emphasis>
166
<para>The value of the gain that multiply the error.</para>
167
<para>Properties : Type 'vec' of size -1.</para>
171
<emphasis role="bold">Integral</emphasis>
173
<para>The value of the integral time of the error.(1/Integral)</para>
174
<para>Properties : Type 'vec' of size -1.</para>
178
<emphasis role="bold">Derivation</emphasis>
180
<para>The value of the derivative time of the error.</para>
181
<para>Properties : Type 'vec' of size -1.</para>
185
<refsection id="Defaultproperties_PID">
186
<title>Default properties</title>
190
<emphasis role="bold">always active:</emphasis> no
195
<emphasis role="bold">direct-feedthrough:</emphasis> no
200
<emphasis role="bold">zero-crossing:</emphasis> no
205
<emphasis role="bold">mode:</emphasis> no
210
<emphasis role="bold">regular inputs:</emphasis>
213
<emphasis role="bold">- port 1 : size [-1,-2] / type
220
<emphasis role="bold">regular outputs:</emphasis>
223
<emphasis role="bold">- port 1 : size [-1,-2] / type
230
<emphasis role="bold">number/sizes of activation
238
<emphasis role="bold">number/sizes of activation
246
<emphasis role="bold">continuous-time state:</emphasis>
252
<emphasis role="bold">discrete-time state:</emphasis> no
257
<emphasis role="bold">object discrete-time state:</emphasis>
263
<emphasis role="bold">name of computational function:</emphasis>
264
<emphasis role="italic">csuper</emphasis>
269
<refsection id="Interfacingfunction_PID">
270
<title>Interfacing function</title>
273
<para>SCI/modules/scicos_blocks/macros/Linear/PID.sci</para>
277
<refsection id="CompiledSuperBlockcontent_PID">
278
<title>Compiled Super Block content</title>
282
<imagedata align="center" fileref="../../../images/PID_img3_eng.gif" valign="middle"/>
287
<refsection id="Example_PID">
288
<title>Example 1</title>
289
<para>This example illustrates the usage of PID regulator. It enables you
290
to fit the output signal Upr(t) to the required signal Ur(t)
293
<para>In this example the control system is a second-order unity-gain
294
low-pass filter with damping ratio ξ=0.5 and cutoff frequency fc= 100 Hz.
295
Its transfer function H(s) is:
300
<imagedata align="center" fileref="../../../examples/pid_filter.gif" valign="middle"/>
304
<para>To model this filter we use Continuous transfer function block (CLR)
305
from Continuous time systems Palette.
307
<para>The PID parameters Kp, Ki and Kd are set to 100, 0.1 and 0.</para>
311
<imagedata align="center" fileref="../../../examples/pid_filter_parameters.png" valign="middle"/>
315
<para>The scope displays the waveforms of system error Ue (black),
316
reference signal Ur (blue) and process signal Upr(red). It shows how
317
initially the process signal Upr(t) does not follow the reference signal
323
<imagedata align="center" fileref="../../../examples/pid_example.png" valign="middle"/>
328
<refsection id="Example_PID">
329
<title>Example 2</title>
331
<link type="scilab" linkend="scilab.xcos/xcos/examples/continuous_pal/PID_Example.xcos">
334
<imagedata align="center" fileref="../../../../examples/continuous_pal/PID_Example.png" valign="middle"/>
340
<refsection id="Example_2_PID">
341
<title>Example 3</title>
343
<link type="scilab" linkend="scilab.xcos/xcos/examples/continuous_pal/PID2_Example.xcos">
346
<imagedata align="center" fileref="../../../../examples/continuous_pal/PID2_Example.png" valign="middle"/>