Converting continuous time to discrete time with zero order hold
Afficher commentaires plus anciens
I am having trouble trying to figure out c2d. I have a continuous time system x_dot = Ac*x + Bc*u. y = Cx + Du
I need to convert this into a discrete time system with a zero order hold.
Also it can only be done in matlab. I am not allowed to use simulink.
%initial input
Ac = [0 0 0 1 0 0;
0 0 0 0 1 0;
0 0 0 0 0 1;
-2 1 0 -1.6 0.8 0;
1 -2 1 0.8 -1.6 0.8;
0 1 -1 0 0.8 -0.8];
Bc = [0 0 0;
0 0 0;
0 0 0;
1 0 0;
0 1 0;
0 0 1];
C = [1 0 0 0 0 0;
0 1 0 0 0 0;
0 0 1 0 0 0;
0 0 0 1 0 0;
0 0 0 0 1 0;
0 0 0 0 0 1];
D = 0;
%Initial x value
X0 = [1 2 3 0 0 0]';
%covariance
w = 0.2*eye(3);
Réponses (1)
Sabin
le 16 Déc 2022
0 votes
This can be done using [Ad,Bd,Cd,Dd] = c2dm(Ac,Bc,C,D,Ts,'zoh')
Catégories
En savoir plus sur Introduction to Installation and Licensing dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!