GuidedBasicDroneModel
Version 1.0.0 (11,9 ko) par
Ramazan Yeniceri
These class definitions simulate simple 3-DoF drone dynamics. Developed for multi-agent and swarm drone simulation.
There are two files in this study. These are BasicDroneModel.m and GuidedBasicDroneModel.m. The first one is called by the other one. Both define a class of handle type.
Basic Drone Model features:
- Simulates 3-DoF dynamics.
- Constant drag coefficient, cross-sectional area and air density are defined.
- Local NED frame is used.
- Fundamentally, position reference is accepted. Additionally, velocity and accelerometer references are fed forward.
- The velocity controller output is summed with the acceleration feed-forward term. The result represents the acceleration reference. It is multiplied by weight to calculate required net force vector.
- Reference force vector is summed with weight and drag vectors, yielding the reference thrust vector.
- Low-level closed loop dynamics (angular behavior of the body and the propeller) are represented by a 3D 1st order low-pass filter. With this filter, the actual thrust vector follows the reference thrust vector.
- Low-pass dynamics are generated by given continuous-time filter transfer function:
, where τ is the time constant of the filter.
is the time that actual thrust vector almost reaches to the reference. The filter is discretized by initially defined
integration-step, i.e. sampling period.
- The weight and drag force is subtracted from actual thrust vector. The result is divided by mass to find net acceleration.
- For simolicity, forward Euler integration method is preferred to calculate velocity and position.
- The highest North, East, Down corner and the lowest corner are defined in order to determine the geocage that the drone flies inside.
- Upward, downward and horizontal velocities are limited. Also, the maximum thrust and maximum tilt angle is limited by corresponding parameters.
- The avionics is assumed to consume constant power. The batter model is assumed to store some initial energy. The power efficiency of the drone is defined by a scalar, not a function. Instant power train electric power consumption is calculated. Th total electrical power consumption is accumulated. Remaining battery percentage is updated at every iteration.
- Total travelled trajectory is accumulated. Also, total flight time is kept live.
- Basic droen has four states: Land(ed), Take-off (transient behavior for only
), Flying, Crashed. Landed is triggered by ground touch. Take-off is used for only one loop period to successfully jump into Fly mode. Crash is a irreversible mode, detected by a high speed impact of the drone to the ground.
Guided Basic Drone Model features:
- It wraps the basic model and implements 6 modes, which are TO, SH, WP, VF, P3, LN.
- TO is for take-off. SH stops drone and holds position. WP is the waypoint navigation mode. VF mode follows reference velocity vector. Between reference changes the velocity is constant. P3 is the trajectory execution mode. In P3, the trajectory is represented by position polynomials in each dimension of NED. The velocity and acceleration are calculated by differentiating the polynomials. LN mode lands the drone with a given constant downward velocity which should be less that the basic drone model's crash speed. Otherwise the basic drone model becomes inoperable.
- Each mode is triggered with a CMD_ method. Then, in the iterate method the corresponding statements automatically run when the method is called.
Citation pour cette source
Ramazan Yeniceri (2026). GuidedBasicDroneModel (https://fr.mathworks.com/matlabcentral/fileexchange/136179-guidedbasicdronemodel), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Créé avec
R2023b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS LinuxTags
Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
| Version | Publié le | Notes de version | |
|---|---|---|---|
| 1.0.0 |
