Main Content

Real-Time Simulation

万博1manbetx®Real-Time™Simscape™ checks, Simscape HDL Workflow Advisor

Deploying a plant model allows you to test your control algorithm. You can deploy yourSimscape Electrical™model for real-time simulation, including hardware-in-the-loop (HIL) simulation, using generated C code or HDL code.

Generate C code to deploy a nonlinear, linear, or switched linear model that requires a 20 µs or greater simulation sample time. If you have a license forSimulink Coder™, you can generate C code for deployment to a real-time target machine. If you have a license for Embedded Coder®, you can generate C code for deployment to an embedded system. If you have a license forSimulink Real-Time, you can use Simscape checks to prepare yourSimscape Electricalmodels for code generation. You can then use theSimulink Real-TimeExplorer to:

  • Generate and compile code on a development computer.

  • Download the real-time application to a target computer.

  • Execute the real-time application remotely from the development computer.

学习如何生成和部署一个C代码中on of a Simscape model, seeReal-Time Model Preparation Workflow,Real-Time Simulation Workflow, andHardware-In-The-Loop Simulation Workflow.

Generate HDL code to deploy a linear or switched linear model that requires a 1 µs or greater simulation sample time. If you have a license for HDL Coder™, you can generate HDL code from yourSimscape Electricalmodel without first manually converting the model to a Simulink model by using the Simscape HDL Workflow Advisor. Thesschdladvisorfunction generates an HDL code compatible version of your model. You can then generate code from the HDL implementation model and deploy your plant model to an FPGA for HIL simulation.

To learn how to generate an HDL version of a Simscape model, seeGenerate HDL Code Using the Simscape HDL Workflow Advisor.

Topics