- The input u is an array having as many rows as time samples (length(t)) and as many columns as system inputs.
What is Input for lsim?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
When using the lsim function, the second variable to input is the "input" to the system. This seems very straightforward for a single dimensional system. However, when you have a multi-degree of freedom system. What is the input, inputing too?
1) For example, if I had two masses between three springs, then would the input be toward the first or second mass or to the container that they are attached to?
2) Is the input to the system, a force or a displacement?
3) Why do you need an input variable? In a code like below, you define your inputs in the BB and DD matrices.
AA = [A11 A12; A21 A22];
BB = [zeros(NN,1); M\Q];
CC = [eye(NN), zeros(NN)]
DD = [0];
% -------------------------------------------------------
% Short Simulation
time = (0:.01:22.5)';
P = 0*(time+1)./(time+1);
P(1) = 500;
P(2) = 500;
timesize = size(time);
P = 0*(time+1)./(time+1);
P(1:timesize) = 500;
%P(2) = 500;
%P = zeros(timesize(1),1);
SYS = ss(AA,BB,CC,DD);
[YY, TT] = lsim(SYS, P, time);
% -------------------------------------------------------
4) Should I be defining my inputs in the BB and DD matrices or the "P" input or both?
2 comentarios
Star Strider
el 10 de Dic. de 2018
I can’t run your code.
The documentation states:
Respuestas (0)
Ver también
Categorías
Más información sobre Get Started with Control System Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!