# How to calculate the $H_2$ and $H_\infty$ norms of TransferFunctionModels or StateSpaceModels?

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] 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


6.12917

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).

SingularValuePlot[tf]


This turns out to be $\sim 5.2 db$ for this system. (Unfortunately, no built-in functions yet for the norm computations.)

• what kind of transpose/inverse is it? – Zero Aug 22 '16 at 20:09
• ConjugateTranspose – Suba Thomas Aug 22 '16 at 20:18
{"ft_lang_label":"__label__en","ft_lang_prob":0.69547313,"math_prob":0.99937457,"size":737,"snap":"2021-21-2021-25","text_gpt3_token_len":286,"char_repetition_ratio":0.09686221,"word_repetition_ratio":0.0,"special_character_ratio":0.43554953,"punctuation_ratio":0.2513369,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.999861,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,3,null,3,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-05-17T14:16:42Z\",\"WARC-Record-ID\":\"<urn:uuid:d681e365-8df5-43bc-acd2-f63d5e6d3a16>\",\"Content-Length\":\"166723\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:4ccd2fa8-a8fd-4826-8bfb-3ff7182a330b>\",\"WARC-Concurrent-To\":\"<urn:uuid:0b7ea4e4-a431-42f4-ac84-ad6da416e741>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://mathematica.stackexchange.com/questions/36965/how-to-calculate-the-h-2-and-h-infty-norms-of-transferfunctionmodels-or-sta/36966\",\"WARC-Payload-Digest\":\"sha1:WOGSEJ7RWKBYBXXVR5Y2TA4L3WP4QIXY\",\"WARC-Block-Digest\":\"sha1:23J3WDJGVFFEH6KCUDN6YLNGJCFGDEZT\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-21/CC-MAIN-2021-21_segments_1620243991772.66_warc_CC-MAIN-20210517115207-20210517145207-00560.warc.gz\"}"}