Main Content

Deploy Algorithm Model for Real-Time Rapid Prototyping

Use the code generator to deploy algorithm models for real-time rapid prototyping.

About Real-Time Rapid Prototyping

Real-time rapid prototyping requires the use of a real-time simulator, potentially connected to system hardware (for example, physical plant or vehicle) being controlled. You generate, deploy, and tune code as it runs on the real-time simulator or embedded microprocessor. This design step is crucial for verifying whether a component can adequately control the system, and allows you to assess, interact with, and optimize code.

The following figure shows a typical approach for real-time rapid prototyping.

Conceptual diagram of a real-time rapid prototyping system

Goals of Real-Time Rapid Prototyping

Assuming that you have documented functional requirements, refined concept models, system hardware for the physical plant or vehicle being controlled, and access to target products you intend to use (for example, the Simulink Real-Time or Simulink Desktop Real-Time product), you can use real-time prototyping to:

  • Refine component and environment model designs by rapidly iterating between algorithm design and prototyping

  • Validate whether a component can adequately control the physical system in real time

  • Evaluate system performance before laying out hardware, coding production software, or committing to a fixed design

  • Test hardware

Refine Code With Real-Time Rapid Prototyping

To perform real-time rapid prototyping:

  1. Create or acquire a real-time system that runs in real time on rapid prototyping hardware. The Simulink Real-Time product facilitates real-time rapid prototyping. This product provides a real-time operating system that makes PCs run in real time. It also provides device driver blocks for numerous hardware I/O cards. You can then create a rapid prototyping system using inexpensive commercial-off-the-shelf (COTS) hardware. In addition, third-party vendors offer products based on the Simulink® Real-Time™ product or other code generation technology that you can integrate into a development environment.

  2. Use provided system target files to generate code that you can deploy onto a real-time simulator. See the following information.

    Engineering TasksRelated Product InformationExamples

    Generate code for real-time rapid prototyping

    Compare System Target File Support Across Products

    Event-Based Scheduling

    Embedded Coder

    Support for Standards and Guidelines (Embedded Coder)

    For an introductory model:

    openExample('CounterModel')

    For more models:

    modelfinder("ecoder")
    Generate code for rapid prototyping in hard real time, using PCs

    Simulink Real-Time

    Simulink Real-Time Options Pane (Simulink Real-Time)

    For an introductory model:

    openExample('slrt_ex_osc')

    For more models:

    modelfinder("slrealtime")
    Generate code for rapid prototyping in soft real time, using PCs

    Simulink Desktop Real-Time

    Simulink Desktop Real-Time Pane (Simulink Desktop Real-Time)

    For an introductory model:

    openExample('sldrtex_vdp')

    For more models:

    modelfinder("sldrt")
  3. Monitor signals, tune parameters, and log data.

Related Topics