Arrow Tech Home page
Previous  Top  Next
Projectile S-Function

The default Simulink model opens with the Trajectory (S-Function). An S-Function in Simulink is pre-compiled code that executes very quickly. In order to use the S-Function the simulation must be set to Normal mode (circled listbox below). Because the block is pre-compiled, the Simulink compiler doesn't know what's in it. This can result in algebraic loops when connecting projectile outputs to projectile inputs through the Trajectory Control. This problem normally won't occur if the Controller includes delays in these connections as it would if it were a detailed model of a "real" control system. With the very simple model that we will be building, algebraic loops are a very real possibility.

NOTE: If your are using an evaluation copy, the PRODAS Simulink Library is not available. In this case, keep the S-function block and the Normal mode execution. A delay element will be inserted later to avoid the algebraic loop.

To eliminate this problem we will replace the S-Function with an open source Trajectory block from the PRODAS library. Complete the following steps to accomplish this task.

1. Click on the Projectile (S-Function) block to select it and then hit the delete key to delete the block.

2. Open the Simulink Library Browser (circled Icon in the figure below) and locate the open source Trajectory block. This is found under "PRODAS" and then "Trajectory" in the Simulink library tree. Use the latest version of the PRODAS library if your installation has multiple libraries as this one does.

3. Drag the open source Projectile block onto the block diagram. Then move it into the location vacated by the S-Function. If you drag it into the identical location all connections will be made. Your block diagram should now look like the one shown below.

Since we've eliminated the S-Function from the model we can take advantage of the Simulink Rapid Accelerator mode. Select "Rapid Accelerator" from the listbox as shown below.

Previous  Top  Next
© 2011 Arrow Tech Associates