System identification
identification of IIR systems least-square approach ** lab13_5.m * mw * 05/08/2007
Contents
Input parameters
Ns = 8; % IIR system model order K = 1000; % simulated length of system response Nh = 20; % computed length of impulse responses for comparison
System under test and filtering
a = [1 -.71 .25]; % denominator coefficients b = .5775*[1 0 .81]; % numerator coefficients % a = [1 -.71 .25]; % denominator coefficients % b = .24192*[1 2 1]; % numerator coefficients b = [.2317 .3378 .5297 .3378 .2317]; a = [1 -.3396 1.2275 -.3119 .2964]; h = impz(b,a,Nh); % impulse response x = randn(1,K); % white noise input signal y = filter(b,a,x); % simulated output signal of system under test
ARMA model
u = zeros(size(y)); e2 = sum(y.^2); % 1st step MA [bM,TSE] = design_fir_model(x,y-u,Ns); v = conv(bM,x); v = v(1:K); % 1st step AR [aM,TSE] = design_fir_model(y,y-v,Ns); u = conv(aM,y); u = u(1:K); e2 = sum((y-u-v).^2); fprintf('lab13_5 IIR system identification \n') fprintf('(1) TSE = %g\n',e2); % analyse system model a1 = 1-aM(1); bM = bM/a1; aM = -aM/a1; aM(1) = 1; fvtool(b,a,bM,aM) hh = impz(bM,aM,Nh); fprintf('(1) TSE of impulse response %10f8\n',sum((h-hh).^2))
lab13_5 IIR system identification (1) TSE = 11.6149 (1) TSE of impulse response 0.0119918