How to calculate a Infinity norm (H) of a dynamic system?

Viewed 28

I am trying to get the Infinity Norm (H) of two dynamic systems: the first is a noncontrolled system and the second is a controlled system. I have plotted the time and frequency response of the two models on Jupyter Notebook, as follows:

enter image description here enter image description here

Nevertheless, I would like to calculate the infinity_norm (H_infinity) and the H2_norm. Does anyone know how can I do it? Or someone can suggest me any command on python to do that? I thought that the H_infinity norm is the peak of the spectrum, but I am not sure.

1 Answers

As explained here, for a SISO (single-input, single-output) system, the infinity norm is the maximum gain (maximum ratio of output/input amplitudes) over the full range of frequencies. However, for a MIMO system it's not that simple.

The Python Control Systems Library has a function control.hinfsyn which computes the H-infinity controller and infinity norm of the closed loop system. But I don't know any ready-made functions to compute just the infinity norm of a given system.

Incidentally, MATLAB does have such a function:

Inf_norm = norm(G,'inf');

However, you can also manually calculate the infinity norm using the control.freqresp function and singular value decomposition using numpy.linalg.svd:

import numpy as np
from control import tf

# Define LTI system
num = [[[3], [2]], [[-2], [3]]]
den = [[[100, 10, 1], [1, 1]], [[20, 1], [5, 1]]]
sys = tf(num, den)

# Calculate frequency response over a wide range of frequencies
omega = np.logspace(-4, 2, 1001)
H = sys(omega * 1j)
assert(H.shape == (2, 2, 1001))

# Calculate all the singular values
singular_values = [np.linalg.svd(H[..., i], compute_uv=False)
                   for i in range(len(omega))]

# Find the highest
print(np.vstack(singular_values).max())

# Output:
# 4.082899055432674

This is the same result I get with MATLAB norm function.

Related