Guy on Simulink

Simulink & Model-Based Design

A scope for Simulink and MATLAB

Do you know about the Time Scope available with the DSP System Toolbox?

This visualization tool was introduced in release R2010a and has been improved upon every release thereafter.

The novelty of this tool is that it ships as both a Simulink block and a System object (dsp.TimeScope) and therefore offers the same graphical user interface, parameters, and tools in both the MATLAB and Simulink environments.

A Scope for Simulink

To use it in a model, just drag the block from the Library Browser and connect the signal you want to visualize.

Time Scope block

As you can see, when used in Simulink, the Time Scope allows you to control the simulation directly on the scopes, for example, it has Start, Pause and Stop buttons. In addition, there is a button to highlight and quickly find the block corresponding to the Scope within the model.

A Scope for MATLAB

For MATLAB-based simulations, the Time Scope System object offers the standard System object methods, for example:

Time Scope System object

So, what is unique about the Time Scope?

Both the block and System object offer many common features, for example, both include integrated measurement panels, which display Signal Statistics, peak detection and Bi-level measurements:

Integrated Measurement Panel

The Time Scope has a configurable layout that lets you select the number of rows and columns used to display multiple axes:

Customizable Layout

Unique to this scope is its ability to accept input data as both sample-based and frame-based signals. Also, both block and System object accept complex data and automatically display the data as Magnitude and Phase, or real and imaginary parts.

Visualizing Frames of complex data

Look at the demos

Many of the Simulink and MATLAB based examples of the DSP System Toolbox have been updated to take advantage of the Time Scope features. From the Help Browser, look in the demo section of the DSP System Toolbox:

DSP System Toolbox Demos

For MATLAB users, you will find demos like:

  • Envelope Detection
  • GSM Digital Down Converter

and for Simulink:

  • Audio Sample Rate Conversion
  • Autoscaling and Curve Fitting

Moreover, I strongly recommend going through the block documentation to see everything the Time Scope can do.

Now it's your turn

What do you think of the Time Scope? Let us know by leaving a comment here


|
  • print

评论

要发表评论,请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。