ControlDesign[ParameterIdentify]

 FrequencyDomain
 Ziegler-Nichols frequency domain (closed-loop) identification

 Calling Sequence FrequencyDomain(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 FrequencyDomain command

Options

 • 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. Also, the symbolic expression of Ku is simplified through the computation process facilitating the symbolic manipulations. The default value is true. For details see: simplify.

Description

 • The FrequencyDomain command performs the Ziegler-Nichols frequency domain (closed-loop) identification. It estimates the ultimate gain (Ku) and ultimate period (Tu) of the given system. The ultimate gain is the smallest positive gain for which the closed-loop system under unity negative feedback becomes oscillatory (marginally stable) and the ultimate period is the period of the corresponding oscillations. The method is only applicable to SISO open-loop stable systems. If the system has no symbolic parameters, the command returns a list of two positive-real floating-point numbers as [Ku,Tu] or returns an error if no solution exists. When the system has symbolic parameters, the ultimate gain and frequency are returned as symbolic expressions of the system parameters. The calculated results are theoretically valid for the parameter space on which 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 resulted algebraic expressions for Ku and Tu are evaluated to positive-real numbers for the numerical values of the system parameters. If more than one symbolic solution exist, multiple solutions are returned as a sequence of [Ku,Tu] pairs: [Ku1,Tu1], [Ku2,Tu2], ... . In this case, by definition, the smallest positive Ku (if exists) and its corresponding Tu, is the acceptable solution.

Examples

 > $\mathrm{with}\left({\mathrm{ControlDesign}}_{\mathrm{ParameterIdentify}}\right):$
 > $\mathrm{sys}≔\mathrm{DynamicSystems}:-\mathrm{NewSystem}\left(\frac{{s}^{2}+3}{{s}^{3}+2{s}^{2}+s+1}\right):$
 > $\mathrm{sys}:-\mathrm{tf}$
 $\left[\begin{array}{c}\frac{{{s}}^{{2}}{+}{3}}{{{s}}^{{3}}{+}{2}{}{{s}}^{{2}}{+}{s}{+}{1}}\end{array}\right]$ (1)
 > $\mathrm{ultimate}≔\mathrm{FrequencyDomain}\left(\mathrm{sys}\right)$
 ${\mathrm{ultimate}}{:=}\left[{0.5000000000}{,}{6.283185308}\right]$ (2)
 > $\mathrm{Ku}≔{\mathrm{ultimate}}_{1};$$\mathrm{Tu}≔{\mathrm{ultimate}}_{2}$
 ${\mathrm{Ku}}{:=}{0.5000000000}$
 ${\mathrm{Tu}}{:=}{6.283185308}$ (3)
 > $\mathrm{sys}≔\mathrm{DynamicSystems}:-\mathrm{NewSystem}\left(\frac{{s}^{2}+a}{{s}^{3}+2{s}^{2}+s+1}\right):$
 > $\mathrm{sys}:-\mathrm{tf}$
 $\left[\begin{array}{c}\frac{{{s}}^{{2}}{+}{a}}{{{s}}^{{3}}{+}{2}{}{{s}}^{{2}}{+}{s}{+}{1}}\end{array}\right]$ (4)
 > $\mathrm{ultimate}≔\mathrm{FrequencyDomain}\left(\mathrm{sys}\right)$
 ${\mathrm{ultimate}}{:=}\left[\frac{{1}}{{-}{1}{+}{a}}{,}{2}{}{\mathrm{π}}\right]$ (5)
 > $\mathrm{Ku}≔{\mathrm{ultimate}}_{1};$$\mathrm{Tu}≔{\mathrm{ultimate}}_{2}$
 ${\mathrm{Ku}}{:=}\frac{{1}}{{-}{1}{+}{a}}$
 ${\mathrm{Tu}}{:=}{2}{}{\mathrm{π}}$ (6)
 > $\mathrm{sys}≔\mathrm{DynamicSystems}:-\mathrm{NewSystem}\left(\frac{3s+1}{{s}^{4}+2{s}^{3}+17{s}^{2}+2.1s+1}\right):$
 > $\mathrm{sys}:-\mathrm{tf}$
 $\left[\begin{array}{c}\frac{{3.}{}{s}{+}{1.}}{{{s}}^{{4}}{+}{2.}{}{{s}}^{{3}}{+}{17.}{}{{s}}^{{2}}{+}{2.100000000}{}{s}{+}{1.}}\end{array}\right]$ (7)
 > $\mathrm{ultimate}≔\mathrm{FrequencyDomain}\left(\mathrm{sys}\right)$
 ${\mathrm{ultimate}}{:=}\left[{10.17663019}{,}{1.555561040}\right]$ (8)
 > $\mathrm{Ku}≔{\mathrm{ultimate}}_{1};$$\mathrm{Tu}≔{\mathrm{ultimate}}_{2}$
 ${\mathrm{Ku}}{:=}{10.17663019}$
 ${\mathrm{Tu}}{:=}{1.555561040}$ (9)
 > $\mathrm{evalf}\left(\mathrm{Tu}\right)$
 ${1.555561040}$ (10)
 > $\mathrm{sys}≔\mathrm{DynamicSystems}:-\mathrm{NewSystem}\left(\frac{3s+a}{{s}^{4}+2{s}^{3}+17{s}^{2}+bs+1}\right):$
 > $\mathrm{sys}:-\mathrm{tf}$
 $\left[\begin{array}{c}\frac{{3}{}{s}{+}{a}}{{{s}}^{{4}}{+}{2}{}{{s}}^{{3}}{+}{17}{}{{s}}^{{2}}{+}{b}{}{s}{+}{1}}\end{array}\right]$ (11)
 > $\mathrm{ultimate}≔\mathrm{FrequencyDomain}\left(\mathrm{sys}\right)$
 ${\mathrm{ultimate}}{:=}\left[{-}\frac{{2}}{{9}}{}{a}{-}\frac{{1}}{{3}}{}{b}{+}\frac{{17}}{{3}}{+}\frac{{1}}{{9}}{}\sqrt{{4}{}{{a}}^{{2}}{+}{12}{}{a}{}{b}{-}{204}{}{a}{+}{2565}}{,}\frac{{\mathrm{π}}{}\sqrt{{2}}{}\sqrt{{3}}}{\sqrt{\left|\frac{{a}{}\sqrt{{4}{}{{a}}^{{2}}{+}{12}{}{a}{}{b}{-}{204}{}{a}{+}{2565}}{-}{2}{}{{a}}^{{2}}{-}{3}{}{a}{}{b}{+}{51}{}{a}{+}{9}}{{-}{51}{-}{2}{}{a}{+}\sqrt{{4}{}{{a}}^{{2}}{+}{12}{}{a}{}{b}{-}{204}{}{a}{+}{2565}}}\right|}}\right]{,}\left[{-}\frac{{2}}{{9}}{}{a}{-}\frac{{1}}{{3}}{}{b}{+}\frac{{17}}{{3}}{-}\frac{{1}}{{9}}{}\sqrt{{4}{}{{a}}^{{2}}{+}{12}{}{a}{}{b}{-}{204}{}{a}{+}{2565}}{,}\frac{{\mathrm{π}}{}\sqrt{{2}}{}\sqrt{{3}}}{\sqrt{\left|\frac{{a}{}\sqrt{{4}{}{{a}}^{{2}}{+}{12}{}{a}{}{b}{-}{204}{}{a}{+}{2565}}{+}{2}{}{{a}}^{{2}}{+}{3}{}{a}{}{b}{-}{51}{}{a}{-}{9}}{{51}{+}{2}{}{a}{+}\sqrt{{4}{}{{a}}^{{2}}{+}{12}{}{a}{}{b}{-}{204}{}{a}{+}{2565}}}\right|}}\right]$ (12)
 > $\mathrm{ultimate}≔{\left(\mathrm{eval}\left(\left[\mathrm{ultimate}\right],\left[a=1,b=2.1\right]\right)\right)}_{[]}$
 ${\mathrm{ultimate}}{:=}\left[{10.17663019}{,}{0.6350551356}{}\sqrt{{2}}{}\sqrt{{3}}\right]{,}\left[{-}{0.687741301}{,}{18.91631017}{}\sqrt{{2}}{}\sqrt{{3}}\right]$ (13)
 > $\mathrm{Ku}≔{{\mathrm{ultimate}}_{1}}_{1};$$\mathrm{Tu}≔{{\mathrm{ultimate}}_{1}}_{2}$
 ${\mathrm{Ku}}{:=}{10.17663019}$
 ${\mathrm{Tu}}{:=}{0.6350551356}{}\sqrt{{2}}{}\sqrt{{3}}$ (14)
 > $\mathrm{evalf}\left(\mathrm{Tu}\right)$
 ${1.555561041}$ (15)
 > $\mathrm{sys}≔\mathrm{DynamicSystems}:-\mathrm{NewSystem}\left(\frac{{s}^{2}+4.5}{{s}^{4}+0.5{s}^{3}+21{s}^{2}+s+1}\right):$
 > $\mathrm{sys}:-\mathrm{tf}$
 $\left[\begin{array}{c}\frac{{{s}}^{{2}}{+}{4.500000000}}{{{s}}^{{4}}{+}{0.5000000000}{}{{s}}^{{3}}{+}{21.}{}{{s}}^{{2}}{+}{s}{+}{1.}}\end{array}\right]$ (16)
 > $\mathrm{ultimate}≔\mathrm{FrequencyDomain}\left(\mathrm{sys}\right)$
 ${\mathrm{ultimate}}{:=}\left[{14.79999999}{,}{4.442882940}\right]$ (17)
 > $\mathrm{sys}≔\mathrm{DynamicSystems}:-\mathrm{NewSystem}\left(\frac{{s}^{2}+a}{{s}^{4}+0.5{s}^{3}+21{s}^{2}+bs+c}\right):$
 > $\mathrm{sys}:-\mathrm{tf}$
 $\left[\begin{array}{c}\frac{{{s}}^{{2}}{+}{a}}{{{s}}^{{4}}{+}{0.5000000000}{}{{s}}^{{3}}{+}{21.}{}{{s}}^{{2}}{+}{b}{}{s}{+}{c}}\end{array}\right]$ (18)
 > $\mathrm{ultimate}≔\mathrm{FrequencyDomain}\left(\mathrm{sys}\right)$
 ${\mathrm{ultimate}}{:=}\left[{-}\frac{{4}{}{{b}}^{{2}}{-}{42}{}{b}{+}{c}}{{a}{-}{2}{}{b}}{,}\frac{{\mathrm{π}}{}\sqrt{{2}}}{\sqrt{\left|{b}\right|}}\right]$ (19)
 > $\mathrm{DynamicSystems}:-\mathrm{RouthTable}\left(\mathrm{denom}\left({\mathrm{sys}:-\mathrm{tf}}_{1,1}\right),s,\mathrm{stablecondition}=\mathrm{true}\right)$
 ${0}{<}{c}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{0}{<}{21}{-}{2}{}{b}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{0}{<}{2}{}{b}{-}\frac{{c}}{{21}{-}{2}{}{b}}$ (20)
 > $\mathrm{ultimate}≔\mathrm{eval}\left(\mathrm{ultimate},\left[a=4.5,b=1,c=1\right]\right)$
 ${\mathrm{ultimate}}{:=}\left[{14.80000000}{,}{\mathrm{π}}{}\sqrt{{2}}\right]$ (21)

References

 [1] K. J. Astrom and T. Hagglund, Advanced PID Control, ISA, 2006.
 [2] A. O'Dwyer, Handbook of PI and PID Controller Tuning Rules, 2nd Edition, Imperial College Press, 2006.