Deep Learning con Simulink
Implementare la funzionalità di Deep Learning nei modelli di Simulink® utilizzando i blocchi dalle librerie di blocchi Deep Neural Networks, Python Neural Networks e Deep Learning Layers incluse nella Deep Learning Toolbox™ o utilizzando il blocco Deep Learning Object Detector dalla libreria di blocchi Analysis & Enhancement (Analisi e miglioramento) inclusa nella Computer Vision Toolbox™.
Per generare un modello Simulink che utilizza la libreria di blocchi Deep Learning Layers per rappresentare una rete, utilizzare la funzione exportNetworkToSimulink
.
In Simulink, alcune funzionalità di Deep Learning utilizzano un blocco MATLAB Function che richiede un compiler supportato. Per la maggior parte delle piattaforme, un compilatore C predefinito viene fornito con l'installazione di MATLAB®. Quando si utilizza il linguaggio C++, è necessario installare un compilatore C++. Per visualizzare un elenco dei compilatori supportati, aprire Supported and Compatible Compilers (Compilatori supportati e compatibili), fare clic sulla scheda corrispondente al sistema operativo in uso, individuare la tabella Simulink Product Family e andare alla colonna For Model Referencing, Accelerator mode, Rapid Accelerator mode, and MATLAB Function blocks. Se sul sistema sono installati più compilatori supportati da MATLAB, è possibile modificare il compilatore predefinito utilizzando il comando mex -setup
. Vedere Change Default Compiler.
Funzioni
exportNetworkToSimulink | Generate Simulink model that contains deep learning layer blocks and subsystems that correspond to deep learning layer objects (Da R2024b) |
Blocchi
Argomenti
Blocchi dei livelli di Deep Learning
- 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.
Immagini
- 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.
Sequenze
- 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. (Da 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). (Da 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®.
Apprendimento di rinforzo
- 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.
Esecuzione simultanea di 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®.
Generazione di codice
- Generazione di codice di Deep Learning dalle applicazioni Simulink
Generare codice C/C++ e GPU per la distribuzione su target desktop o integrati - Export Network to FMU
This example shows how to export a trained network as a Functional Mock-up Unit (FMU). (Da R2023b)