1

I have a simulation that runs in Simulink with input base on a set of 5000 samples. With my simulation time set to 5000 steps, the model runs (in about 2 seconds) and then I get the results. Is there a way I can change my model so that it runs more slowly and I can see the results change as the simulation progresses? I haven't touched Matlab or Simulink for about 12 years so assume I'm a noob. I'm sure the information is there somewhere in one of the manuals I just don't know what to look for :-(

TIA Mark

Mark Wh
  • 31
  • 1
  • 4

2 Answers2

5

Yes, there are various utilities to slow down the execution of a Simulink model on the File Exchange. Here are a few:

am304
  • 13,758
  • 2
  • 22
  • 40
  • Perfect - Real-Time Pacer is just what I needed. – Mark Wh Jan 26 '15 at 15:57
  • Perfect - I'm using Real-Time Pacer, it's just what I was looking for. Thankyou – Mark Wh Jan 26 '15 at 15:59
  • Glad to be of help. Please accept the answer if it helped you solve you problem so that other people with a similar problem can also easily find a solution. – am304 Jan 26 '15 at 16:01
3

I have a device that I sometimes drive with data from Simulink over a UDP connection. Here's the quick and dirty trick I use to make sure that simulation runs in real time so the device receives data at the correct rate:

Simulink block diagram of "From Audio Device" -> "To Audio Device"

Simply dropping in an audio device source and sink forces the model to run at real time because your audio device must. It doesn't have to interact with the rest of your model in any way.

It's not a solution you would use for any sort of final model, but it works great for quick one-off simulations.

These blocks come from the DSP toolkit, although there may be others that provide it too.

Katie
  • 1,260
  • 10
  • 20