Multirotor drone sizing and trajectory optimization within Modelon Impact

The design of multirotor drones often relies on optimizing its performance in terms of maximum speed requirements and hover time. This is well suited to undefined tasks. In the case of repetitive tasks, the drone trajectory can be added as a third degree of freedom. This paper focuses on the use of Modelon Impact and its dynamic optimization capabilities to reach a multirotor drone design and 1-D trajectory optimization. In comparison to other options investigated by the authors in a separate publication, Modelon Impact based optimization proved to be much simpler, more robust, and faster – for this use case.


Introduction
Multirotor drones are often associated with toys that are fun to pilot.The drone designer does not know in advance who will use the drone and how it will be used.Therefore, these drones are typically designed based on performance requirements.For a toy drone to be fun, the user expects it to be fast and to have a satisfying autonomy.The toy drone designer often takes as requirement a maximum speed and a given hover time.
On the other side, multirotor drones are also being developed for some industry applications for a variety of rolesfrom packages delivery to military assistance or payload lifting in substitution to cranes.Contrarily to the toy drones, industry drones typically have well defined missions often expressed as: • Start point: initial elevation, hover time • End point: final elevation, horizontal distance from the initial point and hover time Missions including more points can be described as sequences of start and end points.
Getting back to the sole mission of the dronein comparison to optimizing for performance requirementsrelaxes an entire degree of freedom: the drone trajectory.Solving both the drone sizing and trajectory optimizations allows focusing on optimization criteria such as minimizing energy consumption or the cost function, if willing to associate a cost to the parts that compose the drone and its utilization (time of utilizationincluding potential operatorand energy consumption).
This paper presents how easy it is to perform sizing and trajectory optimization of a system within Modelon Impact.A drone is selected as example system.A selected case studypayload liftingis introduced in section 2. The drone model is discussed in section 3 of this paper, with a particular focus on the propeller.In section 4, we present the optimization problem, the simplicity of its implementation in Modelon Impact and the associated results.Finally, section 5 is a collection of advantages that come with optimizing using OPTIMICA and Modelon Impact.

Case Study -Payload lifting 2.1 Use Case
It is typical on construction sitesmostly when approaching the end of the constructionto either keep a crane operating for a longer period time to lift some minor equipment or material, or to carry this payload by human strength.While the former solution is often expensive, the latter requires manpower and can affect physical health.The use of drones to lift these small payloads (Draganfly, 2022) is an economically attractive solution which has a low impact on physical health.This paper focuses on a drone design aimed at a repetitive task: small payload liftingbelow 25 kgfrom ground to the top of a building.

Main Requirements
To match the use case presented in section 2.1, the main requirements for the drone designs are related to the lifting operation in terms of payload and endurance: • Payload: The drone shall lift masses up to 25 kg during its full operation.
• Endurance: The drone shall operate at least 150 climbs of at least 10 m height with 5 seconds hoveringfor the handling of the payload.
For this use case, the drone returns to ground without any payload and thus with very little energy consumption.Should the drone carry payload on the descent, the number of climbs would be reduced inevitably.

From Drone Architecture to Model
This section details the drone architecture, technological choices, the sizing problem formulation and discusses the associated model.

Drone Architecture
Different architectural choices can be made depending on the purpose and the mission.For multirotor drones, the main choices are the number of arms and the number of propellers per arms but also the materials and technologies of the components.
As the main usage of such a drone is in urban area, it was decided to select a fully electric drone design.Indeed, electric motor emit less pollutionin terms of emissions, smell, and noisethan the combustion ones.In the presented work, a single architecture is considered for the multirotor drone.The architecture is presented in Figure 2 and is composed of:

Discussion on the Drone Model Fidelity
As for physical systems, a simulation model is developed for a given purpose.This purpose guides technological choices on the model development, such as general assumptions, the physical effects modeled, the level of details, the smoothing, etc.These are all gathered within the so-called model fidelity.
The purpose of the multirotor drone model for this paper is to perform a component sizing and simultaneously optimize the 1-D trajectory of the drone to perform a well-defined task.From these two purposes, we can extract a few technological choices.

