pid (MathScript RT Module Function)
- Updated2023-03-14
- 2 minute(s) read
pid (MathScript RT Module Function)
Owning Class: construct
Requires: Control Design and Simulation Module and MathScript RT Module
Syntax
SysOutTF = pid(Kc, Ki, Kd, 'parallel')
SysOutTF = pid(Kc, Ti, Td, 'series')
SysOutTF = pid(Kc, Ti, Td, 'academic')
[num, den] = pid(Kc, Ti, Td)
Description
Constructs a proportional-integral-derivative (PID) controller model in either parallel, series, or academic form. Refer to the LabVIEW Control Design User Manual for information about these three forms.
Inputs
| Name | Description |
|---|---|
| Kc | Specifies the proportional gain of the controller model. |
| Ki | Specifies the integral gain of a parallel controller. This input adjusts the effect of the error integral on the controller output. The default value is 0, which specifies no integral action. |
| Kd | Specifies the derivative gain of a parallel controller. This input adjusts the effect of the error derivative on the controller output. The default value is 0, which specifies no derivative action. |
| Ti | Specifies the integral time constant of a series or academic controller. This input adjusts the effect of the error integral on the controller output. The default value is 0, which specifies no integral action. |
| Td | Specifies the derivative time constant of a series or academic controller. The default value is 0, which specifies no derivative action. |
| 'parallel', 'series', or 'academic' | Specifies the structure of PID controller model you want to construct. The default value is 'academic'. This input is a string. |
Outputs
| Name | Description |
|---|---|
| SysOutTF | Returns a PID controller model in transfer function form. |
| num | Returns the coefficients of the numerator polynomial function of the PID controller model. num is a real vector. |
| den | Returns the coefficients of the denominator polynomial function of the PID controller model. den is a real vector. |
Details
The following table lists the support characteristics of this function.
| Supported in the LabVIEW Run-Time Engine | Yes |
| Supported on RT targets | Yes |
| Suitable for bounded execution times on RT | Not characterized |
Examples
Kc = 0.5;
Ti = 0.25;
SysOutTF = pid(Kc, Ti, 'academic');