A risc-v multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method

By leveraging the hardware triggering path and pipelined operation of the RISC-V multi-core processor, the algorithm is directly launched to accelerate the execution of state estimation and matrix operations of the control law. This solves the real-time performance and stability issues of flight control algorithms in low-altitude aircraft, and achieves efficient attitude control under power consumption and size constraints.

CN123177484APending Publication Date: 2026-11-27GUANGZHOU ANYUE INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611639800.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-22
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing flight control algorithms suffer from increased computational load in low-altitude aircraft, leading to real-time and stability issues. Especially under power and size constraints, the matrix operations of state estimation and attitude control law are difficult to maintain a constant latency on limited hardware resources, and the timing uncertainty of the control loop affects the stability of attitude control.

Method used

Employing a RISC-V multi-core processor, the algorithm acceleration core is directly launched via a hardware trigger path. The matrix operation hardware acceleration unit performs matrix operations for state estimation and control laws, avoiding intervention from the operating system task scheduler. The computation is completed in a pipelined manner, and the collaborative scheduling core generates collaborative drive signals for multi-axis actuators, ensuring that the control quantities of each axis are updated synchronously.

Benefits of technology

It improves the real-time performance and stability of the flight control algorithm, reduces control loop delay fluctuations, and enhances the attitude control capability of low-altitude aircraft under power consumption and size constraints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123177484A_ABST
    Figure CN123177484A_ABST
Patent Text Reader

Abstract

The present application relates to the field of aircraft control, and particularly relates to a RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method, which is applied to a RISC-V multi-core processor containing an algorithm acceleration core and a cooperative scheduling core. A sensor data ready signal directly starts the algorithm acceleration core through a hardware trigger path without passing through an operating system task scheduler. The algorithm acceleration core calls a matrix operation hardware acceleration unit, sequentially executes matrix operations of state estimation and matrix operations of control law, and obtains a state estimation quantity and an attitude control quantity. After the attitude control quantity is calculated, a hardware completion signal is output, and the cooperative scheduling core generates a cooperative driving signal of a multi-axis actuator in response to the signal, and each axis actuator synchronously updates the control quantity according to the cooperative driving signal. The method connects each stage of the control loop by a hardware signal, and the matrix operation does not pass through a software loop, which is beneficial to improving the real-time performance and certainty of attitude control under the constraints of power consumption and volume.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of aircraft control technology, and in particular to a RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method. Background Technology

[0002] As low-altitude aircraft are increasingly used in logistics, inspection, and emergency response, their flight control systems are placing higher demands on the real-time performance and stability of attitude control. At the same time, these aircraft are typically subject to strict limitations in power consumption and size, while the computational complexity of state estimation and attitude control laws in the core flight control algorithms is constantly increasing. Algorithms such as extended Kalman filtering, cascaded PID, or LQG involve extensive matrix operations, and when running on limited hardware resources, the real-time performance of the control loop is easily affected.

[0003] Currently, most flight control algorithms run on general-purpose processors and are uniformly scheduled by the operating system. Once sensor data is ready, it needs to be allocated to the processor core by a task scheduler, and the computation process relies on software loops. The drawback of this approach is that the timing of task scheduling and loop execution is affected by factors such as software load and interrupt response, making it difficult to maintain a constant total delay from data readiness to control output. For low-altitude aircraft, this uncertainty directly affects the stability of attitude control and hinders further optimization of system design under power consumption and size constraints.

[0004] To improve computational efficiency, some hardware acceleration attempts have been made in existing technologies. For example, computationally intensive tasks such as EKF are offloaded to independent coprocessors, or multi-core architectures are used for parallel processing. However, these solutions often focus on accelerating a specific algorithm step independently. Bus communication or software intervention is still required to connect the coprocessor and the main processor, as well as between control output and actuator drive. As a result, the data transfer between state estimation and control law calculation, and the synchronous distribution of control quantities to multi-axis actuators, still have timing uncertainties. The connection between the various stages of the control loop is not tight enough, and the overall coordination effect is limited. Summary of the Invention

[0005] To address one or more problems in the existing technology, the main objective of this application is to provide a RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method.

[0006] To achieve the aforementioned objectives, this application proposes a RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method, applied to a RISC-V multi-core processor. The RISC-V multi-core processor includes an algorithm acceleration core and a cooperative scheduling core. The algorithm acceleration core includes a matrix operation hardware acceleration unit. The RISC-V multi-core processor executes a flight control algorithm, which includes state estimation and a control law. The method includes: In response to a sensor data ready signal, the algorithm acceleration core is started via a hardware trigger path, wherein the start-up does not go through the operating system task scheduler; The algorithm acceleration core calls the matrix operation hardware acceleration unit to perform hardware-accelerated calculations on the matrix operation of the state estimation to obtain the state estimate. Based on the obtained state estimate, the matrix operation hardware acceleration unit is invoked to perform hardware-accelerated calculations on the matrix operation of the control law based on the state estimate, thereby obtaining the attitude control quantity; Based on the obtained attitude control quantity, a hardware completion signal is output, which carries the attitude control quantity. The collaborative scheduling core responds to the hardware completion signal, generates a collaborative drive signal for the multi-axis actuators based on the attitude control quantity, and outputs the collaborative drive signal to the multi-axis actuators so that each axis actuator can synchronously update the control quantity according to the collaborative drive signal.

[0007] This application embodiment also provides a RISC-V multi-core driven flight control algorithm hardware acceleration and attitude coordination control system, applied to a RISC-V multi-core processor. The RISC-V multi-core processor includes an algorithm acceleration core and a coordination scheduling core. The algorithm acceleration core includes a matrix operation hardware acceleration unit. The RISC-V multi-core processor is used to execute flight control algorithms, which include state estimation and control laws. The system includes: A response triggering module is used to start the algorithm acceleration core through a hardware triggering path in response to a sensor data ready signal, wherein the start-up does not go through the operating system task scheduler; The first calling module is used to call the matrix operation hardware acceleration unit through the algorithm acceleration core to perform hardware-accelerated calculations on the matrix operation of the state estimation to obtain the state estimate. The second calling module is used to call the matrix operation hardware acceleration unit based on the obtained state estimate, and perform hardware-accelerated calculation on the matrix operation of the control law based on the state estimate to obtain the attitude control quantity; The output module is configured to output a hardware completion signal based on the obtained attitude control quantity, wherein the hardware completion signal carries the attitude control quantity. The generation module is used to respond to the hardware completion signal through the cooperative scheduling core, generate a cooperative drive signal for the multi-axis actuators according to the attitude control quantity, and output the cooperative drive signal to the multi-axis actuators so that each axis actuator can synchronously update the control quantity according to the cooperative drive signal.

[0008] This application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described above.

[0009] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.