Sizing purpose Implications on model causality
When it comes to sizing a system based on a desired trajectoryhere, imposed by the optimization algorithm -, it is often necessary to reverse the power chain.This is also known as bicausality.
A performance simulation of the drone model would typically require a known load at the propellers and would compute the resulting speed of the drone, for a given command.On the contrary, a sizing scenario would provide both the load at the rotors and the drone speed.These two variables define the required power output, which can be propagated upstream on the power chain to compute the require power at the power generation or storagehere, the battery.
As the design validation would require a performance simulation, the acausality of the Modelica language is clearly a benefit to solve sizing problems.The sizing solving requires propagating the power variables through the component ports in one way or anothere.g. by having flow and non-flow which product would lead to the power or by adding the power to a connector.

Selection of model complexity
For cost reasons, we assume the drone will be assembled using off-the-shelf components.The sizing problem thus consists mainly of finding a good order of magnitude for each component size.Therefore, physical effects to be modeled should only be the dominant ones and their implementation complexity could be quite low.Consequently, scaling laws are used to design the components and efficiencies are often used to assume lossesinstead of overloading the model with multiple separate physical losses, e.g. each separate friction.

Optimization purpose
Most optimization algorithms rely on gradients to define on which direction they should perform the next step.This means that the variables of the model should, at least, be continuous and derivable.A special effort is made in the Modelica code to respect this constrain.
In addition, minimum, maximum and nominal values of the design variables are provided to allow respectively to bound and normalize the variables and equationskey for optimization convergence.
Finally, dynamic optimization benefits from having both an initial and a nominal trajectory that match the specified requirementswithout necessarily be optimal.This is easily achieved by simulating first the drone behavior with a smooth trajectory command.Here, the acausality of the Modelica language becomes once more convenient.

Drone Model -Focus on Propeller
The drone Modelica model serves two purposes: 1.It includes the scaling laws for all components to allow their sizing.While CT and CP are dimensionless, they are not constant.These depend on further variables such as the blade pitch p, the air Bulk Modulus K, the relative airspeed V (normal to the rotor plane).It is here assumed that: ℎ = (, , , , , ) (3) →   = (, , , , , )/(   2  4 ) (4) Performing a dimensional analysis on these equations allows identifying a reduced set of dimensionless variables that can define this equation.Note that Buckingham's theorem gives us the insight that these dimensionless variables are in number of 3 (6 variables and 3 units dimensions).The detailed dimensionless analysis is available on requestplease email the authors.This gives us the following three dimensionless numbers: • The pitch to diameter ratio:  = ℎ/.
• The air compressibility indicator:  = /( 2  2 ) The analysis on CP reveals the same dimensionless numbers.As both the thrust and power coefficients are surface responses, these are better fitted with polynomial regression rather than with power regressionas discussed in (Sanchez 2017).
A sensitivity study was conducted in (Budinger 2020) on the three dimensionless numbers within the domain of usage of the drone.It showed that both CT and CP are quite insensitive to the air compressibility indicator, within this domain.Finally, the fitting revealed the following equations: ≈ 0.02791 − 0.06543 − 0.23504 2 + 0.02104 3 + 0.11867 + 0.27334 2 − 0.28852 3 + 0.18677 2 (5) The surface responses and the corresponding datasets are presented below for both coefficients.This gives us the performance model of the propeller, that needs to be completed by its sizing model.For the propeller, that parameters of interest are the mass and the inertia.These are computed based on scaling laws.The propeller mass Mprop is found to be proportional to the cube of its diameter.From the mass, the inertia Iprop can be computed.Note that scaling laws require similar reference data to scale on to.

Sizing Problem Formulation
The main sizing scenarios, design drivers and models for vertical flight applications of multirotor drones are summarized in Figure 5.Such applications consist of three sizing scenarios to be considered in the design problem that are: 1. the hovering flight with the advance ratio of the propeller J = 0as the air speed V is null.
2. the takeoff phase which requires maximum power to accelerate the drone with an increasing Jincreasing air speed V.
3. the climb phase with a constant vertical speed and thus constant J.The objective is to minimize the weight of the vehicle for the defined mission with respect to design variables such as the propeller pitch βpro or the nominal motor torque Tmot.The design has to respect some constraints to respect the technological constraints of components such as motor maximum electromagnetic torque Tmot,max as well as others to respect voltages consistency in the power train (Umot ≤ UESC and UESC ≤ Ubat).Some consistency constraints are used to solve multidisciplinary couplings as suggested by Delbecq (2020) (Emission ≤ Ebat and MTOWf ≤ MTOW).This also requests to add normalized design variables such as kMTOW and kbat,mass.
Instead of minimizing the drone weight, minimizing the energy could have been used as objective.Unfortunately, within the time given to investigate this solution, this seemed to be a less robust option.Minimizing the mass is a conscious problem simplificationa lower mass means less energy to carry it.The authors acknowledge that minimizing the energy might lead to a slightly different optimum to this problem.

