Simulink integrator for piecewise-constant / variable time step input

1 Ansicht (letzte 30 Tage)
Bardo
Bardo am 20 Sep. 2017
Kommentiert: Bardo am 21 Sep. 2017
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 Kommentar
Bardo
Bardo am 21 Sep. 2017
See my submission to File Exchange for an implementation in Stateflow.
Still looking for an S-function implementation.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Verification, Validation, and Test finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by