kalman filter in matlab

2 ビュー (過去 30 日間)
Nana Fernandes
Nana Fernandes 2017 年 4 月 14 日
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 件)

カテゴリ

Help Center および File ExchangeOnline Estimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by