Deep Learning mit Simulink
Implementieren Sie Deep-Learning-Funktionen in Simulink®-Modellen, indem Sie Blöcke aus den Blockbibliotheken „Deep Neural Networks“, „Python Neural Networks“ und „Deep Learning Layers“ verwenden, die in der Deep Learning Toolbox™ enthalten sind, oder indem Sie den Deep Learning Object Detector-Block aus der in der Computer Vision Toolbox™ enthaltenen Blockbibliothek „Analysis & Enhancement“ verwenden.
Um ein Simulink-Modell zu erstellen, das mit der Blockbibliothek „Deep Learning Layers“ ein Netz darstellt, verwenden Sie die Funktion exportNetworkToSimulink
.
Einige Deep-Learning-Funktionalitäten in Simulink verwenden einen MATLAB Function-Block, der einen unterstützten Compiler erfordert. Für die meisten Plattformen wird ein Standard-C-Compiler mit der MATLAB®-Installation mitgeliefert. Wenn Sie die Sprache C++ verwenden, müssen Sie einen kompatiblen C++ Compiler installieren. Um eine Liste der unterstützten Compiler anzuzeigen, öffnen Sie Supported and Compatible Compilers, klicken Sie auf die Registerkarte, die Ihrem Betriebssystem entspricht, suchen Sie die Simulink Product Family-Tabelle und gehen Sie zur Spalte For Model Referencing, Accelerator mode, Rapid Accelerator mode, and MATLAB Function blocks. Wenn Sie mehrere MATLAB-unterstützte Compiler auf Ihrem System installiert haben, können Sie den Standard-Compiler mit dem Befehl mex -setup
ändern. Siehe Change Default Compiler.
Funktionen
exportNetworkToSimulink | Generate Simulink model that contains deep learning layer blocks and subsystems that correspond to deep learning layer objects (Seit R2024b) |
Blöcke
Themen
Blöcke der Deep-Learning-Schicht
- List of Deep Learning Layer Blocks and Subsystems
Discover all the deep learning layer blocks and subsystems in Simulink. - Implement Unsupported Deep Learning Layer Blocks
This example shows how to implement layers using Simulink blocks or MATLAB code in a MATLAB Function block.
Bilder
- Classify Images in Simulink Using GoogLeNet
This example shows how to classify an image in Simulink® using theImage Classifier
block. - Acceleration for Simulink Deep Learning Models
Improve simulation speed with accelerator and rapid accelerator modes. - Lane and Vehicle Detection in Simulink Using Deep Learning
This example shows how to use deep convolutional neural networks inside a Simulink® model to perform lane and vehicle detection. - Classify ECG Signals in Simulink Using Deep Learning
This example shows how to use wavelet transforms and a deep learning network within a Simulink (R) model to classify ECG signals. - Classify Images in Simulink with Imported TensorFlow Network
Import a pretrained TensorFlow™ network usingimportTensorFlowNetwork
, and then use the Predict block for image classification in Simulink.
Sequenzen
- Predict and Update Network State in Simulink
This example shows how to predict responses for a trained recurrent neural network in Simulink® by using theStateful Predict
block. - Classify and Update Network State in Simulink
This example shows how to classify data for a trained recurrent neural network in Simulink® by using theStateful Classify
block. - Speech Command Recognition in Simulink
Detect the presence of speech commands in audio using a Simulink model. - Time Series Prediction in Simulink Using Deep Learning Network
This example shows how to use an LSTM deep learning network inside a Simulink® model to predict the remaining useful life (RUL) of an engine. - Simulate Calorie Burn Using Neural Network in Simulink
This example shows how to include a simple fully connected neural network in a Simulink® model that predicts calorie burn when given five time steps of sensor readings from a smart watch. - Battery State of Charge Estimation Using Deep Learning
Define requirements, prepare data, train deep learning networks, verify robustness, integrate networks into Simulink, and deploy models. (Seit R2024b) - Physical System Modeling Using LSTM Network in Simulink
This example shows how to create a reduced order model (ROM) that acts as a virtual sensor in a Simulink® model using a long short-term memory (LSTM) neural network. - Classify Motor Faults Using Deep Learning
This example shows how to train a deep learning model to classify faults in a permanent magnet synchronous motor (PMSM) using simulated data across various revolutions per minute (RPM). (Seit R2025a) - Improve Performance of Deep Learning Simulations in Simulink
This example shows how to use code generation to improve the performance of deep learning simulations in Simulink®.
Verstärkungslernen
- Control Water Level in a Tank Using a DDPG Agent (Reinforcement Learning Toolbox)
Train a controller using reinforcement learning with a plant modeled in Simulink as the training environment. - Train DDPG Agent for Adaptive Cruise Control (Reinforcement Learning Toolbox)
Train a DDPG agent for an adaptive cruise control application. - Train DQN Agent for Lane Keeping Assist Using Parallel Computing (Reinforcement Learning Toolbox)
Train a DQN agent for an automated driving application using parallel computing. - Train DDPG Agent for Path-Following Control (Reinforcement Learning Toolbox)
Train a DDPG agent for lane following control.
Gemeinsame Ausführung mit Python
- Classify Images Using TensorFlow Model Predict Block
Classify images using TensorFlow Model Predict block. - Classify Images Using ONNX Model Predict Block
Classify images using ONNX Model Predict block. - Classify Images Using PyTorch Model Predict Block
Classify images using PyTorch Model Predict block. - Predict Responses Using TensorFlow Model Predict Block
Predict Responses Using TensorFlow Model Predict block. - Predict Responses Using ONNX Model Predict Block
Predict Responses Using ONNX Model Predict block. - Predict Responses Using PyTorch Model Predict Block
Predict Responses Using PyTorch Model Predict block. - Predict Responses Using Custom Python Model in Simulink (Statistics and Machine Learning Toolbox)
This example shows how to use the Custom Python Model Predict (Statistics and Machine Learning Toolbox) block for prediction in Simulink®.
Code-Generierung
- Deep Learning Code-Generierung aus Simulink-Anwendungen
Generieren von C/C++ und GPU-Code für die Bereitstellung auf Desktop- oder eingebetteten Zielen - Export Network to FMU
This example shows how to export a trained network as a Functional Mock-up Unit (FMU). (Seit R2023b)