[0010] The RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method of this application directly starts the algorithm acceleration core through a hardware trigger path. The computation start after sensor data readiness no longer goes through the operating system task scheduler, and the start time is not affected by the software task queue, ensuring a deterministic control loop start point. The algorithm acceleration core calls the matrix operation hardware acceleration unit to perform matrix operations for state estimation and control laws. The operations are completed in a pipelined manner, independent of software loops, with the cycle determined by the hardware pipeline stage, avoiding time fluctuations caused by buffering and interrupts. The state estimate is directly used as the input for the control law matrix operation, executed continuously on the same hardware acceleration unit, reducing data transfer and scheduling overhead between stages. After the attitude control quantity is calculated, a hardware completion signal is output. The cooperative scheduling core generates cooperative drive signals for the multi-axis actuators based on this signal. Each axis actuator synchronously updates its control quantity, ensuring the timing consistency of the multi-axis drive. The overall control loop delay no longer changes with the flight control software task load, which is beneficial for improving the real-time performance and stability of attitude control under the power consumption and size constraints of low-altitude aircraft. Attached Figure Description

[0011] Figure 1 This is a flowchart illustrating a RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method according to an embodiment of this application. Figure 2 This is a flowchart illustrating another embodiment of the RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method of this application. Figure 3 This is a schematic block diagram of the structure of a RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control system according to an embodiment of this application; Figure 4 This is a schematic block diagram of the structure of a computer device according to an embodiment of this application.

[0012] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0014] Reference Figure 1 This application provides a RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method, applied to a RISC-V multi-core processor. The RISC-V multi-core processor includes an algorithm acceleration core and a cooperative scheduling core. The algorithm acceleration core includes a matrix operation hardware acceleration unit. The RISC-V multi-core processor is used to execute a flight control algorithm, which includes state estimation and control laws. The method includes: S1. In response to the sensor data ready signal, the algorithm acceleration core is started through a hardware trigger path, wherein the start-up does not go through the operating system task scheduler; S2. The matrix operation hardware acceleration unit is called through the algorithm acceleration core to perform hardware-accelerated calculations on the matrix operation of the state estimation to obtain the state estimate. S3. Based on the obtained state estimate, the matrix operation hardware acceleration unit is invoked to perform hardware-accelerated calculations on the matrix operation of the control law based on the state estimate, so as to obtain the attitude control quantity. S4. Based on the obtained attitude control quantity, output a hardware completion signal, the hardware completion signal carrying the attitude control quantity; S5. The collaborative scheduling core responds to the hardware completion signal, generates a collaborative drive signal for the multi-axis actuators based on the attitude control quantity, and outputs the collaborative drive signal to the multi-axis actuators so that each axis actuator can synchronously update the control quantity according to the collaborative drive signal.

[0015] As described in steps S1-S3 above, this solution is applied to a RISC-V multi-core processor. This processor internally consists of two types of cores: one is an algorithm acceleration core, responsible for matrix operations in the flight control algorithm; the other is a cooperative scheduling core, responsible for the timing coordination of each stage of the control loop and the drive scheduling of multi-axis actuators. The algorithm acceleration core integrates a matrix operation hardware acceleration unit, specifically designed to perform numerous matrix multiplications, matrix inversions, and covariance updates involved in the flight control algorithm. The flight control algorithm itself comprises two main parts: first, state estimation, used to deduce the aircraft's current attitude, position, and velocity from sensor data; and second, the control law, used to calculate the control quantities that each axis actuator should output based on the state estimation results.

[0016] When the sensor interface generates a data ready signal, this signal is sent directly to the startup of the algorithm acceleration core via a hardware trigger path. This hardware trigger path bypasses the operating system's task scheduler, meaning that the startup of the algorithm acceleration core does not depend on the operating system allocating time slices or scheduling tasks. Once the sensor data is ready, the hardware signal directly triggers the algorithm acceleration core to start working, and the startup time is not affected by the current software task queue. In this way, the starting point of the control loop is determined and will not be delayed because the operating system is processing other tasks.

[0017] After the algorithm acceleration core is activated, it first calls the matrix operation hardware acceleration unit to perform matrix operations for state estimation. State estimation typically employs extended Kalman filtering or its variants, involving multiplication of the state transition matrix and covariance matrix, multiplication of the observation matrix and covariance matrix, inversion of the Kalman gain, and update of the covariance matrix. These matrix operations are executed pipelined in the hardware acceleration unit, eliminating the need for element-wise computation via software loops. The data path of the hardware acceleration unit matches the matrix dimension of the state estimation algorithm, and the computation cycle is determined by the pipeline stage, no longer affected by cache hit rate or interrupt response. After state estimation is complete, a state estimate is output, representing the aircraft's current attitude, position, and velocity.

[0018] After obtaining the state estimate, the algorithm acceleration core continues to call the same matrix operation hardware acceleration unit to execute the matrix operation of the control law. The control law typically adopts a cascaded PID or LQG structure, where the outer loop calculates the desired attitude based on position and velocity errors, the inner loop calculates the control quantity based on attitude and angular velocity errors, and the integral term is used to eliminate steady-state errors. Each stage of the control law involves the multiplication of the gain matrix and the error vector. These matrix operations are also completed by the hardware acceleration unit in a pipelined manner, with the state estimate serving as the input to the control law matrix operation. Both are executed continuously on the same hardware acceleration unit. Since the state estimate and the control law share the same hardware acceleration unit, data transfer between them does not require bus backhaul or software relay; the state estimate directly enters the input of the next round of matrix operation from the output of the hardware acceleration unit. After the control law matrix operation is completed, the attitude control quantity is obtained, which contains the thrust or torque command that each axis actuator should output.

[0019] As described in steps S4-S5 above, after the attitude control quantity is calculated, the algorithm acceleration core outputs a hardware completion signal. This hardware completion signal is a hardware-level level or pulse signal, without going through a software interrupt handler. The hardware completion signal carries either the newly calculated attitude control quantity or a memory address pointing to that attitude control quantity. The purpose of the hardware completion signal is to notify the cooperative scheduling core that the algorithm calculation for this control cycle has been completed, the attitude control quantity is ready, and the actuator driving stage can begin.

[0020] After receiving the hardware completion signal, the cooperative scheduling core reads the attitude control quantity from the signal, or reads it from the shared memory area based on the address carried in the signal. Then, the cooperative scheduling core calculates the drive signals that each axis of the multi-axis actuator should output based on the attitude control quantity. The multi-axis actuator may include multiple rotor motors, servos, or other types of actuators, each corresponding to a drive signal. The cooperative scheduling core outputs these drive signals to the corresponding actuators, and each axis actuator updates its own control quantity according to the drive signal. Because the cooperative scheduling core generates the drive signal only after receiving the hardware completion signal, and the hardware completion signal is output only after the algorithm acceleration core has completed all matrix operations, the control quantity update of each axis actuator is time-aligned with the completion of the algorithm calculation. Each axis actuator updates synchronously within the same control cycle, reducing the possibility of one axis being updated while another has not.

