Converting continuous time to discrete time with zero order hold
18 views (last 30 days)
Show older comments
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);
0 Comments
Answers (1)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!