CAD-based Approach for Identification of UAVs

The paper presents an approach for the identification of the parameters of an Unmanned Aerial Vehicle (UAV), specifically a quadrotor using experiments in a CAD environment. A linearized control model is proposed to create a global model that operates in all operation range. Usually, in this type of systems a linear time invariant (LTI) controller is used, and then a lineal control model around each operating point is needed to the design of the controller. In this study, a linear control model suitable in each operating point is developed and identified. This serial of LTI control model can be combined and provides a global control model. Therefore, through this global control model can be designed a global controller suitable for all the operating range.


Introduction
The knowledge of robot dynamic parameters is essential for several objectives: simulation [1], automatic control [2,3], and mechatronic design (i.e., to optimize robot design by studying the interaction between the robot and its environment [4]). Therefore, a suitable estimation of the parameters of the robot (in our case a quadrotor) is indispensable to fulfil those previous objectives. Lastly, different estimation methods have emerged to obtain a good model of the robot that represents the maxima information of the robot system ( Figure 1) [5]. The model proposed in this paper is a linearized control model derived specifically for designing controllers [6,7,8]. It is obvious, that the development of precise and suitable control models is a step very important for designing controllers which fulfil the desired control specifications (stability, rapidity and accuracy). For this motive, before a controller computation, an enough "good" control model is needed. In this case, the quadrotor is a system nonlinear with parameters that vary along the time. Then, to keep all the information of the system is necessary to develop a model that works in all the system operation range. Linear control is usually used to control quadrotors. Then, usually a serial of linear local models combined (for example, with a polynomial rule) to make a global model is proposed. In this case, authors propose a control model linearized around set-points.
Dynamic parameters can be grouped into the following three main categories, based on the contribution they provide to generate motor torques [9]: (i) unidentifiable parameters: if a variation of the parameter does not modify the robot dynamic behavior; (ii) linearly independent parameters: if a variation of the parameter modifies the robot dynamic behavior in a way that is not repeatable by varying another parameter (or a set of other parameters) (iii) linearly dependent parameters: if a variation of the parameter modifies the robot dynamic behavior in a way that is repeatable by varying another parameter (or a set of other parameters) This paper is focused on one specific branch of the tree in Figure 1, that is, the Parameters identification procedures belonging to the category of offline estimation. This paper is based on the identification CAD of a physical linearized model control. This model will be used to design advanced controller for a quadrotor in a future.

Movement and operation of the quadrotor
A very simple and realistic way to model the quadrotor only for the explanation of their movements is a simple solid rigid which have four rotors with asymmetric rotation of adjacent propellers. This means that one pair of the propellers rotates clockwise, while the other pair rotates counter clockwise, but all propellers generate an airflow for lifting the quadrotor. Moreover, this configuration helps to remove side propeller needed in standard helicopter.
Another interesting property of a quadrotor is that it is an underactuated system. This means that the number of degrees of freedom of the system (in total 6: 3 for position and 3 for rotation) are more than the number of actuators (4 rotors). Therefore, it is not possible to achieve the desired state for all degrees of freedom. Despite this, the particular geometric configuration of a quadrotor helps to decouple control variables and selecting a simple controller. The basic movements are related to the way in which the spacecraft rotates, that is, Euler angles. Figure 2 shows the assignment of each Euler angle to each axis of quadrotor: pitch, roll and yaw.
This kind of quadrotor needs that the whole weight will be in the range 30-40% of the maximum thrust, because it is designed for carrying charge, not for speed races. In this case, it was calculated that the quadcopter was going to measure 1m1m. The most of the structure is made of aluminium. After iterate several times, it ended up getting to the necessary measure, 108 cm x 108 cm. The symmetry of the structures makes very easy to calculate the size of the propeller, which is 44 cm. The space to place the hardware is defined by the 4 circles of 44 cm in diameter. The main advantage of aluminium is that it possesses a high strength, that combined with the right thickness gives a highly resistant and light structure.

