 NormH2 - Maple Help

DynamicSystems

 NormH2
 Compute the H2 norm of a linear system Calling Sequence NormH2(sys) Parameters

 sys - System; system object opts - (optional) equation(s) of the form option = value; specify options for the NormH2 command Options

 • checkstability = truefalse

True means check whether the system is stable; if it is not stable, an error occurs. False means skip the check. The default is true. Description

 • The NormH2 command computes the H2 norm of a linear system sys. Both continuous-time and discrete-time systems, and both single-input single-output (SISO) and multiple-input multiple-output (MIMO) systems are supported. Continuous-time

 • For a stable SISO linear system with transfer function $H\left(s\right)$, the H2 norm is defined in the frequency domain as:
 ${\mathrm{‖H‖}}_{2}=\sqrt{\frac{{{\int }}_{-\mathrm{\infty }}^{\mathrm{\infty }}{\left|H\left(j\mathrm{\omega }\right)\right|}^{2}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}\mathrm{\omega }}{2\mathrm{\pi }}}$
 • For a MIMO linear system with transfer function Matrix $H\left(s\right)$, the definition of H2 norm in the frequency domain is generalized to:
 ${\mathrm{‖H‖}}_{2}=\sqrt{\frac{{{\int }}_{-\mathrm{\infty }}^{\mathrm{\infty }}\mathrm{Trace}\left({H\left(j\mathrm{\omega }\right)}^{\mathrm{Typesetting}:-\mathrm{_Hold}\left(\left[\mathrm{%H}\right]\right)}·H\left(j\mathrm{\omega }\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}\mathrm{\omega }}{2\mathrm{\pi }}}$
 where ${A}^{\mathrm{Typesetting}:-\mathrm{_Hold}\left(\left[\mathrm{%H}\right]\right)}$ is the Hermitian transpose of Matrix A.
 • In the time domain, the H2 norm of a transfer function is calculated assuming that the stable transfer function $H\left(s\right)$ has a state-space representation:
 $\stackrel{.}{x}=\mathrm{Ax}+\mathrm{Bw}$
 $y=\mathrm{Cx}$
 so that $H\left(s\right)=\frac{Y\left(s\right)}{W\left(s\right)}$ and $H\left(s\right)=C$. ${\left(\mathrm{sI}-A\right)}^{-1}$. $B$.
 where the feedforward matrix $\mathrm{D}=0$ is necessary for the H2 norm to be finite. It follows that, for non-strictly-causal continuous-time linear time-invariant (LTI) systems ($\mathrm{D}\ne 0$), the H2 norm is infinite.
 From the above definitions, it can be demonstrated that the H2 norm of a continuous-time LTI is equivalent to:
 ${\mathrm{‖H‖}}_{2}=\sqrt{\mathrm{Trace}\left(C·P·{C}^{T}\right)}$
 where the Matrix $P\succcurlyeq 0$ is calculated by solving a continuous Lyapunov equation:
 $A·P+P·{A}^{T}+B·{B}^{T}=0$ Discrete-time

 • In the frequency domain, the H2 norm of a discrete-time LTI system is defined by:
 ${\mathrm{‖H‖}}_{2}=\sqrt{\frac{{{\int }}_{-\mathrm{\infty }}^{\mathrm{\infty }}\mathrm{Trace}\left({H\left({ⅇ}^{j\mathrm{\omega }}\right)}^{\mathrm{Typesetting}:-\mathrm{_Hold}\left(\left[\mathrm{%H}\right]\right)}·H\left({ⅇ}^{j\mathrm{\omega }}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}\mathrm{\omega }}{2\mathrm{\pi }}}$
 where ${A}^{\mathrm{Typesetting}:-\mathrm{_Hold}\left(\left[\mathrm{%H}\right]\right)}$ is the Hermitian transpose of Matrix A.
 • In the time domain, the H2 norm of a transfer function is calculated assuming that the stable transfer function $H\left(z\right)$ has a state-space representation:
 $x\left(k+1\right)=\mathrm{Ax}\left(k\right)+\mathrm{Bw}\left(k\right)$
 $y\left(k\right)=\mathrm{Cx}\left(k\right)+\mathrm{Dw}\left(k\right)$
 so that $H\left(z\right)=C$. ${\left(\mathrm{zI}-A\right)}^{-1}$. $B+\mathrm{D}$.
 From the above definitions, it can be demonstrated that the H2 norm of a discrete-time LTI is equivalent to:
 ${\mathrm{‖H‖}}_{2}=\sqrt{\mathrm{Trace}\left(C·P·{C}^{T}+\mathrm{D}·{\mathrm{D}}^{T}\right)}$
 where the Matrix $P\succcurlyeq 0$ is calculated by solving a discrete Lyapunov equation:
 $A·P·{A}^{T}-P+B·{B}^{T}=0$
 • For both continuous and discrete-time systems, the H2 norm is finite if the LTI system is asymptotically stable. It follows that for unstable systems, the H2 norm is infinite.
 • A deterministic interpretation of the H2 norm is that it measures the energy of the impulse response of the LTI system.
 • A stochastic interpretation of the H2 norm is that it measures the energy of the output response to unit white Gaussian noise inputs. A white noise process $w\left(t\right)$ has an expected or mean value $𝔼\left(w\left(t\right)\right)=0$ and covariance matrix $𝔼\left(w\left(t\right)·{w\left(t+\mathrm{\tau }\right)}^{T}\right)=𝕀·\delta \left(\mathrm{\tau }\right)$, where $𝕀$ is the Identity Matrix and $\mathrm{\delta }$ is the Dirac delta function. It follows that the H2 norm is equivalent to: ${\mathrm{‖H‖}}_{2}=\sqrt{\mathrm{Trace}\left(\mathrm{Covariance}\left('\mathrm{sys}',𝕀\right)\right)}$ from the interpretation above and DynamicSystems[Covariance]. Examples

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

Example 1 : Find the H2 norm of a system with discrete-time transfer function shown below.

 > $\mathrm{sys1}≔\mathrm{TransferFunction}\left(\frac{10\left(2z+1\right)}{10{z}^{2}+2z+5},\mathrm{discrete},\mathrm{sampletime}=0.1\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{sys1}\right)$
 $\left[\begin{array}{l}{\mathbf{Transfer Function}}\\ {\mathrm{discrete; sampletime = .1}}\\ {\mathrm{1 output\left(s\right); 1 input\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({z}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y1}}{}\left({z}\right)\right]\\ {{\mathrm{tf}}}_{{1}{,}{1}}{=}\frac{{20}{}{z}{+}{10}}{{10}{}{{z}}^{{2}}{+}{2}{}{z}{+}{5}}\end{array}\right$ (1)
 > $\mathrm{h2norm1}≔\mathrm{NormH2}\left(\mathrm{sys1}\right)$
 ${\mathrm{h2norm1}}{≔}{2.46238673166698}$ (2)

Example 2 : Find the H2 norm of a continuous state-space MIMO system.

 > $\mathrm{sys2}≔\mathrm{StateSpace}\left(⟨⟨-5,3⟩|⟨3,-4⟩⟩,⟨⟨2,3⟩|⟨1,1⟩⟩,⟨⟨1,-2⟩|⟨\frac{1}{2},1⟩⟩,⟨⟨0,0⟩|⟨0,0⟩⟩\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{sys2}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{2 output\left(s\right); 2 input\left(s\right); 2 state\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({t}\right){,}{\mathrm{u2}}{}\left({t}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y1}}{}\left({t}\right){,}{\mathrm{y2}}{}\left({t}\right)\right]\\ {\mathrm{statevariable}}{=}\left[{\mathrm{x1}}{}\left({t}\right){,}{\mathrm{x2}}{}\left({t}\right)\right]\\ {\mathrm{a}}{=}\left[\begin{array}{cc}{-5}& {3}\\ {3}& {-4}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{cc}{2}& {1}\\ {3}& {1}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{cc}{1}& \frac{{1}}{{2}}\\ {-2}& {1}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{cc}{0}& {0}\\ {0}& {0}\end{array}\right]\end{array}\right$ (3)
 > $\mathrm{h2norm2}≔\mathrm{NormH2}\left(\mathrm{sys2}\right)$
 ${\mathrm{h2norm2}}{≔}{2.52637601270590}$ (4)

Example 3 : Find the H2 norm of the following discrete system.

 > $\mathrm{sys3}≔\mathrm{Coefficients}\left(\left[1,-2.841,2.875,-1.004\right],\left[1,-2.417,2.003,-0.5488\right],\mathrm{discrete},\mathrm{sampletime}=0.1\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{sys3}\right)$
 $\left[\begin{array}{l}{\mathbf{Coefficients}}\\ {\mathrm{discrete; sampletime = .1}}\\ {\mathrm{1 output\left(s\right); 1 input\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({z}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y1}}{}\left({z}\right)\right]\\ {{\mathrm{num}}}_{{1}{,}{1}}{=}\left[{1}{,}{-2.841}{,}{2.875}{,}{-1.004}\right]\\ {{\mathrm{den}}}_{{1}{,}{1}}{=}\left[{1}{,}{-2.417}{,}{2.003}{,}{-0.5488}\right]\end{array}\right$ (5)
 > $\mathrm{h2norm3}≔\mathrm{NormH2}\left(\mathrm{sys3}\right)$
 ${\mathrm{h2norm3}}{≔}{1.24382062647607}$ (6)

Example 4: Find the H2 norm of the system given by the following differential equation.

 > $\mathrm{sys4}≔\mathrm{DiffEquation}\left(\mathrm{diff}\left(\mathrm{diff}\left(x\left(t\right),t\right),t\right)=-10x\left(t\right)-\mathrm{diff}\left(x\left(t\right),t\right)+w\left(t\right),\left[w\left(t\right)\right],\left[x\left(t\right)\right]\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{sys4}\right)$
 $\left[\begin{array}{l}{\mathbf{Diff. Equation}}\\ {\mathrm{continuous}}\\ {\mathrm{1 output\left(s\right); 1 input\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{w}{}\left({t}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{x}{}\left({t}\right)\right]\\ {\mathrm{de}}{=}\left[\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right){=}{-}{10}{}{x}{}\left({t}\right){-}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}{}\left({t}\right){+}{w}{}\left({t}\right)\right]\end{array}\right$ (7)
 > $\mathrm{h2norm4}≔\mathrm{NormH2}\left(\mathrm{sys4}\right)$
 ${\mathrm{h2norm4}}{≔}{0.223606797749979}$ (8)

Example 5 : Find the H2 norm of a non-strictly-causal continuous state-space MIMO system.

 > $\mathrm{sys5}≔\mathrm{StateSpace}\left(⟨⟨-5,3⟩|⟨3,-4⟩⟩,⟨⟨2,3⟩|⟨1,1⟩⟩,⟨⟨1,-2⟩|⟨\frac{1}{2},1⟩⟩,⟨⟨2,1⟩|⟨3,7⟩⟩\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{sys5}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{2 output\left(s\right); 2 input\left(s\right); 2 state\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({t}\right){,}{\mathrm{u2}}{}\left({t}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y1}}{}\left({t}\right){,}{\mathrm{y2}}{}\left({t}\right)\right]\\ {\mathrm{statevariable}}{=}\left[{\mathrm{x1}}{}\left({t}\right){,}{\mathrm{x2}}{}\left({t}\right)\right]\\ {\mathrm{a}}{=}\left[\begin{array}{cc}{-5}& {3}\\ {3}& {-4}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{cc}{2}& {1}\\ {3}& {1}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{cc}{1}& \frac{{1}}{{2}}\\ {-2}& {1}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{cc}{2}& {3}\\ {1}& {7}\end{array}\right]\end{array}\right$ (9)

Since the H2 norm is infinite, an error message is displayed.

 > $\mathrm{h2norm5}≔\mathrm{NormH2}\left(\mathrm{sys5}\right)$

Example 6: Find the H2 norm of an unstable system given by the continuous transfer function G(s).

 > $\mathrm{sys6}≔\mathrm{TransferFunction}\left(\frac{4s+3}{5{s}^{4}+7{s}^{3}+4{s}^{2}+3s+1}\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{sys6}\right)$
 $\left[\begin{array}{l}{\mathbf{Transfer Function}}\\ {\mathrm{continuous}}\\ {\mathrm{1 output\left(s\right); 1 input\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({s}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y1}}{}\left({s}\right)\right]\\ {{\mathrm{tf}}}_{{1}{,}{1}}{=}\frac{{4}{}{s}{+}{3}}{{5}{}{{s}}^{{4}}{+}{7}{}{{s}}^{{3}}{+}{4}{}{{s}}^{{2}}{+}{3}{}{s}{+}{1}}\end{array}\right$ (10)

Since the H2 norm is infinite, an error message is displayed.

 > $\mathrm{h2norm6}≔\mathrm{NormH2}\left(\mathrm{sys6}\right)$ Compatibility

 • The DynamicSystems[NormH2] command was introduced in Maple 18.