Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: controlling simulink variable timestep size based on signals
Replies: 1   Last Post: Feb 14, 2013 11:37 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jason S

Posts: 57
Registered: 2/23/05
controlling simulink variable timestep size based on signals
Posted: Feb 14, 2013 11:49 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

(crossposted from StackOverflow: http://stackoverflow.com/questions/14877718/controlling-simulink-variable-timestep-size-based-on-signals)

I have a frequency ramp in Simulink (sin wt where w increases with time) and would like to use a variable-timestep solver. At the beginning of the simulation, the timesteps could be large; at the end, they have to be small.

I have tried tweaking the relative tolerance and it doesn't really seem to have a useful effect: the timesteps at the end are too long and the sinewaves have only 2-3 points per cycle.

Is there any way to somehow tie the timestep to the sinewave resolution, either directly or indirectly (e.g adding blocks in the simulation to somehow cause timesteps to decrease as frequency increases)?



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.