Hardware and Gimbal
In this section, the most relevant parts for the operation of the quadrotor are described, doing special emphasis on the electronic parts, and also it is presented a diagram to sum up the components used and the connections between them.  Rotor: In this quadrotor, three-phase outrunner brushless motors are used, which have the advantage of delivering high power at very low weight. However, the control of these rotors involves a much more complicated procedure, as an electronic controller that is in charge to regulate the speed of rotation. In one hand, the DC motors are much easier to control, but usually need an additional set of gears to achieve the desired speed and torque, which introduces into the system an extra weight, complexity, inefficient and high noise.  Electronic speed controller ESC: The ESC is a circuit that is responsible to generate a three-phase signal that powers the rotor. In particular, a digital open-source ESC has been selected. The vast majority control the speed of rotation by a signal supplied by the pulse width modulation (PWM). However, it can be controlled by: PWM (servo motor), analogue circuitry, UART, I2C, USB or CAN-bus. It also allows to read all rotor variables: power consumption, speed, etc.  Second Processing Unit: The second processing unit is a board that is responsible to control in short term the state of the quadrotor. Therefore, it has the responsibility to send control signals to the ESC, read the current orientation and position from the sensors, and handles all basic communication using radio frequency to be connected to the base station.  Main processing unit: The main processing unit is the board that is responsible for monitoring in long term the status of the quadrotor, such as to generate a trajectory knowing the current position and a map of the area or processing information from cameras to avoid obstacles. Also, it is capable to run the optimization toolbox such as ACADO, since it is a C++ code that can be compiled on the board.  The gimbal is a system specially designed to orientate a set of tools in the space. It is designed to be modular and be able to adapt the size of the gimbal to make fit the tools on it. Moreover, the system has been damped using a set of antivibration rubbers. The gimbal has its own controller that uses three rotors GB-42, one for each Euler angle of the gimbal. The controller is a Basecam SimpleBGC that combines two external sensors to calculate very precisely the pose of the tool. Also, it receives the desired orientation from the second processing unit. Furthermore, it is possible to control manually the orientation using a joystick. The actual gimbal has 2 tools: an airsoft marker and stereo camera system. The stereo camera system has two webcameras Trust 720p, because it is a cheap setup that give really good results. However, it will be changed for a professional camera once the quadrotor became stable with the marker.

Mathematical modelling
In this section the mathematical model of the quadrotor is explained. The kinematic model of each part of the quadrotor will be derived using the Euler angles, and moreover the dynamics model of the quadrotor will be calculated based on the first principle of a rigid body using the Newton-Euler formulation. Furthermore, the following assumptions are used:  The structure is completely rigid and perfectly symmetric.  The center of mass is in the origin of the quadrotor fixed frame.  The thrusts are proportional to the square of the motors rotational speed.

State-space Model
The State space of the quadrotor is formulated as: X=[x 1 ,x 2 ,x 3 ,x 4 ,x 5 ,x 6 ,x 7 ,x 8 ,x 9 ,x 10 ,x 11 ,x 12 ] T which is mapped to the degrees of freedom of the quadrotor as the following: Where r =[x,y,z] T is the quadrotor position, and (φ,θ,ψ) are the Euler angles (roll, pitch and yaw).
The control inputs are defined as the following: The  MAX is the maximum velocity achieved by the motors and it is used to normalize the inputs, so the U i is ranged between 0 and 2 MAX .
Finally, the state space representation is the following: (1)

Linearization of a quadrotor around an equilibrium point
The model deduced in Eq. (1) presents several nonlinearities that are produced by three factors: the orientation (Pitch, Roll and Yaw), the control action and the angular velocities. To be able to work with the system in manageable way, it is necessary to linearize the system. A usual method to linearize the system is the use of a classical linearization around an operating point. This linearization require that the model can be expressed in the following way: Where x is the state of the quadrotor, u is the control action, d is the disturbances and y is the output variable. The matrices A sp , B sp , C sp , G sp are the linearized equation from Eq. (1). The operating point x sp is the equilibrium point state about around is linearized the system.
The total system has been simplified removing the effects of the angular forces like the gyroscopic and the Coriolis-centripetal effects, since the motion of the quadrotor is assumed to be close the hovering position, these terms are much smaller than the main ones. The orientation variables are bounded from 0 to 360 degrees. So it is possible to have all the non-linear space discretized around a set of set-points which are selected to be uniformly distributed into the space state. However, the total number of subsystems will increase very quickly with the discretization size (n), which in a first approach there are n 3 models. Also, it is possible to discretize this space in a smart way. For example, only the models that change the derivatives in a significant way. Therefore, the matrices of the subsystems are: (4) These subsystems can be combined with possible different methods (switching, polynomial relations, etc.) to obtain the global model.

Parameter identification
In this section, the parameter estimation is carried out by CAD techniques [10]. The process is to estimate each parameter of the model according the known information and their nature is explained in different regions of operation. This process can be derived into the following categories: 1) basic measurements, 2) geometrical derivation, and 3) estimation based on experimental data.

Basic measurements
This part illustrates how the basic measurements for the estimation of the parameters have been done. Mainly, two kinds of instruments for measuring the mass and length are used. The mass is estimated using a digital balance "Anpro". Due to the size of the quadrotor, it was quite complex to use the standard balance available in the laboratory. This kind of balance allows to attach for one side the drone and measure with a precision of 10 g, which was completely reasonable.
The length was estimated using measure tape, due to the measure range needed. There are two distances to measure: the distance to the center of mass of the quadrotor to the rotors and the distance from the center of the quadrotor to the center of mass of the gimbal. In Table 1 those values are collected.

