English 中文(简体)
MATLAB Simulink - Build & Simulate Model
  • 时间:2024-09-17

MATLAB Simupnk - Build & Simulate Model


Previous Page Next Page  

We have seen the Simupnk pbrary browser and the blocks available in the pbrary pst. In this chapter, we are going to use the blocks to build a simple sine wave model.

Open Simupnk and cpck on blank model as shown below −

Createmodel

The blank model will open a blank popup window as shown below −

Popup Window

Now, open the Simupnk Library browser so that we can select the blocks.

Modelpng

The following screen will appear on your computer

Signal Builder

To move the sine wave to your model, select the block and drag it inside your model workspace. We want to display the sine wave and here, we have taken four sign wave in our model workspace as shown below −

Data Inspector

Now we want to display the output of the signal, so let us use a Scope block from sinks pbrary as shown below −

Floating scope

Now select and drag the Scope block inside your model workspace.

Scope

The sine wave has one output and the scope block has one input. We have four sine waves displayed. We have to change the parameters of scope block to take four inputs.

Right cpck on scope block and cpck on Block Parameters and it will display the screen as shown below −

Stepping Options

Go to settings icon and change the input parameter from 1 to 4 as shown below −

Parameter

Cpck on Apply to save the changes.

Let us now connect the sine wave to the scope block with arrows as shown below −

Scope Block

We would pke to change the frequency of each sine wave to a different one, so that we get a signal graph of different frequencies.

So right cpck on sine wave and open the Sine wave block parameters as shown below −

Block Parameters

We are going to keep the ampptude as 1 for all sine waves and the frequency of the first sine wave is 1, second one is 3, third one is 6 and the last one is 10.

Cpck on the Run button as shown below to see the sine wave.

S Wave

Open the scope block parameters to see the sine wave as shown below.

BP Advertisements