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