ControlDesign[ParameterIdentify] - MapleSim Help

Home : Support : Online Help : MapleSim Toolboxes : MapleSim Control Design Toolbox : ControlDesign Package : PID Tuning : ControlDesign/ParameterIdentify/TimeDomain

ControlDesign[ParameterIdentify]

 TimeDomain
 identify parameters of a first-order with time-delay (FOTD) model using time-domain techniques

 Calling Sequence TimeDomain(sys, opts)

Parameters

 sys - System; a DynamicSystems system object in continuous-time domain; must be single-input single-output (SISO) and stable. opts - (optional) equation(s) of the form option = value; specify options for the TimeDomain command

Options

 • method : one of moments, stepPercentage, stepIntegrate or doubletPulse
 Specifies the method of parameter identification.
 – moments uses the values of the transfer function and its first and second derivatives at zero to estimate the parameters.  This is the method of moments as described in Astrom et. al. (1995). This method is the default.
 – stepPercentage uses the points on the system step-response for which the response reaches 1/3 and 2/3 of its final value, as described in O'Dwyer (2006).
 – stepIntegrate is based on certain areas under the step response plot as described in Nishikawa et. al. (1984).
 – doubletPulse uses the system response to a doublet pulse input as described in Astrom et. al. (2006). The amplitude and period of the doublet pulse input signal must be specified by the user. This method only applies to systems with no symbolic parameters.
 • Amp = realcons
 Amplitude of the doublet pulse input signal in the doubletPulse method. Must be a positive-real number.
 • Tp = realcons
 The half period  of the doublet pulse input signal in the doubletPulse method. Must be a positive-real number.
 • simplifyOutput = truefalse
 In case that the system contains symbolic parameters, specifies whether the symbolic expressions for the identified parameters should be simplified. If true then the identification output is simplified using the simplify command. The default value is true. For details see: simplify.

Description

 • The TimeDomain command estimates the parameters of an FOTD model for the given system, sys, using the time-domain method specified in the options. The command returns a list containing gain, time constant, and time delay of the identified FOTD model, respectively. In other words, TimeDomain(sys,opts) computes the parameters $\left[\mathrm{Kp},T,L\right]$ for the model $\frac{\mathrm{Kp}{ⅇ}^{-sL}}{Ts+1}$ that best approximates sys according to the chosen method, with $\mathrm{Kp}\ne 0$, $0\le T$, and $0.
 • When the system has symbolic parameters, the FOTD model parameters are returned as symbolic expressions of the system parameters. The computed results are theoretically valid for the parameter space only when the following conditions hold:
 – The system is open-loop stable. The parametric stability condition can be obtained using the DynamicSystems[RouthTable] command with the stablecondition option set to true. For details see: DynamicSystems[RouthTable].
 – The computed algebraic expressions for the FOTD model parameters time-constant ($T$) and time-delay ($L$) are positive-real, and that of the FOTD model gain ($\mathrm{Kp}$) is either positive-real (corresponding to systems with positive DC gain) or negative-real (corresponding to systems with negative DC gain).

Examples

 > $\mathrm{with}\left({\mathrm{ControlDesign}}_{\mathrm{ParameterIdentify}}\right):$
 > $\mathrm{with}\left(\mathrm{DynamicSystems}\right):$

Basic Usage

 • Use each of the methods to identify the parameters $\left[K,T,L\right]$ for the following system.
 > $\mathrm{sys}≔\mathrm{NewSystem}\left(\frac{1}{{s}^{2}+2s+3}\right):$
 > $\mathrm{params}≔\mathrm{TimeDomain}\left(\mathrm{sys},\mathrm{method}=\mathrm{stepPercentage}\right)$
 ${\mathrm{params}}{≔}\left[\frac{{1}}{{3}}{,}{0.5461468460}{,}{0.3747961646}\right]$ (1)
 > $\mathrm{params}≔\mathrm{TimeDomain}\left(\mathrm{sys},\mathrm{method}=\mathrm{stepIntegrate}\right)$
 ${\mathrm{params}}{≔}\left[\frac{{1}}{{3}}{,}{0.6721581969}{,}{0.2695254684}\right]$ (2)
 > $\mathrm{params}≔\mathrm{TimeDomain}\left(\mathrm{sys},\mathrm{method}=\mathrm{doubletPulse},\mathrm{Amp}=1,\mathrm{Tp}=0.6\right)$
 ${\mathrm{params}}{≔}\left[\frac{{1}}{{3}}{,}{0.619100864277216}{,}{0.492805324230899}\right]$ (3)
 > $\mathrm{params}≔\mathrm{TimeDomain}\left(\mathrm{sys},\mathrm{method}=\mathrm{moments}\right)$
 ${\mathrm{params}}{≔}\left[\frac{{1}}{{3}}{,}\frac{{1}}{{3}}{}\sqrt{{2}}{,}\frac{{1}}{{3}}\right]$ (4)

