A method and system for simulating control of a drone
Patent Information
- Application Number
- CN202611223244.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-08-13
AI Technical Summary
[0003]然而,现有无人机仿真状态重置技术难以满足上述带速瞬移的需求,原因是,现有技术中的状态重置大多采用轨迹过渡式重置,轨迹过渡式重置是指:当需要将无人机从当前状态切换至目标状态时,系统不会直接进行位置跳跃,而是由路径规划算法实时生成一条从A点到B点的平滑过渡轨迹,无人机沿该平滑过渡轨迹飞行,逐步完成从当前状态到目标状态的切换
1)本发明无人机仿真控制方法,其通过对瞬移指令进行初校验,生成预检瞬移指令;再启动异步处理线程,对预检瞬移指令进行处理以及一致性校验;接着再监测无人机仿真周期的计算步长进行同步控制,形成三层解耦逻辑,整个过程不会占用无人机仿真的时间,实现无人机仿真的无轨迹过渡带速瞬移,同时通过双重校验机制、物理性能约束库的约束,以实现无人机仿真过程中的瞬时状态切换,重置后速度和姿态角波动小,位置偏差小,满足瞬时跨越场景或紧急突发规避的零延迟需求。解决了现有技术中无人机切换至目标状态时,出现速度清零、姿态紊乱、运动趋势被迫中断等的技术问题,能够适配于普通无人机仿真环境和倍速仿真场景,大幅提升无人机仿真在障碍规避、应急处置等快速场景的模拟效率与真实性。
Smart Images

