Real-Time Van der Pol Simulation

This example shows a real-time version of the Simulink® Van der Pol simulation model.

This model does not need any external signals, so it does not need any data acquisition hardware or driver. The model is useful for the first time that you work with Simulink Desktop Real-Time™ because you do not have to configure I/O hardware.

Run Model in Normal Mode

  1. To switch to normal mode if needed, double-click the orange button in the model.

  2. To start the real-time execution, on the Simulation tab, click Run.

  3. Observe any missed ticks on the Missed Ticks scope.

Run Model in External Mode

  1. To switch to external mode if needed, double-click the orange button in the model.

  2. To start the real-time execution, on the Desktop Real-Time tab, click Start. The model builds, connects to Simulink in external mode, and starts.

  3. Observe that Missed Ticks is zero.

Open the Model

open_system(fullfile(matlabroot,'toolbox','sldrt','sldrtexamples','sldrtex_vdp'));

Close Open Scopes

close_system(find_system(gcs ,'BlockType', 'Scope'));

Clean Up the Model

clear
close all
bdclose all

See Also