[0021] As described above, the algorithm acceleration core is directly launched via a hardware trigger path. The computation after sensor data readiness is no longer handled by the operating system task scheduler, and the launch time is unaffected by the software task queue, ensuring a deterministic control loop start point. The algorithm acceleration core calls the matrix operation hardware acceleration unit to perform matrix operations for state estimation and control laws. These operations are completed in a pipelined manner, independent of software loops, with the cycle determined by the hardware pipeline stage, avoiding time fluctuations caused by buffering and interrupts. The state estimate is directly used as input for the control law matrix operation, executed continuously on the same hardware acceleration unit, reducing data transfer and scheduling overhead between stages. After the attitude control quantity calculation is completed, a hardware completion signal is output. The cooperative scheduling core uses this signal to generate cooperative drive signals for the multi-axis actuators. Each axis actuator synchronously updates its control quantity, ensuring the timing consistency of the multi-axis drive. The overall control loop delay no longer varies with the flight control software task load, which is beneficial for improving the real-time performance and stability of attitude control under the power consumption and size constraints of low-altitude aircraft.

[0022] In one embodiment, the RISC-V multi-core processor further includes a sensor interface, the method is executed iteratively according to a control cycle, and the state estimation is an extended Kalman filter; The step of calling the matrix operation hardware acceleration unit through the algorithm acceleration core to perform hardware-accelerated calculations on the matrix operations of the state estimation to obtain the state estimate includes: Obtain the preset state transition matrix and the posterior state estimate obtained in the previous control cycle. Based on the state transition matrix and the posterior state estimate obtained in the previous control cycle, perform matrix multiplication to obtain the prior state estimate. Obtain the preset process noise covariance matrix and the posterior covariance matrix obtained in the previous control cycle. Based on the state transition matrix, the posterior covariance matrix obtained in the previous control cycle, and the process noise covariance matrix, perform matrix multiplication and addition operations to obtain the prior covariance matrix. Obtain a preset observation matrix and a preset observation noise covariance matrix, and perform matrix multiplication and addition operations based on the observation matrix, the prior covariance matrix and the observation noise covariance matrix to obtain the observation covariance matrix; Perform matrix inversion on the observation covariance matrix, and perform matrix multiplication on the inversion result, the prior covariance matrix, and the observation matrix to obtain the Kalman gain matrix; The sensor interface responds to the sensor data ready signal by outputting sensor observation data, and performs matrix multiplication and addition operations based on the Kalman gain matrix, the prior state estimate and the sensor observation data to obtain the posterior state estimate; Based on the Kalman gain matrix and the prior covariance matrix, matrix multiplication and subtraction operations are performed to obtain the posterior covariance matrix, and the posterior state estimate is output as the state estimate.

[0023] As described above, the sensor interface serves as the data channel between the RISC-V multi-core processor and external sensors. Within each control cycle, after receiving the sensor data ready signal, it outputs the raw observation data to the algorithm acceleration core. State estimation employs an extended Kalman filter, the core idea of ​​which is to recursively calculate the state estimate using the estimation result from the previous control cycle and the current observation data through two stages: prediction and update. This process is executed iteratively according to the control cycle, with each control cycle completing one full prediction and update.

[0024] The prior state estimate is calculated based on the state transition matrix and the posterior state estimate obtained from the previous control cycle. The state transition matrix describes the evolution of the aircraft state from the previous control cycle to the current control cycle and is usually determined by the flight control dynamics model. Multiplying the state transition matrix by the posterior state estimate from the previous cycle yields the prior state estimate for the current cycle, which is the predicted value of the aircraft state in the absence of current observation data. This step is executed in a matrix multiplication pipeline within the hardware acceleration unit, and the computation time is determined by the matrix dimension and the number of pipeline stages.

[0025] The calculation of the prior covariance matrix is ​​performed after the prior state estimate. The process noise covariance matrix describes the uncertainty introduced during the state transition, while the posterior covariance matrix of the previous control cycle represents the uncertainty of the estimation result in the previous cycle. The state transition matrix, the posterior covariance matrix of the previous cycle, and the process noise covariance matrix are multiplied and added according to the covariance propagation law to obtain the prior covariance matrix, which represents the uncertainty of the state estimate after the prediction phase. This step is also performed by the hardware acceleration unit, and the computation cycle is predictable.

[0026] The calculation of the observation covariance matrix involves the observation matrix and the observation noise covariance matrix. The observation matrix describes the mapping relationship between state variables and sensor observations, while the observation noise covariance matrix reflects the measurement noise level of the sensor itself. By performing matrix multiplication and addition operations on the observation matrix, the prior covariance matrix, and the observation noise covariance matrix, the observation covariance matrix is ​​obtained, which is the theoretical covariance of the innovation under the current observation conditions. This step provides an intermediate quantity for the subsequent calculation of the Kalman gain.

[0027] Calculating the Kalman gain matrix requires inverting the observation covariance matrix. The essence of Kalman gain is finding an optimal weighting ratio between prediction uncertainty and observation uncertainty that minimizes the error covariance of the posterior estimate. The inversion operation is implemented in a dedicated matrix inversion circuit within a hardware acceleration unit, avoiding the iterative division in software loops. The inverted result is multiplied by the prior covariance matrix and the observation matrix to obtain the Kalman gain matrix. The Kalman gain matrix determines the correction weights of the current observation data for the state estimate.

[0028] The calculation of the posterior state estimate is the core of the update phase. The sensor interface combines the sensor observation data output in the current control cycle with the mapping relationship described by the observation matrix to form an innovation vector, which represents the deviation between the actual and predicted observations. The Kalman gain matrix is ​​then used to weight the innovation vector and superimposed on the prior state estimate to obtain the posterior state estimate. This step incorporates observation information into the state estimation, making the estimation result more accurate than relying solely on prediction.

[0029] The calculation of the posterior covariance matrix is ​​performed simultaneously with the posterior state estimate. The Kalman gain matrix is ​​multiplied by the prior covariance matrix, and this product is subtracted from the prior covariance matrix to obtain the posterior covariance matrix. The posterior covariance matrix represents the uncertainty of the state estimate after the update phase and will serve as the input for the prediction phase of the next control cycle. Finally, the posterior state estimate is output as the state estimate for the current control cycle and used for control law matrix operations.

[0030] In this embodiment, it is worth mentioning that the entire iterative process of the extended Kalman filter forms a complete computation chain at the hardware level. From prior state estimation to prior covariance, from observation covariance to Kalman gain, and from posterior state estimation to posterior covariance, the input for each step comes either from preset parameters, from the hardware output of the previous step, or from the direct output of the sensor interface. The data path of the matrix operation hardware acceleration unit matches the matrix dimension of each step, and the computation cycle is determined by the pipeline stage. Compared with the software loop execution on a general-purpose processor, the execution time of the hardware acceleration unit is no longer affected by cache hit rate and interrupt response, and the time overhead of each stage in the control loop can be predetermined. This significantly narrows the fluctuation range of the total delay of the control loop, providing a foundation for the realization of microsecond-level deterministic latency.

