c2d simulink

조회 수: 11 (최근 30일)
M Brodecki
M Brodecki 2012년 3월 11일
Hello,
I'm trying to implement a EKF in simulink. The matlab counterpart of my filter uses the c2d command to obtain the discrete time equivalent matrices. This command, however, does not work in embedded matlab file. Is there a way around this?
Kind regrads, M

채택된 답변

M Brodecki
M Brodecki 2012년 4월 3일
I already found the solution. You can use the c2d code itself in your embedded matlab file:
[m,n] = size(F); [m,nb] = size(G); s = expm([[F G]*Ts; zeros(nb,n+nb)]); Phi = s(1:n,1:n); Gamma = s(1:n,n+1:n+nb);
Alternatively an approximation can be used as presented in the paper below (page 23, equation 2.85).
ode45 can be replaced by coding your own Runge-Kutta solver in embedded matlab.

추가 답변 (1개)

Abhishek Dutta
Abhishek Dutta 2012년 4월 3일
I have the same problem, whats the replacement for 1)c2d and 2)ode45 in embedded matlab?

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by