Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Lets assume we have a system model:

tf = TransferFunctionModel[{{
     (s^3 - 2.841 s^2 + 2.875 s - 1.004)/
      (s^3 - 2.417 s^2 + 2.003 s - 0.5488)}}, s];
ss = StateSpaceModel[tf]

enter image description here

My question is:

How to calculate $H_2$ and $H_\infty$ norms of this system or transfer function? Is there a built-in function for it?

Some notes:

  • In MATLAB norm(ss,2) or norm(ss,inf) does that.
  • Mathematical calculations can be done as in this link.

From the LyapunovSolve examples one can compute the $H_2$ norm of an asymptotically stable continuous-time system as below:

{a, b, c} = {{{-1, 2, 3}, {0, -2, 2}, {0, 0, -3}},
             {{1, 1}, {1, 1}, {1, 1}},
             {{1, 1, 1}, {1, 1, 1}}};

x = LyapunovSolve[a, -b.Transpose[b]];
h2norm = Sqrt[Tr[c.x.Transpose[c]]] // N


share|improve this question
up vote 8 down vote accepted

The $H_2$ norm can be computed as $\sqrt{\text{Trace}\left(b q b^{\dagger}\right)}$ or $\sqrt{\text{Trace}\left(c p c^{\dagger}\right)}$. Here $b$ and $c$ are the input and output matrices of $ss$, and $q$ and $p$ are the observability and controllability gramians.

However if you tried ObservabilityGramian[ss] there is an error because this particular system is unstable and hence its $H_2$ norm is $\infty$.

The $H_{\infty }$ norm can be obtained from the peak value of the the SingularValuePlot (or magnitude plot in BodePlot).


This turns out to be $\sim 5.2 db$ for this system.

enter image description here

(Unfortunately, no built-in functions yet for the norm computations.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.