My Simulink results of a delayed discrete transfer function differs from lsim output
조회 수: 1 (최근 30일)
이전 댓글 표시
I am trying to simply simulate a model I obtained from the system identification toolbox. The model is a discrete model with an input delay. However, the results from simulating with the command 'lsim' is different from what I get from simulink. The output from 'lsim' is similar to what I expect to get but the results from the simulatiom is wrong. I am simulating the model both in MATLAB and SIMULINK with the input 'u' which is a two-column matrix with the first column for the simulation time and the second column for the corresponding input.
>> tf1=tf([0,5.1095],[1,-1.9924,0.9924],1,'IODelay',261)
tf1 =
5.109
z^(-261) * ----------------------
z^2 - 1.992 z + 0.9924
Sample time: 1 seconds
Discrete-time transfer function.
>> y_lsim=lsim(tf1,u(:,2),u(:,1));
>> out=sim('system_simulation.slx');
A view from the simulink file ''system_simulation.slx'' :
Solver is fixed-step with 1s as the step time.
>> plot(out.tout,y,out.tout,y_lsim,'r--')
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 General Applications에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!