02C Exploring LSE with MatlabSimulink

02C Exploring LSE with MatlabSimulink - Generator Scope1...

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

View Full Document Right Arrow Icon
EXPLORING OF LSE WITH MATLAB/SIMULINK Build Simulink diagram to generate system response with noise corruption (FirstOrderTFSimul.mdl) u(k) y(k) v(k) x(k) w(k) simout To Workspace Terminator 0 Slider Gain Signal Generator1 Signal Generator Scope Random Number1 Random Number 0.2 z-0.95 Discrete Transfer Fcn Chirp Signal
Background image of page 1

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

View Full DocumentRight Arrow Icon
Write a Matlab program to take data from the Simulink results and perform a LSE of the system parameters Mean of w(k) = 1 Variance of w(k) = 0.1 Mean of v(k) = 1 Variance of v(k) = 0.1 Signal 1 = 0.1 Hz square wave Signal 2 = 1 Hz sine wave Results in Scope Æ w(k) & v(k) u(k) & y(k) ab = 0.9896 0.0794 a0 = 0.9896 b0 = 0.0794 abc = 0.9311 0.2521 0.3405 a1 = 0.9311 b1 = 0.2521 c1 = 0.3405
Background image of page 2
Build another Simulink diagram to compare results (FirstOrderTFSimulCompare.mdl) u(k) y(k) v(k) x(k) w(k) Terminator 0 Slider Gain Signal Generator1 Signal
Background image of page 3

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

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

Unformatted text preview: Generator Scope1 Scope Random Number1 Random Number b1 z-a1 Discrete Transfer Fcn2 b0 z-a0 Discrete Transfer Fcn1 0.2 z-0.95 Discrete Transfer Fcn c1 Constant Chirp Signal Build aSimulink diagram to perform a Recursive Least Square Estimation (FirstOrderTF_RLSE_Simul.mdl) % Recursive least squared error estimator for a SISO system % with TF H(z) = b/(z+a); assume that there is a bias c function Out = RLSE1(In) ukm1 = In(1); % U = [u(k-1); u(k)] uk = In(2); ykm1 = In(3); % Y = [y(k-1); y(k)] yk = In(4); ThetaHat(:,1)= In(5:7); % Previous estimator state [a b c]' P = [In(8:10) In(11:13) In(14:16)]; P = (P + P')/2; Lamda = 0.98; H = [-ykm1 ukm1 1]; K = P*H'/(H*P*H'+Lamda); ThetaHat = ThetaHat + K*(yk - H*ThetaHat); P = (P - K*H*P)/Lamda; Out = [ThetaHat; P(:,1); P(:,2); P(:,3)];...
View Full Document

This note was uploaded on 04/17/2011 for the course SYS 635 taught by Professor Re during the Spring '11 term at Albany College of Pharmacy and Health Sciences.

Page1 / 5

02C Exploring LSE with MatlabSimulink - Generator Scope1...

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

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