Abstract
The design of racing drones brings quite a thrilling challenge from a flight dynamics point of view. This work aims to offer a single-based simulation platform combining its geometric design, trajectory control, and guidance of racing drones. Also, it is reckoned from a pilot’s view in a classic FPV competition. Hence, it is an active platform for studying racing drones’ design founded on dynamics, with fifteen different drone models. It is one of the few existing platforms that combine all aspects of racing drones in a single simulation environment. Also, it is open access via Matlab Central - File Exchange.
Keywords
Introduction
Computer tools aim to create virtual environments that recreates real complex scenarios. Thus, they usually hold become useful simulation platforms.1,2 Their benefits have been tested in multiple designs. In addition, they need adjustments to suit the response in different scenarios.3,4 5
The design of control systems takes the lead of these platforms. 6 They estimate the drone’s behaviour.7–10 So, the effects are planned to be helpful in actual active states.11,12 Indeed, the integration of simulation platforms is not new.13–16 It seems to have a decisive edge over cost and design times.17–19 When it comes to evaluating the performance of drones, trading data and tying it jointly on a unique platform would make the design process more precise. The CAx(CAD, CAM, CIM, CFD) tools quickly merged the design cycles.20–23 However, linking the data with model-based design software needs further support to enrich design methods.24–27 The work aims to offer a single-based simulation platform. It is for geometric design, trajectory control and guidance of racing drones. Mainly, it combines data from motion-based and model-based design software (see Figure 1). The airframes of the racing drones were drawn in Unigraphics NXTM software from Siemens Product Lifecycle. Thus, the CAD module holds the mass distributions of the bodies. The motion module is liable for the dynamics of the motors and propellers. In this way, the thrust force is run from it. Simulink® manages the control design. Here the rigid body dynamics are figured. In addition, the guidance of the racing drone is into it. MATLAB® is sensitive to running variables. Also, for getting data from NX. Both software packets are from the MathWorks® Corporation. The right mix of data links will result in racing guidances through waypoints. It means without follow-up policies between points. The trajectories gauged are from a pilot’s view, not an intelligent system. The option to switch between kinds of racing drones is open. Also, the impact on those trajectories can be studied. In this way, it is the only one that combines all aspects of a racing drone in a single simulation environment.

Co-Simulation platform.
The first section of this paper deals with the equations of motion. It describes the flight dynamics of a racing drone. The second section defines how the thrust force was figured. The mass distribution and the measure of the body torque are also added. The third section handles the technical requirements. It is based on performance metrics by locating the system’s poles. Thus, the controllers’ operating ranges are defined. In addition, the trajectory guidance problem is solved. The last section shows the data flow between the platforms. It is defined how to set up the simulation platform to run multiple experiments with distinct airframe models. In addition, a case study was conducted on the flight dynamics linked to the airframe models to see the platform’s ability.
Equations of motion for a racing drone
The equations of motion explaining flight dynamics are widely issued in the literature.28–35 They are not for a racing drone. The main simplifications that manage the distinct control methods are laid out.36–39 It helps to track flight trajectories. Some papers have handled the premises for figuring out the physical effects in mixed ways.40–45 It is via testing to get coefficients. It can also be through mathematical terms.
Nomenclature of the equations of motion.
Nomenclature of Motor model.
The centre of mass is located in the reference body frame
The body torque
A working environment was made in the NX motion simulation. It is to use this signal in an open-loop mode outside the NX software and from MATLAB / Simulink. So, the input is the motor’s electrical parameters and the propeller’s geometrical features. The output is the thrust force as a normalized signal. It is for various heights of lever travel. The motor response signals are set in a closed loop to use directly from NX.
The lambda