Symbolic System

 • Identify the parameters for a system with symbolic coefficients.
 > $\mathrm{sys}≔\mathrm{NewSystem}\left(\frac{s+a}{{s}^{3}+b{s}^{2}+35s+c}\right):$
 > $\mathrm{sys}:-\mathrm{tf}$
 $\left[\begin{array}{c}\frac{{s}{+}{a}}{{{s}}^{{3}}{+}{b}{}{{s}}^{{2}}{+}{35}{}{s}{+}{c}}\end{array}\right]$ (5)
 > $\mathrm{params}≔\mathrm{TimeDomain}\left(\mathrm{sys}\right)$
 ${\mathrm{params}}{≔}\left[\frac{{a}}{{c}}{,}\frac{\sqrt{\left|\frac{{2}{}{{a}}^{{2}}{}{b}{}{c}{-}{1225}{}{{a}}^{{2}}{+}{{c}}^{{2}}}{{{c}}^{{4}}}\right|}{}{c}}{{a}}{,}\frac{{1}}{{2}}{}\left|\frac{\sqrt{\left|\frac{{2}{}{{a}}^{{2}}{}{b}{}{c}{-}{1225}{}{{a}}^{{2}}{+}{{c}}^{{2}}}{{{c}}^{{4}}}\right|}{}{{c}}^{{2}}{-}{35}{}{a}{+}{c}}{{c}{}{a}}\right|{+}\frac{{1}}{{2}}{}\left|\frac{\sqrt{\left|\frac{\left|\frac{{2}{}{{a}}^{{2}}{}{b}{}{c}{-}{1225}{}{{a}}^{{2}}{+}{{c}}^{{2}}}{{{c}}^{{4}}}\right|{}{{c}}^{{4}}{+}{2}{}{{a}}^{{2}}{}{b}{}{c}{-}{2450}{}{{a}}^{{2}}{+}{70}{}{c}{}{a}}{{{c}}^{{2}}{}{{a}}^{{2}}}\right|}{}{a}{-}\sqrt{\left|\frac{{2}{}{{a}}^{{2}}{}{b}{}{c}{-}{1225}{}{{a}}^{{2}}{+}{{c}}^{{2}}}{{{c}}^{{4}}}\right|}{}{c}}{{a}}\right|\right]$ (6)
 • Use DynamicSystems[RouthTable] to find the domains of $b$ and $c$ that give a stable system.
 > $\mathrm{stable}≔\mathrm{RouthTable}\left(\mathrm{denom}\left({\mathrm{sys}:-\mathrm{tf}}_{1,1}\right),s,\mathrm{stablecondition}=\mathrm{true}\right)$
 ${\mathrm{stable}}{≔}{0}{<}{b}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{0}{<}{c}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{0}{<}{35}{-}\frac{{c}}{{b}}$ (7)
 • Verify that the following values for $a$, $b$, and $c$ are within the stable region, then substitute into params to find the corresponding FOTD parameters.
 > $\mathrm{vals}≔\left[a=1,b=1,c=5\right]$
 ${\mathrm{vals}}{≔}\left[{a}{=}{1}{,}{b}{=}{1}{,}{c}{=}{5}\right]$ (8)
 > $\mathrm{eval}\left(\mathrm{stable},\mathrm{vals}\right)$
 ${0}{<}{1}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{0}{<}{5}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{0}{<}{30}$ (9)
 > $\mathrm{eval}\left(\mathrm{params},\mathrm{vals}\right)$
 $\left[\frac{{1}}{{5}}{,}\frac{{1}}{{25}}{}\sqrt{{238}}{}\sqrt{{125}}{,}\frac{{1}}{{25}}{}\sqrt{{238}}{}\sqrt{{125}}{-}{3}{-}\frac{{1}}{{2}}{}\sqrt{{36}}\right]$ (10)

