Documentation

Basic Simulation Workflow

Simulation is a process in which you validate and verify a model by comparing simulation results with:

  • Data collected from a real system.

  • 功能模型描述的要求。

你死后执行模拟工作流hed building your model and a simulation completes without errors. The steps in a typical simulation workflow include:

  • Prepare for simulation.

  • Run and evaluate simulation.

Prepare for Simulation

Define the external input and output interfaces.

Determine Simulation Goals

Before simulating a model, you need to understand your goals and requirements. Ask yourself these questions to help plan your simulations:

  • What questions do you want the simulation to answer?

  • How accurately does the model need to represent the system?

Some possible simulation goals:

  • Understand input to output causality — For a given input set and nominal parameter values, look at how the inputs flow through the system to the outputs.

  • Verify model — Compare simulation results with collected data from the modeled system. Iteratively debug and improve the design.

  • Optimize parameters — Change parameters and compare simulation runs.

  • Visualize results — Send simulation results to a plot or print in a report.

Collect Data

Collect input and output data from an actual system.

  • Use the measured input data to drive the simulation.

  • Compare measured output data with the model simulation results to verify the accuracy of your model.

Prepare Model

Preparing a model for simulation includes defining the external interfaces for input data and control signals, and output signals for viewing and recording simulation results.

Set Parameters

For the first simulation, use model parameters from the validated model. After comparing the simulation results with measured output data, change model parameters to more accurately represent the modeled system.

Run and Evaluate Simulation

Simulate your model and verify that the simulation results match the measured data from the modeled system.

Import Data

万博1manbetx®enables you to import data into your model.

  • Use theSignal Builderblock to import input signals from a Microsoft®Excel®file (XLSX, XLS) or a comma-separated value file (CSV). Simulink saves data imported from an Excel file using a Signal Builder block with the model and loads the data into memory when you open the model.

  • For large data sets, use a MATLAB MAT-file with an Inport block.

Run Simulation

Using measured input data, run a simulation and save results.

Evaluate Result

Evaluate the differences between simulated output and measured output data. Use the evaluation to verify the accuracy of your model and how well it represents the system behavior. Decide if the accuracy of your model adequately represents the dynamic system you are modeling.

Change Model

Determine the changes to improve your model. Model changes include:

  • Parameters — Some parameters were initially estimated and approximated. Optimize and update parameters.

  • Adding structure — Some parts or details of the system were not modeled. Add missing details.

Related Topics

Was this topic helpful?