Embedded Machine Learning - MathWorks

Transcription

Embedded Machine Learning:Enabling Workflows for Edge DevicesGokhan Atinc1 2015 The MathWorks,Inc.

BMW designs, tests and deploys data-driven systems thatenhance vehicles’ capabilities using MATLAB and Simulink 95% accuracyFull Story: h-machine-learning.html2

MathWorks provides embedded machine learning workflowsthat integrate nicely with Model-Based DesignSIMULINKMATLABGPU CoderMATLAB CoderC/C Simulink CoderCUDASoftware In The LoopProcessor In The LoopHardware In The LoopEmbedded Machine Learning Data-driven, smart algorithmscapable of running on edgedevicesEmbedded Systems3

Machine learning algorithms are supported for a variety ofembedded systems workflowsDeploy machine learningmodels in MATLAB & SimulinkDeploy fixed-pointmachine learning modelsIn-place modification ofdeployed modelsC/C 4

Learner apps provide convenient ways to compare anditerate over different machine learning algorithmsC/C 5

Classification Learner App demonstrationC/C 6

Models trained with Learner App can be saved fordeploymentC/C Extract Trained ModelSave Trained Model forDeployment7

Trained models can be used in SimulinkC/C ndCodeGenerationExample')8

Trained models can be used in SimulinkC/C 9

Trained models can be used in Simulink via SystemBlocksC/C 10

Majority of machine learning models are supported fordeploymentSupported Models Linear Classification SVM Decision trees and Random Forests Linear Discriminant Analysis k-Nearest Neighbor models Ensemble models Naïve Bayes models Gaussian Process Linear/Generalized Linear RegressionC/C Deploy machine learningmodels in MATLAB & SimulinkC/C 11

Native Simulink Library BlocksC/C Supported Models Binary Classification SVM Regression SVM12

Majority of machine learning models are supported fordeploymentSupported Models Linear Classification SVM Decision trees and Random Forests Linear Discriminant Analysis k-Nearest Neighbor models Ensemble models Naïve Bayes models Gaussian Process Linear/Generalized Linear RegressionC/C Deploy machine learningmodels in MATLAB & SimulinkC/C Simulink Simulink Library Blocks MATLAB System Block MATLAB Function Block Stateflow13

Machine learning algorithms are supported for fixed-pointworkflowsDeploy machine learningmodels in MATLAB & SimulinkDeploy fixed-pointmachine learning modelsIn-place modification ofdeployed modelsC/C 14

Deploy fixed-point machine learning modelsMinimize energy consumptionReduce costC/C 15

Fixed-point workflows allow deployment of models with smallmemory footprintConvert in Fixed-PointDesignerTrain in tion of ModelCLASSIFICATIONREGRESSIONCost-effective modelNewDataFixed-PointImplementation of PredictPredict on low powerembedded device16

Fixed-point conversion is a trade-off between resourceusage optimization and accuracy17

Popular machine learning models are supportedfor fixed-point workflowsSupported Models Binary SVM Decision Trees Ensembles of Decision TreesDeploy fixed-pointmachine learning models18

Machine learning algorithms are supported for in-placemodification workflowsDeploy machine learningmodels in MATLAB & SimulinkDeploy fixed-pointmachine learning modelsIn-place modification ofdeployed modelsC/C 19

In-place modification of deployed modelsUpdate running modelSIL/HIL Verification of modelsOTA Update of models on remote vehiclesC/C 20

In-place modification of deployed models allows modelupdates without code regenerationC/C 21

In-place modification workflow is agnostic tocommunication method, supported in SimulinkModified version of openExample('stats/HARDeploymentExample')22

Popular machine learning models are supported forin-place modification workflowsSupported Models SVM Linear Models Decision TreesIn-place modification ofdeployed models23

Machine learning algorithms are supported for a variety ofembedded systems workflowsDeploy machine learningmodels in MATLAB & SimulinkDeploy fixed-pointmachine learning modelsIn-place modification ofdeployed modelsC/C 24

Q&AWhich machine learning algorithms have youpreviously used in your projects?ASVMBDecision TreesCEnsemblesDGaussian Process ModelsEKNNFOtherIf you have questions, please reach out:Are you already working on a projectthat involves deploying a machinelearning model to an edge device?AYESBgatinc@mathworks.comNO25

MathWorks provides embedded machine learning workflows that integrate nicely with Model-Based Design MATLAB GPU Coder SIMULINK Software In The Loop Processor In The Loop Hardware In The Loop MATLAB Coder Simulink Coder Embedded Machine Learning Data-driven, smart algorithms capable of running on edge devices Embedded Systems C/C CUDA