Reduced-Order Modeling Using Neural State Space
From the series: Reduced Order Modeling
Learn how to create a reduced-order model of an internal combustion engine using neural state-space identification approach from System Identification Toolbox.
This demonstration shows how to define, train, and validate a deep-learning-based nonlinear state space model, and use the identified model to replace the high-fidelity model for faster simulation in Simulink.
This video will show reduced order modeling of an internal combustion engine using neural state space models. Neural state space modeling is a new capability in System Identification Toolbox in release R2022b.
In this example we’ll create a reduced order model for an internal combustion engine modeled in Powertrain Blockset. This reduced order model simulates faster while still capturing essential dynamics.
In this example we want to capture engine dynamics from 4 inputs shown here to engine torque.
We will do that by modeling the system as a neural state space, where nonlinear functions f and g in our state space equations will be neural networks that we will learn from data.
The workflow we will follow is simple. We will prepare the data we collected from high fidelity simulation model. Then we will define our neural state space model and will train it from data. We will validate the model and use it in full vehicle simulation in Simulink.
The first step is preparing the data. Here we load data from the file, extract signals we will use, concatenate them into vectors, remove initial transients, split data into training and validation datasets, downsample data for training, normalize the data, and finally reformat the data as cells of timetables. Now our data is ready for training.
Next step is defining and training a neural state space model. Training a neural network is not necessarily something that control and system engineers are familiar with, so the API you will see here was designed to be accessible to people who are not deep learning experts.
We start with defining a neural state space model – in our case it has one state, and 4 inputs. We then configure state network. In our case output is equal to the state, so we are not learning output network. We specify training options and train. And that’s it – as you can see the code is very simple.
Training takes more than an hour. As it runs we can see the progress plot.
Once the training is done we can validate our neural state space model by simulating it with validation data in Simulink using Neural State Space Model block. In this case we achieved the accuracy of about 90%. Simulation results show comparison of the output of reduced order model with the output of high-fidelity model for the same input data. We can see our reduced order model captures essential dynamics well.
We can now use neural state space model in the full vehicle simulation model where we added it as one of the variants for modeling engine dynamics. Our neural state space model provides a speedup by a factor of 30 in this case.
This concludes the video.
Related Products
Learn More
Related Videos:
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 bat365 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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)