Design of the System for Measuring UAV Parameters

: This article deals with the design and creation of a tensometric measuring system to measure the parameters of an unmanned aerial vehicle (UAV) of the quadcopter type. The system was designed to measure the total UAV thrust and the thrust of its individual motors. The distribution of forces from the UAV motors and their transmission to the sensors was ensured by a specially designed construction, for which the mechanical stresses were simulated and analysed for different modes of the UAV ﬂight. The thrust measurement was performed by four pairs of strain gauges. A measurement system designed in this way and the measured parameters of the UAV can be used for tuning the ﬂight control algorithms applied in the autopilot.


Introduction
Unmanned aerial vehicles (UAVs), especially quadcopter drones, are currently widely utilized in many sectors.The reason for the high usability of UAVs is mainly their economy and that they provide relatively simple equipment to deploy different types of sensors and cameras.The UAVs are widely used nowadays.It is possible to use them for wildlife monitoring [1][2][3], rescue operations [4,5], property inspection [6], monitoring and mapping [7][8][9], magnetic field mapping [10,11], monitoring in public spaces [12,13] or, at present, the import of medicines [14,15], disinfecting of public spaces or even monitoring people's temperatures [16].However, in such uses, it is necessary to consider the increased weight of these UAVs when they are equipped with various devices [17][18][19][20][21], or they may be supplemented by different systems in the future [22].It is also necessary to carefully consider the use of drones at airports [23], where their precise management to ensure safety is the first priority.One possible solution that has been proposed for use at airports is the use of tethered UAVs with external power via a tether [24], which would allow more power to be supplied to the drone's motors than is available using an on-board battery.Drones are also often operated in non-standard conditions, for example at extremely low temperatures, which can change the traction properties of the drone and its controllability.Even in this case, it is necessary to ensure thorough and precise control of these UAVs.
Platforms of various autopilots can be placed onboard UAVs.These autopilot platforms provide partially or fully autonomous flight depending on the selected mode [25].The basic algorithm of the autopilot consists of the proportional-integral-derivative (PID) controllers, which are used for flight control and stabilization [26,27].The values of the individual controllers can be set with the help of software to improve the controllability of the UAV.This is important, for example, in solving the problem of precise landing of UAVs on various moving platforms, such as ship decks and the like [28].In such manoeuvres, it is often necessary to consider factors that show a high degree of variability in time, for example weather conditions or ground effect and time-varying payload during UAV landing, when adaptive altitude control of the quadcopter is needed [29].Tuning of the controller constants can be solved in several ways [30][31][32][33][34].Many operators set the values of individual controller constants based on their experience during a test flight of the UAV or based on quick calculations [35].However, such adjustments carry the risks of an unexpected UAV incident and are also time-consuming, as a test flight must be performed after each adjustment.Where it is impossible to perform a test flight, it is possible to set corrections based on mathematical modelling of the physical properties of the UAV.There are many different models of UAVs available today [36][37][38][39][40][41][42][43].Tuning of the controllers based on the existing quadrotor models could lead to poor quadrotor performance due to various inaccuracies in the underlying model.Therefore, it would be necessary to create an accurate model.This procedure is significantly time-consuming and requires the involvement of highly qualified experts in the process of the mathematical modelling.Due to the difficulty of first creating it and the subsequent complexity of the mathematical model of the UAV, in which it is necessary to model each of its parts, it is desirable to design and apply a simplified mathematical model.However, such a simplified mathematical model, which is often not experimentally confirmed, or for which a test flight has not been carried out, can significantly differ from the actual flight characteristics of the modelled UAV.These deviations are difficult to detect and quantify, as an experienced pilot compensates for them subconsciously.
Despite the mentioned problems, it is possible to use a simplified mathematical model of UAV dynamics [44][45][46], but it must be able to directly measure the UAV parameters, especially the complete thrust characteristics of the motors, which are very important in setting the control algorithms of the UAV, as already mentioned.Currently, there are several methods that can measure UAV motor parameters, from measuring propeller parameters to measuring motor thrust, but such measurements require removing the motor from the UAV [47,48].However, this could be again time-consuming.The main motivation for this study, and the main contribution of it, was the design of a measurement system that can measure UAV parameters, especially the thrusts of individual motors, without the need to disassemble the motors and the individual structural parts of the UAV.Furthermore, the aim was that this system could be used in future to create a mathematical model of the UAV, which would allow the simulation of the position angles of the UAV and the position of the UAV in space.Further motivation was that by creating a UAV model, this contribution will reduce the time required to tune PID controllers, especially by limiting the number of test flights that are currently required after each retuning.By designing a system for measuring UAV parameters, its possible future use will indirectly increase safety and limit UAV incidents, which can occur, for example, even in the phase of test flights after retuning the controllers.

