Finding the H infinity norm of a system

28 views (last 30 days)
Kashish Pilyal
Kashish Pilyal on 22 Aug 2022
Commented: Paul on 26 Aug 2022
I am running a system with ode45. So, I have an input array and an output. The definition of H infinity norm says that it is L2 norm of output by L2 norm of input. So I just used norm function on both arrays and divided them both. Although, the system must have the H infinity norm of 1 but it comes out to be less than 1. I have the code as:
clear all
%%
%paramters of leader vehicle
q=0; %position
v=0; %velocity
a=0; %acceleration
x_0=[q;
v;
a]; %initial conditions
t1=linspace(0,5,1000);
L1=4; %lenght of car(m)
dr=5; %gap b/w cars(m)
%parameters of second vehicle
q1=0; %position
v1=0; %velocity
a1=0; %acceleration
x_1=[q1;
v1;
a1]; %initial conditions
%initial conditions of the platoon
x=[x_0; x_1];
[t1,y1]=ode45(@code3,t1,x);
%% second step
%paramters of leader vehicle
q=0; %position
v=0; %velocity
a=1; %acceleration
x_0=[q;
v;
a]; %initial conditions
t2=linspace(5,10,1000);
%parameters of second vehicle
q1=0; %position
v1=0; %velocity
a1=0; %acceleration
x_1=[q1;
v1;
a1]; %initial conditions
%initial conditions of the platoon
x=[x_0; x_1];
[t2,y2]=ode45(@code3,t2,x);
%% third step
%paramters of leader vehicle
q=y2(end,1); %position
v=y2(end,2); %velocity
a=0; %acceleration
x_0=[q;
v;
a]; %initial conditions
t3=linspace(10,20,1000);
%parameters of second vehicle
q1=y2(end,4); %position
v1=y2(end,5); %velocity
a1=y2(end,6); %acceleration
x_1=[q1;
v1;
a1]; %initial conditions
%initial conditions of the platoon
x=[x_0; x_1];
[t3,y3]=ode45(@code3,t3,x);
%% concating
time=[t1;t2;t3];
%parameters of 1st
q_1=[y1(:,1);y2(:,1);y3(:,1)];
v_1=[y1(:,2);y2(:,2);y3(:,2)];
a_1=[y1(:,3);y2(:,3);y3(:,3)];
%parameters of 2nd
q_2=[y1(:,4);y2(:,4);y3(:,4)];
v_2=[y1(:,5);y2(:,5);y3(:,5)];
a_2=[y1(:,6);y2(:,6);y3(:,6)];
figure(1)
plot(time,q_1,time,q_2)
grid on
figure(2)
plot(time,v_1,time,v_2)
grid on
figure(3)
plot(time,a_1,time,a_2)
ylim([-2 2])
grid on
Nm=norm(a_2)/norm(a_1);

Answers (2)

Sam Chak
Sam Chak on 22 Aug 2022
Edited: Sam Chak on 26 Aug 2022
Perhaps try using hinfnorm() to compute the H∞ norm of a dynamic system.
Edit 1: Looking at your code, it seemed that what you computed was the H₂-norm, .
Here is an excerpt from the article: Interpretation of H-Infinity Norm:
Edit 2: There are some algorithms provided in Kuster's thesis: "H-infinity Norm Calculation via a State Space Formulation".
  6 Comments
Kashish Pilyal
Kashish Pilyal on 23 Aug 2022
So, can you tell me how to find the L2 norm of a vector in my case? and how does it differ from norm(a_2)?
Torsten
Torsten on 23 Aug 2022
Edited: Torsten on 25 Aug 2022
I don't know how it works here, but given a function u you get by a differential equation
du/dt = f(u,t)
and you want to calculate
sqrt( integral_{t=0}^{t=T} u(t)^2 dt )
you have to solve the additional differential equation
dU/dt = u^2, U(0) = 0
The L2-norm of u will then be
sqrt(U(end))
But when reading about the output of MATLAB's hinfnorm, this doesn't seem to be what you want:

Sign in to comment.


Paul
Paul on 25 Aug 2022
Edited: Paul on 25 Aug 2022
Following up on this comment ... Can the equations not be writen in state space form only because it's impractical to do so, or because it's not possible to do so, i.e., the system is not LTI and causal?
If the latter, then I'm not sure how the inifity norm is defined? Is there a definition?
If the former, how do you know that the infinity norm of the system is 1?
As far as computing the 2-norm of the input and output goes, I think using norm() is a reasonable approximation as long as (actually, it would be norm*sqrt(sampling period), but the sqrt(sampling period) cancels when computing the ratio)
aa) the system is BIBO stable (actually, I'm not sure if the inifnity norm is even defined for an unstable system, can't recall off hand, but even if it is, it woudn't be too useful)
a) the input has a finite 2-norm
b) the input and ouput are sampled at a fixed rate, which ode45 doesn't do with default settings
c) the output has finite 2-norm, which I think basically means the (square of the?) ouput has to at least approach zero asymptotically.
d) the simualtion is simulated long enough s.t. one can use a finite number of samples of the input and output to estimate the 2-norm of each.
Assuming that the system is LTI, and assuming that its infnity norm is 1, and assuming that the calculation of the 2-norms of the input and output are reasonably approximated, we also must bear in mind that, in general, the infinity norm of the system is NOT the ratio of the 2-norms of the output and input. Rather the infinity norm is an upper bound on this ratio, i.e.,
2-norm(y) <= inf-norm(H)*2-norm(u).
So, the obtained result might be correct after all.
  2 Comments
Kashish Pilyal
Kashish Pilyal on 26 Aug 2022
The system is non linear so I am unable to write it in state space form.
Paul
Paul on 26 Aug 2022
How is the infinity norm defined for a nonlinear system? What is the basis for the claim that the inifinity norm of the system is one?

Sign in to comment.

Categories

Find more on Programming in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!