PIDProper:

Path: Common/Control

% Compute proper and non-proper transfer functions for a PID.

   Compute proper and non-proper transfer functions for a set of PID gains
   Call with no inputs to use default data for a demo.
   Call with no outputs to produce a plot.

   The transfer function from u to y is of the form:

               KD s         u
   y = KP u +  ---- u + KI ---
              s + wR        s

  
   Notice that with smaller wR, the proper transfer function matches
   the original PID (non-proper) transfer function over a higher frequency
   range.

--------------------------------------------------------------------------
   Form:
   data = PIDProper( KP, KI, KD, gamma );
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   KP           (1,1)  Proportional gain
   KI           (1,1)  Integral gain
   KD           (1,1)  Derivative gain
   wR           (1,1)  Derivative roll-off term
   w            (1,:)  Frequency vector. Optional, default: logspace(-3,2) 

   -------
   Outputs
   -------
   data          (.)   Data structure with fields:
                       - num       Numerator of proper TF
                       - den       Denominator of non-proper TF
                       - numNP     Numerator of proper TF
                       - denNP     Denominator of non-proper TF
                       - a         A matrix of proper statespace
                       - b         B matrix of proper statespace
                       - c         C matrix of proper statespace
                       - d         D matrix of proper statespace
                       - mag       Magnitude response of proper TF
                       - phase     Magnitude response of proper TF
                       - magNP     Magnitude response of proper TF
                       - phaseNP   Magnitude response of proper TF

--------------------------------------------------------------------------

Children:

Common: Control/FResp
Common: Control/FRespPlot
Common: Control/ND2SS

Back to the Common Module page