Basic airframe structure.
Now, if motion aims to make the fastest, semicircular and uniform trajectory possible, it depends, if and only if, on the mass distribution
Thrust force for racing drones
The expression of the thrust force differs from the standard forms.50–53 It is a coefficient of static test benches. Indeed, the physical and aerodynamic value stays, as discussed in the literature.54,55,45
Suppose a racing drone aims to fly the fastest horizontal and straight trajectory possible. In that case, it will depend primarily on its pitch angle
The racing drone’s forward speed
Trajectory tracking - Control Position
The dynamics of a racing drone are highly non-linear.
48
It was handled with Matlab design tools. First, the plant was trimmed around the hovering position. Subsequently, it was also linearised as
Table 3 shows a range of performance restrictions for a racing drone. Also, the system holds poles in a fit range of metrics. Thus, Figure 3 shows that the contrast between non-linear and linear systems is stable. That way, good pole order meets multiple performance goals. That is, the white area reveals all likely candidate closed-loop poles. In this way, the dynamic of the racing drone is controlled without altering its innate structural design. Taking into account that

Performance metrics range - (x, y) closed loop.
Time Domain analysis - Racing performance.
The Matlab Control System Designer application has been used for multiple concurrent tasks. First, it was used to assess the effect of the gains. Secondly, it was used to catch their behaviour. In addition, this was used to fine-tune the design of the controller structure. In this way, the root locus of the system was conducted. The step responses and the controller effort also.
The process applies to a dynamic model of the non-linear system. It means a closed-loop architecture that needs to be controlled. Those are remade into linear models: It stands for the model’s Zero-Pole-Gain (ZPK). Also, it can be a Transfer Function (TF) of the model. Likewise, into a State Space - Matrix (SS) functions. Thus, they are packed into the Matlab application. At this point, the requirements of the design must be defined (see Table 3). This way, the voltage regulators are continually adjusted (See Figure 3). The process is ended when the desired performance is gained.
The app can be used directly if at least one of the linear models is available. Also, the linear model can be loaded into the design architecture. If not, it is possible to start the PID tuner app directly to design and tune the controllers.
The dynamics of a racing drone were earlier studied experimentally.
48
Rash accelerations were found. In addition, high speeds in quick times were seen. Due to this and the fact that it is not planned to set high levels of automation, thus, a classic cascade PID control strategy was picked (see Figure 4) for the simulation platform. In this way, the described design process was used. Where

Schematic of the control architecture.
The effect of the three chosen candidate compensators (K) is presented in Table 4. Also, it shows the designed PID controller structure. It is to control the position of the