Geometric derivation
This part shows the process to obtain the position of the center of mass and the values of the inertia matrices. There are two different approaches for estimating these values, either theoretically or experimentally. The experimental approach should be more accurate, since it gives the values for the real quadrotor. However, performing the necessary experiments to estimate these parameters on a full size quadrotor can be complex and non-cost-effective. Therefore, the theoretical approach was preferred. The procedure which is more effective is to use a commercial CAD software packages, Figure 6. Table 2 collects the geometric parameters in this experiment, The selected software to create the CAD model is SolidWorks 2017, which allows to define each component with their corresponding material. Therefore, the program is able to calculate the mass, volume, surface area, center of mass, the principal moments of inertia and their orientation. Additionally, the components created can be assembled to create different and more complex components where the previous properties could be calculated. However, the drawback is to generate good results because the lack of accurate knowledge of the dimensions and the material. This information was obtaining thanks several measurements on every component of the quadrotor.

Experimental derivation
This part shows the process to obtain the constant of the force and the moment of the rotors. Also, it details the set-up used to carry out to experimental tests, which are based in collected data for estimating the constant that express the forces and the moments. Additionally, the experiment was done only in one rotor, although the unique of each motor, to avoid the stress of others rotors and for simplicity. Therefore, two different set-ups have been used: one for estimating the constant force, and the other for estimating the constant of the moment.
To carry out the force test, a test bench has used, consisting of a cylindrical bar and a strain gage. The data collected here is the thrust of the rotors while they are regulated by the ESC, to know that relation of the thrust and every of the ESC inputs.
To carry out the moment test, a similar set-up has been used, with the difference that the force needed to be measured is the lateral one. Therefore, it is used the test bench than the force test, but the bench is connected through a bar that is doing like a lever. The distance to the center of the lever is the same for both rotor and test bench. From this experimental part, Table 3 collects the parameters.
Another important condition is that all the test receives the same voltage. For this, a 24 V power supply is used, which is capable of feeding the motors with the maximum intensity, that is 23A. Most commercial power supply that can be found that only generate between 2-3 A, but a LED source is cheaper and is able to give more than 15 A (500 W source). This power avoids the use of the battery, since as it is used, its voltage decreases and makes difficult to guarantee the same conditions for all tests. Figure 3 shows the regression done to calculate the constants K F , which is deduced from the equations seen in Section 3. The vertical force generated for the rotor is proportional to squared angular speed. Therefore, it is directly the slope of the regression. In the same way, constant K M has been calculated using the regression obtained from the data of the moment bench, which is presented in Figure 9.

Airsoft Marker
The produce an estimation of the force generated by the marker, an accelerometer was attached to measure their evolution. However, due to the fast dynamics of the marker it is necessary an accelerometer that could able to work at least at 200 Hz. Fortunately, authors have used the MTI-100 of Xsens capable of working at 2 kHz, although it was necessary a deal between accuracy and sampling rate. At 200 Hz, this rate is enough as shown in Figure 4. The set-up was simple, only attach the accelerometer to the marker and align it with the canon axis.

Validation of the model
In this subsection, the linearized control model proposed in Section 3 is verified. However, this verification needs that the quadrotor works without any controller in open loop. To achieve this task, a bench test has been built allowing the quadrotor to rotate only in one axis. The main drawback is that the verification is only possible for roll and pitch turns and not for yaw. Moreover, the bench structure adds more inertia to the system leading a behaviour far from the reality. The test bench has an encoder that allows to register the current angle of the test with great accuracy (0.1 o ). Additionally, the test bench has to be attached to the floor with screws, because the moment of the quadrotor generates dangerous vibrations.  The validation shows that the linearized model is good enough, although the quadrotor was only simulated for 1 second due to the well-known fact that drag force was not included in the model, and data start to diverge for both models. In real operation this is not an important issue due to the fact that the quadrotor needs slow velocities to be able to perform its activities. It is important to remark that the PWA is good when many points are available, however the drawback is the huge amount of models needed to achieve a good control. Otherwise, the data obtained is stepped and very inaccurate. Figure 5 (right) shows the difference between roll and pitch degrees using real data and the output of our linearized model. As it can be seen from both plots, the model is quite accurate and its linearization performs very well because the difference respect the groundtruth is small.

Conclusions
A LTI (linearized time invariant) control model is developed in this work. First, by physical laws a statespace model is derived. Due to the non-linearity of the system and that usually an LTI control is used for this applications, a linearized around different set-points control model is proposed. The parameters of this linearized model are identified by CAD techniques. Then, dynamic parameters are obtained from geometrical and material properties of components. The obtained linearized control model has enough "goodness" and can be used to design advanced controller for the quadrotor in a future.