Materials and Methods
The design of the measurement system consisted of mechanical and electrical parts.When designing the electrical parts, it was necessary to select sensors that would be suitable for measuring the force acting from the UAV motors.Strain gauges were deemed to be a suitable element, due to their wide use in industrial applications, where they are often used for universal and accurate measurement of deformation, force, pressure, and moments acting on solids.The most widely used type are metal resistance strain gauges.Sensing takes place by changing the ohmic resistance of the sensing element when changing the mechanical stress acting on the sensor changes.Strain gauges are commonly used in the detection and analysis of mechanical stresses on structures and individual structural elements.A brief description of the resistance strain gauge is shown in Figure 1.In our case, an "S" type strain gauge, the MIK-LCS 1 was used.As these strain gauges are not very widespread, their parameters are summarized in Table 1.There were a total of eight strain gauges used in the system.The thrust was measured by two sensors for each motor.The system therefore contained four pairs of sensors, one pair for each motor.The mechanical part of the system consisted of a rod construction, base, and mounting frame.The dimensions of the base were 52 × 52 cm to allow the placement of the rod construction together with the sensors and the mounting frame through which a quadcopter type UAV could be attached to the measurement system.The height of the base could be adjusted to the requirements.The height of the measuring system from the base to the mounting frame was 65 cm.The dimension of the mounting frame was 74 cm on the diagonal.A sensor was placed on each rod in the lower part of the rod construction.The sensors were used to sense the forces that are transmitted by the rod construction from the mounting frame to the base.The rod construction was firmly connected to the base behind each sensor in each of its corners.In the upper part, the rod construction was firmly connected to the mounting frame at its end points.The length of each rod including the sensor was 83 cm.To design the mechanical part, the PTC Creo Parametric CAD program was used to model the individual parts of the measurement system.The essential idea of the whole solution was the transmission of forces from UAV motors to strain gauges.The design of the measurement system is shown in Figure 2. When designing the In our case, an "S" type strain gauge, the MIK-LCS 1 was used.As these strain gauges are not very widespread, their parameters are summarized in Table 1.There were a total of eight strain gauges used in the system.The thrust was measured by two sensors for each motor.The system therefore contained four pairs of sensors, one pair for each motor.The mechanical part of the system consisted of a rod construction, base, and mounting frame.The dimensions of the base were 52 × 52 cm to allow the placement of the rod construction together with the sensors and the mounting frame through which a quadcopter type UAV could be attached to the measurement system.The height of the base could be adjusted to the requirements.The height of the measuring system from the base to the mounting frame was 65 cm.The dimension of the mounting frame was 74 cm on the diagonal.A sensor was placed on each rod in the lower part of the rod construction.The sensors were used to sense the forces that are transmitted by the rod construction from the mounting frame to the base.The rod construction was firmly connected to the base behind each sensor in each of its corners.In the upper part, the rod construction was firmly connected to the mounting frame at its end points.The length of each rod including the sensor was 83 cm.To design the mechanical part, the PTC Creo Parametric CAD program was used to model the individual parts of the measurement system.The essential idea of the whole solution was the transmission of forces from UAV motors to strain gauges.The design of the measurement system is shown in Figure 2. When designing the structure, an emphasis was put on functionality of the individual elements and that they did not place unnecessary demands on the production process and the availability of materials.To maintain a low weight of the measuring system, aluminium was used as the main construction material.The low weight of the measuring system structure was important especially for the sensors to be minimally loaded by the weight of the structure.Another reason was the low momentum and influence on the measurement dynamics.
Drones 2022, 6, x FOR PEER REVIEW 4 of 17 structure, an emphasis was put on functionality of the individual elements and that they did not place unnecessary demands on the production process and the availability of materials.To maintain a low weight of the measuring system, aluminium was used as the main construction material.The low weight of the measuring system structure was important especially for the sensors to be minimally loaded by the weight of the structure.
Another reason was the low momentum and influence on the measurement dynamics.Load simulations were performed to give an overview of the behaviour of the measurement system when it was loaded with the force of 1 N.For the simulation, a simple rod model of the system was designed that was quite sufficient for the evaluation of the forces acting on the structure.
First, simulation of the mechanical stress of the measuring system was performed with the quadcopter in the thrust mode (see Figure 3), in which all four quadcopter motors have the same thrust.The thrust of the individual motors is shown in the figure as forces F1 for motor 1, F2 for motor 2, F3 for motor 3, and F4 for motor 4. From the simulation results, it was clear that with equal thrust on all four motors of the quadcopter, the mechanical structure was evenly stressed and the individual rods were loaded (stretched) equally.Load simulations were performed to give an overview of the behaviour of the measurement system when it was loaded with the force of 1 N.For the simulation, a simple rod model of the system was designed that was quite sufficient for the evaluation of the forces acting on the structure.
First, simulation of the mechanical stress of the measuring system was performed with the quadcopter in the thrust mode (see Figure 3), in which all four quadcopter motors have the same thrust.The thrust of the individual motors is shown in the figure as forces F1 for motor 1, F2 for motor 2, F3 for motor 3, and F4 for motor 4. From the simulation results, it was clear that with equal thrust on all four motors of the quadcopter, the mechanical structure was evenly stressed and the individual rods were loaded (stretched) equally.
Drones 2022, 6, x FOR PEER REVIEW 4 of structure, an emphasis was put on functionality of the individual elements and that th did not place unnecessary demands on the production process and the availability of m terials.To maintain a low weight of the measuring system, aluminium was used as t main construction material.The low weight of the measuring system structure was im portant especially for the sensors to be minimally loaded by the weight of the structu Another reason was the low momentum and influence on the measurement dynamics.Load simulations were performed to give an overview of the behaviour of the mea urement system when it was loaded with the force of 1 N.For the simulation, a simp rod model of the system was designed that was quite sufficient for the evaluation of t forces acting on the structure.
First, simulation of the mechanical stress of the measuring system was perform with the quadcopter in the thrust mode (see Figure 3), in which all four quadcopter moto have the same thrust.The thrust of the individual motors is shown in the figure as forc F1 for motor 1, F2 for motor 2, F3 for motor 3, and F4 for motor 4. From the simulati results, it was clear that with equal thrust on all four motors of the quadcopter, the m chanical structure was evenly stressed and the individual rods were loaded (stretche equally.In the second step, simulation of the mechanical stress of the measuring system with the quadcopter in pitch or roll mode was performed; this meant two motors having a higher speed (F1 and F4) and two motors having a lower speed (F2 and F3).In this mode one side of the structure will be stressed by tension and the opposite side will be stressed by mechanical pressure (see Figure 4).
In the second step, simulation of the mechanical stress of the measuring system wi the quadcopter in pitch or roll mode was performed; this meant two motors having higher speed (F1 and F4) and two motors having a lower speed (F2 and F3).In this mod one side of the structure will be stressed by tension and the opposite side will be stresse by mechanical pressure (see Figure 4).Finally, simulation of the mechanical stress of the measurement system with th quadcopter in yaw mode was performed.In this case, the two opposite motors had higher speed (F1 and F3) and the other two lower speed (F2 and F4), which depends o the UAV configuration.The simulation results showed the stress of individual rods, whi the rods marked by red are stressed by tension and the rods marked by blue are stresse by mechanical pressure (see Figure 5).The combination of electrical and mechanical parts created a system capable of mea uring the UAV parameters.However, as the output signal from the sensors had a lo voltage level (of the order of several mV), it was necessary to amplify this signal to th order of volts, which was solved by a circuit for analog signal processing.The main pa of this circuit were the operational amplifiers AD620, which were used for signal amplif cation.The electronics were adapted in such a way that it allowed different levels of sign amplification to be selected using jumpers, and thus it could be used with different typ of sensors if necessary.Based on the designed circuit solution, it was possible to choo the signal amplification level of 10, 100 or 1000, and it was necessary to be chosen appr priately, so that at the maximum measured value, we did not exceed the maximum inpu voltage level of the analog to digital converter (ADC).After amplification, the signal w Finally, simulation of the mechanical stress of the measurement system with the quadcopter in yaw mode was performed.In this case, the two opposite motors had a higher speed (F1 and F3) and the other two lower speed (F2 and F4), which depends on the UAV configuration.The simulation results showed the stress of individual rods, while the rods marked by red are stressed by tension and the rods marked by blue are stressed by mechanical pressure (see Figure 5).
In the second step, simulation of the mechanical stress of the measuring system w the quadcopter in pitch or roll mode was performed; this meant two motors havin higher speed (F1 and F4) and two motors having a lower speed (F2 and F3).In this mo one side of the structure will be stressed by tension and the opposite side will be stress by mechanical pressure (see Figure 4).Finally, simulation of the mechanical stress of the measurement system with quadcopter in yaw mode was performed.In this case, the two opposite motors ha higher speed (F1 and F3) and the other two lower speed (F2 and F4), which depends the UAV configuration.The simulation results showed the stress of individual rods, wh the rods marked by red are stressed by tension and the rods marked by blue are stress by mechanical pressure (see Figure 5).The combination of electrical and mechanical parts created a system capable of me uring the UAV parameters.However, as the output signal from the sensors had a l voltage level (of the order of several mV), it was necessary to amplify this signal to order of volts, which was solved by a circuit for analog signal processing.The main p of this circuit were the operational amplifiers AD620, which were used for signal ampl cation.The electronics were adapted in such a way that it allowed different levels of sig amplification to be selected using jumpers, and thus it could be used with different ty of sensors if necessary.Based on the designed circuit solution, it was possible to cho the signal amplification level of 10, 100 or 1000, and it was necessary to be chosen app priately, so that at the maximum measured value, we did not exceed the maximum inp voltage level of the analog to digital converter (ADC).After amplification, the signal w The combination of electrical and mechanical parts created a system capable of measuring the UAV parameters.However, as the output signal from the sensors had a low voltage level (of the order of several mV), it was necessary to amplify this signal to the order of volts, which was solved by a circuit for analog signal processing.The main part of this circuit were the operational amplifiers AD620, which were used for signal amplification.The electronics were adapted in such a way that it allowed different levels of signal amplification to be selected using jumpers, and thus it could be used with different types of sensors if necessary.Based on the designed circuit solution, it was possible to choose the signal amplification level of 10, 100 or 1000, and it was necessary to be chosen appropriately, so that at the maximum measured value, we did not exceed the maximum input voltage level of the analog to digital converter (ADC).After amplification, the signal was further processed by a microcontroller, which provides measurement with sampling frequency of 100 Hz and digital signal processing (DSP), which was ensured by its own software solution for calculating the thrusts of individual UAV motors and the total thrust of the UAV.The electrical part of the measurement system can be represented by a simplified block diagram shown in Figure 6.
further processed by a microcontroller, which provides measurement with sampling frequency of 100 Hz and digital signal processing (DSP), which was ensured by its own software solution for calculating the thrusts of individual UAV motors and the total thrust of the UAV.The electrical part of the measurement system can be represented by a simplified block diagram shown in Figure 6.For the purposes of measurement, it was first necessary to identify the measurement system, to determine its resolution, transfer function, and the sensitivity of the individual sensors.Next, it was necessary to introduce the required software gain corrections to make the recalculation of the thrust during the measurement as accurate as possible.An ATMega2560 microcontroller was used to determine the parameters of the measuring system.It was an 8-bit AVR-based microcontroller with a 10-bit ADC.
The identification of the response of the measuring system was realized using precisely determined weights.The system was tested by pushing and pulling during the initial experiments, and the results showed the same values.In the beginning, the transfer function of the strain gauge MIK-LCS 1 was determined.During the measurements, the system was gradually loaded with different weights.The change in the sensor output was expressed by the output value of the ADC, which is given in bits.The transfer function of the MIK-LCS 1 strain gauge is shown in Figure 7, where in the graph, each point represents a different weight.The measurement shows that the transmission characteristic of the used sensor was linear, which means that the transfer function of the measuring system (with eight strain gauges) will be also linear.The same procedure was used to determine the transfer function of the entire measuring system, but in this case the applied weights were evenly distributed among eight strain gauges (see Figure 8).The transfer function of the measuring system was also linear in this case.For the purposes of measurement, it was first necessary to identify the measurement system, to determine its resolution, transfer function, and the sensitivity of the individual sensors.Next, it was necessary to introduce the required software gain corrections to make the recalculation of the thrust during the measurement as accurate as possible.An ATMega2560 microcontroller was used to determine the parameters of the measuring system.It was an 8-bit AVR-based microcontroller with a 10-bit ADC.
The identification of the response of the measuring system was realized using precisely determined weights.The system was tested by pushing and pulling during the initial experiments, and the results showed the same values.In the beginning, the transfer function of the strain gauge MIK-LCS 1 was determined.During the measurements, the system was gradually loaded with different weights.The change in the sensor output was expressed by the output value of the ADC, which is given in bits.The transfer function of the MIK-LCS 1 strain gauge is shown in Figure 7, where in the graph, each point represents a different weight.
further processed by a microcontroller, which provides measurement with sampling frequency of 100 Hz and digital signal processing (DSP), which was ensured by its own software solution for calculating the thrusts of individual UAV motors and the total thrust of the UAV.The electrical part of the measurement system can be represented by a simplified block diagram shown in Figure 6.For the purposes of measurement, it was first necessary to identify the measurement system, to determine its resolution, transfer function, and the sensitivity of the individual sensors.Next, it was necessary to introduce the required software gain corrections to make the recalculation of the thrust during the measurement as accurate as possible.An ATMega2560 microcontroller was used to determine the parameters of the measuring system.It was an 8-bit AVR-based microcontroller with a 10-bit ADC.
The identification of the response of the measuring system was realized using precisely determined weights.The system was tested by pushing and pulling during the initial experiments, and the results showed the same values.In the beginning, the transfer function of the strain gauge MIK-LCS 1 was determined.During the measurements, the system was gradually loaded with different weights.The change in the sensor output was expressed by the output value of the ADC, which is given in bits.The transfer function of the MIK-LCS 1 strain gauge is shown in Figure 7, where in the graph, each point represents a different weight.The measurement shows that the transmission characteristic of the used sensor was linear, which means that the transfer function of the measuring system (with eight strain gauges) will be also linear.The same procedure was used to determine the transfer function of the entire measuring system, but in this case the applied weights were evenly distributed among eight strain gauges (see Figure 8).The transfer function of the measuring system was also linear in this case.The measurement shows that the transmission characteristic of the used sensor was linear, which means that the transfer function of the measuring system (with eight strain gauges) will be also linear.The same procedure was used to determine the transfer function of the entire measuring system, but in this case the applied weights were evenly distributed among eight strain gauges (see Figure 8).The transfer function of the measuring system was also linear in this case.The resolution of the measuring system could be determined from the transfer functions measured this way.The resolution of the sensor (Rs) can be determined as: The resolution of the measuring system could be determined from the transfer functions measured this way.The resolution of the sensor (Rs) can be determined as: where w is the weight used and out is the output at a certain weight.The resolution of the sensor per least significant bit (LSB) determined using the Equation (1) was 3.70961 g/LSB, which is 0.03637 newtons/LSB.The next step was to determine the time constant of the system.This constant was determined from the normalized graph of load with a certain weight at an output value of 0.63 on the y-axis.Such a method of determining the time constant is widely used [49].The value of the time constant determined in this way was 0.300456 s.Based on the previous results, the transfer function Gx(s) of the measuring system for individual sensors was determined as: In addition to these parameters, it was also necessary to determine the gain correction constants for individual sensors.This issue and the calculation of the accuracy (which depends on the individual sensors, and is at least 99%) of the model was described in previous work [50].Based on these previous results, the resulting transfer function of the sensor was determined as: where G CX is gain correction for the individual sensors (x is the sensor number).The individual parameters of the measuring system and gain corrections are summarized in Table 2.The mathematical model of the measuring system is shown in Figure 9.
For the measurement purposes, a customized quadcopter type UAV with a 3D printed frame was used.Parameters of the quadcopter are listed in Table 3.
The quadcopter together with the measurement system can be seen in Figure 10.
The mathematical model of the measuring system is shown in Figure 9.For the measurement purposes, a customized quadcopter type UAV with a 3D printed frame was used.Parameters of the quadcopter are listed in Table 3.The quadcopter together with the measurement system can be seen in Figure 10.

Measurements
The initial measurements were aimed at measuring the thrust of the UAV and at monitoring the output raw data from the measurement system.Figure 11 shows that vibrations from the UAV motors were introduced into the measurements.Due to this, it was

Measurements
The initial measurements were aimed at measuring the thrust of the UAV and at monitoring the output raw data from the measurement system.Figure 11 shows that vibrations from the UAV motors were introduced into the measurements.Due to this, it was necessary to filter the measured data to reduce the variance of the data during measurement and to increase the accuracy of the measurements and determination of thrusts.Finite Impulse Response (FIR) filters are among the simplest digital filters, both theoretically and practically.The disadvantage of using these filters is mainly the high order of the transfer function, greater computational demands when calculating the coefficients and determined variables, and last but not least, the long delay in processing the input sample.Due to the high delay, the use of FIR filters in the proposed measurement system was not suitable.It was, therefore, necessary to test other filter variants.For this reason, various combinations of filtering algorithms were designed and tested in previous work and several measurements were performed [51].The efficiency of the different filters was tested with a UAV thrust of 240 g (2.35 newtons).The best results in the output data were obtained using a double exponential moving average (DEMA) filter and triple exponential moving average (TEMA) filter which was based on the exponential moving average (EMA) filter.Exponential averaging filters are floating averaging filters, often used for data smoothing and prediction [52,53].Exponential filters are first order IIR filters.The EMA filter can be described by the following equation: where y[n] is actual output value, y[n − 1] is previous output value, x[n] is actual input value and η is a time constant of the filter (number value between 0 and 1).The DEMA filter can be described by the equation: Drones 2022, 6, x FOR PEER REVIEW 10 of 17 of the system may occur and thus, an undesirable reduction of the system's dynamics.As the time constant of the transfer function of the system Ts = 0.300456 s was determined based on the previous results, it was necessary to choose the window size for the MWM filter appropriately.The resulting delay, which depends on the window size, should be as small as possible so that it is not affected by the dynamics of the measurement system.With the used window size n = 11 samples of the MWM filter and with a sampling frequency of 100 Hz, the filter delay was 0.05 s.The results of the variance and standard deviation of the data before and after the implementation of the filtering algorithms are shown in Table 4.The proposed filters reduce the variance of the measured data at the output by approximately 70%.

Results
After the complete identification and calibration of the measuring system with the implemented filtering algorithms in the microcontroller, it was possible to measure the thrust of the individual UAV motors.The thrust measurement was done by using a customized quadcopter.The quadcopter was attached to the mounting frame with locking brackets made using 3D printing, which ensured that the quadcopter did not move during the measurement.The autopilot of the quadcopter had to be deactivated during the measurement so that no unwanted compensations would occur, because if the control part registered that the quadcopter did not perform the required manoeuvre, it would have tried to compensate.The thrust adjustment of the motors was realized using pulse width modulation (PWM) from the flight controller using to the electronic speed controller (ESC), where 1000 μs pulse time was the minimum value and 2000 μs pulse time was the maximum value of the thrust.Reference thrusts of individual motors are shown in Figure 12.And finally, the TEMA filter can be described by the equation: In our case, both filters had a time constant (η) of 0.2 and were used in combination with a Moving Window Median (MWM) filter with a window size of n = 11.Changing the parameters of the designed filters, especially the time constant for exponential filters, may result in insufficient suppression of unwanted vibrations, if the time constant is increased above the value of 0.2.If the time constant is reduced below the value of 0.2, overdamping of the system may occur and thus, an undesirable reduction of the system's dynamics.As the time constant of the transfer function of the system Ts = 0.300456 s was determined based on the previous results, it was necessary to choose the window size for the MWM filter appropriately.The resulting delay, which depends on the window size, should be as small as possible so that it is not affected by the dynamics of the measurement system.With the used window size n = 11 samples of the MWM filter and with a sampling frequency of 100 Hz, the filter delay was 0.05 s.The results of the variance and standard deviation of the data before and after the implementation of the filtering algorithms are shown in Table 4.The proposed filters reduce the variance of the measured data at the output by approximately 70%. Figure 11 shows the results at the maximum thrust of the UAV before and after data filtering in the left part of Figure 11 and a detailed view in the right part of Figure 11 that exemplifies how the vibrations from the UAV engines are suppressed and how the data variance is reduced after filtering.

Results
After the complete identification and calibration of the measuring system with the implemented filtering algorithms in the microcontroller, it was possible to measure the thrust of the individual UAV motors.The thrust measurement was done by using a customized quadcopter.The quadcopter was attached to the mounting frame with locking brackets made using 3D printing, which ensured that the quadcopter did not move during the measurement.The autopilot of the quadcopter had to be deactivated during the measurement so that no unwanted compensations would occur, because if the control part registered that the quadcopter did not perform the required manoeuvre, it would have tried to compensate.The thrust adjustment of the motors was realized using pulse width modulation (PWM) from the flight controller using to the electronic speed controller (ESC), where 1000 µs pulse time was the minimum value and 2000 µs pulse time was the maximum value of the thrust.Reference thrusts of individual motors are shown in Figure 12.Based on these reference thrusts, it will be possible to verify the measurement results on the measuring system.
Before starting the measurement, it was necessary to set the required amplification of the circuit for processing the signal from the sensors.The gain was set to the level of 100, as the maximum reference thrust of the quadcopter is 35 N, and at the gain level of 100 we will not exceed the voltage level of the ADC used, which was 5 V.The weight of the quadcopter was measured on the measuring system before the measurement using our own software, and then the zero points were set to sensors.The measurement began only after this initial setup.The thrust was gradually adjusted from 0 to 100% on the flight controller.The measurement results are shown in Figure 13, where it is possible to see the measured thrust of each of the motors (four quadcopter motors).Based on these reference thrusts, it will be possible to verify the measurement results on the measuring system.Before starting the measurement, it was necessary to set the required amplification of the circuit for processing the signal from the sensors.The gain was set to the level of 100, as the maximum reference thrust of the quadcopter is 35 N, and at the gain level of 100 we will not exceed the voltage level of the ADC used, which was 5 V.The weight of the quadcopter was measured on the measuring system before the measurement using our own software, and then the zero points were set to sensors.The measurement began only after this initial setup.The thrust was gradually adjusted from 0 to 100% on the flight controller.The measurement results are shown in Figure 13, where it is possible to see the measured thrust of each of the motors (four quadcopter motors).Before starting the measurement, it was necessary to set the required amplification of the circuit for processing the signal from the sensors.The gain was set to the level of 100, as the maximum reference thrust of the quadcopter is 35 N, and at the gain level of 100 we will not exceed the voltage level of the ADC used, which was 5 V.The weight of the quadcopter was measured on the measuring system before the measurement using our own software, and then the zero points were set to sensors.The measurement began only after this initial setup.The thrust was gradually adjusted from 0 to 100% on the flight controller.The measurement results are shown in Figure 13, where it is possible to see the measured thrust of each of the motors (four quadcopter motors).Figure 13 shows how much more accurate the data are after filtering, compared to those before filtering, against the reference thrust curves of the individual motors at maximum thrust values from Figure 12, and what a significant role data filtering plays in the system.If we compare the maximum measured thrust values of the motors against the maximum reference values, we can see that the measurement using the designed measuring system was sufficiently accurate and the differences between the maximum thrust values did not exceed 1% (Table 5).
Table 5. Accuracy results of the measured maximum thrust value of the motors against the maximum value of the reference thrust curves.Figure 13 shows how much more accurate the data are after filtering, compared to those before filtering, against the reference thrust curves of the individual motors at maximum thrust values from Figure 12, and what a significant role data filtering plays in the system.If we compare the maximum measured thrust values of the motors against the maximum reference values, we can see that the measurement using the designed measuring system was sufficiently accurate and the differences between the maximum thrust values did not exceed 1% (Table 5).The local fluctuation of thrusts seen in Figure 13 was caused by a small amount of freedom in the clamping mechanism, and thus the quadcopter reached such a thrust at the time when the fluctuation in the graph occurred that the clamping mechanism was strained due to overcoming the weight with thrust.
The standard deviation results for the data measured in Figure 13 are shown in Figure 14, where the red lines represent the mean, the green area in the graphs represents the segment standard deviation for the unfiltered RAW data, and the blue area in the graphs represents the segment standard deviation for the filtered data.Figure 13 shows how much more accurate the data are after filtering, compared to those before filtering, against the reference thrust curves of the individual motors at maximum thrust values from Figure 12, and what a significant role data filtering plays in the system.If we compare the maximum measured thrust values of the motors against the maximum reference values, we can see that the measurement using the designed measuring system was sufficiently accurate and the differences between the maximum thrust values did not exceed 1% (Table 5).The local fluctuation of thrusts seen in Figure 13 was caused by a small amount of freedom in the clamping mechanism, and thus the quadcopter reached such a thrust at the time when the fluctuation in the graph occurred that the clamping mechanism was strained due to overcoming the weight with thrust.
The standard deviation results for the data measured in Figure 13 are shown in Figure 14, where the red lines represent the mean, the green area in the graphs represents the segment standard deviation for the unfiltered RAW data, and the blue area in the graphs represents the segment standard deviation for the filtered data.The data measured this way at the output of the system may be applied as an input to a cybernetic UAV quadcopter model in future research.The proposed system allows the measurement of almost any quadcopter type UAV, the size of which does not exceed the length of the arms of the mounting frame and whose total force does not exceed the sum of the ranges of the used individual sensors.The data measured this way at the output of the system may be applied as an input to a cybernetic UAV quadcopter model in future research.The proposed system allows the Drones 2022, 6, 213 13 of 17 measurement of almost any quadcopter type UAV, the size of which does not exceed the length of the arms of the mounting frame and whose total force does not exceed the sum of the ranges of the used individual sensors.

Discussion
Measuring the thrust characteristics of UAV motors is currently most often performed by measuring the thrust of the UAV motor placed on a special measuring platform.However, with such an approach, it is necessary to dismantle it from the UAV and fix it on a special measuring platform.This paper describes the original design of a system for measuring the thrust characteristics of UAV motors (quadcopter type) without the need to remove the motors from the UAV frame.The system allows the attachment of the whole quadcopter to the measuring system, which is an indisputable advantage.However, a disadvantage may be the limitation regarding the maximum possible dimensions of the quadcopter, which cannot exceed the size of the mounting frame of the measuring system, which is based on the design of the measuring system.Another limitation may be the maximum load that the system is capable of measuring.This load depends on the type of sensors used and their maximum possible load.The sensors used on the proposed system have a maximum possible load of 5 kg per sensor.As the system contained eight sensors, it could be loaded with a total weight of 40 kg, which is suitable for most widely used quadcopters.The proposed solution can be modified in the future at the sensor level, where different types of strain gauges can be used depending on the range of load that need to be measured, as the proposed electronics of the system allow changing the gain, which can be adapted to different types of sensors.
The measurements of the thrust of the motors had high accuracy, as the system was adjusted and verified using different types of weights.However, there was a problem during the initial measurements with vibrations from the quadcopter, which caused a high dispersion of data at the output of the system.This was solved by implementing filtering algorithms, which suppressed the data dispersion by approximately 70%.In future, it may be possible to focus on the design and implementation of other advanced algorithms that would further suppress the dispersion and thus increase the accuracy of the measurement, but at the same time they cannot limit the dynamics of the measurement.
The measurement system currently has a resolution of 3.70961 g/LSB per sensor.This resolution was determined by the resolution of the ADC used, which was 10 bits, which was sufficient for current use in the case of concept design.If it is necessary to obtain higher resolution, the measurement system can be improved by using 16-bit ADC and the resolution of the measurement system would be 0.05796 g/LSB per sensor.Further research will focus on optimization of the design of the system to obtain more accurate measurement results.
Another advantage of the designed measuring system is the possibility of using it for the diagnostics of the state of the UAV and its motors.During one of the measurements while testing the filtering algorithms, it could be seen in the graph that the RAW data on motor 4 showed more vibrations than the other motors (see Figure 15).The reason was a slightly loose propeller on motor 4. If we increased the sampling frequency, this system has the possibility to expand its functionality with diagnostics of the motors in the future.
The results show that the constructed measurement system can be used to identify UAV parameters, especially the complete thrust characteristics of the motors.The parameters of the UAV measured in this way can be used in future as input data for a dynamic model of the UAV, so there is no need to model the complete motor part of the UAV from propellers to motors and controllers.Creating a model for future research and subsequent modelling of UAV characteristics eliminates the need for frequent test flights when tuning the UAV controllers.With this method, setting up the on-board control electronics will be faster and more accurate if the UAV model is known.The concept for the future development of the complex measurement system needed for the tuning of the PID controllers can be illustrated by a simplified block diagram (Figure 16).
Another advantage of the designed measuring system is the possibility of using it for the diagnostics of the state of the UAV and its motors.During one of the measurements while testing the filtering algorithms, it could be seen in the graph that the RAW data on motor 4 showed more vibrations than the other motors (see Figure 15).The reason was a slightly loose propeller on motor 4. If we increased the sampling frequency, this system has the possibility to expand its functionality with diagnostics of the motors in the future.The results show that the constructed measurement system can be used to identify UAV parameters, especially the complete thrust characteristics of the motors.The parameters of the UAV measured in this way can be used in future as input data for a dynamic model of the UAV, so there is no need to model the complete motor part of the UAV from propellers to motors and controllers.Creating a model for future research and subsequent modelling of UAV characteristics eliminates the need for frequent test flights when tuning the UAV controllers.With this method, setting up the on-board control electronics will be faster and more accurate if the UAV model is known.The concept for the future development of the complex measurement system needed for the tuning of the PID controllers can be illustrated by a simplified block diagram (Figure 16).

Conclusions
The objective of this research was to design a measuring system that could identify the UAV parameters, i.e., determine the total thrust and the thrust characteristics of the  The results show that the constructed measurement system can be used to identify UAV parameters, especially the complete thrust characteristics of the motors.The parameters of the UAV measured in this way can be used in future as input data for a dynamic model of the UAV, so there is no need to model the complete motor part of the UAV from propellers to motors and controllers.Creating a model for future research and subsequent modelling of UAV characteristics eliminates the need for frequent test flights when tuning the UAV controllers.With this method, setting up the on-board control electronics will be faster and more accurate if the UAV model is known.The concept for the future development of the complex measurement system needed for the tuning of the PID controllers can be illustrated by a simplified block diagram (Figure 16).

Conclusions
The objective of this research was to design a measuring system that could identify the UAV parameters, i.e., determine the total thrust and the thrust characteristics of the

Conclusions
The objective of this research was to design a measuring system that could identify the UAV parameters, i.e., determine the total thrust and the thrust characteristics of the individual UAV motors.The measuring system described in this research was designed for this purpose.The initial design and construction of the measuring system was optimized several times.It was necessary to design the concept and to create a 3D model of the measuring system.Based on this 3D model, a simple rod model was created, in which the distribution of forces in the structure was simulated, based on possible UAV flight modes.Subsequently, the selection of sensors for the measurement system and the construction of the measuring system began.Electronics for processing signals from sensors were designed, as well as software for the microcontroller, which ensured the calculation of the motors thrusts at the output of the system.After the system was designed, a mathematical model of the system was created.Subsequently, filter algorithms were designed for the measurement system, which helped reduce the dispersion of data at the output of the system by almost 70%, which contributed to higher measurement accuracy.Thrust measurements of individual quadcopter motors were performed on the measuring system.These measurements were compared with the reference thrust curves of the individual motors used on the quadcopter.The measurements showed that the differences between the measured and the reference maximum thrusts of the motors were less than 1%, which means that the accuracy of the measurement system was more than 99%.A measurement system with such accuracy can be used in future UAV parameter determination research and studies.
The system forms the basis for the design of a mathematical model of the UAV (quadcopter type).The thrusts of the individual motors measured by the system can be used in further research focused on the dynamic cybernetic model of the UAV as inputs of this model.The UAV model will be used for conversion of the measured thrust to position angles, calculation of position coordinates in space and to tune the PID controllers of the autopilot, based on static laboratory measurements.The main benefits of this modelling method are the reduction of the time required for tuning PID controllers, reduction of the number of UAV flights needed to verify the set constants of the PID controllers and the fact that it is possible to use the proposed methodology for the diagnostics, for example for the UAV testing during the manufacturing process.

Patents
For the solution mentioned in the article, a patent application for a measuring system with application number 50020-2021 was filed at the Office of Industrial Property of the Slovak Republic.

Figure 1 .
Figure 1.Description of resistance strain gauge.

Figure 1 .
Figure 1.Description of resistance strain gauge.

Figure 2 .
Figure 2. Design of measuring system.

Figure 3 .
Figure 3. UAV thrust simulation (3D view on the left side, front view on the right side).

Figure 2 .
Figure 2. Design of measuring system.

Figure 2 .
Figure 2. Design of measuring system.

Figure 3 .
Figure 3. UAV thrust simulation (3D view on the left side, front view on the right side).Figure 3. UAV thrust simulation (3D view on the left side, front view on the right side).

Figure 3 .
Figure 3. UAV thrust simulation (3D view on the left side, front view on the right side).Figure 3. UAV thrust simulation (3D view on the left side, front view on the right side).

Figure 4 .
Figure 4. UAV pitch and roll simulation (3D view on the left side, front view on the right side).

Figure 5 .
Figure 5. UAV yaw simulation (3D view on the left side, top view on the right side).

Figure 4 .
Figure 4. UAV pitch and roll simulation (3D view on the left side, front view on the right side).

Figure 4 .
Figure 4. UAV pitch and roll simulation (3D view on the left side, front view on the right side).

Figure 5 .
Figure 5. UAV yaw simulation (3D view on the left side, top view on the right side).

Figure 5 .
Figure 5. UAV yaw simulation (3D view on the left side, top view on the right side).

Figure 6 .
Figure 6.Block diagram of the electrical part of the measuring system.

Figure 6 .
Figure 6.Block diagram of the electrical part of the measuring system.

Figure 6 .
Figure 6.Block diagram of the electrical part of the measuring system.

Figure 8 .
Figure 8. Transfer function of the measuring system.

Figure 9 .
Figure 9. Mathematical model of the measuring system.

Figure 11 Figure 11 .
Figure11shows the results at the maximum thrust of the UAV before and after data filtering in the left part of Figure11and a detailed view in the right part of Figure11that exemplifies how the vibrations from the UAV engines are suppressed and how the data variance is reduced after filtering.

Figure 11 .
Figure 11.Total measured thrust of UAV (a) Data before and after filtration; (b) Detailed view on the same data before and after filtration.

Figure 12 .
Figure 12.Reference thrust of individual UAV motors (a) Reference thrust of motor 1; (b) Reference thrust of motor 2; (c) Reference thrust of motor 3; (d) Reference thrust of motor 4.

Figure 12 .
Figure 12.Reference thrust of individual UAV motors (a) Reference thrust of motor 1; (b) Reference thrust of motor 2; (c) Reference thrust of motor 3; (d) Reference thrust of motor 4.

Figure 12 .
Figure 12.Reference thrust of individual UAV motors (a) Reference thrust of motor 1; (b) Reference thrust of motor 2; (c) Reference thrust of motor 3; (d) Reference thrust of motor 4.

Figure 13 .
Figure 13.Measured filtered and unfiltered thrust of individual UAV motors in thrust mode (a) Thrust of motor 1; (b) Thrust of motor 2; (c) Thrust of motor 3; (d) Thrust of motor 4.

Figure 13 .
Figure 13.Measured filtered and unfiltered thrust of individual UAV motors in thrust mode (a) Thrust of motor 1; (b) Thrust of motor 2; (c) Thrust of motor 3; (d) Thrust of motor 4.

Figure 13 .
Figure 13.Measured filtered and unfiltered thrust of individual UAV motors in thrust mode (a) Thrust of motor 1; (b) Thrust of motor 2; (c) Thrust of motor 3; (d) Thrust of motor 4.

Figure 15 .
Figure 15.The possibility of using the measuring system in motors diagnostics (a) Thrust of motor 1; (b) Thrust of motor 2; (c) Thrust of motor 3; (d) Thrust of motor 4.

Figure 16 .
Figure 16.Use of measurement system in process of creating of the UAV mathematical model.

Figure 15 .
Figure 15.The possibility of using the measuring system in motors diagnostics (a) Thrust of motor 1; (b) Thrust of motor 2; (c) Thrust of motor 3; (d) Thrust of motor 4.

Figure 15 .
Figure 15.The possibility of using the measuring system in motors diagnostics (a) Thrust of motor 1; (b) Thrust of motor 2; (c) Thrust of motor 3; (d) Thrust of motor 4.

Figure 16 .
Figure 16.Use of measurement system in process of creating of the UAV mathematical model.

Figure 16 .
Figure 16.Use of measurement system in process of creating of the UAV mathematical model.

Table 1 .
Parameters of the MIK-LCS 1 strain gauge.

Table 1 .
Parameters of the MIK-LCS 1 strain gauge.

Table 2 .
Parameters of the measuring system.

Table 3 .
Parameters of the customized quadcopter.

Table 4 .
Results of the variance and standard deviation of the data at the output before and after filtration (DEMA and TEMA filters in combination with MWM filter) with UAV thrust of 240 g.

Table 4 .
Results of the variance and standard deviation of the data at the output before and after filtration (DEMA and TEMA filters in combination with MWM filter) with UAV thrust of 240 g.

Table 5 .
Accuracy results of the measured maximum thrust value of the motors against the maximum value of the reference thrust curves.

Table 5 .
Accuracy results of the measured maximum thrust value of the motors against the maximum value of the reference thrust curves.