Access coefficients of parallelform PID controller
[Kp,Ki,Kd,Tf]
= piddata(sys)
[Kp,Ki,Kd,Tf,Ts]
= piddata(sys)
[Kp,Ki,Kd,Tf,Ts]
= piddata(sys,J1,...,JN)
[
returns the PID gains Kp
,Ki
,Kd
,Tf
]
= piddata(sys
)Kp
,Ki
, Kd
and
the filter time constant Tf
of the parallelform
controller represented by the dynamic system sys
.
[
also returns the sample
time Kp
,Ki
,Kd
,Tf
,Ts
]
= piddata(sys
)Ts
.
[
extracts
the data for a subset of entries in Kp
,Ki
,Kd
,Tf
,Ts
]
= piddata(sys
,J1,...,JN)sys
, where sys
is
an Ndimensional array of dynamic systems. The indices J
specify
the array entry to extract.

SISO dynamic system or array of SISO dynamic systems. If 

Integer indices of N entries in the array [Kp,Ki,Kd,Tf,Ts] = piddata(sys,2,3); 

Proportional gain of the parallelform PID controller represented
by dynamic system If If If 

Integral gain of the parallelform PID controller represented
by dynamic system If If If 

Derivative gain of the parallelform PID controller represented
by dynamic system If If If 

Filter time constant of the parallelform PID controller represented
by dynamic system If If If 

Sample time of the dynamic system 
Extract the proportional, integral, and derivative gains and
the filter time constant from a parallelform pid
controller.
For the following pid
object:
sys = pid(1,4,0.3,10);
you can extract the parameter values from sys
by
entering:
[Kp Ki Kd Tf] = piddata(sys);
Extract the parallel form proportional and integral gains from an equivalent standardform PI controller.
For a standardform PI controller, such as:
sys = pidstd(2,3);
you can extract the gains of an equivalent parallelform PI controller by entering:
[Kp Ki] = piddata(sys)
These commands return the result:
Kp = 2 Ki = 0.6667
Extract parameters from a dynamic system that represents a PID controller.
The dynamic system
$$H\left(z\right)=\frac{\left(z0.5\right)\left(z0.6\right)}{\left(z1\right)\left(z+0.8\right)}$$
represents a discretetime PID controller with a derivative
filter. Use piddata
to extract the parallelform
PID parameters.
H = zpk([0.5 0.6],[1,0.8],1,0.1); % sample time Ts = 0.1s [Kp Ki Kd Tf Ts] = piddata(H);
the piddata
function uses the default ForwardEuler
discrete
integrator formula for IFormula
and DFormula
to
compute the parameter values.
Extract the gains from an array of PI controllers.
sys = pid(rand(2,3),rand(2,3)); % 2by3 array of PI controllers [Kp Ki Kd Tf] = piddata(sys);
The parameters Kp
, Ki
, Kd
,
and Tf
are also 2by3 arrays.
Use the index input J
to extract the parameters
of a subset of sys
.
[Kp Ki Kd Tf] = piddata(sys,5);
If sys
is not a pid
controller
object, piddata
returns the PID gains Kp
, Ki
, Kd
and
the filter time constant Tf
of a parallelform
controller equivalent to sys
.
For discretetime sys
, piddata
returns
the parameters of an equivalent parallelform controller. This controller
has discrete integrator formulas IFormula
and DFormula
set
to ForwardEuler
. See the pid
reference
page for more information about discrete integrator formulas.