Professional Documents
Culture Documents
Simulate and Deploy Uav Applications With Sil and Hil Workflows
Simulate and Deploy Uav Applications With Sil and Hil Workflows
1
Agenda
Introduction
Scenario Simulation
3
Simulation in a Virtual Scenario
4
Building Blocks for UAV Simulation
5
MIL, SIL and HIL Workflows for UAV Simulation
Inputs Flight Controller Plant Model
Host Host
PC PC
Model-in-the-Loop
(MIL)
Host
PC
Software-in-the-Loop Hardware-in-the-Loop
(SIL) (HIL) 6
HIL with Flight Controller Deployed on PX4
TCP/IP or UDP
• Communicates with
• PX4 sensors are disabled actuators, sensors and the
drone peripherals
• Psuedo real-time operation
• Real-time operation
7
Visualize Flight Behavior in a Virtual Scenario
Inputs Flight Controller Plant Model Scenario Simulation
Host Host Host
PC PC PC
Model-in-the-Loop
(MIL)
Host
PC
Software-in-the-Loop Hardware-in-the-Loop
(SIL) (HIL)
8
Design Autonomy Algorithms with UAV Simulation Workflow
Inputs
Flight Controller Plant Model Scenario Simulation Onboard Autonomy
Host Host Host Host
PC PC PC PC
Host
PC
NVIDIA® Jetson™
Software-in-the-Loop Hardware-in-the-Loop
9
What is Pixhawk®
Host machine
On-board sensors:
• Accel/Gyro: ICM-20689
• Accel/Gyro: BMI055 or
ICM20602 USB Type-B
• Magnetometer: IST8310
Transmitter
• Barometer: MS5611
Interfaces:
• 8-16 PWM outputs
• 3 dedicated PWM
• Dedicated R/C Telemetry Link
• 5 serial ports
• 3 I2C ports
• 4 SPI buses
• 2 CANBuses
GPS module
Motor Output
https://docs.px4.io/en/assembly/quick_start_pixhawk4.html
10
UAV Toolbox Support Package for PX4 Autopilots
Simulink Block Library
11
PX4 Autopilots Support Package Relationship to PX4 Architecture
https://www.mathworks.com/help/supportpkg/px4/ug/px4-capabilities-integration.html
12
PX4 Autopilots Support Package Relationship to PX4 Architecture
https://www.mathworks.com/help/supportpkg/px4/ug/px4-capabilities-integration.html
13
UAV Simulation Workflow with PX4 and Simulink
Inputs
Flight Controller Plant Model Scenario Simulation Onboard Autonomy
Host Host Host Host
PC PC PC PC
Host
PC
NVIDIA Jetson
Software-in-the-Loop Hardware-in-the-Loop
14
Model In the Loop
Simulated Waypoints
Model-in-the-Loop
(MIL)
15
Quadcopter Simulation in Simulink
16
Quadcopter Simulation in Simulink
17
Simulink Plant Modelling
High-Fidelity Low-Fidelity
Building UAV Programming UAV
18
Software-in-the-Loop (SIL)
Inputs
Flight Controller Plant Model
Host Host
PC PC
Simulated Waypoints
Host
PC
Software-in-the-Loop
20
SIL with PX4 HSP and Simulink Plant
21
SIL with PX4 HSP and Simulink Plant
22
Hardware-in-the-Loop (HIL)
Inputs
Flight Controller Plant Model
Host Host
PC PC
Deploy on Hardware
Hardware-in-the-Loop
24
HIL with PX4 HSP and Simulink Plant
26
UAV Simulation Workflow with PX4 and Simulink
Inputs Flight Controller Plant Model
Host Host
PC PC
Model-in-the-Loop
(MIL)
Host
PC
Software-in-the-Loop Hardware-in-the-Loop
(SIL) (HIL) 27
UAV Simulation Workflow with PX4 and Simulink
Inputs
Flight Controller Plant Model Scenario Simulation Onboard Autonomy
Host Host Host Host
PC PC PC PC
Host
PC
NVIDIA Jetson
Software-in-the-Loop Hardware-in-the-Loop
28
Closed-loop autonomy simulation
Scenario Simulation
Cuboid Photorealistic
Environments Environments
29
Create environments and simulate sensor readings
UAV Scenario Designer
30
Integrate environments into full-system simulation
31
Integrate environments into full-system simulation
32
Integrate environments into full-system simulation
33
UAV Simulation Workflow with PX4 and Simulink
Inputs
Flight Controller Plant Model Scenario Simulation Onboard Autonomy
Host Host Host Host
PC PC PC PC
Host
PC
NVIDIA Jetson
Software-in-the-Loop Hardware-in-the-Loop
34
HIL with Scenario Visualization
Inputs
Flight Controller Plant Model Scenario Simulation
Host Host Host
PC PC PC
Deploy on Hardware
Hardware-in-the-Loop
35
HIL with Scenario Visualization
36
HIL with Scenario Visualization
38
UAV Simulation Workflow with PX4 and Simulink
Inputs
Flight Controller Plant Model Scenario Simulation Onboard Autonomy
Host Host Host Host
PC PC PC PC
Host
PC
NVIDIA Jetson
Software-in-the-Loop Hardware-in-the-Loop
Shipping example in UAV Toolbox 40
Simulate and Deploy UAV Applications with SIL and HIL Workflows
41
UAV Toolbox
UAV Algorithms for Scenario Design & Low-Fidelity Flight Telemetry Data Analysis
Planning and Control Sensor Simulation Flight Log Analyzer App
Connectivity and Deployment with Unreal Engine Co-Simulation with Reference Applications
MAVLink and PX4 Sensor Models
Board Deployment
42
Resources
▪ Product Page
– www.mathworks.com/products/uav.html
▪ Documentation
– www.mathworks.com/help/uav/
▪ Examples
– www.mathworks.com/help/uav/examples.html
43
Share the EXPO experience
#MATLABEXPO
44
Thank you
© 2022 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See mathworks.com/trademarks
for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.
45