[0031] In one embodiment, the control law is a cascaded PID / LQG control law; the step of calling the matrix operation hardware acceleration unit based on the obtained state estimate to perform hardware-accelerated calculations on the matrix operation of the control law based on the state estimate to obtain attitude control quantities includes: Obtain a preset outer loop gain matrix, extract position and velocity estimates from the state estimates, determine the outer loop error vector based on the position and velocity estimates, and perform matrix multiplication on the outer loop error vector and the outer loop gain matrix to obtain the outer loop control quantity; Obtain a preset inner loop gain matrix, determine the desired attitude quantity based on the outer loop control quantity, extract the attitude estimate and angular velocity estimate from the state estimate, determine the inner loop error vector based on the desired attitude quantity, the attitude estimate and the angular velocity estimate, and perform matrix multiplication on the inner loop error vector and the inner loop gain matrix to obtain the inner loop control quantity. Obtain the cumulative integral term obtained from the previous control cycle, and perform matrix addition based on the outer loop error vector, the inner loop error vector, and the cumulative integral term to obtain the updated cumulative integral term. Obtain a preset integral gain matrix, and perform matrix multiplication on the updated integral term accumulation and the integral gain matrix to obtain the integral control quantity; The attitude control quantity is obtained by performing matrix addition based on the outer loop control quantity, the inner loop control quantity, and the integral control quantity.

[0032] As mentioned above, cascaded PID / LQG control laws in flight control systems are responsible for converting state estimates into control commands for each axis actuator. The cascaded structure means the control law is divided into two levels: an outer loop and an inner loop. The outer loop handles position and velocity control, while the inner loop handles attitude and angular velocity control, connected by the desired attitude parameters. LQG control laws, on the other hand, introduce an optimal gain matrix into the PID structure, ensuring the control input reaches its optimal state while satisfying constraints.

[0033] The outer-loop control quantity is calculated by extracting position and velocity estimates from the state estimates. The position estimate reflects the aircraft's current spatial position, and the velocity estimate reflects its velocity. Subtracting the desired position from the position estimate and the desired velocity from the velocity estimate yields the outer-loop error vector, which represents the aircraft's deviation from the target state in both position and velocity dimensions. The outer-loop gain matrix is ​​a pre-designed optimal gain matrix, calculated offline by the LQG algorithm based on the aircraft dynamics model and control performance indicators. Multiplying the outer-loop error vector by the outer-loop gain matrix yields the outer-loop control quantity, which represents the desired acceleration or desired attitude adjustment required to eliminate position and velocity deviations.

[0034] The calculation of the inner-loop control quantity uses the outer-loop control quantity as input. After coordinate transformation or amplitude limiting, the outer-loop control quantity determines the desired attitude quantity, i.e., the attitude angle and angular velocity that the aircraft should achieve to track the desired trajectory. Attitude and angular velocity estimates are extracted from the state estimates and subtracted from the desired attitude quantities to obtain the inner-loop error vector. The inner-loop gain matrix is ​​also a pre-designed optimal gain matrix, reflecting the influence weights of attitude and angular velocity errors on the control quantity. Multiplying the inner-loop error vector by the inner-loop gain matrix yields the inner-loop control quantity, which represents the torque command required to eliminate attitude and angular velocity deviations.

[0035] Updating the integral term accumulation is a crucial step in eliminating steady-state errors. The outer-loop error vector and inner-loop error vector represent deviations at the position, velocity and attitude, and angular velocity levels, respectively. As these deviations persist throughout each control cycle, the integral term accumulation accumulates them cycle by cycle. The updated integral term accumulation is obtained by adding the integral term accumulation from the previous control cycle to the outer-loop and inner-loop error vectors of the current cycle. The role of the integral term is that even if the error is small, as long as it persists, the integral term will continuously accumulate and eventually drive the control input to eliminate the error.

[0036] The integral control quantity is calculated by multiplying the updated cumulative integral term by a preset integral gain matrix. The integral gain matrix determines the contribution weight of the integral term to the control quantity. After scaling the cumulative integral term by the integral gain matrix, the integral control quantity is obtained. The integral control quantity is typically used to compensate for steady-state deviations or persistent external disturbances in the system model, such as the persistent tilting moment caused by the shift of the center of gravity when an aircraft is hovering.

[0037] The final calculation of the attitude control quantity involves adding the outer-loop control quantity, the inner-loop control quantity, and the integral control quantity. The outer-loop control quantity provides control at the position and velocity levels, the inner-loop control quantity provides control at the attitude and angular velocity levels, and the integral control quantity provides compensation to eliminate steady-state errors. The sum of these three quantities yields the attitude control quantity, which contains the torque or thrust commands that each axis actuator should output. The attitude control quantity is then used to generate hardware completion signals, which are then used by the collaborative scheduling core to generate multi-axis collaborative drive signals.

[0038] It should be noted that matrix operations in cascaded PID / LQG control laws are among the most computationally intensive parts of flight control algorithms. The outer loop, inner loop, and integral term each involve multiplication of the gain matrix and error vector. When the number of control law stages is large or the state dimension is high, the computational load of matrix multiplication increases significantly. On general-purpose processors, these matrix multiplications are typically executed element-wise in nested loops. This results in a large number of loops, a large number of instructions, and the loop execution time is affected by cache hit rate and branch prediction, making it difficult to accurately predict the total computation time of the control cycle.

[0039] Therefore, this embodiment decomposes the matrix operation of the cascaded PID / LQG control law into five steps: outer loop control quantity, inner loop control quantity, integral term accumulation, integral control quantity, and attitude control quantity. The matrix multiplication in each step is performed by the matrix operation hardware acceleration unit. The outer loop gain matrix, inner loop gain matrix, and integral gain matrix are pre-configured as preset parameters in a storage area accessible to the hardware acceleration unit. The integral term accumulation of the previous control cycle is directly provided by the output of the hardware acceleration unit of the previous cycle. The position estimate, velocity estimate, attitude estimate, and angular velocity estimate in the state estimate are directly extracted from the state estimate output, without requiring software processing.

[0040] Reference Figure 2 In one embodiment, the hardware triggering path includes a window comparator and a jitter classifier; the step of activating the algorithm acceleration core via the hardware triggering path in response to a sensor data ready signal includes: S11. The window comparator receives the sensor data ready signal, records the arrival time of the sensor data ready signal, and compares the arrival time with a preset time window, wherein the preset time window is centered on the reference time of the current control cycle and has a preset window width. S12. When the arrival time is within the preset time window, the window comparator outputs the sensor data ready signal to the startup register of the algorithm acceleration core. S13. When the arrival time is outside the preset time window, the jitter classifier outputs a jitter flag, and the window comparator controls the output path of the sensor data ready signal to the start register in response to the jitter flag.

[0041] As described above, the arrival time of the sensor data ready signal from the sensor interface to the hardware trigger path does not always fall precisely at a fixed position in the control cycle. In actual operation, the signal arrival time may be offset due to internal timing fluctuations in the sensor, differences in signal line transmission delays, or buffering processes within the sensor interface. The window comparator performs a time window check on the signal arrival time before the signal enters the algorithm acceleration core.

