Previous Top Next |
Running Simulations in Edit Mode |
Very early in this tutorial we ran a ballistic trajectory from PRODAS. This caused MATLAB to open, the simulation to compile and run, results to return to PRODAS and MATLAB to close. During development it's more efficient to run the simulation in Edit Mode. We just defined all nominal parameters for a run with guidance turned off. To execute from the Trade Studies tab we click the "Generate Scenarios" button. This takes all of our inputs and generates the table that will be passed to MATLAB. In this case when I click the button, one scenario is generated. Note that Append to Table was not selected.
Click OK to dismiss the message box. Since we have changed data in PRODAS we next must click "Update PRODAS inputs". Then we can go to the MATLAB window and run the simulation by typing the command "PRODASIF_RUN". Note that when MATLAB runs in the Rapid Accelerator mode it generates an executable file. You may need to take an action in your firewall to allow this file to run. When the run completes, the MATLAB window will be:
MATLAB provides limited summary information in the Command Window. You can see that the projectile flew approximately 3.7km in 28 seconds with a small deflection due to the roll. MATLAB also displays the elapsed time for the run, about 49 seconds on my computer. You'll notice that subsequent runs will be much faster now that the compile and build in MATLAB is complete.
Note the list of variables in the Workspace. All variables that came from PRODAS have names starting with "P_". All this data is available to plot in MATLAB or you can return to PRODAS to review the results. As an example, let's plot Alpha and Beta in MATLAB. Enter the following command in the MATLAB Command Window.
The following plot will appear. You can see that this was a uncontrolled trajectory with very little angular motion later in the flight.
© 2011 Arrow Tech Associates |