Download presentation
Presentation is loading. Please wait.
1
Kiran Arcot EE 587: Advanced Embedded Systems Hardware in the Loop (HIL) March 5th 2014
2
Outline Introduction Hardware in the Loop (HIL)
Pieces required for HIL HIL on the Discovery Board with PX4 Firmware Conclusion
3
Introduction What is simulation?
Modeling of a real-world system and process Many types of simulation Completely in software Simulation of collision of galaxies Lawrence Livermore National Lab nuclear weapons simulation Simulation in Computational Electromagnetics Many others (Lexmark printers) To-scale modeling and simulation Tsunami simulation at Oregon State University
4
Introduction (cont’d)
Many types of simulation (cont’d) Military exercises Training and preparedness War games Simulation with hardware input/output Arcade motorcycle games Wiimote for tennis game Occulus Rift the virtual head mounted display Hardware in the Loop Mostly a technique employed in real-time embedded systems
5
Hardware in the Loop (HIL)
HIL typically involves A computer that simulates the “plant” An embedded microcontroller Why use HIL? Cost of the plant is extremely high Shorter time-to-market Safety Parallel development Testing in inclement weather is made easier Faster development of newer vehicles
6
Pieces Required for HIL
For HIL on the PX4 we need X-Plane 10 Q Ground Control (QGC) The STM32F4-Discovery board Sensor Data MAVLINK Control inputs UDP Control inputs Control inputs Control inputs Control inputs Control inputs Control inputs Control inputs UDP UDP UDP UDP MAVLINK Sensor Data
7
X-Plane 10 X-Plane 10 Flight simulator by Laminar research
Uses something called “blade element theory” for modeling to calculate aerodynamic forces such as drag, lift in different conditions In blade theory each wing is divided in to subsections to calculate the forces on it in real time. Then the forces are combined to figure out the overall effect on the aircraft. Plane Maker and Airfoil Maker HiLStar 17f is the simulation fixed wing aircraft provided by PX4 developers
8
Q Ground Control (QGC)
9
MAVLink Micro Aerial Vehicle Link By Lorenz Meier Released in 2009
Used for communication between ground stations and the micro aerial vehicle
10
MAVLink (cont’d)
11
HIL on the Discovery board
Default firmware has modules turned off
12
HIL on the Discovery board (cont’d)
Main modules are Hil Subscribes to attitude_control topic and publishes attitude_output att_pos_estimator_ekf Subscribes to sensor_combined, vehicle_gps_position, parameter_update topics and publishes vehicle_global_pos, vehicle_local_pos and vehicle_attitude topics fw_pos_control_l1 Subscribes to vehicle_global_position, vehicle_global_position_set_triplet, vehicle_attitude etc. Publishes vehicle_attitude_setpoint
13
HIL on the Discovery board (cont’d)
Main modules are fw_att_control Subscribes to vehicle_attitude_setpoint, vehicle_attitude, vehicle_control_mode etc Publishes actuator_controls_0, vehicle_attitude_setpoint_0
14
Conclusion No sensors, no problem Can test/tweak the PID loops
Can still run HIL on the Discovery board Can test/tweak the PID loops Can develop on $15 board as opposed to the $100-$150 PX4FMU
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.