[0042] After receiving the sensor data ready signal, the window comparator first records the arrival time of the signal. The arrival edge can be either a rising edge or a falling edge, depending on the output polarity of the sensor interface. Subsequently, the window comparator compares the arrival time with a preset time window. This preset time window is centered on the reference time of the current control cycle, extending outwards by a preset window width on each side. The reference time can be the starting point of the control cycle or a fixed reference point within the control cycle, and the window width is preset according to the timing characteristics of the sensor interface and the length of the control cycle.

[0043] If the arrival time falls within the preset time window, it indicates that the arrival time of the sensor data ready signal is within the expected range, and the signal is a valid trigger signal for the current control cycle. At this time, the window comparator outputs the signal to the start register of the algorithm acceleration core. After receiving the signal, the start register generates a start pulse, and the algorithm acceleration core responds to this start pulse by starting the matrix operations of state estimation and control law. This path is entirely completed by hardware; the signal transmission from the window comparator to the start register and then to the algorithm acceleration core does not involve any software.

[0044] If the arrival time falls outside the preset time window, it indicates that the signal arrival time deviates from the expected range. At this time, the jitter classifier outputs a jitter flag, indicating that there is timing jitter in the current sensor data ready signal. Upon receiving the jitter flag, the window comparator controls the output path of the signal to the start register. The control method can be either blocking the signal output or delaying the output, depending on the type of jitter and the system's fault tolerance strategy. The purpose of this design is to prevent a timing anomaly trigger signal from directly activating the algorithm acceleration core, causing the start point of the control loop to deviate from the expected position.

[0045] In this embodiment, in the flight control system, sensor data ready signals are typically generated in the form of interrupts. Several factors can introduce jitter along the path from the sensor interface to the processor core. The operating system kernel briefly masks interrupts when entering a critical section, and the critical section length for some drivers can reach hundreds of microseconds. When multiple sensors share the same interrupt line, interrupt handling for one sensor may delay the interrupt response of another. These factors cause the arrival time of the sensor data ready signal at the algorithm acceleration core to no longer be fixed, but may drift back and forth within the control cycle.

[0046] In general-purpose processor solutions, the uncertainty of interrupt response time directly leads to the uncertainty of the startup time of the algorithm acceleration core, causing a shift in the starting point of the control loop. Even if the execution time of the matrix operation hardware acceleration unit itself is deterministic, the total delay of the control loop will still fluctuate due to the drift in the startup time. The introduction of a window comparator and a jitter classifier ensures that only sensor data ready signals whose arrival time falls within the expected time window can normally trigger the algorithm acceleration core. Signals outside the window are identified as jitter, and their output paths are controlled, no longer directly triggering the algorithm acceleration core. In this way, the starting point of the control loop is limited to a preset time window, and the drift range of the startup time is narrowed from the entire control cycle to the window width. For microsecond-level control loops, this time window verification mechanism compresses the timing uncertainty of the startup to an acceptable range.

[0047] In one embodiment, the jitter flag includes an early jitter flag and a late jitter flag; the window comparator, in response to the jitter flag, controls the output path of the sensor data ready signal to the start register, including: When the arrival time is earlier than the start time of the preset time window, the jitter classifier outputs the early jitter flag, the window comparator blocks the output path of the sensor data ready signal to the start register in response to the early jitter flag, the algorithm acceleration core does not perform the step of performing hardware acceleration calculation on the matrix operation of the state estimate, and outputs the posterior state estimate obtained in the previous control cycle as the state estimate of the current control cycle. When the arrival edge time is later than the end time of the preset time window, the jitter classifier outputs the late jitter flag and the delay of the arrival edge time relative to the end time of the preset time window. The window comparator responds to the late jitter flag by outputting the sensor data ready signal to the start register. In response to the delay, the cooperative scheduling core shifts the output timing of the cooperative drive signal by the delay in the next control cycle.

[0048] As mentioned above, when the arrival time of the sensor data ready signal deviates from the preset time window, the direction of deviation affects the control loop differently. The jitter classifier classifies jitter into early jitter and late jitter based on the position of the arrival time relative to the time window, and adopts different processing methods for each.

[0049] Early jitter refers to an arrival time that is earlier than the start time of a preset time window. This usually means that the sensor data ready signal arrives too early, possibly originating from residual signals from the previous control cycle, glitches on the signal line, or leading pulses caused by timing fluctuations within the sensor interface. At this point, the sensor observation data corresponding to the signal may not have been updated, or may not even be valid data for the current control cycle. If the algorithm acceleration core is started as usual, the extended Kalman filter will perform state estimation based on unreliable data, and the posterior state estimate may be biased. Therefore, after the jitter classifier outputs the early jitter flag, the window comparator blocks the output path of the signal to the start register. The algorithm acceleration core does not perform matrix operations for state estimation; instead, it directly outputs the posterior state estimate obtained from the previous control cycle as the state estimate for the current control cycle. This processing is equivalent to maintaining the state estimate from the previous cycle when the signal arrives abnormally early, avoiding contamination of the Kalman filter's recursive process with unreliable data.

[0050] Late jitter refers to data arrival times that are later than the termination time of a preset time window. This usually means that the sensor data ready signal arrives too late, which may be due to additional delays in the signal transmission path, excessively long buffering times within the sensor interface, or queuing when multiple sensors share an interrupt line. The sensor observation data corresponding to this signal is usually valid, but its arrival time is later than expected. If this signal is discarded directly, the current control cycle will lack observation data, state estimation will degenerate into pure prediction, and accuracy will decrease. Therefore, the jitter classifier outputs a late jitter flag and a delay amount, the window comparator still outputs the signal to the start register, and the algorithm acceleration core continues to perform matrix operations for state estimation and control law. The delay amount is sent to the cooperative scheduling core, which offsets the output timing of the cooperative drive signal by this delay amount in the next control cycle. This process is equivalent to accepting the late-arriving data to complete the calculation in the current cycle and then pulling the timing back in the next cycle, compensating for the impact of this delay on the control cycle timing.

[0051] In this embodiment, although both early jitter and late jitter belong to timing deviations, their corresponding data reliability and system impact are drastically different. In early jitter, the signal arrives too early, and the data itself may not be ready or may be a residual signal. The safest approach in this case is to block the trigger and maintain the state estimate from the previous cycle, even if it means the control loop pauses for a moment, rather than introducing erroneous data. In late jitter, the signal arrives late, but the data itself is valid. The most reasonable approach in this case is to perform the calculation as usual, accept the delay, and record the delay for compensation in the next cycle. If the two types of jitter are treated the same, either valid data will be incorrectly discarded in late jitter, leading to a decrease in estimation accuracy, or invalid data will be incorrectly used in early jitter, causing estimation divergence. Classifying jitter into early and late categories and processing them separately ensures that the control loop maintains the continuity and reliability of state estimation even when the trigger signal timing is abnormal. Simultaneously, the timing offset compensation in the next cycle limits the impact of the delay to within one control cycle, preventing it from accumulating cycle by cycle. This classification mechanism, combined with the time window verification of the window comparator, jointly ensures the stability of the control loop's starting point under timing abnormalities.

