Simulink integrator for piecewise-constant / variable time step input

조회 수: 1 (최근 30일)
Bardo
Bardo 2017년 9월 20일
댓글: Bardo 2017년 9월 21일
Hi,
I am trying to write an efficient integrator (S-function preferred) for piecewise-constant / variable time step input.
Output y should update when
  • input x changes
  • integration reaches ydelta since last output change (timestep = ydelta/x).
Taking the input as continuous requires derivative data and ultimatively gives timestep control to the solver.
Using variable sample time for the output (Level 1 C-code) and NextTimeHit could be useful, but would need to be triggered on a change of the input signal.
Ideas?
  댓글 수: 1
Bardo
Bardo 2017년 9월 21일
See my submission to File Exchange for an implementation in Stateflow.
Still looking for an S-function implementation.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Verification, Validation, and Test에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by