Building and simulating a simple Embed model

Start Embed.

 

An empty diagram appears named Diagram1.

Adding blocks

To construct the second-order system, you will use a step block, two integrator blocks, and a plot block.

1.    Choose Blocks > Signal Producer and click step.

Blocks-Signal Producer-Step

2.    The Blocks menu disappears, and the pointer appears with a marquee attached to it.

Insertblockmarquee

3.    Move the pointer to the work area and click to add the step block.

stepblock

4.    Repeat these steps to add two integrator blocks and a plot block. The integrator block is under Blocks > Integration, and the plot block is under Blocks > Signal Consumer.

secondordersystem

You can also use the toolbar or Browser windowpane to add blocks to a diagram. See Inserting blocks for all methods of populating a diagram.

Connecting blocks

By connecting blocks, you can pass signal values, or data, from one block to another. You connect blocks by creating a wire between the input and output connector tabs on blocks.

Input and Output tabs2

To make a connection

1.    Point to the output tab on the step block. The pointer turns into an upward pointing arrow when it is over the tab.

connectblocks#1

2.    Drag the pointer to the input tab on the integrator block. When you release the mouse button, the connection is completed.

connectblocks#2

When all the connections are complete, the diagram looks like this:

secondordersystem#2

To undo a connection

1.    Point to the input tab on the block and drag the pointer away from the block.

2.    When you release the mouse button, the connection disappears.

Moving blocks

Moving blocks is one of the more common editing actions you perform on blocks. As you build your diagram, you will often have to move blocks around the work area. When blocks are connected, you can move them around the work area without breaking their connections.

To move blocks

1.    Position the pointer over the block and hold down the mouse button.

2.    Drag the mouse to reposition the block.

secondordersystem#3 

Setting block parameters

Most blocks have parameters that allow you to set attributes specific to the block.

To set block parameters

      Right-click the mouse over the step block to display the Properties dialog box.

  

For this example, no changes are required; however, it is worth noting that you can control the strength of the output signal and the time to delay before calculating the output signal. You can also create a block label that appears below the block when you activate View > Block Labels.

Setting simulation parameters

Before starting a simulation, you can set the parameters of the simulation, including the integration algorithm and duration of the simulation.

To specify simulation parameters

1.    Choose System > System Properties.

 

2.    In the End box, enter 20 and click OK.

Embed sets the simulation stop time to 20 sec and closes the dialog box.

Running a simulation and viewing the results

The diagram is now ready to be simulated. To start the simulation, choose System > Go.

secondorder system#6

The simulation runs until it reaches the specified end time. The plot block displays the simulation results for x2/2 from 0 to 20 sec.

Saving your work

When you create a new diagram or edit an existing diagram, the work you do is saved in a temporary buffer. To make the changes permanent, use one of the File > Save commands.  

You can tell if your changes have not been saved if there is an asterisk after the diagram name in the title bar.

Exiting Embed

When you are ready to end your Embed session, click the File > Exit command.