kalman filter in matlab
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
A = [1.1269 -0.4940 0.1129;
1.0000 0 0;
0 1.0000 0];
B = [-0.3832;
0.5919;
0.5191];
C = [1 0 0];
Plant = ss(A,[B B],C,0,-1,'inputname',{'u' 'w'},'outputname','y');
Q = 1;
R = 1;
[kalmf,L,P,M] = kalman(Plant,Q,R);
M
kalmf = kalmf(1,:);
a = A;
b = [B B 0*B];
c = [C;C];
d = [0 0 0;0 0 1];
P = ss(a,b,c,d,-1,'inputname',{'u' 'w' 'v'},'outputname',{'y' 'yv'});
sys = parallel(P,kalmf,1,1,[],[]);
SimModel = feedback(sys,1,4,2,1); % Close loop around input #4 and output #2
SimModel = SimModel([1 3],[1 2 3]); % Delete yv from I/O list
SimModel.InputName
SimModel.OutputName
src = dsp.SignalSource(xlsread('D:\ieee14\faultset.xlsx',1,'A5601:AB11201'));
u = src;
src1 = dsp.SignalSource(xlsread('D:\ieee14\faultset.xlsx',1,'A1:AB5600'));
w = src1;
src2 = dsp.SignalSource(xlsread('D:\ieee14\trainingset.xlsx',1,'A1:AB6'));
v = src2;
[out,x] = lsim(SimModel,[w,v,u]);
This is my code and im getting the following error
Error using dsp.SignalSource/horzcat
Array formation and parentheses-style indexing with objects of class 'dsp.SignalSource' is not
allowed. Use objects of class 'dsp.SignalSource' only as scalars or use a cell array.
Error in kalman15thapril (line 32)
[out,x] = lsim(SimModel,[w,v,u]);
Please help me out with this error Thanks in advance
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Online Estimation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!