I have a frustrating error when using Matlab where I'm trying to simulate a continuous time system in discrete time.
Ts = 0.01;
A=[-0.313 0 56.7;
0 56.7 0;
-0.0139 0 0.426];
B = [0.232; 0; 0.0203];
C = [0 1 0];
D = 0;
SYSC = ss(A,B,C,D);
SYSD = c2d(SYSC,Ts);
t = linspace(0,10,10/0.01)';
u = zeros(1000,3);
u(:) = 0.2;
lsim(SYSD,u,t);
I am getting the error:
When simulating the response to a specific input signal, the
input data U must be a matrix with as many rows as samples in
the time vector T, and as many columns as input channels
What is meant by input channels here? Overall I'm not sure how I can fix this error. I have a set time for which I want the simulation to run but I do not know how to set up my vector of inputs correctly. I am modeling three states.