Optimica Implementation
Modelon Impact (Coïc 2020-b) is a state of the art, cloudbased modeling and simulation environment, relying on open standards such as Modelica, FMI and Python.Modelica models can be developed within Modelon Impact by composition (drag and drop and connect) of existing models from available Modelica libraries, or by writing Modelica code within the code editor.Modelon Impact compiler, Optimica Compiler Toolkit (OCT), compiles the modelseither in steady-state or dynamic simulation mode.
As many engineering problems can be cast as optimization problemsincluding optimal control, minimum time problems, optimal design, and model calibration -Modelon Impact compiler supports optimization of dynamic and steady state models.This is achieved relying on the extension of Modelica language for optimization: OPTIMICA (Åkesson 2008).
As the OPTIMICA language extends the Modelica language, it is convenient to opt for a similar approach when formulating an OPTIMICA optimization problem.Thus, the optimization model could be built as follow: 1. Create an optimization class and provide modifiers to set up the objective and time constraints.
2. Extend the Modelica model and provide modifiers to fix or relax parameters as well as minimum, maximum and nominal values.
3. Optionally add more variables and equations.
4. Add the constraints of the optimization problem.
The Optimica code of the drone optimization is listed in Listing 1.It appears that the OPTIMICA language is straightforward for a person used to the Modelica languagewhich itself is quite straightforward for many engineers.This way, the threshold to develop an optimization model is minimized.

Optimization Results
The result of the optimization problemsolving both the design (component pre-sizing) and trajectory optimization problemsare shown in dashed lines, for some variables, in Figure 6.
The solution of the sole trajectory optimizationwith a separate sizingis presented in full lines.This highlights the differences in trajectories when sizing is added as part of the optimization.When combining both, the optimizer could assess that it was more energy efficient to increase the size of the propeller, reducing its rotational speed, allow a smoother trajectory and compensating by a bigger batterythat can allow the relevant number of ascents.
After scaling to 150 climbs (endurance requirement), the optimum resulted in a drone weighting about 45 kg (without payload) with a battery contributing to more than half of the weight (about 27 kg).A drone designer might find interesting to investigate an easily replaceable battery pack in order to reduce the endurance requirementleading to potentially more convenient (and safer) drones to operate.
These results were obtained with similar orders of magnitude with both Modelon Impact and a comparative solution based on FAST-OAD (David 2021).

The Benefits of Modelon Impact
There are several advantages in using Modelon Impact compared to a separate optimization with a Python package or in a dedicated optimization platform such as OpenMDAO, even if relying on a FMU for the plant model.
A key advantage of using Modelon Impact is that it relies on its OPTIMICA compiler and the OPTIMCA language, as mentioned previous, extends the Modelica language.Hence, a fair amount of the benefits listed below are Modelica features serving the optimization purposes.

Solving Initialization Problem
The Modelica language can deal with both Initial Value Problem (IVP) and Boundary Value Problem (BVP) for the model initialization.In the former case, the user provides the initial values for every state.In the latter, the number of independent initial values should match the number of states but is not necessarily their initial values.
Therefore, Modelon Impact compiler solves an initial problemdifferent from the dynamic problemto resolve the BVP.In this process, the compiler can solve linear and non-linear systems, which is often not tolerated out of the box with a different solution.For example, in the Python optimization, it was necessary to adapt the code, define iteration variables (coefficient factors) and residuals (equations that should tend to zero) to solve these nonlinear problems.

Acausality -One Model Several Purposes
A second advantage is that the Modelica language is acausal.This way, defining a Drone model based on the equations of the physics makes it useful for several use cases: position, speed or torque command.In our example, we want to optimize the torque trajectory while sizing the drone.Nevertheless, it is convenient to provide the optimizer a start trajectory not too far from our constraints.This is easily achieved by simulating the same

Normalization for Convergence
Modelica models and FMUs usually use variables expressed in SI units.Variable values may therefore differ by several orders in magnitude (Coïc 2020-a).A typical example is thermodynamic models containing pressures, temperatures and mass flows.Such large differences in scales may have a severe deteriorating effect on the performance of numerical algorithms and may in some cases even lead to the algorithm failing.In order to relieve the user from the burden of manually scaling variables, Modelica offers the nominal attribute, which can be used to automatically scale a model.Modelon Impact compiler can use these nominal attributes to scale the variables (and thus objective) of the optimization problem.In addition, it is possible to provide a reference trajectory for scaling at every time step of the simulation.

