Extracting a response time in simulink

So I have a control system in simulink which I have put into a test harness and I want to find the response time for that system to a step function. So I made a subsystem that returns a 1 when the demand and output systems are within 1% of each other and want to be able to extract a response time by taking the time taken for the 1 to appear away from the time at which the step function switches on but I'm stuck on how to do this. Any ideas?

댓글 수: 4

TAB
TAB 2012년 7월 27일
I am sorry but I didn't got your question. Can you elaborate with more details ?
Oliver McEnteggart
Oliver McEnteggart 2012년 7월 27일
Basically I have a graph that goes from 0 to 1 like a step function, and I want to know when it goes to 1 i.e. be able to send that data to a simulink block
TAB
TAB 2012년 7월 27일
편집: TAB 2012년 7월 27일
You can use Compare block to check when data is moved to 1. Is it not OK for you ?
Oliver McEnteggart
Oliver McEnteggart 2012년 7월 27일
That's what I have used but how to I get the value of t when it moves to 1 from that?

댓글을 달려면 로그인하십시오.

 채택된 답변

TAB
TAB 2012년 7월 27일
편집: TAB 2012년 7월 27일

1 개 추천

Ok, I think you need Sources\Clock block.
It gives the simulation time. You can capture the time output of this block when your comparision satisfied.
-----OR-----
You can log the your data to workspace using To Workspace block selecting format as structure with time. Thus data will be saved in structure format at each time step.After simulation, using matlab commands you can find when the data reached to 1.

댓글 수: 2

Oliver McEnteggart
Oliver McEnteggart 2012년 7월 27일
Thank you.
K E
K E 2012년 7월 27일
I second the suggestion of post-processing in Matlab. You could check your calculation with plots etc.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Schedule Model Components에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by