[0052] In one specific embodiment, the control cycle of the RISC-V multi-core processor is set to 200 microseconds. The nominal arrival time of the sensor data ready signal is set to 40 microseconds after the start of each control cycle. A preset time window is centered at 40 microseconds, with a window width of ±5 microseconds; therefore, the lower limit of the time window is 35 microseconds, and the upper limit is 45 microseconds. The window comparator internally contains a free-running counter, which is reset at the start of each control cycle. The counting clock frequency is 100 MHz, and each counting unit corresponds to 10 nanoseconds. When the sensor data ready signal arrives, the window comparator latches the current count value of the counter, which represents the arrival edge time.

[0053] If the latched count value falls between 3500 and 4500, corresponding to an arrival time between 35 and 45 microseconds, the window comparator determines that the arrival edge is within a preset time window. At this point, the window comparator outputs a sensor data ready signal to the startup register of the algorithm acceleration core. The startup register generates a startup pulse, and the algorithm acceleration core begins executing matrix operations for the extended Kalman filter and the cascaded PID / LQG control law. The entire startup process does not involve the operating system task scheduler.

[0054] If the latched count is less than 3500, for example, 3200, the corresponding arrival time is 32 microseconds, earlier than the start time of the preset time window. The jitter classifier determines it as early jitter and outputs an early jitter flag. Upon receiving the early jitter flag, the window comparator blocks the output path of the sensor data ready signal to the start register. The algorithm acceleration core does not perform matrix operations for state estimation; instead, it directly outputs the posterior state estimate obtained from the previous control cycle as the state estimate for the current control cycle. This approach avoids triggering a Kalman filter update based on incomplete data due to an prematurely arriving signal.

[0055] If the latched count is greater than 4500, for example, 4800, the arrival time is 48 microseconds, later than the end time of the preset time window. The jitter classifier determines it as late jitter, outputs a late jitter flag, and calculates the delay. The delay equals the latched count minus the upper limit count of the window, i.e., 4800 minus 4500 equals 300 count units, corresponding to 3 microseconds. After receiving the late jitter flag, the window comparator still outputs the sensor data ready signal to the start register, and the algorithm acceleration core continues to perform state estimation and matrix operations of the control law. After receiving the delay, the cooperative scheduling core shifts the output timing of the cooperative drive signal by 3 microseconds in the next control cycle. For example, if the nominal output time of the cooperative drive signal is 120 microseconds after the start of the control cycle, the next control cycle will adjust it to 117 microseconds. In this way, the 3 microseconds late arrival will not accumulate into subsequent control cycles.

[0056] Within a more specific parameter range, the control period can be set to any value between 50 microseconds and 500 microseconds. The window width of the preset time window can be set to any value between 1 microsecond and 10 microseconds. The reference time can be taken as 10% to 30% of the start of the control period. The clock frequency of the counter can be flexibly selected according to the control period and window width, as long as the window boundaries can be distinguished. These parameters can be adjusted according to the timing characteristics of the sensor interface and the real-time requirements of the flight control system.

[0057] In one embodiment, the step of generating a coordinated drive signal for the multi-axis actuator based on the attitude control quantity in response to the hardware completion signal by the coordinated scheduling core, and outputting the coordinated drive signal to the multi-axis actuator, includes: The cooperative scheduling core responds to the hardware completion signal and generates cooperative drive signals corresponding to each axis actuator in the multi-axis actuator according to the attitude control quantity. Each cooperative drive signal carries a synchronization identifier corresponding to the hardware completion signal. Each axis actuator in the multi-axis actuator updates its control quantity within the same control cycle based on the synchronization identifier.

[0058] As described above, after receiving the hardware completion signal, the cooperative scheduling core reads the attitude control parameters from the signal. These parameters contain the overall torque and thrust requirements that the aircraft should achieve within the current control cycle. However, the specific output of each axis in the multi-axis actuators needs further allocation based on the attitude control parameters. The cooperative scheduling core performs control allocation calculations based on the attitude control parameters, decomposing the overall torque and thrust requirements to each axis actuator. The control allocation method depends on the aircraft configuration. For quadcopters, the total thrust and three-axis torque are typically allocated to the speed commands of the four motors. For tiltrotor or distributed propulsion configurations, the allocation of control surface deflection or nacelle tilt angle is also involved. After allocation, the cooperative scheduling core generates cooperative drive signals corresponding to each axis actuator, with each drive signal corresponding to the control parameter of one actuator.

[0059] While generating each coordinated drive signal, the coordinated scheduling core attaches a synchronization identifier to each drive signal. This synchronization identifier corresponds to the hardware completion signal and can be the sequence number, timestamp, or trigger edge information of the hardware completion signal. The purpose of the synchronization identifier is to tell each axis actuator that these drive signals come from the completion signal of the same control cycle and the same algorithm operation. After receiving the drive signal, each axis actuator first identifies the synchronization identifier to confirm that the signal corresponds to the current control cycle, and then updates its own output according to the control quantity in the drive signal.

[0060] Each axis actuator updates its control parameters within the same control cycle based on a synchronization identifier. This means that although the drive signals for all axes may be transmitted through different physical channels, they carry the same synchronization identifier. After recognizing this identifier, each axis actuator completes the update of its control parameters within the same control cycle's time window. For multirotor aircraft, this means that the speed commands of all motors switch together within the same control cycle, preventing a situation where one motor has been updated while another is still executing the commands from the previous cycle. For tiltrotor or distributed propulsion configurations, the thrust, control surfaces, and tilt angle of each axis are also updated synchronously within the same control cycle.

[0061] In one embodiment, before the step of generating cooperative drive signals corresponding to each axis actuator in the multi-axis actuator based on the attitude control quantity, the method further includes: Determine whether a cooperative drive signal carrying the synchronization identifier has been generated within the current control cycle, corresponding to each axis actuator in the multi-axis actuator; When the cooperative drive signal is not generated in the current control cycle, the step of generating a cooperative drive signal corresponding to each axis actuator in the multi-axis actuator according to the attitude control quantity is executed. When the cooperative drive signal has been generated in the current control cycle, the step of generating cooperative drive signals corresponding to each axis actuator in the multi-axis actuator according to the attitude control quantity is not executed, and the generated cooperative drive signal is maintained, wherein the generated cooperative drive signal has been used by each axis actuator to update the control quantity of the corresponding actuator.

[0062] As described above, before responding to the hardware completion signal and generating the cooperative drive signal, the cooperative scheduling core first performs a conditional check: whether a cooperative drive signal carrying a synchronization identifier corresponding to each axis actuator has already been generated within the current control cycle. This check can be implemented through a flag register inside the cooperative scheduling core. The flag register is set whenever the cooperative scheduling core completes the generation of a cooperative drive signal; it is reset whenever a new control cycle begins. After receiving the hardware completion signal, the cooperative scheduling core first reads the state of the flag register and then decides whether to execute the generation action.

