{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

WienIdentification

# WienIdentification - Identification of Wiener model-c clear...

This preview shows pages 1–2. Sign up to view the full content.

% Identification of Wiener model. %% ------------------------------------------------------------------------ clear all c u=normrnd(0,2,1,400); % A white gaussian input sequence u with length %400 0 mean and standard deviation 2 ut=normrnd(0,2,1,200); %input for testing. e=normrnd(0,.2,1,400); % A white gaussian with zero mean and standart de %viation .2 with length 400. it is error term zt =zeros(1,400); a = [2.09 -2.063 1.209 -.4656 .1164 -.02975] ; % ai s b = [1 .3 -.8 .7] ; N=200; r=7; m=6; % sg = 5; % bi s % now we will get the input output data. The last 200 datapoints will be % used for training % for t = 1:400 if (t==1) z(1,t) = b(1,t)*u(1,1); y(1,t) = 5*(z(1,t)); % following was before: sinc(z(1,t))*z(1,t)^2 ;% no +e(1,t); % b(1,t)*sinc(u(1,1))*(u(1,1)^2) + e(1,t); end % (exp(.3*z(1,t))-exp(-.3*z(1,t)))/(exp(.3*z(1,t))+exp(-.3*z(1,t))) if (1<t&&t<=6) sm1 = 0; for i = 1:t-1 sm1 = sm1 + a(1,i)*z(1,t-i); % sm1 = sm1 + a(1,i)*y(1,t-i); end sm2 = 0; if(t<4) for j = 1:t sm2 = sm2 + b(1,j)*u(1,t-j+1); % sm2 = sm2 + b(1,j)*sinc(u(1,t-j+1))*(u(1,t-j+1)^2); end else for i = 1:4 sm2 = sm2 + b(1,i)*u(1,t-i+1); % sm2 = sm2 +b(1,i)*sinc(u(1,t-i+1))*(u(1,t-i+1)^2); end end z(1,t) = sm1 + sm2 ; y(1,t) =5*(z(1,t)); % following was before: sinc(z(1,t))*z(1,t)^2; %no + e(1,t); % y(1,t) = sm1+sm2 + e(1,t); end if (t>6) sm1 = 0; for i = 1:6 sm1 = sm1 + a(1,i)*z(1,t-i); % sm1 = sm1 + a(1,i)*y(1,t-i); end sm2 = 0; for i = 1:4

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}