Difference using lsim and simulink model transfer function block with equal transfer functions
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi all, I am working on a model of an air fan. The input is a PWM signal between 0% and 100%, the output is fan speed in rpm. I have estimated transfer functions from measured data for two step responses: from 0%-15% and from 15%-20%. For the estimation I used data that starts at zero. So for 15%-20%, the input data range is actually from 0%-5%. For the simulation with lsim I use this data and tf and add the fan speed that it started with. This leads to very accurate results between measured values and simulated using lsim.
However I want to implement these transfer functions in a Simulink model. I use the same strategy as with lsim, but the results do not agree. 0-15 is the same but 15-20 is not. I use an S-function to alter the nominator and denominator of the transfer function block.
I understand it is difficult to answer this question without files, but the main question is: How can I get the same results as with lsim using a transfer function in Simulink?
Thanks in advance.
Best, Gijs
댓글 수: 0
답변 (3개)
Alexis Nguyen
2012년 2월 15일
Hi Gijs,
Have you solved your problem? Could you please let me know the answer. I'm also trying to solve this.
Thanks
댓글 수: 0
Matheus WV
2020년 9월 14일
I had a similar issue. In my case the problem was on the estimation. As data is discrete, MATLAB has to assume the values of the input variables between samples. As the property 'InterSample' was not specified, a First-order hold was assumed. Simulink, on the other side, uses a zero-order hold.
Changing the data from
id_data = iddata(i_is,V_is,Ts);
to
id_data = iddata(i_is,V_is,Ts,'InterSample','zoh');
solved the problem.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Model Predictive Control Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!