SITL and HITL Simulations using PCC - Aerodynamic Decelerator Systems Laboratory
SITL and HITL Simulations using PCC
The quality of the developed Athena Vortex Lattice (AVL) aircraft model can be verified in software-in-the-loop (SITL) and hardware-in-the-loop (HITL) simulations involving FlightGear Flight Simulator (for SITL visualization) and Piccolo Command Center (PCC). Hardware / software setup for both cases is shown in Figs.T,U. As seen from Fig.U, the HITL simulation allows the control inputs to be introduced from the pilot console (Futaba transmitter) in the manual mode (otherwise the model of an aircraft will be controlled by the Piccolo autopilot). The pilot console can be added to the SITL simulation as well (through the Futaba - USB interface).
Figure T. Setup for the FlightGear-flight-simulator-based SITL.
Figure U. Hardware-in-the-loop simulation setup.
Preparing AVL model for the Piccolo Simulator once this AVL model is developed involves the following steps:
- Creating Piccolo Simulator model template
- Mapping AVL control surface to Piccolo Simulator (Futaba transmitter channels)
- Setting up Piccolo autopilot configuration (control surfaces, tail configuration, aircraft parameters)
Specifically, once all necessary model files are assembled they can be loaded into Piccolo Simulator and PCC as follows. First, the UAS AVL txt file should be loaded into the Piccolo Simulator via navigating to this file in the Open Aircraft menu of the File drop-down menu as shown in Fig.Va. Next, the model needs to be saved into the default directory (via choosing Vehicle / Fixed Wing Gen 2 from the simulator menu as presented in Fig.Vb). This allows the simulator to generate the vehicle specific model parameters from the complete simulator model to be used by PCC.
a)
b)
Figure V. Loading the model into Simulator (a) and saving it for PCC use (b).
Now, the file that was just saved should be opened in PCC using the Open button in the Vehicle folder of the Controller Configuration option of the Window drop-down menu of the main PCC screen (the very first button in Fig.W).
Figure W. Loading the model into Piccolo Command Center.
When loading the model several warnings might pop up informing that some of parameters, say Vertical Tail Arm Payload Mass, are not defined. These undefined parameters need to be defined in the Vehicle screen directly. These data (a local model) need to be uploaded to the Piccolo autopilot. This is done by unlocking the default configuration in the Preflight screen as shown in Fig.X and then clicking on the Send All button on the vehicle screen (Fig.W). Now, both models, local on the ground computer and global on the Piccolo autopilot will have the same model of UAS.
Figure X. Unlocking the current configuration in Piccolo Command Center.
Now that the model is loaded into Piccolo Simulator and PCC (PCC uses a small portion of the complete model used by Piccolo Simulator), everything is ready for simulations.
Based on (quite qualitative) results of SITL simulation the user might want to adjust the controller gains (if really necessary) on the two pages of the Controller Configuration windows (see Fig.Y).
Figure Y. Lateral and longitudinal gains of the Piccolo controller.
The Trims and Limits tabs of the PCC Controller Configuration window (Figs.Za and Zb, respectively), specify trim conditions and flight envelop for the specific UAS. The trim conditions can be entered manually or derived automatically using the Automatic Trims option (Fig.Za). The flight envelop is defined similarly for all RPT based on data provided by a manufacturer.
a)
b)
Figure Z. Defining UAS Trims and limits.
Downloads
You are welcome to download and use the complete models for Cub 50, P10B and Rascal 110 UAS that can be used for Piccolo Simulator and Piccolo Command Center (needed for SITL and HITL simulations). Each model includes four files: Alpha Sweep (aerodynamics), Engine, Propeller, and the main AVL file:
- AlphaSweep.xml file that defines aerodynamics
- Engine.lut file that defines an engine
- Propeller.prd file that defines a propeller
- AVL.txt model description file that glues everything together