PidStd
| Page in progress. | 
The PID controller is in the standard form.
| Library | 
 | 
Description
The function creates a continuous or discrete proportional-integral-differential controller (PID controller) in a standard form:
where
- 
— proportional coefficient; 
- 
— constant integration; 
- 
— constant differentiation; 
- 
— the divisor of the differentiation constant; 
- 
— discrete integrator of the integral part; 
- 
— discrete integrator of the differential part. 
Syntax
Function call
- 
c = PidStd()creates a continuous PID controller with default parameters. You can change the parameter values using the functionsetproperty!.
Arguments
Input arguments
# kp — proportional coefficient
+
1.0 (default) | scalar
Details
The proportional coefficient of the regulator. The value must be a finite number not equal to zero.
| Data types | 
 | 
| Support for complex numbers | None | 
# ti is the integration constant
+
Inf (by default) | scalar
Details
The constant of integration of the regulator. The value must be a positive number.
| Data types | 
 | 
| Support for complex numbers | None | 
# td — differentiation constant
+
0.0 (by default) | scalar
Details
The constant of differentiation of the regulator. The value must be a finite non-negative number.
| The creation of a D-regulator is not provided. | 
| Data types | 
 | 
| Support for complex numbers | None | 
# n is the divisor of the differentiation constant
+
Inf (by default) | scalar
Details
The coefficient that determines the limit frequency of the filter. The value must be a positive number.
| The value of this parameter must be equal to Infwhen the differentiation constant is0. | 
| Data types | 
 | 
| Support for complex numbers | None | 
# ts — sampling period
+
nothing (by default) | scalar
Details
The sampling period of the controller. For a continuous regulator, the argument takes the value nothing, and for a discrete controller, the value of the argument can be any positive number.
| The value of this parameter must be equal to 0when the regulator has no differential component. | 
| Data types | 
 | 
| Support for complex numbers | None | 
# iformula is a method for integrating an integral component
+
nothing (by default) | :forward_euler | :backward_euler | :trapezoidal
Details
The method of integrating the integral component discrete PID controller
The argument takes the following values:
- 
:forward_euler— the direct Euler methodIt is recommended to use this method when the sampling period is short, i.e. if the Nyquist frequency is much higher than the bandwidth of the controller. For large values of the sampling period, using the direct Euler method can make the regulator unstable, even if a similar continuous regulator is stable. 
- 
:backward_euler— the inverse Euler methodThis method guarantees the stability of a discrete regulator when sampling a stable continuous regulator. 
- 
:trapezoidal— the trapezoid methodThis method guarantees the stability of a discrete regulator when sampling a stable continuous regulator. The trapezoid method allows to obtain a better correspondence of the frequency characteristics of continuous and discrete regulators in comparison with the Euler method. 
| For a continuous regulator, this argument takes the value nothing. | 
| Data types | 
 | 
# dformula is a method for integrating the differential component
+
nothing (by default) | :forward_euler | :backward_euler | :trapezoidal
Details
The method of integrating the integral component discrete PID controller
The argument takes the following values:
- 
:forward_euler— the direct Euler methodIt is recommended to use this method when the sampling period is short, i.e. if the Nyquist frequency is much higher than the bandwidth of the controller. For large values of the sampling period, using the direct Euler method can make the regulator unstable, even if a similar continuous regulator is stable. 
- 
:backward_euler— the inverse Euler methodThis method guarantees the stability of a discrete regulator when sampling a stable continuous regulator. 
- 
:trapezoidal— the trapezoid methodThis method guarantees the stability of a discrete regulator when sampling a stable continuous regulator. The trapezoid method allows to obtain a better correspondence of the frequency characteristics of continuous and discrete regulators in comparison with the Euler method. 
| For a continuous regulator, this argument takes the value nothing. | 
| Data types | 
 | 
Output arguments
# c — PID controller in standard form
+
PidStd
Details
The PID controller is in the standard form. The structure of the regulator depends on the specified parameters.
| Data types | 
 |