The Drone Library was developed to model and simulate a quadcopter in multiple domains. To start, navigate to DroneLibrary.Examples.DroneWithIdealPower.TestSystem. This model contains the simplest version of the quadcopter.
Using the model in DroneLibrary.Examples.DroneWithIdealPower.TestSystem, the model is configured as shown below:
It is configured to hold the x- and y-direction coordinates to remain at the origin (0 m) and ramp the height of the drone up to 5m in the z-direction using the input zcoord_ramp. When the model is simulated, the following response is achieved:
The model variants can be changed by right clicking on the drone model and changing the class following the figure below.
The system can then be simulated using different model variants and input commands.
The Drone Library contains scripts to configure the animation of the drone within
a Modelica simulation environment and automated plotting of the XYZ-coordinate response of the system.
These models were tested in Dymola 2019, 2020, 2021x, and 2022x.
To set up the animation, run the
DroneLibrary/Resources/Scripts/drone_animation_setup.mos
script.
Then the following animation appears and can be interacted with using the inputs supplied in xcoord, ycoord, and zcoord.
The DroneLibrary/Resources/Scripts/plotOutput.mos script will plot the XYZ position of the drone and can be used for any of the tests in the Examples package. The DroneLibrary/Resources/Scripts/drone_simulation_setup.mos configures the animation of the drone and plot windows for any of the example cases.