FOTD Approximation

 • Starting with the FOTD transfer function, use series to generate a second-order polynomial approximation for the delay term, create a DynamicSystems model from the rational polynomial, then use TimeDomain and simplify to extract the original parameters.
 > $\mathrm{fotd}≔\frac{\mathrm{Kp}{ⅇ}^{-sL}}{1+sT}$
 ${\mathrm{fotd}}{≔}\frac{{\mathrm{Kp}}{}{{ⅇ}}^{{-}{s}{}{L}}}{{T}{}{s}{+}{1}}$ (11)
 > $\mathrm{fotd2}≔\frac{\mathrm{convert}\left(\mathrm{series}\left(\mathrm{numer}\left(\mathrm{fotd}\right),s,3\right),\mathrm{polynom}\right)}{\mathrm{denom}\left(\mathrm{fotd}\right)}$
 ${\mathrm{fotd2}}{≔}\frac{{\mathrm{Kp}}{-}{\mathrm{Kp}}{}{L}{}{s}{+}\frac{{1}}{{2}}{}{\mathrm{Kp}}{}{{L}}^{{2}}{}{{s}}^{{2}}}{{T}{}{s}{+}{1}}$ (12)
 > $\mathrm{sys}≔\mathrm{NewSystem}\left(\mathrm{fotd2}\right):$
 Warning, improper transfer-function, degree(num) > degree(den)
 > $\mathrm{params}≔\mathrm{TimeDomain}\left(\mathrm{sys}\right)$
 ${\mathrm{params}}{≔}\left[{\mathrm{Kp}}{,}\frac{\sqrt{\left|{{\mathrm{Kp}}}^{{2}}{}{{T}}^{{2}}\right|}}{{\mathrm{Kp}}}{,}\frac{{1}}{{2}}{}\left|\frac{{\mathrm{Kp}}{}{L}{+}{\mathrm{Kp}}{}{T}{-}\sqrt{\left|{{\mathrm{Kp}}}^{{2}}{}{{T}}^{{2}}\right|}}{{\mathrm{Kp}}}\right|{+}\frac{{1}}{{2}}{}\left|\frac{\sqrt{\left|\frac{{{\mathrm{Kp}}}^{{2}}{}{{L}}^{{2}}{+}{2}{}{{\mathrm{Kp}}}^{{2}}{}{L}{}{T}{+}{2}{}{{\mathrm{Kp}}}^{{2}}{}{{T}}^{{2}}{-}\left|{{\mathrm{Kp}}}^{{2}}{}{{T}}^{{2}}\right|}{{{\mathrm{Kp}}}^{{2}}}\right|}{}{\mathrm{Kp}}{-}\sqrt{\left|{{\mathrm{Kp}}}^{{2}}{}{{T}}^{{2}}\right|}}{{\mathrm{Kp}}}\right|\right]$ (13)
 > $\mathrm{simplify}\left(\mathrm{params}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}assuming\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}0<\mathrm{Kp},0\le T,0
 $\left[{\mathrm{Kp}}{,}{T}{,}{L}\right]$ (14)

Unstable System

 • Create a system with a zero at $-1$, poles at $-2$, $1+I$, and $1-I$, and a gain of $3$.
 > $\mathrm{sys}≔\mathrm{NewSystem}\left(\left[-1\right],\left[-2,1+I,1-I\right],3\right):$
 • Attempt to identify the parameters for this unstable system; doing so raises an error.
 > $\mathrm{TimeDomain}\left(\mathrm{sys}\right)$

References

 [1] K. J. Astrom and T. Hagglund, Automatic Tuning of PID Controllers, ISA, 1995.
 [2] K. J. Astrom and T. Hagglund, Advanced PID Control, ISA, 2006.
 [3] Y. Nishikawa, N. Sannomiya, T. Ohta and H. Tanaka, A Method for Auto_Tuning of PID Control Parameters, Automatica, Vol. 20, No. 3, pp. 321-332, 1984.
 [4] A. O'Dwyer, Handbook of PI and PID Controller Tuning Rules, 2nd Edition, Imperial College Press, 2006.