Chapter 1

Why Use AI for Simulation and Model-Based Design?

Using Simulink® models throughout your development process, an approach called Model-Based Design, is a proven way to develop complex systems with efficiency and reduced risk. Adding AI techniques to your workflow can save time and improve your designs—and you don’t need to be an AI expert to do it.

There are four main reasons for using AI for simulation and Model-Based Design:

  1. Improve Accuracy: Improve algorithm accuracy by using high-quality training data to build an AI algorithm.
  2. Tame Complexity: Use AI to replace algorithms that would be computationally complex or impossible to model with other methods.
  3. Save Time: Use AI to create reduced-order models of systems when high-fidelity models derived from first principles would take too long to build or simulate.
  4. Work together: Integrate AI models developed in open-source frameworks or MATLAB into system-level designs using Simulink.

Use cases of AI in simulations

In this ebook, we’ll cover two main use cases for integrating trained AI models into Simulink:

  • Develop an AI model for an algorithm that will eventually be deployed on an embedded system. For a deep dive into an example, see Chapter 2.
  • Use AI for data-driven plant or environment modeling. The data used to train the AI model could come from hardware or from a high-fidelity simulation model that is too computationally intensive for system-level simulation. For a deep dive into an example of how AI can be used to create a reduced-order model of a high-fidelity component, see Chapter 3.

Embedded algorithm development: This use case includes AI-based controllers, sensors, sensor fusion, image processors, and object detectors that are eventually deployed on an embedded system.

Reduced-order models: Use AI to create a reduced-order model of a complex system that can be used by many engineers to refine and validate system components.

In many instances, an AI model can be used for both use cases. Another option is to leverage Simulink as a dynamic environment for reinforcement learning, a branch of machine learning (ML).

Integrating AI into Model-Based Design for embedded algorithm development enables you to:

  • Experiment with multiple AI models of an algorithm and rapidly compare tradeoffs in accuracy and on-device performance.
  • Evaluate AI models of algorithms for compliance with system requirements before they are deployed.
  • Run your AI models alongside other models within a simulated environment to uncover system integration issues.
  • Test scenarios that would be difficult, expensive, or dangerous to run on hardware or in a physical environment.

Using AI for data-driven reduced-order modeling, you can:

  • Speed up slow high-fidelity model simulations.
  • Accelerate the design using the AI-based reduced-order model early in the design process and use a high-fidelity simulation model later in the design process to validate the results.
  • Perform hardware-in-the-loop testing by verifying your controller design without the complete system hardware.
  • Spend more time exploring edge cases, iterating on the design, and evaluating alternatives.

How will you use AI in your system-level design work?

Engineers in every industry can use AI without being AI experts. MathWorks provides easy-to-use interfaces, apps, and examples to make AI approachable.

You can use AI techniques for machine learning and deep learning within familiar vertical applications and learn how to apply these techniques to industry-specific problems.


Which user success story would you like to explore?