Figure CN122732238B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of unmanned aerial vehicle (UAV) simulation technology, and relates to UAV state switching technology in the UAV simulation process, specifically a UAV simulation control method and system. Background Technology
[0002] Drone simulation training utilizes high-fidelity, repeatable, and zero-risk virtual test environments to address the high trial-and-error costs and scenario limitations inherent in real-world drone flight. During simulation training, it's frequently necessary to rapidly switch the drone's spatial state and motion parameters. For example, switching from long-distance cruise to close-range obstacle avoidance, or from long-distance cruise to emergency response drills. This switching requires the drone to instantly transition from its current state to the target state without any trajectory planning or transition paths, while maintaining seamless flight at the target velocity (no loss or zeroing of the velocity vector), i.e., instantaneous speed-carrying teleportation.
[0003] However, existing UAV simulation state reset technologies struggle to meet the aforementioned requirements for high-speed instantaneous movement. This is because most existing state reset technologies employ trajectory transition resets. Trajectory transition resets mean that when switching the UAV from its current state to a target state, the system doesn't directly jump to a new position. Instead, a path planning algorithm generates a smooth transition trajectory from point A to point B in real time. The UAV flies along this trajectory, gradually transitioning from the current state to the target state. Furthermore, in terms of state reset dimensions, existing solutions often only reset position parameters, neglecting the synchronous matching of motion trend parameters such as velocity vectors, attitude angles, and angular velocities. This leads to technical problems such as velocity zeroing, attitude disorder, and forced interruption of motion trends when the UAV instantly switches to the target state. Consequently, these technologies cannot meet the zero-latency requirements for instantaneous scene traversal or emergency evasion, i.e., they cannot meet the requirements for high-speed instantaneous movement during UAV simulation. Summary of the Invention
[0004] In response to the technical problems described in the background, such as speed zeroing, attitude disorder, and forced interruption of motion trend when a UAV instantly switches to the target state, which cannot meet the requirements of instantaneous speed-driven movement in UAV simulation, this invention proposes a UAV simulation control method and system to achieve instantaneous state switching in UAV simulation. After resetting, the speed and attitude angle fluctuations are small, and the position deviation is small, meeting the zero-delay requirement for instantaneous scene crossing or emergency avoidance.
[0005] To address the aforementioned technical problems, the present invention adopts the following technical solution: A method for simulating and controlling an unmanned aerial vehicle (UAV) includes the following steps: Establish a physical performance constraint library; Obtain the teleportation command; The teleportation command is initially verified: if the initial verification passes, a pre-detection teleportation command is generated; if the initial verification fails, the teleportation command is discarded and the next teleportation command is obtained. An asynchronous processing thread is started based on the pre-detection teleportation instruction, and the pre-detection teleportation instruction is processed to obtain the pre-detection teleportation target instruction. The pre-detection teleportation target instruction is then subjected to consistency verification based on the physical performance constraint library: if the consistency verification passes, the teleportation target instruction is generated; otherwise, the pre-detection teleportation target instruction is modified until the pre-detection teleportation target instruction passes the consistency verification, and the teleportation target instruction and instruction ready flag are generated. Based on the instruction ready flag, start monitoring whether the UAV simulation cycle has entered the start time of the next calculation step: if yes, generate and execute a reset instruction; if no, continue monitoring. Based on the execution reset command, all integrator histories of the UAV model are cleared to zero, and the instantaneous target command is injected into the UAV model at the start of the next calculation step to update the spatial state and motion parameters of the UAV model, thus completing the UAV simulation.
[0006] Further specified, the teleportation command includes a command validity flag, target position parameters in the WGS84 geodetic coordinate system, target forward airspeed, and target heading angle; The initial verification includes three conditions: Condition 1, Condition 2, and Condition 3. Condition 1 is to determine whether the command validity flag, target position parameters in the WGS84 geodetic coordinate system, target forward airspeed, and target heading angle in the teleportation command do not contain any non-empty values. Condition 2 is to determine whether the teleportation command is valid based on the command validity flag. Condition 3 is to determine whether the target altitude is greater than the ground altitude, where the target altitude is the height component in the target position parameters. To pass the initial verification, the results of Conditions 1, 2, and 3 must all be yes.
[0007] Further specifying, the processing of the pre-detection teleportation command specifically includes: Transform the target location parameters from the WGS84 geodetic coordinate system to the ENU ground coordinate system; Determine the target velocity parameters, target angular velocity parameters, and target attitude parameters based on the target's forward airspeed and target heading angle; The pre-detection instantaneous target command includes target position parameters, target velocity parameters, target angular velocity parameters, and target attitude parameters in the ENU ground coordinate system.
[0008] Furthermore, the physical performance constraint library includes flight speed limits, attitude angle limits, and angular velocity limits; The consistency check refers to: determining whether the target velocity parameter is within the flight speed limit; determining whether the target angular velocity parameter is within the angular velocity limit; and determining whether the target attitude parameter is within the attitude angle limit.
[0009] Further specifying, the modification of the pre-detection teleportation target command specifically includes: If the target velocity parameter exceeds the flight speed limit, the target velocity parameter is scaled up until it is within the flight speed limit to obtain the updated target velocity parameter, and the target attitude parameter is re-determined based on the updated target velocity parameter. If the target attitude parameters exceed the range of the attitude angle limit, the target attitude parameters are clamped to the boundary value of the attitude angle limit to obtain the updated target attitude parameters, and the target velocity parameters are re-determined based on the updated target attitude parameters. If the target angular velocity parameter exceeds the range of the angular velocity limit, the target angular velocity parameter is clamped to the boundary value of the attitude angular limit to obtain the updated target angular velocity parameter.
[0010] Further specifying, the UAV model includes a UAV navigation and flight control model and a UAV dynamics model; The specific steps of updating the spatial state and motion parameters of the UAV model include: injecting the target position parameters in the ENU ground coordinate system into the UAV navigation and flight control model to update the spatial state of the UAV model; and injecting the target velocity parameters, target angular velocity parameters, and target attitude parameters into the UAV dynamics model to update the motion parameters of the UAV model.
[0011] Further specifying, the process of updating the spatial state and motion parameters of the UAV model to complete the UAV simulation specifically includes: Update the spatial state and motion parameters of the drone model; The control commands output by the UAV navigation and flight control model are smoothed and limited; the deviation between the actual state of the UAV and the target state of the UAV is actively suppressed, and the active suppression is exited after the deviation converges to the tolerance band, thus completing the UAV simulation.
[0012] Further specifying, the smoothing and limiting of the control commands output by the UAV navigation and flight control model specifically includes: Definition of the first The control command for the j-th channel in the simulation cycle is: , No. The control command for the j-th channel in the simulation cycle is: , No. The simulation cycle refers to the first simulation cycle after the spatial state and motion parameters have been updated; the simulation cycle refers to the first simulation cycle after the spatial state and motion parameters have been updated. Each simulation cycle refers to the last simulation cycle before the spatial state and motion parameters are updated. According to control commands and control commands Determine the instruction change amount of the j-th channel. Determine the change in instruction for the j-th channel. Is it greater than the maximum instruction change threshold of the j-th channel? If so, then according to the control instructions. and the maximum instruction change threshold Control commands Make corrections to the control commands. Perform smoothing limiting; otherwise, no control commands are required. Perform smoothing and limiting.
[0013] Further specifying, the active suppression of the deviation between the actual state of the UAV and the target state of the UAV specifically includes: Real-time monitoring of the actual status of drones According to the actual state of the drone and the target status of the drone Determine the absolute deviation of the state ; This refers to the control ring number of the drone; Determine the absolute deviation of the state Is it greater than the set threshold? If so, adjust the proportional gain of the control loop corresponding to the actual state of the UAV to make the absolute deviation of the state... Not greater than the set threshold If the actual state of the UAV is not actively suppressed, then the deviation between the actual state of the UAV and the target state of the UAV is not actively suppressed.
[0014] The UAV simulation control system corresponding to the above-mentioned UAV simulation control method includes: Constraint Library Creation Module: Used to create a physical performance constraint library; Command Acquisition and Monitoring Module: Used to acquire teleportation commands; receive feedback command readiness flags; upon receiving the command readiness flags, monitor whether the UAV simulation cycle has entered the start time of the next calculation step: if yes, generate an execution reset command and forward the execution reset command to the synchronization reset module; if no, continue monitoring. Teleportation command initial verification module: used to perform initial verification on the teleportation command; if the initial verification passes, a pre-detection teleportation command is generated; an asynchronous processing thread is started according to the pre-detection teleportation command to execute the consistency verification module; if the initial verification fails, the teleportation command is discarded and the next teleportation command is obtained. Consistency verification module: processes the pre-detection teleportation command to obtain the pre-detection teleportation target command; performs consistency verification on the pre-detection teleportation target command according to the physical performance constraint library: if the consistency verification passes, the teleportation target command is generated; otherwise, the pre-detection teleportation target command is modified until the pre-detection teleportation target command passes the consistency verification, generates the teleportation target command and command ready flag, and feeds back the command ready flag to the command acquisition and monitoring module; And a synchronous reset module: receiving the execution reset command, clearing all integrator history of the UAV model to zero based on the execution reset command, and injecting the instantaneous target command into the UAV model at the start of the next calculation step, updating the spatial state and motion parameters of the UAV model, and completing the UAV simulation.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1) The UAV simulation control method of this invention performs initial verification of the teleportation command to generate a pre-detection teleportation command; then, it starts an asynchronous processing thread to process the pre-detection teleportation command and perform consistency verification; next, it monitors the calculation step size of the UAV simulation cycle for synchronous control, forming a three-layer decoupled logic. The entire process does not occupy the UAV simulation time, realizing trajectory-free transition speed-based teleportation in UAV simulation. At the same time, through dual verification mechanisms and constraints from the physical performance constraint library, it achieves instantaneous state switching during UAV simulation. After resetting, the speed and attitude angle fluctuations are small, and the position deviation is small, meeting the zero-latency requirement for instantaneous scene crossing or emergency avoidance. It solves the technical problems in the prior art where speed is zeroed, attitude disorder occurs, and motion trend is forcibly interrupted when the UAV switches to the target state. It can be adapted to ordinary UAV simulation environments and high-speed simulation scenarios, greatly improving the simulation efficiency and realism of UAV simulation in rapid scenarios such as obstacle avoidance and emergency response.
[0016] 2) This invention injects the instantaneous target transfer command into the UAV model at the start of the next calculation step, while clearing all integrator history of the UAV model, performing a deep reset and initializing the model state to avoid interfering with the main loop calculation of the UAV simulation cycle. At the same time, it combines the control command output by the UAV navigation and flight control model after the speed-up instantaneous transfer to smooth and limit the amplitude, and actively suppress the deviation between the actual state of the UAV and the target state of the UAV, thus realizing speed-up instantaneous transfer and fast and stable convergence, thereby achieving the purpose of stable flight continuation.
[0017] 3) This invention monitors whether the UAV simulation cycle enters the start time of the next calculation step, thereby aligning the injection timing of the instantaneous target command with the calculation step, achieving a state switching time of <1ms. Through state reset without trajectory transition, it solves the technical problem of excessive time consumption of traditional trajectory transition technology, and is fully adapted to the needs of UAV rapid simulation scenarios.
[0018] 4) The pre-detection instantaneous target command of the present invention includes target position parameters, target velocity parameters, target angular velocity parameters and target attitude parameters in the ENU ground coordinate system, thereby realizing full-dimensional speed reset of position, velocity, attitude and angular velocity, and ensuring the legality of the target state through verification matching with the physical performance constraint library, avoiding the collapse of the UAV model after reset. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the UAV simulation control method of the present invention; Figure 2 This is a schematic diagram of the UAV simulation control system of the present invention; Figure 3 This is a simulated flight path diagram of a UAV during high-speed instantaneous movement. Detailed Implementation
[0020] The technical solution of the present invention will be further explained and described below with reference to the accompanying drawings and embodiments, but the present invention is not limited to the embodiments described below.
[0021] Before implementing the simulation function of the UAV, this invention requires constructing a UAV model and establishing a full-dimensional state parameter system. The UAV model includes a UAV navigation and flight control model and a UAV dynamics model. The UAV navigation and flight control model refers to a multi-closed-loop flight control model containing attitude loop, position loop, and velocity loop. The UAV dynamics model is a six-degree-of-freedom dynamics model constructed based on the rigid body dynamics of the UAV and the aerodynamic principles of rotor or fixed wing. A fixed simulation cycle is set, and the UAV model runs according to this fixed simulation cycle. Simultaneously, it is also necessary to establish an environmental model for WGS84 geodetic coordinate system, ENU ground coordinate system transformation, and wind field disturbance. As a preferred embodiment of this invention, the wind field disturbance environmental model is set to a windless condition with the UAV flying horizontally. The full-dimensional state parameter system includes four dimensions: position, velocity, attitude, and angular velocity. express: These represent longitude, latitude, and altitude in the WGS84 coordinate system, with longitude and latitude in degrees and altitude in meters. These represent the eastward, northward, and celestial altitude positions in the ENU ground coordinate system, in meters (m). These represent the forward velocity, lateral velocity, and vertical velocity in the body coordinate system, respectively, in m / s. These are the roll angle, pitch angle, and yaw angle in the body coordinate system, respectively, in degrees. These are the roll rate, pitch rate, and yaw rate in the body coordinate system, respectively, in rad / s.
[0022] See Figure 1 This invention proposes a drone simulation control method, comprising the following steps: S1: Establish a physical performance constraint library; the physical performance constraint library includes flight speed limits, attitude angle limits, and angular velocity limits; the physical performance constraint library is based on the physical performance constraint thresholds determined by the flight manuals of different UAV models, providing a benchmark for subsequent state legality verification.
[0023] The flight speed limit is expressed as: This is the minimum forward velocity in the body coordinate system, in m / s. The forward velocity in the body coordinate system, in m / s; This represents the maximum forward velocity in the body coordinate system, in m / s. This is the minimum lateral velocity in the body coordinate system, in m / s. Lateral velocity in the body coordinate system, unit: m / s; This represents the maximum lateral velocity in the body coordinate system, in m / s. This is the minimum vertical velocity in the body coordinate system, in m / s. Vertical velocity in the body coordinate system, unit: m / s; This represents the maximum vertical velocity in the body coordinate system, in m / s.
[0024] The attitude angle limit is expressed as: In the formula, The minimum roll angle in the body coordinate system, in degrees; The roll angle in the body coordinate system, in degrees; The maximum roll angle in the body coordinate system, in degrees; The minimum pitch angle in the body coordinate system, in degrees; The pitch angle in the body coordinate system, in degrees; The maximum pitch angle in the body coordinate system, in degrees; Yaw angle in the body coordinate system, unit: degrees.
[0025] The angular velocity limit is expressed as: In the formula, The minimum roll velocity in the body coordinate system, in rad / s; The roll rate in the body coordinate system, in rad / s; This is the maximum roll velocity in the body coordinate system, in rad / s. This is the minimum pitch angular velocity in the body coordinate system, in rad / s. The pitch angular velocity in the body coordinate system, in rad / s; This represents the maximum pitch angular velocity in the body coordinate system, in rad / s. This is the minimum yaw rate in the body coordinate system, in rad / s. Yaw angular velocity in the body coordinate system, unit: rad / s; This represents the maximum yaw rate in the body coordinate system, expressed in rad / s.
[0026] S2: Obtain teleportation command; the teleportation command includes command validity flag, target position parameters in WGS84 geodetic coordinate system, target forward airspeed and target heading angle. The command validity flag is 0 or 1, 0 is invalid and 1 is valid.
[0027] S3: Perform initial verification on the teleportation command: If the initial verification passes, a pre-verification teleportation command is generated; if the initial verification fails, the teleportation command is discarded, and the process returns to step S2 to obtain the next teleportation command. The initial verification includes conditions one, two, and three. Condition one is to determine whether the command validity flag, target position parameters in the WGS84 geodetic coordinate system, target forward airspeed, and target heading angle in the teleportation command do not contain non-empty values: if yes, then condition one is satisfied; otherwise, condition one is not satisfied. Condition two is to determine whether the teleportation command is valid based on the command validity flag: if yes, then condition two is satisfied; otherwise, condition two is not satisfied. Condition three is to determine whether the target altitude (target altitude is the height component in the target position parameters) is greater than the ground altitude (the ground altitude is a parameter automatically obtained by the UAV model during the simulation operation): if yes, then condition three is satisfied; otherwise, condition three is not satisfied. To pass the initial verification, the judgment results of conditions one, two, and three must all be yes, that is, conditions one, two, and three must all be satisfied.
[0028] The above conditions one, two, and three can be judged in any order known to those skilled in the art, or they can be judged simultaneously. For example: ① First, judge whether condition one is satisfied. If condition one is satisfied, then judge whether conditions two and three are satisfied. If condition one is not satisfied, then terminate the judgment process, or then judge whether conditions two and three are satisfied. ② First, judge whether condition two is satisfied. If condition two is satisfied, then judge whether conditions one and three are satisfied. If condition two is not satisfied, then terminate the judgment process, or then judge whether conditions one and three are satisfied. ③ First, judge whether condition three is satisfied. If condition three is satisfied, then judge whether conditions one and two are satisfied. If condition three is not satisfied, then terminate the judgment process, or then judge whether conditions one and two are satisfied. ④ Conditions one, two, and three are judged simultaneously, and the judgment results are obtained at the same time.
[0029] S4: Start an asynchronous processing thread based on the pre-detection teleportation instruction and process the pre-detection teleportation instruction to obtain the pre-detection teleportation target instruction; perform a consistency check on the pre-detection teleportation target instruction according to the physical performance constraint library: if the consistency check passes, generate the teleportation target instruction; otherwise, modify the pre-detection teleportation target instruction until the pre-detection teleportation target instruction passes the consistency check, generate the teleportation target instruction and instruction ready flag, and execute step S5; Step S4, specifically processing the pre-detection teleportation command, includes: Transform the target location parameters from the WGS84 geodetic coordinate system to the ENU ground coordinate system; Based on the target's forward airspeed and heading angle, and using flight dynamics principles, the target's velocity parameters, angular velocity parameters, and attitude parameters are determined. This leads to the further determination of the target's attitude parameters and angular velocity parameters. The determination process is as follows: Set the drone to fly without sideslip, fly in a straight line, and determine the target's lateral velocity in the body coordinate system. The UAV is flying horizontally with a flight path tilt angle of 0°. In windless conditions, the direction of the target's forward airspeed vector is the same as the direction of the target's forward ground speed vector.
[0030] Target pitch angle and target forward airspeed in the aircraft coordinate system The relationship is: In the formula, Angle of attack in body coordinate system, unit: rad; The zero-velocity reference angle of attack in the body coordinate system, in rad; The coefficient of change, in units of s / m; The target's forward airspeed in the body coordinate system, in m / s; , and This is determined based on the flight manuals of different UAV models and is a technology known to those skilled in the art. The target pitch angle in the airframe coordinate system of the UAV during level flight in calm conditions. equal to the angle of attack in the body coordinate system ; Target forward velocity in body coordinate system Vertical velocity of the target in the body coordinate system Determine according to the following formula: In the formula, The forward velocity of the target in the body coordinate system, in m / s; The target's forward airspeed in the body coordinate system, in m / s; Angle of attack in body coordinate system, unit: rad; The vertical velocity of the target in the body coordinate system, in m / s.
[0031] When a drone is flying in a straight line, the target roll angle in the body coordinate system Target yaw angle in body coordinate system It equals the target heading angle.
[0032] Set the target roll rate while the drone is in stable flight. Target pitch rate Target yaw rate .
[0033] Pre-detection instantaneous target commands include target position parameters in the ENU ground coordinate system. Target velocity parameters ( ), target angular velocity parameters ( , ) and target attitude parameters ( ).
[0034] In step S4, the consistency check of the pre-detection teleportation target command is performed according to the physical performance constraint library. The consistency check refers to: determining whether the target velocity parameter is within the flight speed limit; determining whether the target angular velocity parameter is within the angular velocity limit; determining whether the target attitude parameter is within the attitude angle limit. If all three are within the corresponding range, the consistency check is passed; otherwise, the consistency check fails.
[0035] In step S4, the correction of the pre-detection teleportation target command specifically includes: If the target velocity parameter exceeds the flight speed limit, the target velocity parameter is scaled up until it is within the flight speed limit to obtain the updated target velocity parameter, and the target attitude parameter is re-determined based on the updated target velocity parameter. If the target attitude parameters exceed the range of the attitude angle limit, the target attitude parameters are clamped to the boundary value of the attitude angle limit to obtain the updated target attitude parameters, and the target velocity parameters are re-determined based on the updated target attitude parameters. If the target angular velocity parameter exceeds the range of the angular velocity limit, the target angular velocity parameter is clamped to the boundary value of the attitude angular limit to obtain the updated target angular velocity parameter.
[0036] S5: Based on the instruction ready flag, start monitoring whether the UAV simulation cycle has entered the start time of the next calculation step: if yes, generate and execute the reset instruction and execute step S6; if no, repeat S5 and continue monitoring whether the UAV simulation cycle has entered the start time of the next calculation step.
[0037] S6: Based on the execution of the reset command, all integrator history of the UAV model is cleared to zero, and the instantaneous target command is injected into the UAV model at the start of the next calculation step, updating the spatial state and motion parameters of the UAV model, and completing the UAV simulation.
[0038] In step S6, updating the spatial state and motion parameters of the UAV model specifically includes: injecting the target position parameters in the ENU ground coordinate system into the UAV navigation and flight control model to update the spatial state of the UAV model; and injecting the target velocity parameters, target angular velocity parameters, and target attitude parameters into the UAV dynamics model to update the motion parameters of the UAV model.
[0039] In a preferred embodiment of the present invention, updating the spatial state and motion parameters of the UAV model to complete the UAV simulation specifically includes: Update the spatial state and motion parameters of the drone model; The control commands output by the UAV navigation and flight control model are smoothed and limited; the deviation between the actual state of the UAV and the target state of the UAV is actively suppressed. Once the deviation converges to the tolerance band, the active suppression is exited, and the UAV simulation is completed.
[0040] Specifically, smoothing and limiting the control commands output by the UAV navigation and flight control model includes: Definition of the first The control command for the j-th channel in the simulation cycle is: , No. The control command for the j-th channel in the simulation cycle is: , No. The simulation cycle refers to the first simulation cycle after the spatial state and motion parameters have been updated; the simulation cycle refers to the first simulation cycle after the spatial state and motion parameters have been updated. Each simulation cycle refers to the last simulation cycle before the spatial state and motion parameters are updated. Within the first control cycle after the teleportation target command is injected, according to the control command... and control commands Determine the instruction change amount of the j-th channel. Determine whether the instruction change amount of the j-th channel is greater than the maximum instruction change amount threshold of the j-th channel. If so, then according to the control instructions. and the maximum instruction change threshold Control commands Make corrections to the control commands. Perform smoothing limiting; otherwise, no control commands are required. Perform smoothing and limiting.
[0041] The change in instruction for the j-th channel Determine according to the following formula: Let be the dimensionless change in the instruction of the j-th channel; For the first The j-th channel control instruction in the simulation cycle is dimensionless. For the first The j-th channel control instruction in the simulation cycle is dimensionless. This is the threshold for the maximum instruction change, and it is dimensionless.
[0042] According to control commands and the maximum instruction change threshold Control commands are executed according to the following formula. Make corrections: In the formula, This is a sign function that takes the sign of the original variable.
[0043] Specifically, actively suppressing the deviation between the actual state of the drone and the target state of the drone includes: Real-time monitoring of the actual status of drones According to the actual state of the drone and the target status of the drone Determine the absolute deviation of the state ; This refers to the control loop number of the UAV; determining the absolute deviation of the state. Is it greater than the set threshold? If so, adjust the proportional gain of the control loop corresponding to the actual state of the UAV to make the absolute deviation of the state... Not greater than the set threshold If the actual state of the UAV is not actively suppressed, then the deviation between the actual state of the UAV and the target state of the UAV is not actively suppressed.
[0044] Among them, absolute deviation of state Determine according to the following formula: The absolute deviation of state is dimensionless; The actual state of the drone is dimensionless, where the actual state of the drone is... It can be any standardized value of the monitored state variable, including velocity parameters, attitude parameters, and angular velocity parameters; The target state of the UAV is dimensionless. To set the threshold, which is dimensionless, its value is the upper limit of the steady-state tolerance as follows. The value is 2 to 5 times higher, depending on the simulation accuracy requirements and the characteristics of the drone model.
[0045] Among them, the proportional gain of the control loop corresponding to the actual state of the UAV for: In the formula, The proportional gain of the control loop corresponding to the actual state of the UAV is dimensionless. For the first The nominal proportional gain of the control loop in normal flight mode, dimensionless; This is a temporary boost factor for the proportional gain, dimensionless, with a value ranging from 0.5 to 1.5, preferably 1.0 in this invention, and it needs to be ensured that... It should not exceed 80% of the critical gain of the control loop. That is, in normal flight mode, .
[0046] The principle for exiting active suppression after the deviation converges to the tolerance band is: the absolute deviation of the monitored state. Less than the upper limit of steady-state tolerance ,Right now And the rate of change of deviation is less than the stability criterion threshold. ; Stability criterion threshold The calculation formula is: In the formula, The threshold for the stability criterion is dimensionless. This is the upper limit of steady-state tolerance, dimensionless, and its value ranges from 0.01 to 0.05. In this application, 0.05 is preferred. Users can adjust the specific value according to the simulation accuracy requirements and the characteristics of the UAV model.
[0047] The drone simulation control method of the present invention will be described below in conjunction with typical application scenarios of drone simulation: In the drone simulation system, a drone simulation task is being performed. See [link / reference] Figure 3 The operator needs to perform a tactical evasion maneuver in high-speed flight, requiring the drone to be teleported at high speed to a pre-set reconnaissance point, i.e., teleported at high speed from point A to point B, and then immediately enter the patrol line at cruising speed.
[0048] The operator sends a teleportation command through the ground control station. The teleportation command includes: a command validity flag (set to 1 here), and the longitude in the WGS84 coordinate system. ,latitude ° and altitude target airspeed The target heading angle is 60°, and the ground elevation is 50m.
[0049] Perform an initial check on the teleportation command. If the initial check passes, generate a pre-check teleportation command.
[0050] An asynchronous processing thread is initiated based on the pre-detection teleportation command, and the command is processed by converting the target position parameters from the WGS84 geodetic coordinate system to the ENU ground coordinate system to obtain the target position parameters in the ENU ground coordinate system. Based on the flight manual of this UAV model, the angle of attack in the body coordinate system is obtained. Therefore, the target pitch angle in the body coordinate system The forward velocity of the target in the body coordinate system is calculated according to the formula. Target vertical velocity in body coordinate system Target lateral velocity in body coordinate system Target yaw angle in body coordinate system Target roll angle in body coordinate system When the drone is in stable flight, set the target roll rate. Target pitch rate Target yaw rate .
[0051] Determine the target velocity parameters ( Whether it is within the flight speed limit; determine the target angular velocity parameters ( , Whether it is within the angular velocity limit; determine the target attitude parameters ( If the attitude angle is within the limit range, and after consistency verification, all three are within the corresponding range, then the instantaneous target command and command ready flag are generated.
[0052] Based on the instruction ready flag, start monitoring whether the UAV simulation cycle has entered the start time of the next calculation step: if yes, generate and execute the reset instruction; if no, continue monitoring whether the UAV simulation cycle has entered the start time of the next calculation step.
[0053] The simulation is completed by resetting the history of all integrators in the UAV model, injecting the target position parameters in the ENU ground coordinate system into the UAV navigation and flight control model, and updating the spatial state of the UAV model; injecting the target velocity parameters, target angular velocity parameters, and target attitude parameters into the UAV dynamics model, and updating the motion parameters of the UAV model; smoothing and limiting the control commands output by the UAV navigation and flight control model; actively suppressing the deviation between the actual state of the UAV and the target state of the UAV, and exiting the active suppression after the deviation converges to the tolerance band, thus completing the UAV simulation.
[0054] This invention generates a pre-detection teleportation command by initially verifying the control commands; then, an asynchronous processing thread is started to process the pre-detection teleportation command and perform consistency verification; next, the calculation step size of the UAV simulation cycle is monitored for synchronous control, forming a three-layer decoupled logic. The entire process does not occupy the UAV simulation time, realizing trajectory-free transition speed-based teleportation in UAV simulation. At the same time, through dual verification mechanisms and constraints from the physical performance constraint library, instantaneous state switching during UAV simulation is achieved. After resetting, the speed and attitude angle fluctuations are small, and the position deviation is small, meeting the zero-latency requirement for instantaneous scene crossing or emergency avoidance. It solves the technical problems in the prior art, such as speed zeroing, attitude disorder, and forced interruption of motion trend when the UAV switches to the target state. It can be adapted to ordinary UAV simulation environments and high-speed simulation scenarios, significantly improving the simulation efficiency and realism of UAV simulation in rapid scenarios such as obstacle avoidance and emergency response.
[0055] See Figure 2 The present invention also proposes an unmanned aerial vehicle (UAV) simulation control system, which corresponds to the above-mentioned UAV simulation control method, including a constraint library establishment module, an instruction acquisition and monitoring module, a teleportation instruction initial verification module, a consistency verification module, and a synchronization reset module; Constraint Library Creation Module: Used to create a physical performance constraint library; Command Acquisition and Monitoring Module: Used to acquire teleportation commands; receive feedback command readiness flags; upon receiving the command readiness flags, monitor whether the UAV simulation cycle has entered the start time of the next calculation step: if yes, generate an execution reset command and forward the execution reset command to the synchronization reset module; if no, continue monitoring. The teleportation instruction initial verification module is used to perform initial verification on the teleportation instruction. If the initial verification passes, a pre-detection teleportation instruction is generated. An asynchronous processing thread is started based on the pre-detection teleportation instruction to execute the consistency verification module. If the initial verification fails, the teleportation instruction is discarded and the next teleportation instruction is obtained. Consistency verification module: Processes the pre-detection teleportation command to obtain the pre-detection teleportation target command; performs consistency verification on the pre-detection teleportation target command according to the physical performance constraint library: if the consistency verification passes, the teleportation target command is generated; otherwise, the pre-detection teleportation target command is modified until the pre-detection teleportation target command passes the consistency verification, generates the teleportation target command and command ready flag, and feeds back the command ready flag to the command acquisition and monitoring module; Synchronous Reset Module: Receives and executes the reset command, clears all integrator history of the UAV model based on the reset command, and injects the instantaneous target command into the UAV model at the start of the next calculation step, updates the spatial state and motion parameters of the UAV model, and completes the UAV simulation.
[0056] It should be noted that the UAV simulation control system of this invention is completely corresponding to the above-mentioned UAV simulation control method. For the relevant contents of the constraint library establishment module, instruction acquisition and monitoring module, instantaneous instruction initial verification module, consistency verification module and synchronization reset module that are not described in detail in the UAV simulation control system, please refer to the description in the above-mentioned UAV simulation control method section. This invention will not be repeated in the UAV simulation control system section.
[0057] The above description is only used to illustrate the technical solutions of the present invention, and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing, those skilled in the art should understand that modifications can still be made to the technical solutions described above, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the present invention.
Claims
1. A method for simulating and controlling an unmanned aerial vehicle (UAV), characterized in that, Includes the following steps: Establish a physical performance constraint library; the physical performance constraint library includes flight speed limits, attitude angle limits, and angular velocity limits; Obtain the teleportation command; The teleportation command is initially verified: if the initial verification passes, a pre-detection teleportation command is generated; if the initial verification fails, the teleportation command is discarded and the next teleportation command is obtained. An asynchronous processing thread is started based on the pre-detection teleportation instruction, and the pre-detection teleportation instruction is processed to obtain the pre-detection teleportation target instruction. The pre-detection teleportation target instruction is then subjected to consistency verification based on the physical performance constraint library: if the consistency verification passes, the teleportation target instruction is generated; otherwise, the pre-detection teleportation target instruction is modified until the pre-detection teleportation target instruction passes the consistency verification, and the teleportation target instruction and instruction ready flag are generated. The consistency check refers to: determining whether the target velocity parameter is within the flight speed limit; and determining whether the target angular velocity parameter is within the angular velocity limit. Determine whether the target attitude parameters are within the attitude angle limits; The specific steps of correcting the pre-detected teleportation target command include: If the target velocity parameter exceeds the flight speed limit, the target velocity parameter is scaled up until it is within the flight speed limit to obtain the updated target velocity parameter, and the target attitude parameter is re-determined based on the updated target velocity parameter. If the target attitude parameters exceed the range of the attitude angle limit, the target attitude parameters are clamped to the boundary value of the attitude angle limit to obtain the updated target attitude parameters, and the target velocity parameters are re-determined based on the updated target attitude parameters. If the target angular velocity parameter exceeds the range of the angular velocity limit, the target angular velocity parameter is clamped to the boundary value of the attitude angular limit to obtain the updated target angular velocity parameter; Based on the instruction ready flag, start monitoring whether the UAV simulation cycle has entered the start time of the next calculation step: if yes, generate and execute a reset instruction; if no, continue monitoring. Based on the execution reset command, all integrator histories of the UAV model are cleared to zero, and the instantaneous target command is injected into the UAV model at the start of the next calculation step to update the spatial state and motion parameters of the UAV model, thus completing the UAV simulation.
2. The UAV simulation control method according to claim 1, characterized in that, The teleportation command includes a command validity flag, target position parameters in the WGS84 geodetic coordinate system, target forward airspeed, and target heading angle. The initial verification includes three conditions: Condition 1, Condition 2, and Condition 3. Condition 1 is to determine whether the command validity flag, target position parameters in the WGS84 geodetic coordinate system, target forward airspeed, and target heading angle in the teleportation command do not contain any non-empty values. Condition 2 is to determine whether the teleportation command is valid based on the command validity flag. Condition 3 is to determine whether the target altitude is greater than the ground altitude, where the target altitude is the height component in the target position parameters. To pass the initial verification, the results of Conditions 1, 2, and 3 must all be yes.
3. The UAV simulation control method according to claim 2, characterized in that, The processing of the pre-detection teleportation command specifically includes: Transform the target location parameters from the WGS84 geodetic coordinate system to the ENU ground coordinate system; Determine the target velocity parameters, target angular velocity parameters, and target attitude parameters based on the target's forward airspeed and target heading angle; The pre-detection instantaneous target command includes target position parameters, target velocity parameters, target angular velocity parameters, and target attitude parameters in the ENU ground coordinate system.
4. The UAV simulation control method according to claim 3, characterized in that, The UAV model includes a UAV navigation and flight control model and a UAV dynamics model; The specific steps of updating the spatial state and motion parameters of the UAV model include: injecting the target position parameters in the ENU ground coordinate system into the UAV navigation and flight control model to update the spatial state of the UAV model; and injecting the target velocity parameters, target angular velocity parameters, and target attitude parameters into the UAV dynamics model to update the motion parameters of the UAV model.
5. The UAV simulation control method according to claim 4, characterized in that, The process of updating the spatial state and motion parameters of the UAV model to complete the UAV simulation specifically includes: Update the spatial state and motion parameters of the drone model; The control commands output by the UAV navigation and flight control model are smoothed and limited; the deviation between the actual state of the UAV and the target state of the UAV is actively suppressed, and the active suppression is exited after the deviation converges to the tolerance band, thus completing the UAV simulation.
6. The UAV simulation control method according to claim 5, characterized in that, The smoothing and limiting of the control commands output by the UAV navigation and flight control model specifically includes: Definition of the first The control command for the j-th channel in the simulation cycle is: , No. The control command for the j-th channel in the simulation cycle is: , No. The simulation cycle refers to the first simulation cycle after the spatial state and motion parameters have been updated; the simulation cycle refers to the first simulation cycle after the spatial state and motion parameters have been updated. Each simulation cycle refers to the last simulation cycle before the spatial state and motion parameters are updated. According to control commands and control commands Determine the instruction change amount of the j-th channel. Determine the change in instruction for the j-th channel. Is it greater than the maximum instruction change threshold of the j-th channel? If so, then according to the control instructions. and the maximum instruction change threshold Control commands Make corrections to the control commands. Perform smoothing limiting; otherwise, no control commands are required. Perform smoothing and limiting.
7. The UAV simulation control method according to claim 6, characterized in that, The active suppression of the deviation between the actual state of the UAV and the target state of the UAV specifically includes: Real-time monitoring of the actual status of drones According to the actual status of the drone and the target status of the drone Determine the absolute deviation of the state ; This refers to the control ring number of the drone; Determine the absolute deviation of the state Is it greater than the set threshold? If so, adjust the proportional gain of the control loop corresponding to the actual state of the UAV to make the absolute deviation of the state... Not greater than the set threshold If the actual state of the UAV is not actively suppressed, then the deviation between the actual state of the UAV and the target state of the UAV is not actively suppressed.
8. A drone simulation control system, characterized in that, include: Constraint Library Creation Module: Used to create a physical performance constraint library; the physical performance constraint library includes flight speed limits, attitude angle limits, and angular velocity limits. Command Acquisition and Monitoring Module: Used to acquire teleportation commands; receive feedback command ready flags; upon receiving the command ready flags, monitor whether the UAV simulation cycle has entered the start time of the next calculation step: if yes, generate an execution reset command and forward the execution reset command to the synchronization reset module; if no, continue monitoring. Teleportation command initial verification module: used to perform initial verification on the teleportation command; if the initial verification passes, a pre-detection teleportation command is generated; an asynchronous processing thread is started according to the pre-detection teleportation command to execute the consistency verification module; if the initial verification fails, the teleportation command is discarded and the next teleportation command is obtained. Consistency verification module: processes the pre-detection teleportation command to obtain the pre-detection teleportation target command; performs consistency verification on the pre-detection teleportation target command according to the physical performance constraint library: if the consistency verification passes, the teleportation target command is generated; otherwise, the pre-detection teleportation target command is modified until the pre-detection teleportation target command passes the consistency verification, generates the teleportation target command and command ready flag, and feeds back the command ready flag to the command acquisition and monitoring module; The consistency check refers to: determining whether the target velocity parameter is within the flight speed limit; and determining whether the target angular velocity parameter is within the angular velocity limit. Determine whether the target attitude parameters are within the attitude angle limits; The specific steps of correcting the pre-detected teleportation target command include: If the target velocity parameter exceeds the flight speed limit, the target velocity parameter is scaled up until it is within the flight speed limit to obtain the updated target velocity parameter, and the target attitude parameter is re-determined based on the updated target velocity parameter. If the target attitude parameters exceed the range of the attitude angle limit, the target attitude parameters are clamped to the boundary value of the attitude angle limit to obtain the updated target attitude parameters, and the target velocity parameters are re-determined based on the updated target attitude parameters. If the target angular velocity parameter exceeds the range of the angular velocity limit, the target angular velocity parameter is clamped to the boundary value of the attitude angular limit to obtain the updated target angular velocity parameter; And a synchronous reset module: receiving the execution reset command, clearing all integrator history of the UAV model to zero based on the execution reset command, and injecting the instantaneous target command into the UAV model at the start of the next calculation step, updating the spatial state and motion parameters of the UAV model, and completing the UAV simulation.
Citation Information
Patent Citations
Verification method for operation simulation of quadrotor unmanned aerial vehicle in low-altitude layered airspace
CN114047774A
Coupling six-degree-of-freedom elastic aircraft flight simulation method
CN121167881A