MATLAB CONTROL SYSTEM TOOLBOX 9 Uživatelská příručka Strana 363

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 649
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 362
Kalman Filtering
9-55
Finally, close the sensor loop by connecting the plant output to the filter
input with positive feedback.
% Close loop around input #4 and output #2
SimModel = feedback(sys,1,4,2,1)
% Delete yv from I/O list
SimModel = SimModel([1 3],[1 2 3])
The resulting simulation model has as inputs and as outputs.
SimModel.input
ans =
'w'
'v'
'u'
SimModel.output
ans =
'y'
'y_e'
You are now ready to simulate the filter behavior. Generate a sinusoidal input
and process and measurement noise vectors and .
t = [0:100]';
u = sin(t/5);
n = length(t)
randn('seed',0)
w = sqrt(Q)*randn(n,1);
v = sqrt(R)*randn(n,1);
Now s imulate with lsim.
[out,x] = lsim(SimModel,[w,v,u]);
y = out(:,1); % true response
ye = out(:,2); % filtered response
yv = y + v; % measured response
y
v
y
v
wvu
,,
yy
e
,
u
w
v
Zobrazit stránku 362
1 2 ... 358 359 360 361 362 363 364 365 366 367 368 ... 648 649

Komentáře k této Příručce

Žádné komentáře