System response and controller effort applying the three designed controllers.
PID controller structure.
Trajectory guidance
The international sporting regulations (FAI) do not allow wheelbases (
Simulation platform experiments
The co-simulation aims to use a typical racing drone airframe design. Also, track the trajectories and guide them around race tracks by waypoints. However, the aim is not to guide the trajectory between points like autonomous racing drones. It is related to the pilots’ point of view. The structure of the racing drone is drawn on the NX CAD module. MATLAB-Simulink will cause the flight trajectory.
Three well-defined sets of airframe models have been recalled. 48 They are named symmetric (SY), non-symmetric (NSY) and hybrid (HS) geometries. A generic symmetric model has been chosen for the airframe design. Figures 6 to 8 show the setup of the NX CAD model assembly.

NX CAD part set up / Front view.

NX CAD part set up / Back view.

NX CAD part set up / Perspective view.
Basic requirements for geometry design are shown in Table 5. It relates to the mathematical expressions of the CAD part sizes. The material features for all parts are assigned in the part module of NX. It is found following the route:
Technical geometric specifications.
The material created for the airframe structure is an intermediate stiffness carbon fibre (IM). It has a low modulus of over 100 GPa. The tensile strength is greater than 3 GPa. With a density of 2

Material characteristics.
Suppose it is required to access the body mass distribution analysis and all moment-related results from the NX platform. In that case, they should be found in excel file format following the route:
The effects of the geometric features are shown in Table 6. A script from MATLAB records the whole excel database. Thus, it sends the needed data to a Simulink block. A simulation stage is built to generate the thrust force signal. It is built from the NX motion module. All physical features of the structure are inherited from the CAD module.
Results of body mass distribution.
In the Figure 10 it is possible to observe the motion simulation scenario. Note that the yellow and black colours define the links to be joined. The rotation axis (Z) arrow represents the output force and direction. A revolute joint connects the motor and propeller. Also, they are connected to the airframe arm by a fixed joint. The degrees of freedom of the structure is defined by nine links, four joints per revolution and five fixed joints. Thus, it simulates the motion of motors and propellers. To start the motion simulation, the input to the system is a step function. It emulates the throttle lever positions starting at 50% of the total travel. This signal is multiplied by the nominal voltage. In this way, it obtains its magnitude and direction of rotation. A motion sensor is located at the propeller’s tip to store its RPM.

NX Motion simulation environment.
It is also possible to see two brown arrows in Figure 10. The vertical arrow on the Z-axis means the output force and direction. Also, the arrow around the Z-axis shows the direction of rotation. The output by each motor is a normalised signal. It emulates the thrust force for 50, 60, 75, 90 and 100% of the throttle lever travel, and its magnitude is stored in a force container.
The FAI sporting code suggests using 4s up to 6s batteries. So, the maximum voltage allowed in a racing competition is about 17-23 volts. In addition, the propeller lengths are up to around 5.9 inches. Also, the magnitudes required for the thrust force to be modelled are listed in Table 7. Likewise, these conditions match with a set of earlier assessed electronic pieces. 48
Thrust force requirements.
The parameters to link with Matlab-Simulink are in Table 8. The solver algorithm that holds all the execution routines is called Recurdyn. The set of RMD, MSG and RPLT files make up the solver.
NX parameters.
A user-definable block (s-function) is used to load the NX motion dynamic parameters to Matlab. This function is called by the name version of NX that is running. A successful link should result in an NX Simulink block, as in Figure 11.

NX Thrust Dynamics.
A transfer function (10) identifies the NX plant. In this way, tune the control parameters in Simulink. Note that the thrust is Newton-units. Also,
The diagram shows (see Figure 12) the tools used to realise the design. Also, it shows how they interact with each other. The translational accelerations

Control design strategy.
The track layout is a matrix with reference points
The subtraction between the destination points and the current position of the centre of gravity

Guidance and trajectory tracking.

Angular rate and attitude control.
The result of the co-simulation is successful (Figure 15). Points 1, 2, 3 and 4, labelled in Figure 15, indicate the points on the rectangular trajectory that the drone has travelled. Thus, waypoints 12 – 34 are 2.5 metres, and 23-41 are 50 metres. The directional components of the trajectory have been calculated. It is to confirm that the drone points with the nose towards the direction of the second point, as seen in Figure 16. It simulated the perspective of the first-person view (FPV). The red arrows show the direction of the nose of the drone. For this experiment, the simulation flow starts at 0.0 seconds, and the stop time is between 300 and 700 seconds in Simulink. The type of solver used is called variable-step.

Typical trajectory of a racing circuit.

Video camera pointing towards the target point – for first person view - FPV.
The sample time in Simulink was set to 0.01 seconds. The Dormand-prince solver (ODE45) was used to run de simulation. In contrast, the Forward Euler method was used to assess control gains. It is a numerical approach to the Runge-Kutta methods.
The studied motion dynamics related to Figure 17 were linked to a rectangular flight trajectory. It is through waypoints 1, 2, 3 and 4, as shown in Figure 15. Note that waypoints 12 and 34 connect to sectors with tight turns. So, waypoints 23 and 41 to straight trajectories.

Dynamic behaviour of the models according to the effort of the controllers and the thrust force requested.
The gains of the voltage regulators used are the default ones (see Tables 9 to 11). Where
Attitude controller default values.
Rate controller default values.
Position controller default values.
Figure 17 shows all the kinds of racing drones 48 included in the platform. It considers the mass distribution of all models. In addition, the features of the electronic components are in Table 7. It also shows the capacity of the effort made by the controllers. It is due to the thrust force demanded by the motors. It is over a square trajectory. However, studying the dynamics of racing drones on five diverse trajectories is doable doable (See Figures 19, 26, 27, and 28 in annexes section). These are usual trajectories performed in an FPV competition.
Figure 17 contains ten graphs from the letter a to e. The thrust force required by the motors is shown on the right-hand side of Figure 17. The effort the regulators made to meet the requested force is shown on the left-hand side. The grey arrows and the horizontal lines on the left-hand side of Figure 17 show the time per lap for each model—also, the maximum effort made by the controllers through the trajectory. A straightforward graph is placed in descending order. It means that at the top of Figure 17 are placed the models with the most extensive Wheelbase (
Tables 12 to 14 are for the models with outstanding dynamic behaviour. They show the quantities of the flight test simulation. Note that peaks of effort controller appear on tight turns (waypoints 1-2 and 3-4). Regardless, the maximum thrust forces are earned. In contrast, those remain constant on straight trajectories (waypoints 2-3 and 4-1). It is then tracked that the non-symmetric (NSY) has slightly different dynamics on tight turns. Likewise, hybrid (HS) models. However, the mass distribution of HS models allows higher force than the NSY. Although per similar pieces of effort offered by controllers on the straight trajectory. The highest thrust on turns is around 9.3 and 7.5-newton units. While in straight trajectories is nearly 0.9 and 0.7. Graph a2 shows the heaviest models. Note that the SY voltage controllers cover the highest thrust demand requested by the motors. Also, that model reaches the highest performance. Even the lightest model falls short of this performance (see graph e(2)).
Lap-times performance through waypoints.
Effort controller performance through waypoints.
Thrust controller performance through waypoints.
Note that the thrust forces for the NSY and HS models are similar on the trajectories. However, as the weights decrease, shorter lap times are earned. Also, the time gap and weight of each airframe decrease. Thus, the ability to fulfil the raised thrust on straight trajectories is proportional to the model’s weight. However, it is limited by the speed controller (ESC). It must often respond to speed shifts. In this way, it limits the amount of acceleration earned on straight trajectories. It is possible to attribute the performance in tight turns to the geometry aspect ratio (i.e.
Setting up relevant control actions is critical. It should be according to the geometric shape kind of the airframes. Thus, the dynamic operating range has to be shrunk. Proper action control allows taking the edge of the mass distributions of the airframes. Thus, reach the dynamic behaviours described in the literature. 48 Else, the control system tends to prefer symmetrical airframes (SY). Suppose the likeness of the controller stresses is considered. Also, mass distribution is taken into account. In this case, the SY stands out. It is due to its long arm and inertia effects. Unlike, the HS model does not take the edge of its shape. Thus, there is no proof of a racing leap. It is vital to handle the controller gains suitably for a specific trajectory.
How to set up multiple experiments
The platform consists of five blocks of variants. It is to handle the simulation process: Gray variant block stores the trajectory control loops. Black variants stored the system guidance. Thus, three variant blocks hold the geometric features of each airframe (SY, NSY and HS) (See Figure 18).

Simulation Platform for racing airframes.
Choosing the control path before running the simulation is required. The airframe shape should be specified. Also, the wheelbase has to be selected. Likewise, the communication ports and the platform must be updated. For this, variables should be writ in the Matlab window. It is set in the annexes section. All feasible geometric has already been validated on the platform. Thus, the control path is defined in Tables 15 to 17. The platform offers five standard FPV trajectories. Table 18 defines the path to be selected. In addition, Figure 19 shows another kind of trajectory of a racing drone. The vertical black lines define the usual obstacles of an FPV competition. To apprehend the trajectory realistically, thus, the control point is placed in the centre of the obstacle. When the nearness to the point is less than 0.25 mm, the pilot turns the drone, and it goes to the next obstacle. These can be applied to each kind of drone chosen. Thus, the dynamics of the model may be studied as a function of the stress on the controllers. Also, the forces interacting on the picked trajectory could be studied.
Options airframes Symmetrical structures.
Options airframes Non - Symmetrical structures.
Options airframes Hybrid structures.
Trajectory options.

Trajectory options – Cross.
The control path will be highlighted in black if the above commands are correctly typed. The platform will be ready to run a simulation. The kind of airframe preloaded on the platform has been carefully picked. It fits the report raised about racing drones. 48 Thus, suppose that the controllers require a custom fit. Likewise, the reference generator needs to be edited. In those cases, all airframe choices have a unique control system. It can be found within the grey variant block. They also follow the control system shown in Figure 4.
Conclusions
The platform is open in Matlab Central for file sharing. 56 It is planned from the racing driver’s view. Still, it even offers a broad option of approaches. It is feasible to get distinct kinds of airframes. It means to asses the dynamic performance on unlike trajectories. In addition, sort of situations can be handled. These are tied to aerodynamic or autonomous control problems. Also, to study topics linked to machine learning. All the toolboxes offered by Simulink can be used.
The platform offers to check all design features. It means each geometric option can be studied apiece. It has 15 kinds of known airframes. In addition, it offers the option of adjusting all the control loops based on need. Thus, the motion of the drones can be linked to the accelerations reached on the trajectories. It is an open platform that lets in new updates. That is, it can be boosted to acquire data from vision sensors. Also, obtain data in real-time or for hardware uses.
All airframe models inside the platform are variants of the system. Suppose the goal is to optimise the controllers. In that case, each variant can evolve a system model. Thus, adaptive control methods can be offered. Now, suppose the goal is to optimise the geometric features. It is for studying the trajectories and the controllers’ efforts. In that case, all airframe sizes are script functions or parametric equations.
The aim is to study the dynamics of racing drones. Thus, the platform handles the equations of motion in a certain way. In addition, it shows a cascaded PID control for all model variants. Since access to the blocks is open. Thus, it links quickly to any design application (MOD). Likewise, the control scheme is elastic to any case. In addition, the geometric options are ample, allowing racing aerodynamics to be studied. Thus, they can be optimised for distinct trajectories. It makes the platform a flexible design tool.
Earning high performance in demanding situations is a challenge. It needs design goals beyond a classic machine’s performance measures. High dynamic motion, such as that of racing drones, is a sample. Thus, it ought to be handled gradually. Control methods have already been broadly learned. Also, techniques have expanded at the same time. Thus, this study has focused on the kinds of airframes bound to the effort they require from controllers.
The CAD design module allows a high definition of the airframes. This way, a precise estimation of the moments of inertia was aimed. In addition, motion simulations added a degree of exactness. The motors and propellers were also drawn using the CAD module. It allows a proper model of the motor dynamics. That is the motion of the propellers tied to the airframes. Thus, the motion app attaches the features of the model. Likewise, it lessens the computational load in Simulink. Estimating the thrust force outside Matlab seeks a drop in the simulation time. In addition, this streamlines the design flow.
Supplemental Material
sj-pdf-1-mav-10.1177_17568293221143785 - Supplemental material for Co-simulation platform for geometric design, trajectory control and guidance of racing drones
Supplemental material, sj-pdf-1-mav-10.1177_17568293221143785 for Co-simulation platform for geometric design, trajectory control and guidance of racing drones by J.M. Castiblanco Quintero, S. Garcia-Nieto, R. Simarro and J.V. Salcedo in International Journal of Micro Air Vehicles
Footnotes
Acknowledgements
This work was partially supported by proyect PID2020-119468RA-I00 funded by MCIN/AEI/10.13039/501100011033.
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was partially supported by proyect PID2020-119468RA-I00 funded by MCIN/AEI/10.13039/501100011033.
Supplemental material
Supplementary material for this article is available online.
References
Supplementary Material
Please find the following supplemental material available below.
For Open Access articles published under a Creative Commons License, all supplemental material carries the same license as the article it is associated with.
For non-Open Access articles published, all supplemental material carries a non-exclusive license, and permission requests for re-use of supplemental material or any part of supplemental material shall be sent directly to the copyright owner as specified in the copyright notice associated with the article.
