Chapter 3
Using AI for Reduced-Order Modeling of Complex Systems
System complexity is increasing. Autonomous systems enable vehicles to navigate unpredictable environments. Wind turbines monitor themselves via digital twins for maintenance needs. Personal smart devices measure sleep activity, label photos, and even plan workouts. Medical devices monitor patients, diagnose disease, and predict personalized outcomes.
In these applications, AI-based algorithms are often part of a larger complex system.
The AI model is sometimes intended to be deployed as part of that system, but it can also be used for reduced-order modeling (ROM). ROM is a means of reducing complexity or storage requirements of a virtual model of a system while preserving the expected fidelity within a controlled error.
Engineers often start modeling components of their system using first principles. The real value of a first-principles model is that results typically have a clear, explainable physical meaning. In addition, behaviors can often be parameterized.
In many cases, however, a high-fidelity model is too computationally intensive to be used for system-level design, especially using HIL or PIL testing that requires a model to run in real time. High-fidelity models may also be time-consuming to derive.
In these cases, consider creating an AI-based reduced-order model.
There are several approaches to creating ROMs, including AI:
- Physics-based reduction models
- Model-based techniques
- Nonlinear Simulink models that are linearized at certain operating points
- Data-driven approaches, including:
- Static approaches such as curve-fitting and lookup tables
- Dynamic approaches such as AI-based models
A ROM can serve as a valuable tool. You can use it to:
- Accelerate Simulink desktop simulation affected by a third-party high-fidelity model.
- Enable hardware-in-the-loop (HIL) testing by reducing complexity of a high-fidelity model.
- Bring 2D and 3D models from other tools into system-level simulation models in Simulink.
- Develop an AI-based virtual sensor model for use in control software, fault detection, or predictive maintenance.
- Perform control design.
- Speed up finite element analysis (FEA) or computational fluid dynamics (CFD) software calculations or optimizations.
AI-based ROMs come with design considerations. It takes a lot of high-quality data to create an accurate AI model. Even when accurate, AI models tend to be likened to a “black box” or, in some cases, a “gray box.” That is, the model’s output might not always be explainable or parameterizable. An AI model also does not enable an engineer to easily incorporate knowledge about the physics of the machine into the model.
Suppose you are part of a team working on a new vehicle design. You need to simulate a vehicle’s speed based on several inputs and conditions. You will want to create a model that includes components representing the driver, road conditions, controllers, and car engine.
A colleague has provided a vehicle engine subsystem modeled using third-party tools. The resulting simulation will match the real-world system with high fidelity. However, it is running slower than you expected.
To speed up your simulations while developing and refining other system components, you can replace that costly third-party engine model with a surrogate or reduced-order model. This may be developed using various techniques, including physics-based (e.g., using Simulink and Simscape) or AI-based methods. In the case of an AI model, the inputs would include engine speed, ignition timing, throttle position, and wastegate valve values, while the output would represent the engine torque.
You can easily switch between components built with different techniques using variants. With variants you can compare design options, balancing accuracy and performance, without having to comment out parts of your model. This helps you understand the differences and inform your decision on component selection.
To create the AI model, you’ll need to train it using a data set that varies the relevant inputs and produces the desired output. You can use a public data set or experimental data from your own physical system setup.
You can also use your high-fidelity simulation to generate data. To do this, first design a set of experiments by picking the model parameters and varying their ranges. For instance, speed, ignition timing, and throttle position will each have varying ranges. Use design of experiments (DoE) to create a table listing the possible combinations of parameters, then run the simulation and collect the data.
You can use a range of techniques to create your AI model. For instance, you can use MATLAB to apply machine learning methods or deep learning methods such as LSTMs (long short-term memory networks, recurrent neural networks capable of learning order dependence in sequence prediction problems), neural ODEs (deep learning operations defined by the solution of an ordinary differential equation), or nonlinear ARX models (models that use flexible nonlinear functions, such as wavelet and sigmoid networks, to model complex nonlinear behavior).
You can also interoperate with other open-source frameworks used to train an AI model.
If your goal is to test the design and performance of the other components in your system, you may want to run the components you are designing on the target hardware and run the AI model on the desktop. A potential hardware-in-the-loop (HIL) setup involves:
- Deploying your components onto target hardware platforms
- Running your AI model on a real-time computer system
- Linking the systems together and running the simulation, monitoring signals, and adjusting parameters
Once developed, the AI model is modular and reusable. Your colleagues, whether local or in other locations, can also use your AI model in their simulations and component tests, potentially accelerating parallel design and development of the system.
If time permits, you can create several AI models using different techniques and use Simulink to refine them. For instance, you can use Simulink Profiler to see how fast each model runs on a desktop computer. You can also compare outputs from the high-fidelity model with the AI models to gauge accuracy.
To determine the best model for your application, you’ll need to deploy the models and collect all the metrics.
Choosing a model is not always about accuracy. You may need to consider training speed, interpretability, inference speed, or model size. Different methodologies will produce different results—and each specific ROM will produce different pros and cons.
Test Your Knowledge
There are many options for creating AI models, including machine learning methods as well as deep learning and reinforcement learning techniques. The best model for your application is:
Nice try! The correct answer is The model that has the best tradeoff of attributes, such as accuracy and memory.
You’ll want to consider many attributes, including accuracy, model size, and interpretability and choose the model that best suits your specific application.
Nice try! The correct answer is The model that has the best tradeoff of attributes, such as accuracy and memory.
You’ll want to consider many attributes, including accuracy, model size, and interpretability and choose the model that best suits your specific application.
You’re right! You’ll want to consider many attributes, including accuracy, model size, and interpretability and choose the model that best suits your specific application.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)