Derivatives at Hand of the Optimization
Finally, the Optimica language, being an extension of Modelica, has access to all the equations of the model and can process these.Thus, the compiler automatically computes all the derivatives it requires to secure a fast and robust convergence to a global optimum of the problem.

Simpler, Faster and More Robust
Modelon Impact solution also proved to be much simpler than the python with FAST-OAD approach.The Modelica code wasn't written differently for performance simulation and for optimization purposes as it was the case for its Python version.Also, the optimization problem formulation in OPTIMICA language is very simply expressed, as mentioned above (see Listing 1), and does not diverge much from the Modelica languagewhich makes it really easy for a Modelica developer to ramp up on OPTIMICA The same optimization problem was solved in Modelon Impact and using FAST-OAD.For this optimization problem that consists of 10 design variables, 7 inequality and 1 equality constraint, Modelon Impact could solve the problem in less than 30 seconds while it took more than 2 minutes to FAST-OAD.This can be explained by the different level of information on the model the optimizer hasby default FAST-OAD does not have access to the internal derivatives of the model.
Finally, and this might sound unfortunately qualitative, the Modelon Impact solution was more robust, more straightforward to converge.While it took several hours of debugging to get the Python code running and optimization solving with FAST-OAD, it appeared to work almost directly with Modelon Impact.In all transparency, the first attempt did not involve normalization of the added variables for inequality constraints, and it failed to converge.Normalizing solved the issue.

The Benefits of FAST-OAD
There are many applications for which higher model fidelities are required.FAST-OAD supports easy coupling with Computational Flow Dynamics or Finite Element models.FAST-OAD scales also very well with the number of models involved in the optimization process.Therefore, the authors value both technologies and, indeed, some authors are major contributors to FAST-OAD development.

Conclusion
This paper uses a multi-rotor drone (pre-)sizing and trajectory optimization to illustrate the needs for solving such a problem.The model fidelity is not necessarily the highest but constrains on the numerical aspect of the code are highlightede.g.acausality, smoothness, etc.The models shall be "optimization-friendly".The propeller model is detailed to emphasize the level of details sufficient for such a purpose.
In a second step, the optimization problem has been expressed, first analytically and then in OPTIMICA languagesupported by Modelon Impact.The solving of the problem is achieved, and the benefit of this solution are discussed, in a generic way, and in comparison with another implementation using Python and FAST-OAD.
The results proved that solving the sizing problem in combination with the trajectory optimization leads to a better design, compared to solving both problems sequentially.All industries could benefit from optimizing systemsthat are meant to existin a more complete manner, e.g.including dynamic optimization of trajectories.
As a perspective of work, we could show how the same model serve the purpose of Model Predictive Control of the multi-rotor drone to actually reach the optimum trajectory it was designed for.Another axis of improvement could be to use one of Modelon's 6 degrees of freedom drone model to be able to include environmental constraintssuch as a wind fieldin the overall design optimization problem.

Figure 1 .
Figure 1.Illustration of the load lifting use case.

2.
It encodes the physics equations to model the flight performance and power consumption.The component sizing models used are scaling laws, linear regressions of data sheet and surrogate modelsdetailed by Budinger (2020).The physics equations are well known equations from components and are presented by Delbecq (2021).It is however relevant to present here the propeller model, as a representative component of the drone.The propeller represents a key component in the drone propulsion chain.Its performance can be expressed as a function of two coefficients CT and CP, respectively expressing thrust (1) and mechanical power (2) equations: ℎ =      2  4 (1)  =      3  5 (2) where ρair represents the air density in [kg/m 3 ], n the rotational speed in [rev/s] and D the propeller diameter in [m].

Figure 3 .
Figure 3. Surface response of CT and reference dataset (dots).

Figure 4 .
Figure 4. Surface response of CP and reference dataset (dots).
8)From this complete set of equations, we get the propeller sizing and associated performanceimpacted by the sizing.Similar models are developed for all components and the following parts of the paper will focus on the general sizing problem formulation and optimization problem, rather than detailing each component.As a reminder, these equations are available in (Budinger 2020) and the propeller model fidelity is representative of the rest of the model.If of interest, a more detailed Modelica performance model is presented by Podlaski (2020).

Figure 6 .
Figure 6.Comparison of resulting trajectories for the trajectory optimization with and without the sizing.