Create PID controller in parallel form, convert to parallelform PID controller
C = pid(Kp,Ki,Kd,Tf)
C = pid(Kp,Ki,Kd,Tf,Ts)
C = pid(sys)
C = pid(Kp)
C = pid(Kp,Ki)
C = pid(Kp,Ki,Kd)
C = pid(...,Name,Value)
C = pid
creates
a continuoustime PID controller with proportional, integral, and
derivative gains C
= pid(Kp
,Ki
,Kd
,Tf
)Kp
, Ki
,
and Kd
and firstorder derivative filter time
constant Tf
:
$$C={K}_{p}+\frac{{K}_{i}}{s}+\frac{{K}_{d}s}{{T}_{f}s+1}.$$
This representation is in parallel form.
If all of Kp
, Ki
, Kd
,
and Tf
are real, then the resulting C
is
a pid
controller object. If one or more of these
coefficients is tunable (realp
or genmat
),
then C
is a tunable generalized statespace (genss
)
model object.
creates
a discretetime PID controller with sample time C
= pid(Kp
,Ki
,Kd
,Tf
,Ts
)Ts
.
The controller is:
$$C={K}_{p}+{K}_{i}IF\left(z\right)+\frac{{K}_{d}}{{T}_{f}+DF\left(z\right)}.$$
IF(z) and DF(z) are the discrete integrator formulas for the integrator and derivative filter. By default,
$$IF\left(z\right)=DF\left(z\right)=\frac{{T}_{s}}{z1}.$$
To choose different discrete integrator formulas, use the IFormula
and DFormula
properties.
(See Properties for more information
about IFormula
and DFormula
).
If DFormula
= 'ForwardEuler'
(the
default value) and Tf
≠ 0, then Ts
and Tf
must
satisfy Tf > Ts/2
.
This requirement ensures a stable derivative filter pole.
converts
the dynamic system C
= pid(sys
)sys
to a parallel form pid
controller
object.
creates
a continuoustime proportional (P) controller with C
= pid(Kp
)Ki
= 0, Kd
= 0, and Tf
= 0.
creates
a proportional and integral (PI) controller with C
= pid(Kp
,Ki
)Kd
= 0 and Tf
= 0.
creates
a proportional, integral, and derivative (PID) controller with C
= pid(Kp
,Ki
,Kd
)Tf
= 0.
creates
a controller or converts a dynamic system to a C
= pid(...,Name,Value
)pid
controller
object with additional options specified by one or more Name,Value
pair
arguments.

Proportional gain.
When Default: 1 

Integral gain.
When Default: 0 

Derivative gain.
When Default: 0 

Time constant of the firstorder derivative filter.
When Default: 0 

Sample time. To create a discretetime
Default: 0 (continuous time) 

SISO dynamic system to convert to parallel

Specify optional commaseparated pairs of Name,Value
arguments.
Name
is the argument
name and Value
is the corresponding
value. Name
must appear
inside single quotes (' '
).
You can specify several name and value pair
arguments in any order as Name1,Value1,...,NameN,ValueN
.
Use Name,Value
syntax to set the numerical
integration formulas IFormula
and DFormula
of
a discretetime pid
controller, or to set other
object properties such as InputName
and OutputName
.
For information about available properties of pid
controller
objects, see Properties.

PID controller, represented as a


PID controller gains. The 

Derivative filter time constant. The 

Discrete integrator formula IF(z)
for the integrator of the discretetime $$C={K}_{p}+{K}_{i}IF\left(z\right)+\frac{{K}_{d}}{{T}_{f}+DF\left(z\right)}.$$
When Default: 

Discrete integrator formula DF(z)
for the derivative filter of the discretetime $$C={K}_{p}+{K}_{i}IF\left(z\right)+\frac{{K}_{d}}{{T}_{f}+DF\left(z\right)}.$$
When Default: 

Time delay on the system input. 

Time delay on the system Output. 

Sample time. For continuoustime models, Changing this property does not discretize or resample the model.
Use Default: 

Units for the time variable, the sample time
Changing this property has no effect on other properties, and
therefore changes the overall system behavior. Use Default: 

Input channel name, specified as a character vector. Use this
property to name the input channel of the controller model. For example,
assign the name C.InputName = 'error'; You can use the shorthand notation Input channel names have several uses, including:
Default: Empty character vector, 

Input channel units, specified as a character vector. Use this
property to track input signal units. For example, assign the concentration
units C.InputUnit = 'mol/m^3';
Default: Empty character vector, 

Input channel groups. This property is not needed for PID controller models. Default: 

Output channel name, specified as a character vector. Use this
property to name the output channel of the controller model. For example,
assign the name C.OutputName = 'control'; You can use the shorthand notation Input channel names have several uses, including:
Default: Empty character vector, 

Output channel units, specified as a character vector. Use this
property to track output signal units. For example, assign the unit C.OutputUnit = 'Volts';
Default: Empty character vector, 

Output channel groups. This property is not needed for PID controller models. Default: 

System name, specified as a character vector. For example, Default: 

Any text that you want to associate with the system, specified
as a character vector or cell array of character vectors. For example, Default: 

Any type of data you want to associate with system, specified as any MATLAB^{®} data type. Default: 

Sampling grid for model arrays, specified as a data structure. For model arrays that are derived by sampling one or more independent variables, this property tracks the variable values associated with each model in the array. This information appears when you display or plot the model array. Use this information to trace results back to the independent variables. Set the field names of the data structure to the names of the sampling variables. Set the field values to the sampled variable values associated with each model in the array. All sampling variables should be numeric and scalar valued, and all arrays of sampled values should match the dimensions of the model array. For example, suppose you create a 11by1
array of linear models, sysarr.SamplingGrid = struct('time',0:10) Similarly, suppose you create a 6by9
model array, [zeta,w] = ndgrid(<6 values of zeta>,<9 values of w>) M.SamplingGrid = struct('zeta',zeta,'w',w) When you display M M(:,:,1,1) [zeta=0.3, w=5] = 25  s^2 + 3 s + 25 M(:,:,2,1) [zeta=0.35, w=5] = 25  s^2 + 3.5 s + 25 ... For model arrays generated by linearizing a Simulink^{®} model
at multiple parameter values or operating points, the software populates Default: 