An unmanned aerial vehicle degree of freedom attitude test analysis system and method
The UAV degree-of-freedom attitude test and analysis system solves the problem of lack of real sensor errors and extreme conditions in the simulation of UAV flight control system testing. It realizes high-fidelity simulation, safety and robust testing, ensures that the data is tamper-proof, supports professional-level testing in the laboratory or field, and is seamlessly integrated into the existing R&D process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU TUOCHE INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2025-09-22
- Publication Date
- 2026-06-23
Smart Images

Figure CN121005102B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) testing technology, and in particular to a UAV degree-of-freedom attitude testing and analysis system and method. Background Technology
[0002] With the widespread application of multi-rotor drones in surveying, inspection, logistics, and other fields, the requirements for their flight accuracy, reliability, and safety are increasing. The performance of the flight control system directly depends on the accuracy of the sensors and the depth of verification of the control algorithm. Therefore, it is necessary to complete high-confidence attitude calibration and algorithm testing on the ground.
[0003] However, existing control algorithm verification mostly relies on simple software simulation or field flight testing. Software simulation lacks real sensor errors and extreme operating conditions, while flight testing suffers from high risks, poor repeatability, and difficulties in data traceability. Furthermore, test data and calibration parameters are mostly stored in plaintext, lacking anti-tampering mechanisms, which cannot meet the needs of quality auditing and accident reproduction. Various test devices are independent of each other, and the data formats are inconsistent, resulting in fragmented R&D processes, long cycles, and high costs. Summary of the Invention
[0004] In order to solve the above-mentioned technical problems, the present invention provides a system and method for testing and analyzing the attitude of unmanned aerial vehicles (UAVs).
[0005] The technical solution of this invention is implemented as follows:
[0006] A UAV degree-of-freedom attitude testing and analysis system includes:
[0007] The attitude simulation module, based on a quaternion dynamics model, simulates the attitude changes of a UAV under six degrees of freedom (6DOF) and supports custom trajectory input.
[0008] The sensor dynamic calibration module automatically identifies and calibrates gyroscope zero bias, accelerometer scale error, and magnetic compass hard iron / soft iron interference.
[0009] The multi-throttle vector control module controls the motor throttle separately to simulate extreme working conditions such as asymmetric thrust, single propeller failure, and thrust saturation.
[0010] The flight control algorithm verification module injects attitude error in real time and evaluates convergence time, overshoot, and steady-state error.
[0011] The data fusion and visualization module integrates inertial measurement unit (IMU), global positioning system (GPS), magnetometer, barometer, and optical flow data in real time, and supports multi-dimensional visualization such as waveform diagrams, 3D attitude spheres, heat maps, and spectrum diagrams.
[0012] The automated test script module supports Excel-driven testing, and users can write natural language commands.
[0013] The permissions and data security module implements hierarchical permission management and supports test data encryption, operation log auditing, and parameter tamper prevention.
[0014] Preferably, the degree-of-freedom attitude simulation module includes a dynamics calculation unit, an environmental disturbance modeling unit, a sensor signal generation unit, and an interface synchronization unit, wherein:
[0015] The dynamics calculation unit uses quaternions to describe attitude, avoiding gimbal lock; it establishes a mass-inertia-thrust-aerodynamic coupling equation, in which the thrust model supports input of motor, propeller diameter, pitch, and ESC delay parameters, and the aerodynamic model provides linear and quadratic damping options; it outputs three-axis angular velocity, three-axis acceleration, quaternion, NED (north-east-ground) velocity, and NED (north-east-ground) position for subsequent unit calls;
[0016] The environmental disturbance modeling unit provides four models: constant wind, Dryden continuous turbulence, discrete gusts, and user-defined wind spectrum. The wind vector is superimposed on the body velocity in real time. It generates Gaussian noise with adjustable bandwidth to simulate propeller slipflow asymmetry, body vibration, and external collisions.
[0017] The sensor signal generation unit generates the original data packet by superimposing calibration error, noise, quantization error, delay, and temperature drift based on the true value output by the dynamics calculation unit.
[0018] The interface synchronization unit has a built-in clock synchronization service and uses soft timestamps to reduce the deviation between the simulated clock and the physical clock.
[0019] Preferably, the sensor dynamic calibration module includes an action command generation unit, a sensor data caching unit, an error parameter estimation unit, and a parameter write-back unit, wherein:
[0020] The motion command generation unit provides users with rhythm and amplitude prompts through sound, light, and vibration to ensure repeatability of the motion; and it detects motion quality in real time, automatically re-samples if it is not up to standard.
[0021] The sensor data caching unit establishes a circular buffer area to synchronously store the raw data, magnetic data, and body temperature of the IMU (Inertial Measurement Unit), and pre-filters the stored data; it outputs a clean data stream with noise reduction, outlier removal, and timestamps for subsequent units to call.
[0022] The error parameter estimation unit calculates the gyroscope zero bias, accelerometer scale and installation error matrix, magnetic compass hard iron / soft iron interference coefficient and temperature-zero bias slope online, and outputs the corresponding uncertainty.
[0023] The parameter write-back unit writes the estimation results of the error estimation unit into a temporary register, securely injects them into the flight control system, and performs uninterrupted real-time compensation on the original sensor data throughout the entire working process.
[0024] Preferably, the multi-throttle vector control module includes a motor distribution unit, a current dynamic unit, a motor torque generation unit, a body torque synthesis unit, and a fault injection unit, wherein:
[0025] The motor distribution unit converts the PWM (Pulse Width Modulation) pulses and digital throttle signals sent by the flight controller into dimensionless throttle values; according to the frame layout, it converts these dimensionless throttle values into the total thrust and torque in the three axes that the whole machine can generate, ensuring that each motor is assigned the correct target throttle.
[0026] The current dynamic unit simulates the inertia and dead zone of a real ESC, calculates the actual current of each motor line, and then sums them into the total battery current to simulate the battery voltage drop.
[0027] The motor torque generation unit calculates the thrust generated by each propeller and then adds the influence of the incoming flow velocity to make the thrust vary with the flight speed. Based on the thrust and motor inertia, the counter-torque and acceleration torque generated by each propeller are calculated simultaneously to ensure that the torque values match the data from the actual test bench.
[0028] The airframe torque synthesis unit adds and cross-multiplies the tension of each motor according to the installation position vector to obtain the total lift and total roll, pitch, and yaw moments in the airframe coordinate system.
[0029] The fault injection unit, according to user settings and external triggering, suddenly lowers the throttle of a certain motor at a specified time, slowly lowers it, and superimposes random vibrations to simulate propeller failure, ESC damage, and abnormal signal interference.
[0030] Preferably, the flight control algorithm verification module includes an algorithm template loading unit, a disturbance and fault generation unit, a closed-loop simulation execution unit, a performance index extraction unit, an algorithm comparison and ranking unit, and a report generation and data encapsulation unit, wherein:
[0031] The algorithm template loading unit completes the algorithm instantiation and data channel binding, ensuring that the attitude error and angular velocity error sent by the subsequent unit can be correctly received by the algorithm under test and return the motor throttle command.
[0032] The disturbance and fault generation unit automatically generates attitude disturbances of step, sine, random and custom waveforms according to user settings, for testing the algorithm's tracking capability.
[0033] The closed-loop simulation execution unit embeds the algorithm under test into the closed-loop loop. First, the free-degree attitude simulation engine outputs the real-time attitude, then the algorithm calculates the throttle, and finally the multi-throttle vector control simulator returns the tension and torque to form a complete feedback.
[0034] The performance index extraction unit automatically calculates commonly used indicators such as overshoot, convergence time, steady-state error, ITAE, and phase margin, while also providing energy consumption and motor saturation.
[0035] The algorithm compares and sorts the indicators according to user weights, and generates a radar chart and a comprehensive ranking.
[0036] The report generation and data encapsulation unit automatically writes test results, curves, indicators, and rankings into PDF and Excel reports.
[0037] Preferably, the data fusion and visualization module includes a time-aligned caching unit, a multi-source data fusion and calculation unit, a fusion quality assessment unit, a multi-dimensional graphics drawing unit, and an interactive output unit, wherein:
[0038] The time alignment buffer unit unifies data from different sensors to the same clock reference according to timestamps and establishes a circular buffer area to temporarily store historical data.
[0039] The multi-source data fusion and calculation unit uses an extended Kalman filter (EKF) to combine and calculate angular velocity, acceleration, magnetic field, position, and velocity information, and output continuous and smooth attitude, velocity, and position.
[0040] The fusion quality assessment unit compares the merged calculation results with the original sensor data in real time, calculates the residuals and covariance, and determines whether there are abnormal jumps or sensor failures.
[0041] The multi-dimensional graphics drawing unit automatically generates attitude spheres, velocity curves, position trajectories, and residual bar charts based on the merged calculation results, and supports simultaneous display in multiple windows on the same interface;
[0042] The interactive output unit allows users to view detailed data for any time period by zooming, panning, and selecting segments with the mouse.
[0043] Preferably, the automated test script module includes a natural language parsing unit, a timing scheduling unit, an action execution unit, a data recording and anomaly monitoring unit, and a report generation unit, wherein:
[0044] The natural language parsing unit recognizes Chinese and English commands and automatically converts them into standard action codes;
[0045] The timing scheduling unit sorts the actions according to the time axis and triggers execution with millisecond precision to prevent multi-task conflicts.
[0046] The action execution unit sends control commands to the flight controller via a serial port, and simultaneously collects feedback data such as attitude, speed, and motor current.
[0047] The data recording and anomaly monitoring unit saves the original sensor data and control commands throughout the process; it monitors key indicators such as attitude error and current overload in real time, and immediately stops the test and marks the anomaly point once the safety threshold is exceeded.
[0048] The report generation unit automatically calculates key indicators such as overshoot, convergence time, and energy consumption, and compares them with preset pass lines; it outputs PDF and Excel reports, which contain data curves, pass criteria, and improvement suggestions.
[0049] Preferably, the permission and data security module includes an identity verification unit, a hierarchical permission management unit, a data encryption unit, and an integrity verification unit, wherein:
[0050] The identity verification unit adopts a multi-factor authentication method of account + strong password + dynamic token, and the account is automatically locked after a set number of consecutive failed login attempts.
[0051] The hierarchical access control unit divides users into three roles: operator, engineer, and administrator. Each role can only access the corresponding functions.
[0052] The data encryption unit automatically encrypts the test parameters and results before saving them, and the encryption key is stored in an independent secure area.
[0053] The integrity verification unit calculates a unique verification value for each piece of test data and periodically backs up the encrypted data to external storage and the cloud.
[0054] A method for testing and analyzing the attitude of a UAV with degrees of freedom, characterized by the following steps:
[0055] S1: Collect parameters of the machine body and motors to generate a digital twin model with degrees of freedom;
[0056] S2: Controls rotation according to specified actions, and estimates and corrects errors of gyroscope, accelerometer, and magnetic compass in real time;
[0057] S3: Injects extreme conditions such as wind disturbance and thrust failure, and outputs corresponding tension and torque signals;
[0058] S4: Run different control laws under the same disturbance sequence and automatically record overshoot, convergence time and recovery capability;
[0059] S5: Encrypt and save calibration parameters and test reports, generate unique verification values, and ensure data integrity and traceability.
[0060] The beneficial effects of this invention are as follows:
[0061] 1. This invention eliminates sensor bias, scale and temperature drift through online estimation, reduces attitude error after calibration, and ensures high-fidelity simulation; it incorporates extreme scenarios such as wind disturbance, single propeller failure, and thrust delay, and can be programmed to meet safety and robustness testing requirements.
[0062] 2. This invention ensures that calibration and test data cannot be tampered with by using blockchain digests, encrypted storage, and operation logs as double insurance, supports quality audits and accident reproduction, and uses natural language scripts, graphical interfaces, and trial-confirmation dual modes to complete professional-grade testing in the laboratory or field without the need for a precision turntable.
[0063] 3. This invention supports arbitrary layout of 4-8 rotors, access to multiple control laws and format export, and can be seamlessly integrated into existing R&D processes and industry standard platforms. Attached Figure Description
[0064] Figure 1 This is a system block diagram of an unmanned aerial vehicle (UAV) degree-of-freedom attitude testing and analysis system according to the present invention;
[0065] Figure 2 This is a schematic diagram illustrating the workflow of a UAV degree-of-freedom attitude testing and analysis method according to the present invention. Detailed Implementation
[0066] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0067] like Figure 1 As shown, the present invention provides a UAV degree-of-freedom attitude test and analysis system, including a degree-of-freedom attitude simulation module, a sensor dynamic calibration module, a multi-throttle vector control module, a flight control algorithm verification module, an automated test script module, and an access control and data security module.
[0068] In the degree-of-freedom attitude simulation module, the dynamics solution unit uses quaternions to describe attitude, avoiding gimbal lock; it establishes a mass-inertia-thrust-aerodynamic coupling equation, where the thrust model supports input of motor, propeller diameter, pitch, and ESC delay parameters, and the aerodynamic model provides linear and quadratic damping options; it outputs three-axis angular velocity, three-axis acceleration, quaternion, NED (north-east-earth) velocity, and NED (north-east-earth) position for subsequent unit calls;
[0069] Specifically, external forces such as motor pull, wind disturbance, and gravity are combined into total force and total torque, and the acceleration and angular acceleration of the machine are calculated using the Newton-Euler equations. Through numerical integration, new velocity, position, attitude angular velocity and attitude angle are obtained, forming a complete six-degree-of-freedom motion trajectory.
[0070] The environmental disturbance modeling unit provides four models: constant wind, Dryden continuous turbulence, discrete gusts, and user-defined wind spectrum. The wind vector is superimposed on the body velocity in real time. It generates Gaussian noise with adjustable bandwidth to simulate propeller slipflow asymmetry, body vibration, and external collisions.
[0071] The sensor signal generation unit generates the original data packet by superimposing calibration error, noise, quantization error, delay, and temperature drift based on the true value output by the dynamics calculation unit.
[0072] Specifically, based on the actual motion data calculated by the dynamics calculation unit, errors such as zero bias, noise, and delay are added to simulate the output values of sensors such as gyroscopes, accelerometers, and magnetic compasses. The output beat is consistent with the actual hardware, making it convenient for the flight controller to use directly.
[0073] The interface synchronization unit has a built-in clock synchronization service and uses soft timestamps to reduce the deviation between the simulated clock and the physical clock.
[0074] Specifically, the simulation clock data is sent to the flight controller in real time, while the flight controller receives the motor throttle commands calculated by the flight controller, forming a closed loop to ensure that the simulation clock is synchronized with the external device clock, so that the virtual flight and the actual control rhythm are consistent.
[0075] The motion command generation unit in the sensor dynamic calibration module prompts the user with sound, light and vibration to indicate the beat and amplitude, ensuring that the motion is repeatable; and it detects the motion quality in real time, automatically re-sampling if it is unqualified.
[0076] Specifically, it issues three action prompts in a predetermined sequence: drawing a figure eight, rotating horizontally, and gently pushing the throttle to heat up, ensuring that each sensor receives sufficient excitation; it detects the amplitude and number of rotations in real time, and if the excitation is insufficient, it automatically extends or resamples to ensure the completeness of the data required for subsequent calculations.
[0077] The sensor data caching unit establishes a circular buffer area to synchronously store the raw data, magnetic data, and body temperature of the IMU (Inertial Measurement Unit), and pre-filters the stored data; it outputs a clean data stream with noise reduction, outlier removal, and timestamps for subsequent units to call.
[0078] Specifically, the raw data with different sampling rates are aligned to a unified time axis and stored in a circular buffer; clean angular velocity, acceleration and magnetic field signals are obtained by using low-pass filtering and outlier removal for use by the error estimation algorithm.
[0079] The error parameter estimation unit calculates the gyroscope zero bias, accelerometer scale and installation error matrix, magnetic compass hard iron / soft iron interference coefficient and temperature-zero bias slope online, and outputs the corresponding uncertainty.
[0080] Specifically, for the gyroscope: the three-axis zero bias is obtained by integrating the closure error of the angular velocity; for the accelerometer: the zero bias, scale factor, and installation error angle are fitted using the gravity length as a reference; for the magnetic compass: the hard iron offset and soft iron coupling matrix are obtained by fitting a horizontally rotating ellipse; for the temperature: a linear relationship between the zero bias and the temperature is established within the heating range, and the temperature coefficient is obtained.
[0081] The parameter write-back unit writes the estimation results of the error estimation unit into a temporary register, securely injects them into the flight control system, and performs uninterrupted real-time compensation on the original sensor data throughout the entire working process.
[0082] Specifically, the obtained error parameters are first written into memory for trial use, and can be rolled back at any time within 30 seconds. After confirmation that there are no errors, they are stored in non-volatile memory. During subsequent flights, the corresponding errors are deducted in real time at a frequency of 1kHz, and the gyroscope zero bias is corrected online according to temperature changes to ensure that the calibration results are valid for a long time.
[0083] The motor allocation unit in the multi-throttle vector control module converts the PWM (pulse width modulation) pulses and digital throttle signals sent by the flight controller into dimensionless throttle values; according to the frame layout, it converts these dimensionless throttle values into the total thrust and torque in the three axes that the whole machine can generate, ensuring that each motor is assigned the correct target throttle.
[0084] Specifically, the PWM pulses and digital throttle signals sent by the flight controller are converted into dimensionless 0-1 values.
[0085] Based on the frame layout, these throttle values are converted into the total pulling force and torque in three axes that the whole machine can generate, ensuring that each motor is assigned the correct target throttle; if a single propeller fails or the throttle is exceeded, the remaining throttle is automatically redistributed to keep the drone controllable.
[0086] The current dynamic unit simulates the inertia and dead zone of a real ESC. At this time, the throttle command will not be converted into current instantly, but will gradually increase according to a set time constant, and a transmission delay can be added. The actual current of each motor line is calculated and then summed into the total battery current to simulate the battery voltage drop. When the current exceeds the set upper limit, an alarm is given and the output is limited to protect the simulation model from numerical abnormalities.
[0087] The motor torque generation unit calculates the thrust generated by each propeller and then adds the influence of the incoming flow velocity to make the thrust vary with the flight speed. Based on the thrust and motor inertia, the counter-torque and acceleration torque generated by each propeller are calculated simultaneously to ensure that the torque values match the data from the actual test bench.
[0088] Specifically, the thrust generated by each propeller is calculated using the method of "rotation speed squared × coefficient", and the influence of the incoming flow velocity is added to make the thrust magnitude change with the flight speed. Based on the thrust and motor inertia, the counter-torque and acceleration torque generated by each propeller are calculated simultaneously to ensure that the torque value matches the data of the actual test bench. The three sets of values of thrust, torque and current are sent to the next unit together to synthesize the force on the whole machine.
[0089] The airframe torque synthesis unit adds and cross-multiplies the thrust of each motor according to the installation position vector to obtain the total lift and total roll, pitch, and yaw moments in the airframe coordinate system; it adds simple aerodynamic damping so that the aircraft can feel air resistance when in motion; if a fault such as a sudden drop in single propeller thrust is set, the thrust and torque of the corresponding motor are corrected in real time here and then resynthesized to ensure that the fault effect is immediately reflected in subsequent simulations.
[0090] The fault injection unit, according to user settings and external triggers, suddenly lowers the throttle of a certain motor at a specified time, slowly lowers it, and superimposes random jitter to simulate propeller failure, ESC damage, and abnormal signal interference; it delays the ESC by 0-200 milliseconds to reproduce the response lag of inexpensive hardware; it aligns all fault edges with the simulation beat, achieving millisecond-level time accuracy, ensuring that the disturbances sensed by the control algorithm are consistent with actual flight.
[0091] The flight control algorithm verification module's algorithm template loading unit pre-loads common control law templates such as PID (Proportional-Integral-Derivative Controller), LQR (Linear Quadratic Regulator), ADRC (Active Disturbance Rejection Controller), and MPC (Model Predictive Control), which users can directly call. It also provides a standard interface to support importing custom algorithms as dynamic libraries.
[0092] Complete the algorithm instantiation and data channel binding to ensure that the attitude error and angular velocity error sent by the subsequent unit can be correctly received by the algorithm under test and return the motor throttle command.
[0093] The disturbance and fault generation unit automatically generates attitude disturbance signals of step, sine, random and custom waveforms according to user settings, which are used to test the algorithm's tracking capability.
[0094] Extreme conditions such as gusts, delays, and single-propeller failures are added to make the algorithm run under stress conditions and expose potential defects.
[0095] All disturbance signals are synchronized with the simulation beat, with time accuracy down to the millisecond level, ensuring repeatable test results.
[0096] The closed-loop simulation execution unit embeds the algorithm under test into a 1kHz closed-loop loop. First, the degree-of-freedom attitude simulation engine outputs the real-time attitude, then the algorithm calculates the throttle, and finally the multi-throttle vector control simulator returns the tension and torque to form a complete feedback.
[0097] The entire process records attitude, angular velocity, throttle, and current data, providing raw curves for subsequent index calculations.
[0098] The performance index extraction unit automatically calculates commonly used indicators such as overshoot, convergence time, steady-state error, ITAE, and phase margin, while also providing energy consumption and motor saturation.
[0099] For perturbation tests, additional outputs of recovery time, maximum deviation, and energy consumption are used to measure the robustness of the algorithm.
[0100] The algorithm comparison and ranking unit supports the parallel operation of multiple algorithms, obtaining their respective indicator sets under the same perturbation sequence; the indicators are weighted and scored according to user weights to generate radar charts and comprehensive rankings, making the differences in quality immediately apparent.
[0101] The report generation and data encapsulation unit automatically writes test results, curves, indicators, and rankings into PDF and Excel reports, and outputs JSON data packets for external archiving;
[0102] It offers a blockchain digest option, which generates a unique hash for key data, preventing subsequent tampering and facilitating quality traceability.
[0103] In the data fusion and visualization module, the time alignment cache unit unifies the IMU, GNSS (Global Navigation Satellite System), magnetic compass, barometer, and optical flow data from different sensors to the same clock reference according to the timestamp, so as to avoid fusion errors caused by inconsistent sampling cycles; and establishes a circular cache area to temporarily store historical data for easy subsequent interpolation or backtracking.
[0104] The multi-source data fusion and calculation unit uses an extended Kalman filter (EKF) to combine and calculate angular velocity, acceleration, magnetic field, position, and velocity information, and output continuous and smooth attitude, velocity, and position.
[0105] When GNSS signals are lost, the system automatically switches to pure inertial estimation and marks areas of increased uncertainty to alert users to drift.
[0106] The fusion quality assessment unit compares the merged calculation results with the original sensor data in real time, calculates the residuals and covariance, and determines whether there are abnormal jumps or sensor failures.
[0107] When the residual exceeds the set threshold, a quality degradation alarm is immediately issued and a log is recorded for post-event analysis.
[0108] The multi-dimensional graphics drawing unit automatically generates attitude spheres, velocity curves, position trajectories, and residual bar charts based on the merged calculation results, and supports simultaneous display in multiple windows on the same interface;
[0109] The interactive output unit allows users to view detailed data for any time period by zooming, panning, and selecting segments with the mouse.
[0110] In the automated test script module, the natural language parsing unit recognizes Chinese and English commands and automatically converts them into standard action codes;
[0111] The parsed results are verified and stored in the intermediate script queue to ensure that subsequent units can read them accurately.
[0112] The timing scheduling unit sorts the actions according to the time axis and triggers execution with millisecond precision to prevent multi-task conflicts.
[0113] If a step times out or returns an error, the system will automatically pause subsequent steps and record the exception to prevent further danger.
[0114] The action execution unit sends control commands to the flight controller via a serial port, and simultaneously collects feedback data such as attitude, speed, and motor current.
[0115] It supports closed-loop waiting until the aircraft reaches the specified attitude or the error enters the set range before continuing to the next step, ensuring consistent test conditions.
[0116] The data recording and anomaly monitoring unit saves the original sensor data and control commands throughout the process; it monitors key indicators such as attitude error and current overload in real time, and immediately stops the test and marks the anomaly point once the safety threshold is exceeded.
[0117] The report generation unit automatically calculates key indicators such as overshoot, convergence time, and energy consumption, and compares them with preset pass lines; it outputs PDF and Excel reports containing data curves, pass criteria, and improvement suggestions, and also generates data packages for external systems to call.
[0118] In the permission and data security module, the identity verification unit adopts a multi-factor authentication method of account + strong password + dynamic token, and the account is automatically locked after more than a set number of consecutive failed login attempts.
[0119] If a user fails to log in for more than a set number of consecutive times, the account will be automatically locked, and the administrator will be notified to prevent brute-force attacks.
[0120] The hierarchical permission management unit divides users into three roles: operator, engineer, and administrator. Each role can only access the corresponding function, that is, the operator runs tests, the engineer adjusts parameters, and the administrator assigns accounts and backs up data.
[0121] For critical commands, such as writing calibration parameters and exporting reports, a one-time authorization code must be entered to avoid accidental operation.
[0122] The data encryption unit automatically encrypts the test parameters and results before saving them, and the encryption key is stored in an independent secure area, so that the contents cannot be read directly even if the hard drive is removed.
[0123] It supports encrypted export; all external transmissions are encrypted, and the recipient needs an authorization certificate to decrypt them properly.
[0124] The integrity verification unit calculates a unique verification value for each piece of test data. Any alteration will result in verification failure, and the system will immediately prompt that the data has been tampered with. It also regularly backs up encrypted data to external storage and the cloud, which can be quickly restored in the event of equipment failure, ensuring business continuity.
[0125] like Figure 2 As shown, this invention provides a method for testing and analyzing the attitude of a UAV, comprising the following steps:
[0126] S1: Collect parameters of the machine body and motors to generate a digital twin model with degrees of freedom;
[0127] S2: Controls rotation according to specified actions, and estimates and corrects errors of gyroscope, accelerometer, and magnetic compass in real time;
[0128] S3: Injects extreme conditions such as wind disturbance and thrust failure, and outputs corresponding tension and torque signals;
[0129] S4: Run different control laws under the same disturbance sequence and automatically record overshoot, convergence time and recovery capability;
[0130] S5: Encrypt and save calibration parameters and test reports, generate unique verification values, and ensure data integrity and traceability.
[0131] Specifically, in step S1, the system automatically reads parameters such as the weight of the UAV, the KV value of the motor, and the size of the propeller blades, and generates a digital twin model within 10 seconds that is consistent with the weight, inertia, and thrust characteristics of the real UAV, which serves as the basis for all subsequent calculations.
[0132] In step S2, the user completes three simple actions according to the on-screen prompts: draw a figure eight; rotate horizontally one full circle; and gently push the throttle to heat up the machine. The sensor dynamic calibration module automatically calculates the gyroscope zero bias, accelerometer scale error, magnetic compass interference, and temperature drift coefficient, writes the error into memory within 30 seconds and makes it effective immediately, without the need for additional tooling.
[0133] In step S3, the computer injects configurable extreme conditions such as wind disturbance, single propeller failure, and sudden drop in thrust into the virtual aircraft, and outputs the corresponding thrust, torque, and sensor data in real time to simulate sudden situations in real flight.
[0134] In step S4, the PID, LQR or other flight control algorithm to be tested is connected to the loop and run under the same disturbance sequence. Key indicators such as attitude overshoot, convergence time, and energy consumption are automatically recorded, and a quantitative score is given.
[0135] In step S5, after confirming that there are no abnormalities, the calibration parameters are encrypted and stored in the airborne memory, and a PDF / Excel report with curves, indicators and blockchain summaries is generated to ensure that the data is tamper-proof and traceable throughout the process.
[0136] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, it is intended that all variations falling within the meaning and scope of equivalents of the claims be included within the present invention.
Claims
1. A system for testing and analyzing the attitude of a UAV, characterized in that: include: The attitude simulation module, based on a quaternion dynamics model, simulates the attitude changes of a UAV under six degrees of freedom (6DOF) and supports custom trajectory input. The degree-of-freedom attitude simulation module includes a dynamics calculation unit, an environmental disturbance modeling unit, a sensor signal generation unit, and an interface synchronization unit. The dynamics calculation unit uses quaternions to describe the attitude, avoiding gimbal lock; it establishes a mass-inertia-thrust-aerodynamic coupling equation. The environmental disturbance modeling unit provides various wind field models. The sensor signal generation unit generates the original data packet by superimposing calibration error, noise, quantization error, delay, and temperature drift based on the true value output by the dynamics calculation unit. The sensor dynamic calibration module automatically identifies and calibrates gyroscope zero bias, accelerometer scale error, and magnetic compass hard iron / soft iron interference. The sensor dynamic calibration module includes an error parameter estimation unit and a parameter write-back unit; the error parameter estimation unit calculates the gyroscope zero bias, accelerometer scale and installation error matrix, magnetic compass hard iron / soft iron interference coefficient and temperature-zero bias slope online, and outputs the corresponding uncertainty. The parameter write-back unit writes the estimation result of the error estimation unit into a temporary register, injects it safely into the flight control system, and performs uninterrupted real-time compensation on the original sensor data throughout the entire working process. The multi-throttle vector control module controls the motor throttle separately to simulate extreme working conditions such as asymmetric thrust, single propeller failure, and thrust saturation. The flight control algorithm verification module injects attitude error in real time and evaluates convergence time, overshoot, and steady-state error. The data fusion and visualization module integrates inertial measurement unit (IMU), global positioning system (GPS), magnetometer, barometer, and optical flow data in real time, and supports multi-dimensional visualization such as waveform diagrams, 3D attitude spheres, heat maps, and spectrum diagrams. The automated test script module supports Excel-driven testing, allowing users to write natural language commands. This module includes a natural language parsing unit, a timing scheduling unit, an action execution unit, a data recording and anomaly monitoring unit, and a report generation unit. The natural language parsing unit recognizes Chinese and English commands and automatically converts them into standard action codes; The timing scheduling unit sorts the actions according to the time axis and triggers execution with millisecond precision to prevent multi-task conflicts. The action execution unit sends control commands to the flight controller via a serial port, and simultaneously collects feedback data such as attitude, speed, and motor current. The data recording and anomaly monitoring unit saves the original sensor data and control commands throughout the process; it monitors key indicators such as attitude error and current overload in real time, and immediately stops the test and marks the anomaly point once the safety threshold is exceeded. The report generation unit automatically calculates key indicators such as overshoot, convergence time, and energy consumption, and compares them with preset pass lines; it outputs PDF and Excel reports, which contain data curves, pass criteria, and improvement suggestions. The permissions and data security module implements hierarchical permission management, supports test data encryption, operation log auditing, and parameter tamper-proofing; it provides a blockchain digest option, which can generate a unique hash for key data to prevent tampering afterward and facilitate quality traceability.
2. The UAV degree-of-freedom attitude testing and analysis system according to claim 1, characterized in that: The mass-inertia-thrust-aerodynamic coupling equation supports input of motor, propeller diameter, pitch, and ESC delay parameters in the thrust model, while the aerodynamic model provides linear and quadratic damping options. It outputs three-axis angular velocity, three-axis acceleration, quaternion, NED (north-east-ground) velocity, and NED (north-east-ground) position for subsequent unit calls. The environmental disturbance modeling unit provides four models: constant wind, Dryden continuous turbulence, discrete gusts, and user-defined wind spectrum. The wind vector is superimposed on the body velocity in real time. It generates Gaussian noise with adjustable bandwidth to simulate propeller slipflow asymmetry, body vibration, and external collisions. The interface synchronization unit has a built-in clock synchronization service and uses soft timestamps to reduce the deviation between the simulated clock and the physical clock.
3. The UAV degree-of-freedom attitude testing and analysis system according to claim 1, characterized in that: The sensor dynamic calibration module further includes an action command generation unit and a sensor data caching unit, wherein: The motion command generation unit provides users with rhythm and amplitude prompts through sound, light, and vibration to ensure repeatability of the motion; and it detects motion quality in real time, automatically re-samples if it is not up to standard. The sensor data caching unit establishes a circular buffer area to synchronously store the raw data, magnetic data, and body temperature of the IMU (Inertial Measurement Unit), and pre-filters the stored data; it outputs a clean data stream with noise reduction, outlier removal, and timestamps for subsequent units to call.
4. The UAV degree-of-freedom attitude testing and analysis system according to claim 1, characterized in that: The multi-throttle vector control module includes a motor distribution unit, a current dynamic unit, a motor torque generation unit, a body torque synthesis unit, and a fault injection unit, wherein: The motor distribution unit converts the PWM (Pulse Width Modulation) pulses and digital throttle signals sent by the flight controller into dimensionless throttle values; according to the frame layout, it converts these dimensionless throttle values into the total thrust and torque in the three axes that the whole machine can generate, ensuring that each motor is assigned the correct target throttle. The current dynamic unit simulates the inertia and dead zone of a real ESC, calculates the actual current of each motor line, and then sums them into the total battery current to simulate the battery voltage drop. The motor torque generation unit calculates the thrust generated by each propeller and then adds the influence of the incoming flow velocity to make the thrust vary with the flight speed. Based on the thrust and motor inertia, the counter-torque and acceleration torque generated by each propeller are calculated simultaneously to ensure that the torque values match the data from the actual test bench. The airframe torque synthesis unit adds and cross-multiplies the tension of each motor according to the installation position vector to obtain the total lift and total roll, pitch, and yaw moments in the airframe coordinate system. The fault injection unit, according to user settings and external triggering, suddenly lowers the throttle of a certain motor at a specified time, slowly lowers it, and superimposes random vibrations to simulate propeller failure, ESC damage, and abnormal signal interference.
5. The UAV degree-of-freedom attitude testing and analysis system according to claim 1, characterized in that: The flight control algorithm verification module includes an algorithm template loading unit, a disturbance and fault generation unit, a closed-loop simulation execution unit, a performance index extraction unit, an algorithm comparison and ranking unit, and a report generation and data encapsulation unit, wherein: The algorithm template loading unit completes the algorithm instantiation and data channel binding, ensuring that the attitude error and angular velocity error sent by the subsequent unit can be correctly received by the algorithm under test and return the motor throttle command. The disturbance and fault generation unit automatically generates attitude disturbances of step, sine, random and custom waveforms according to user settings, for testing the algorithm's tracking capability. The closed-loop simulation execution unit embeds the algorithm under test into the closed-loop loop. First, the free-degree attitude simulation engine outputs the real-time attitude, then the algorithm calculates the throttle, and finally the multi-throttle vector control simulator returns the tension and torque to form a complete feedback. The performance index extraction unit automatically calculates commonly used indicators such as overshoot, convergence time, steady-state error, ITAE (time multiplied by absolute error integral criterion), and phase margin, while also providing energy consumption and motor saturation. The algorithm compares and sorts the indicators according to user weights, and generates a radar chart and a comprehensive ranking. The report generation and data encapsulation unit automatically writes test results, curves, indicators, and rankings into PDF and Excel reports.
6. The UAV degree-of-freedom attitude testing and analysis system according to claim 1, characterized in that: The data fusion and visualization module includes a time-aligned caching unit, a multi-source data fusion and solving unit, a fusion quality assessment unit, a multi-dimensional graphics drawing unit, and an interactive output unit, wherein: The time alignment buffer unit unifies data from different sensors to the same clock reference according to timestamps and establishes a circular buffer area to temporarily store historical data. The multi-source data fusion and calculation unit uses an extended Kalman filter (EKF) to combine angular velocity, acceleration, magnetic field, position, and velocity information to output continuous and smooth attitude, velocity, and position. The fusion quality assessment unit compares the merged calculation results with the original sensor data in real time, calculates the residuals and covariance, and determines whether there are abnormal jumps or sensor failures. The multi-dimensional graphics drawing unit automatically generates attitude spheres, velocity curves, position trajectories, and residual bar charts based on the merged calculation results, and supports simultaneous display in multiple windows on the same interface; The interactive output unit allows users to view detailed data for any time period by zooming, panning, and selecting segments with the mouse.
7. The UAV degree-of-freedom attitude testing and analysis system according to claim 1, characterized in that: The permission and data security module includes an identity verification unit, a hierarchical permission management unit, a data encryption unit, and an integrity verification unit, wherein: The identity verification unit adopts a multi-factor authentication method of account + strong password + dynamic token, and the account is automatically locked after a set number of consecutive failed login attempts. The hierarchical access control unit divides users into three roles: operator, engineer, and administrator. Each role can only access the corresponding functions. The data encryption unit automatically encrypts the test parameters and results before saving them, and the encryption key is stored in an independent secure area. The integrity verification unit calculates a unique verification value for each piece of test data and periodically backs up the encrypted data to external storage and the cloud.
8. A method for testing and analyzing the attitude of a UAV, used to run the UAV attitude testing and analysis system according to any one of claims 1-7, characterized in that: Includes the following steps: S1: Collect parameters of the machine body and motors to generate a digital twin model with degrees of freedom; S2: Controls rotation according to specified actions, and estimates and corrects errors of gyroscope, accelerometer, and magnetic compass in real time; S3: Injects extreme conditions such as wind disturbance and thrust failure, and outputs corresponding tension and torque signals; S4: Run different control laws under the same disturbance sequence and automatically record overshoot, convergence time and recovery capability; S5: Encrypt and save calibration parameters and test reports, generate unique verification values, and ensure data integrity and traceability.