Effacer les filtres
Effacer les filtres

kalman filter in matlab

1 vue (au cours des 30 derniers jours)
Nana Fernandes
Nana Fernandes le 14 Avr 2017
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

Réponses (0)

Catégories

En savoir plus sur Code Generation dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by