{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

RLSE2ndOrderTF - K ThetaHat = ThetaHat K(yk H*ThetaHat P...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% 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 = RLSE2ndOrderTF(In) f ukm1 = In(1); ukm2 = In(2); % Y = [y(k) y(k-1) y(k-2)] yk = In(3); ykm1 = In(4); % U = [u(k) u(k-1) u(k-2)] % ykm2 = In(5); Lamda = In(6); ThetaHat(:,1)= In(7:11); % Previous estimator state [a1 a2 b0 b1 c]' P = [In(12:16) In(17:21) In(22:26) In(27:31) In(32:36)]; % three columns of P P P = (P + P')/2; % ensure that P is symmetrical s H = [-ykm1 -ykm2 ukm1 ukm2 1]; K = P*H'/(H*P*H'+Lamda);
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: K ThetaHat = ThetaHat + K*(yk - H*ThetaHat); P = (P - K*H*P)/Lamda; P % Check on the bounds of parameters so that the estimated values are not ridiculous a1 = ThetaHat(1); a2 = ThetaHat(2); b0 = ThetaHat(3); b1 = ThetaHat(4); c = ThetaHat(5); %if (a1 < -2) | (a1 > -1), a1 = -2; end; %if (a2 > 1) | (a2 < a1-1) | (a2 < -a1-1), a2 = 0.5; end; if (a1 < -2.0), a1 = -1.0; end; i ThetaHat = [a1; a2; b0; b1; c]; T Out = [ThetaHat; P(:,1); P(:,2); P(:,3); P(:,4); P(:,5)];...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern