Kalman filter for input estimation

조회 수: 11 (최근 30일)
Piobaireachd
Piobaireachd 2024년 1월 20일
편집: Paul 2024년 1월 21일
I'm trying to develop a Kalman filter (using the control systems toolbox) to estimate the input force to a 2DOF mechanical system. I've implemented the problem augmenting the original plant state matrix with the unknown force f as an additional state. The real force is unknown, but in the application is a superposition of sinusoids or constant. I'm struggling in how to implement its own dynamics
Given the original plant xdot=Ax+Bf+Gw, the augmented states are xaug=[x; f] and the new matrices
Aaug = [ A B; 0 0 ] Baug = [0; 0] Gaug=[G; I]
Caug = [C D]; Daug=0
That is for zero-order dynamics and with the force subject to random noise. However, this realization is not minimal and the command kalman doesn't work. The lines of code for the rest of the problem are
sys=ss(Aaug,Baug,Caug,Daug,'InputName',{'u' 'w'},'OutputName','yt')
[kalmf,L,~,Mx,Z] = kalman(sys,Qn,Rn);
kalmf.InputName = {'u' 'y'};
kalmf.OutputName = {'ye'};
vIn = sumblk('y=yt+v', size(Caug,1));
TotalPlant = connect(sys,vIn,kalmf,{inputName{:}, sensorNoiseName{:}},{'yt','ye'});
How could I implement this problem?
  댓글 수: 1
Benjamin Thompson
Benjamin Thompson 2024년 1월 21일
편집: Benjamin Thompson 2024년 1월 21일
Please provide more code that defines al variables including A, B, G, I. Try looking in the documentation, type "doc kalman". It looks like you should call the kalman function using the "TotalPlant" system rather than the "sys" system. Without more code to reproduce your problem it is hard to know.

댓글을 달려면 로그인하십시오.

답변 (1개)

Paul
Paul 2024년 1월 21일
편집: Paul 2024년 1월 21일
The steady-state Kalman filter as implemented by kalman requires that the augmented realization be detectable, as opposed to minimal. Offhand, it's not clear why it wouldn't be detectable, assuming the original system is detectable and is controllable (maybe only stabilizable?) from f (I think that would be the requirement, but not 100% sure). Need to see all of the matrices involved to say for sure what the issue is for this particular problem.
Suggest rechecking the formulation of the augmented system. The original system is
xdot = A*x + B*f + G*w
y = C*x + D*f
The model for f looks like it's intended to be (is this correct?):
fdot = wf
where wf is a vector of additional external noise inputs.
Subbing in we have
[xdot;fdot] == [A B;0 0]*[x;f] + [G 0;0 I]*[w;wf]
y = [C D]*[x;f] + 0*[w;wf]
Gaug should be a block diagonal matrix.
In these lines, Baug should be replaced with Gaug.
sys=ss(Aaug,Baug,Caug,Daug,'InputName',{'u' 'w'},'OutputName','yt')
[kalmf,L,~,Mx,Z] = kalman(sys,Qn,Rn);
The name of the first input variable ('u') seems suspicious.
Feel free to upload all the variable involved in this problem in .mat file (use the paperclip icon on the Insert menu) for further investigation if necessary.

카테고리

Help CenterFile Exchange에서 State-Space Control Design and Estimation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by