Contents

% simulation of 2nd order filter in state-space representation with
% respect to direct form II / normal form with l2 scaling of the
% system and the states
% lab4_4.m * mw * 02/21/2007

2nd order system

b = [1 2 1]; a = [1 -1.4 .74];    % numerator and denominator
h = filter(b,a,[1 zeros(1,100)]); % impulse response
b = b / sqrt(sum(h.^2));          % l2 scaling
ssr = ssr_ABCD(b,a,'DF2');     % direct form II

l2 scaling of states

T = [sqrt(6.2682) 0; 0 sqrt(6.2682)];
ssr = ssr_trans(ssr,T);

Impulse response

x = [1 zeros(1,20)];
[y,S,Sm] = ssr_filt_State(ssr,x);

Graphics - Impulse response of state variables

plot_State(Sm,ssr.form)