- 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 (최근 30일)
이전 댓글 표시
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
Star Strider
2018년 12월 10일
I can’t run your code.
The documentation states:
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Control System Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!