[0063] When the flag register indicates that no cooperative drive signal has been generated within the current control cycle, it means that this hardware completion signal is the first trigger within this control cycle. The cooperative scheduling core, following the normal procedure, performs control allocation calculations based on the attitude control variables, generating cooperative drive signals corresponding to each axis, and attaching a synchronization flag to each drive signal. Each axis actuator then updates its control variables within the same control cycle based on the synchronization flag. Simultaneously, the cooperative scheduling core sets the flag register, recording that the current control cycle has been completed.

[0064] When the flag register indicates that a cooperative drive signal has already been generated within the current control cycle, it means that this hardware completion signal is a repeated trigger. Repeated triggering may originate from reflections or ringing of the hardware completion signal on its transmission path, from redundant pulses generated by the pipeline within the algorithm acceleration core under abnormal conditions, or from edge misjudgments by the cooperative scheduling core itself when responding to the previous hardware completion signal. Regardless of the source, the attitude control quantities have already been used to calculate the drive signals during the previous generation process, and each axis actuator has already received the corresponding control quantities. If the generation action is executed again, each axis actuator will receive a second set of drive signals within the same control cycle, and the control quantities will be repeatedly updated. The cooperative scheduling core does not execute the generation step, keeping the already generated cooperative drive signals unchanged. The already generated cooperative drive signals have already been used by each axis actuator to update the control quantities of the corresponding actuators and do not need to be refreshed again.

[0065] Reference Figure 3This application also provides a RISC-V multi-core driven flight control algorithm hardware acceleration and attitude coordination control system, applied to a RISC-V multi-core processor. The RISC-V multi-core processor includes an algorithm acceleration core and a coordination scheduling core. The algorithm acceleration core includes a matrix operation hardware acceleration unit. The RISC-V multi-core processor is used to execute flight control algorithms, which include state estimation and control laws. The system includes: The response trigger module 1 is used to start the algorithm acceleration core through a hardware trigger path in response to the sensor data ready signal, wherein the start-up does not go through the operating system task scheduler; The first calling module 2 is used to call the matrix operation hardware acceleration unit through the algorithm acceleration core to perform hardware acceleration calculation on the matrix operation of the state estimation to obtain the state estimate; The second calling module 3 is used to call the matrix operation hardware acceleration unit based on the obtained state estimate, and perform hardware acceleration calculation on the matrix operation of the control law based on the state estimate to obtain the attitude control quantity. Output module 4 is used to output a hardware completion signal based on the obtained attitude control quantity, wherein the hardware completion signal carries the attitude control quantity. The generation module 5 is used to respond to the hardware completion signal through the cooperative scheduling core, generate a cooperative drive signal for the multi-axis actuators according to the attitude control quantity, and output the cooperative drive signal to the multi-axis actuators so that each axis actuator can synchronously update the control quantity according to the cooperative drive signal.

[0066] As described above, it is understood that each component of the RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control system proposed in this application can realize the function of any of the RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control methods described above, and the specific structure will not be repeated.

[0067] Reference Figure 4 This application also provides a computer device, which may be a server, and its internal structure may be as follows: Figure 4As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores monitoring data and other data. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method.

[0068] The processor described above executes the RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method, including: responding to a sensor data ready signal, starting the algorithm acceleration core via a hardware trigger path, wherein the startup does not go through the operating system task scheduler; calling the matrix operation hardware acceleration unit through the algorithm acceleration core to perform hardware-accelerated calculations on the matrix operation of the state estimation to obtain a state estimate; based on the obtained state estimate, calling the matrix operation hardware acceleration unit to perform hardware-accelerated calculations on the matrix operation of the control law based on the state estimate to obtain an attitude control quantity; based on the obtained attitude control quantity, outputting a hardware completion signal, the hardware completion signal carrying the attitude control quantity; and, in response to the hardware completion signal, generating a cooperative drive signal for the multi-axis actuators according to the attitude control quantity through the cooperative scheduling core, and outputting the cooperative drive signal to the multi-axis actuators so that each axis actuator synchronously updates its control quantity according to the cooperative drive signal.

[0069] One embodiment of this application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements a RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method, including the following steps: responding to a sensor data ready signal, starting the algorithm acceleration core through a hardware trigger path, wherein the startup does not go through the operating system task scheduler; calling the matrix operation hardware acceleration unit through the algorithm acceleration core to perform hardware acceleration calculation on the matrix operation of the state estimation to obtain a state estimate; based on the obtained state estimate, calling the matrix operation hardware acceleration unit to perform hardware acceleration calculation on the matrix operation of the control law based on the state estimate to obtain an attitude control quantity; based on the obtained attitude control quantity, outputting a hardware completion signal, the hardware completion signal carrying the attitude control quantity; and responding to the hardware completion signal through the cooperative scheduling core, generating a cooperative drive signal for the multi-axis actuators according to the attitude control quantity, and outputting the cooperative drive signal to the multi-axis actuators so that each axis actuator synchronously updates its control quantity according to the cooperative drive signal.

[0070] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in this application and in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0071] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method, characterized in that, The method is applied to a RISC-V multi-core processor, which includes an algorithm acceleration core and a cooperative scheduling core. The algorithm acceleration core includes a matrix operation hardware acceleration unit. The RISC-V multi-core processor is used to execute a flight control algorithm, which includes state estimation and control laws. The method includes: In response to a sensor data ready signal, the algorithm acceleration core is started via a hardware trigger path, wherein the start-up does not go through the operating system task scheduler; The algorithm acceleration core calls the matrix operation hardware acceleration unit to perform hardware-accelerated calculations on the matrix operation of the state estimation to obtain the state estimate. Based on the obtained state estimate, the matrix operation hardware acceleration unit is invoked to perform hardware-accelerated calculations on the matrix operation of the control law based on the state estimate, thereby obtaining the attitude control quantity; Based on the obtained attitude control quantity, a hardware completion signal is output, which carries the attitude control quantity. The collaborative scheduling core responds to the hardware completion signal, generates a collaborative drive signal for the multi-axis actuators based on the attitude control quantity, and outputs the collaborative drive signal to the multi-axis actuators so that each axis actuator can synchronously update the control quantity according to the collaborative drive signal.

