SomeTestForWienIdent

SomeTestForWienIdent - sm2 = sm2 + b(1,j)*u(1,t-j+1); % sm2...

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

View Full Document Right Arrow Icon
% Some Tests for Identification of Wiener model. Obtaining the inverse of % the filter. that is obtain inputs from outputs. . %% ------------------------------------------------------------------------ clear all u=normrnd(0,2,1,400); % A white gaussian input sequence u with length %400 0 mean and standard deviation 2 uback = zeros(1,400); 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 .8 .3 .4] ; N=200; r=7; m=6; % 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) = z(1,t)^3; % 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 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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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) =z(1,t)^3; % 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&gt;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 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 z(1,t) = sm1 + sm2; y(1,t) =z(1,t)^3; % following was before: sinc(z(1,t))*z(1,t)^2; % no + e(1,t); % y(1,t) = sm1 + sm2 + e(1,t); end end %% Do the inverse of all of these processes above. i.e find the inverse of %% the filter. thus obtaining input from output. . % for t =201:400 sm1 = 0; for i = 1:6 sm1 = sm1 + a(1,i)*z(1,t-i); end sm2 = 0; for j = 1:3 sm2 = sm2 + b(1,j+1)*u(1,t-j); end uback(1,t) = z(1,t) - sm1 - sm2; end e %% %...
View Full Document

Page1 / 2

SomeTestForWienIdent - sm2 = sm2 + b(1,j)*u(1,t-j+1); % sm2...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online