give arbitrary, unknown and in-real-time input value to transfer function
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi,
I am writing a control system program and I have a function to get an input value from external hardware. This value need to be operated by my transfer function in real time and then I can get a output value. Here is the problem, I dont know the input value beforehand. There is a function close, lsim . But the input argument u of the function lsim request an exact matrix which is confirmed and known beforehand. All I can do is collecting the input values, but I dont know the next. So, how can i do to accomplish? Is there any matlab function I can use to solve this problem? Help me please! I have been annoyed for many days!
Millions of thanks.
April 11, 2016
I have a stupid and rude idea taday. To collect the input value in an array. Then it is operated by function lsim. I will get the final value of the output array as my output value, and give it to my external hardware.But I think this is not efficient.
I have a stupid idea again. When I collect the input value to the array, I delete the earliest value from the array and keep this array short. And then use lsim to get the final value as output value.
But I think there is a simple and smart way to accomplish it. I need your help.
Or is there someone who can amend lsimplot.m or lsim.m for my problem? Thanks so much.
I found something, Simulink® Real-Time™. It seems that simulink can probably solve my problem. But I dont want to use simulink now if possible.
댓글 수: 0
답변 (1개)
Walter Roberson
2016년 4월 10일
편집: Walter Roberson
2016년 4월 14일
u should be the data values read in at real time.
Are you trying to create a symbolic transfer function?
댓글 수: 2
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!