2. The RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method according to claim 1, characterized in that, The RISC-V multi-core processor also includes a sensor interface; the method is executed iteratively according to a control cycle, and the state estimation is an extended Kalman filter; The step of calling the matrix operation hardware acceleration unit through the algorithm acceleration core to perform hardware-accelerated calculations on the matrix operations of the state estimation to obtain the state estimate includes: Obtain the preset state transition matrix and the posterior state estimate obtained in the previous control cycle. Based on the state transition matrix and the posterior state estimate obtained in the previous control cycle, perform matrix multiplication to obtain the prior state estimate. Obtain the preset process noise covariance matrix and the posterior covariance matrix obtained in the previous control cycle. Based on the state transition matrix, the posterior covariance matrix obtained in the previous control cycle, and the process noise covariance matrix, perform matrix multiplication and addition operations to obtain the prior covariance matrix. Obtain a preset observation matrix and a preset observation noise covariance matrix, and perform matrix multiplication and addition operations based on the observation matrix, the prior covariance matrix and the observation noise covariance matrix to obtain the observation covariance matrix; Perform matrix inversion on the observation covariance matrix, and perform matrix multiplication on the inversion result, the prior covariance matrix, and the observation matrix to obtain the Kalman gain matrix; The sensor interface responds to the sensor data ready signal by outputting sensor observation data, and performs matrix multiplication and addition operations based on the Kalman gain matrix, the prior state estimate and the sensor observation data to obtain the posterior state estimate; Based on the Kalman gain matrix and the prior covariance matrix, matrix multiplication and subtraction operations are performed to obtain the posterior covariance matrix, and the posterior state estimate is output as the state estimate.

3. The RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method according to claim 2, characterized in that, The control law is a cascaded PID / LQG control law; based on the obtained state estimate, the matrix operation hardware acceleration unit is invoked to perform hardware-accelerated calculations on the matrix operation of the control law based on the state estimate to obtain the attitude control quantities, including: Obtain a preset outer loop gain matrix, extract position and velocity estimates from the state estimates, determine the outer loop error vector based on the position and velocity estimates, and perform matrix multiplication on the outer loop error vector and the outer loop gain matrix to obtain the outer loop control quantity; Obtain a preset inner loop gain matrix, determine the desired attitude quantity based on the outer loop control quantity, extract the attitude estimate and angular velocity estimate from the state estimate, determine the inner loop error vector based on the desired attitude quantity, the attitude estimate and the angular velocity estimate, and perform matrix multiplication on the inner loop error vector and the inner loop gain matrix to obtain the inner loop control quantity. Obtain the cumulative integral term obtained from the previous control cycle, and perform matrix addition based on the outer loop error vector, the inner loop error vector, and the cumulative integral term to obtain the updated cumulative integral term. Obtain a preset integral gain matrix, and perform matrix multiplication on the updated integral term accumulation and the integral gain matrix to obtain the integral control quantity; The attitude control quantity is obtained by performing matrix addition based on the outer loop control quantity, the inner loop control quantity, and the integral control quantity.

4. The RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method according to claim 1, characterized in that, The hardware triggering path includes a window comparator and a jitter classifier; the step of activating the algorithm acceleration core via the hardware triggering path in response to a sensor data ready signal includes: The window comparator receives the sensor data ready signal, records the arrival edge time of the sensor data ready signal, and compares the arrival edge time with a preset time window, wherein the preset time window is centered on the reference time of the current control cycle and has a preset window width. When the arrival time is within the preset time window, the window comparator outputs the sensor data ready signal to the startup register of the algorithm acceleration core; When the arrival time is outside the preset time window, the jitter classifier outputs a jitter flag, and the window comparator responds to the jitter flag by controlling the output path of the sensor data ready signal to the start register.

5. The RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method according to claim 4, characterized in that, The jitter indicators include early jitter indicators and late jitter indicators; The window comparator, in response to the jitter flag, controls the output path of the sensor data ready signal to the start register, including: When the arrival time is earlier than the start time of the preset time window, the jitter classifier outputs the early jitter flag, the window comparator blocks the output path of the sensor data ready signal to the start register in response to the early jitter flag, the algorithm acceleration core does not perform the step of performing hardware acceleration calculation on the matrix operation of the state estimate, and outputs the posterior state estimate obtained in the previous control cycle as the state estimate of the current control cycle. When the arrival edge time is later than the end time of the preset time window, the jitter classifier outputs the late jitter flag and the delay of the arrival edge time relative to the end time of the preset time window. The window comparator responds to the late jitter flag by outputting the sensor data ready signal to the start register. In response to the delay, the cooperative scheduling core shifts the output timing of the cooperative drive signal by the delay in the next control cycle.

6. The RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method according to claim 2, characterized in that, The step of responding to the hardware completion signal through the cooperative scheduling core, generating a cooperative drive signal for the multi-axis actuator based on the attitude control quantity, and outputting the cooperative drive signal to the multi-axis actuator includes: The cooperative scheduling core responds to the hardware completion signal and generates cooperative drive signals corresponding to each axis actuator in the multi-axis actuator according to the attitude control quantity. Each cooperative drive signal carries a synchronization identifier corresponding to the hardware completion signal. Each axis actuator in the multi-axis actuator updates its control quantity within the same control cycle based on the synchronization identifier.

7. The RISC-V multi-core driven flight control algorithm hardware acceleration and attitude cooperative control method according to claim 6, characterized in that, Before the step of generating cooperative drive signals corresponding to each axis actuator in the multi-axis actuator based on the attitude control quantity, the method further includes: Determine whether a cooperative drive signal carrying the synchronization identifier has been generated within the current control cycle, corresponding to each axis actuator in the multi-axis actuator; When the cooperative drive signal is not generated in the current control cycle, the step of generating a cooperative drive signal corresponding to each axis actuator in the multi-axis actuator according to the attitude control quantity is executed. When the cooperative drive signal has been generated in the current control cycle, the step of generating cooperative drive signals corresponding to each axis actuator in the multi-axis actuator according to the attitude control quantity is not executed, and the generated cooperative drive signal is maintained, wherein the generated cooperative drive signal has been used by each axis actuator to update the control quantity of the corresponding actuator.

8. A RISC-V multi-core driven flight control algorithm hardware acceleration and attitude coordination control system, characterized in that, The system is applied to a RISC-V multi-core processor, which includes an algorithm acceleration core and a cooperative scheduling core. The algorithm acceleration core includes a matrix operation hardware acceleration unit. The RISC-V multi-core processor is used to execute flight control algorithms, which include state estimation and control laws. The system includes: A response triggering module is used to start the algorithm acceleration core through a hardware triggering path in response to a sensor data ready signal, wherein the start-up does not go through the operating system task scheduler; The first calling module is used to call the matrix operation hardware acceleration unit through the algorithm acceleration core to perform hardware-accelerated calculations on the matrix operation of the state estimation to obtain the state estimate. The second calling module is used to call the matrix operation hardware acceleration unit based on the obtained state estimate, and perform hardware-accelerated calculation on the matrix operation of the control law based on the state estimate to obtain the attitude control quantity; The output module is configured to output a hardware completion signal based on the obtained attitude control quantity, wherein the hardware completion signal carries the attitude control quantity. The generation module is used to respond to the hardware completion signal through the cooperative scheduling core, generate a cooperative drive signal for the multi-axis actuators according to the attitude control quantity, and output the cooperative drive signal to the multi-axis actuators so that each axis actuator can synchronously update the control quantity according to the cooperative drive signal.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.