Path: Common/Control
% Design a PID controller.
Design a PID controller of the form
y = cx + du
x = ax + bu
Type PID for a demo.
--------------------------------------------------------------------------
Form:
[g, b, c, d] = PID( kF, kP, kR, kI, omegaR, tSamp, sType )
--------------------------------------------------------------------------
------
Inputs
------
kF Forward gain
kP Proportional gain
kR Rate gain
kI Integral
omegaR Rate cutoff
tSamp Sampling period (sec)
sType State equation type ('Delta' or 'Z')
-------
Outputs
-------
g Statespace data structure or
[a, b, c, d] Statespace
--------------------------------------------------------------------------