c2d simulink

11 visualizaciones (últimos 30 días)
M Brodecki
M Brodecki el 11 de Mzo. de 2012
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

Respuesta aceptada

M Brodecki
M Brodecki el 3 de Abr. de 2012
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.

Más respuestas (1)

Abhishek Dutta
Abhishek Dutta el 3 de Abr. de 2012
I have the same problem, whats the replacement for 1)c2d and 2)ode45 in embedded matlab?

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by