Let us consider the second order system:

Numerical application:

w0=2;

xi=0.1;

G=tf(w0*w0,[1 2*xi*w0 w0^2]);

The norm of :

- using Matlab function norm:

norm(G,2)

- using the analytical solution (see exercise on slide 45):

sqrt(w0/4/xi)

The impulse response of :

figure

impulse(G)

The square root of the numerical intregration of the impulse response squared:

[Y,T]=impulse(G);

Z=trapz(T,Y.^2);

sqrt(Z)

except the numerical integration error, we recognize the time-domain interpretation of the norm :

The Bode response:

figure

bode(G)

The square root of the numerical integration of the frequency-domain response squared and divided by

[MAG,PHASE,W]=bode(G);

sqrt(trapz(W,MAG.^2)/pi)

except the numerical integration error, we recognize the frequency-domain interpretation of the norm :

since the frequency-domain response magnitude is an even function of .

It can be also shown that the norm is also the standard deviation of the random signal corresponding to the steady-state of the output signal when the input signal is a normalized centered white noise (the PSD (Powed spectral density) of is : 1).

To simulate such a response one have to keep in mind that is not possible to simulate a white noise on a digital computer because the variance of a white noise is infinite. We use a discrete-time approximation: the signal is sampled with a sampling period and hold over seconds on the value of a centered normal random variable . Each sample is stochatically independant from the other. Let be the variance of the this normal random variable, then the PSD of such a signal is: So to approximate a unitary withe noise, one have to choose

The sampling period must be chosen such the half sampling frequency is very big with respect to the bandwidth of the system

dt=0.01;

T=[0:dt:1000]; % the stop-time is large to simulate the steady state

U=randn(size(T))/sqrt(dt);

Y=lsim(G,U,T);

figure

plot(T,U)

hold on

plot(T,Y); legend('u(t)','y(t)')

The standard deviation of the output in steady state is computed statistically with the Matlab function std:

std(Y(10000:end)) % it is assumed that the steady steady is reached after 100s

except the numerical error:.

Now we can consider multi-input multi-output (MIMO) systems.

Let us consider a stable system with states outputs and inputs randomly generated by Matlab function rss

n=5;p=3;m=2;

G=rss(n,p,m);

The direct-feedtrough matrix of must be null otherwise its norm is infinite. It is obvious from the:

- frequency-domain interpretation : the magnitude of the frequency-domain response nevers goes back to 0 in high frequency when . So the integral over frequency of the magnitude squared is always infinite,
- stochastic interpretation: when the white noise on the input signal is transmitted to the output and the variance of a white noise is always infinite.

G.d=0*G.d;

The norm of :

- using Matlab function norm:

norm(G,2)

- using the analytical solution (see slide 43):

From the time-domain definition of the norm of a MIMO system defined by the state-space matrices , , :

Let (the observability grammian) then is solution of the Lyapunov equation: and :

Qo=lyap(G.a',G.c'*G.c)

sqrt(trace(G.b'*Qo*G.b))

The impulse response of :

figure

impulse(G)

Computation of :

[Y,T]=impulse(G);

size(Y)

is the matrix of the impulse responses:

Y(i,j,k) is the value at the time T(i) of the response of the j-th output to an single impulse on the k-th input.

Z=zeros(length(Y),1);

for j=1:p,for k=1:m,Z=Z+Y(:,j,k).^2;end;end;

The square root of the numerical intregration of :

sqrt(trapz(T,Z))

except the numerical integration integration errors, we found .

The Bode response:

figure

bode(G)

[MAG,PHASE,W]=bode(G);

size(MAG)

is the matrix of the frequency-domaine responses:

MAG(i,j,k) is the value at the time T(k) of the magnitude of transfer from the j-th input to the i-th output

Z=zeros(length(MAG),1);

for i=1:p,for j=1:m,Z=Z+squeeze(MAG(i,j,:).^2);end;end;

sqrt(trapz(W,Z)/pi)

except the numerical integration integration errors, we found again .

It is the direct extension of the approach presented for SISO systems. One should keep in mind that the m normalized centered white noises on the m inputs of the system must be stochastically independent from each other. Then the results is:

.

In the following Matlab sequence, since is generated randomly:

- the sampling period is computed such that the sampling frequency is 100 times the highest eigenvalue magnitude (in ),
- the steaty state is assumed to start at Tst equal to 10 times the higest time-constant of ,
- the time range to compute the variance in steady state considers 10000 samples after Tst.

dt=2*pi/(100*max(abs(eig(G))))

Tst=10/(min(abs(eig(G))))

Tfin=Tst+10000*dt;

T=[0:dt:Tfin];

U=[];

for i=1:m, U=[U;randn(size(T))/sqrt(dt)];end;

Y=lsim(G,U,T);

sig2=0;

for i=1:p,sig2=sig2+var(Y(end-10000:end,i));end;

sqrt(sig2)