Ustabil eksempel

Sigurd Skogestad ((no email))
Thu, 27 Feb 1997 17:31:41 +0100

Hallo Truls,

Her er et PI eksempel for stabil prosess.

-Sigurd

% ExplX2_1.m, EXTRA example,
% PI control of unstable plant

% G(s) = 1/(s-1)
%
G=nd2sys([1],[1 -1]); %Plant

K = nd2sys([1.8 1],[1 0],2.4); % PI-controller (which is almost identical to
% the S/KS H-infinity controller obtained with the weight in Table 2.3:
% M=1.5; wb=10; Wp = nd2sys([1/M wb], [1 1.e-6]); Wu=1; )

L = mmult(G,K);
s = minv(madd(1,L));
t = msub(1,s);

% Step response
[A,B,C,D]=unpck(t);[y1,x,ty]=step(A,B,C,D);
%Input signal
[A,B,C,D]=unpck(mmult(K,s)); [u1,x]=step(A,B,C,D,1,ty);
figure(1);clf;
plot(ty,y1,ty,u1,'--')

% Bode plots of L, S, T
omega=logspace(-1,2,31);
L_f = frsp(L,omega);
s_f = frsp(s,omega);
t_f = frsp(t,omega);
figure(2);clf;
vplot('bode_l',[.1 100,.1,5],[.1,100,-300,200],L_f,s_f,t_f,1,'w:')

hinfnorm(s) % no peak in S
hinfnorm(t) % peak in T of 1.4 at frequency 1.26 rad/s

% Summary:
% For unstable plants the peak in T is usually larger and at a lower
% frequency than that for S, and this is confirmed in this example.
% Note that the opposite is usually true for a stable plant.