Quaternion attitude control method, attitude control device and aircraft based on mixed signal storage and computing integration
Through the quaternary attitude control method based on mixed signal storage and calculation, the problems of high energy consumption and slow speed caused by attitude data transfer in aircraft attitude control are solved, and more efficient attitude calculation and flight control timeliness are achieved, avoiding the The "universal lock" problem represented by Euler angle.
Patent Information
- Application Number
- CN202411248615.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-06
AI Technical Summary
During the attitude control of the flight control of existing aircraft, the calculation and storage of attitude data need to be frequently moved, resulting in large energy consumption and low attitude resolution speed and insufficient timeliness.
Using a quaternion attitude control method based on mixed signal storage and calculation, by obtaining the attitude quaternion of the aircraft, performing matrix form representation and update, and using the storage and calculation unit to perform matrix multiplication and accumulation operation to avoid the "universal direction" of traditional Euler angle Locking problem, improve computing efficiency.
It reduces the power consumption and area of the aircraft-related computing chip, improves the attitude resolution speed and timeliness of flight control, and improves the survival rate and user experience in extreme scenarios.
Smart Images

Figure CN118760222B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of aircraft technology, and in particular to a quaternion attitude control method, an attitude control device and an aircraft based on mixed signal storage and computing integration. Background Art
[0002] Aircraft have been increasingly used in a wide range of fields, from daily life and entertainment to industrial production and even military fields. Aircraft technology involves many technical sub-fields, including aerodynamics, artificial intelligence, flight attitude control and other sub-fields. Among them, flight attitude calculation in flight attitude control is an important technology that determines whether the aircraft can accurately adjust its flight attitude.
[0003] "Flight control" refers to the flight control technology of drones and other aircraft, which is used to automatically keep the aircraft in a specific state, such as hovering, flying, rotating, etc. Since aircraft often fly in an "beyond visual range" environment and cannot rely entirely on flight operators, many flight actions need to be determined and executed by the aircraft terminal system. Therefore, automated flight control is essential for aircraft. The flight control of a multi-axis aircraft is mainly composed of a main control chip, an attitude sensor, a GPS antenna, and an electronic compass. There are also power control modules, LED indicator lights, Bluetooth connection modules, etc.
[0004] In current aircraft flight control, when performing attitude control, attitude data needs to be moved between the computing unit and the storage unit, usually by performing the accumulation operation in matrix multiplication through an addition tree, which consumes a lot of energy. In addition, the speed of the aircraft's attitude solution is low, resulting in low timeliness of attitude adjustment. Summary of the invention
[0005] The purpose of this application is to provide a quaternion attitude control method, attitude control device and aircraft based on mixed signal storage and computing integration to at least solve the above technical problems. The various technical effects that can be produced by the optional technical solutions among the various technical solutions provided by the present invention are described in detail below.
[0006] To achieve the above objectives, in a first aspect, the present application provides a quaternion attitude control method based on mixed signal storage and computing integration, the quaternion attitude control method based on mixed signal storage and computing integration includes:
[0007] Get the quaternion of the aircraft's attitude at the last moment;
[0008] Get the current attitude information and current timestamp of the aircraft;
[0009] Representing the posture information at the current moment and the current timestamp in matrix quaternion form, obtaining the posture quaternion matrix at the current moment, and storing the posture quaternion matrix at the current moment in a storage and computing unit of the storage and computing integrated architecture;
[0010] In the storage and calculation unit, based on the posture quaternion at the previous moment and the posture quaternion matrix at the current moment, the posture quaternion matrix at the current moment is updated to obtain an updated posture quaternion matrix, and a multiplication and accumulation operation is performed on the updated posture quaternion matrix to obtain a target posture;
[0011] Based on the target attitude, the current flight attitude of the aircraft is adjusted.
[0012] In some embodiments, the present posture information and the current timestamp are represented in the form of matrix quaternions, the posture quaternion matrix of the present moment is obtained, and the posture quaternion matrix of the present moment is stored in a storage and computing unit of the storage and computing integrated architecture, including:
[0013] The rotation angle of the posture information is expressed as a quaternion to obtain the quaternion data at the current moment;
[0014] Based on the current timestamp, performing differential calculation on the quaternion data at the current moment to obtain the attitude quaternion matrix at the current moment;
[0015] The posture quaternion matrix at the current moment is stored in the storage unit.
[0016] In some embodiments, the rotation angle of the posture information is expressed as a quaternion to obtain the quaternion data at the current moment, which is expressed as the following formula 1:
[0017] Formula 1;
[0018] Among them, q represents the quaternion data at the current moment, θ represents the rotation angle of the aircraft's gyroscope, represents the unit vector of the rotation axis; and, , ;
[0019] The angular velocity of the gyroscope Substituting into Formula 1, based on the current timestamp, the quaternion data at the current moment is differentiated to obtain the attitude quaternion matrix at the current moment, which is expressed by the following formula:
[0020] ;
[0021] in, Represents the current attitude quaternion, i, j, k represent imaginary numbers, Respectively represent the components of the rotation angle on the three coordinate axes of x, y, and z; A real number representing a quaternion, , , An imaginary number representing a quaternion;
[0022] The current attitude quaternion is expressed in matrix form using the following formula:
[0023] ;
[0024] in, .
[0025] In some embodiments, in the storage unit, based on the posture quaternion at the previous moment and the posture quaternion matrix at the current moment, the posture quaternion matrix at the current moment is updated to obtain an updated posture quaternion matrix, including:
[0026] In the storage and calculation unit, the time interval is obtained by subtracting the timestamp of the previous moment from the current timestamp; or, the time interval is calculated based on the preset attitude update frequency of the aircraft;
[0027] A first-order Longo Kutta equation is constructed based on the attitude quaternion matrix of the previous moment, the time interval and the current timestamp to solve the update of the attitude quaternion matrix of the previous moment at the current moment and obtain an updated attitude quaternion matrix.
[0028] In some embodiments, the first-order Longo Kutta equation is constructed based on the attitude quaternion matrix of the previous moment, the time interval and the current timestamp to solve the update of the attitude quaternion matrix of the previous moment at the current moment, and the updated attitude quaternion matrix is obtained, which is expressed by the following formula:
[0029] ;
[0030] in, Indicates the tth n+1 The attitude quaternion at the moment, Represents the attitude quaternion at the tth moment; Indicates the time interval, Indicates the current timestamp t n Next ,for .
[0031] In some embodiments, the updated attitude quaternion matrix is expressed by the following formula:
[0032] .
[0033] In some embodiments, performing a multiplication-accumulation operation on the updated attitude quaternion matrix to obtain the target attitude includes:
[0034] The updated attitude quaternion matrix is divided into a real part and an imaginary part by the storage and calculation unit, and multiplication and accumulation operations are performed on the real part and the imaginary part respectively to obtain the target attitude.
[0035] In some embodiments, the step of obtaining the attitude quaternion of the aircraft at the last moment includes:
[0036] Get the last moment attitude information and last moment timestamp of the aircraft;
[0037] The posture information of the previous moment and the timestamp of the previous moment are represented in the form of matrix quaternion, the posture quaternion matrix of the previous moment is obtained, and the posture quaternion matrix of the previous moment is stored in the storage and computing unit of the storage and computing integrated architecture.
[0038] In a second aspect, the present application provides a posture control device, comprising: one or more processors; a memory for storing one or more computer programs, and one or more of the processors are used to execute one or more computer programs stored in the memory, so that one or more of the processors execute a quaternion posture control method based on mixed signal storage and computing as described in any one of the first aspects.
[0039] In a third aspect, the present application provides an aircraft, wherein the aircraft comprises the attitude control device described in the second aspect.
[0040] Implementing one of the above technical solutions of this application has the following advantages or beneficial effects:
[0041] The quaternion attitude control method, attitude control device and aircraft based on mixed signal storage and computing in the present application, by converting the attitude information of the aircraft into quaternion form, only one rotation angle information is needed, so as to avoid the "universal lock" problem caused by the Euler angle representing the attitude information, and can release the requirements for hardware sensors; and, by utilizing the storage and computing inseparable characteristics of the storage and computing integrated architecture, the update calculation of the attitude quaternion matrix is mapped to the storage and computing structure, which has higher energy efficiency and minimum delay. The digital part of the storage and computing can greatly reduce the energy consumption of the multiplication operation in the matrix multiplication and accumulation operation, and the analog part can significantly reduce the accumulation energy consumption in the matrix multiplication and accumulation operation, and greatly save the chip area. The analog operation has a natural advantage in the operation of nonlinear operators, which improves the speed of attitude solution, efficiently solves the target attitude, improves the timeliness of the aircraft flight control, and greatly reduces the power consumption and area of the aircraft-related computing chips, especially can improve the survival rate of the aircraft in extreme scenarios or the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. It is obvious that the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0043] Figure 1 It is a flow chart of a quaternion attitude control method based on mixed signal storage and computing in one embodiment of the present application;
[0044] Figure 2 This is a schematic diagram of the current reference frame rotating by three Euler angles;
[0045] Figure 3 This is a schematic diagram of the current quaternion solution for attitude angles combined with traditional chips;
[0046] Figure 4 It is a schematic diagram of the quaternion solution for posture angle combined with storage and computing integrated architecture in the embodiment of the present application;
[0047] Figure 5 It is a schematic block diagram of the storage-computing integrated architecture of an embodiment of the present application;
[0048] Figure 6 It is a schematic block diagram of a quaternion attitude control method based on mixed signal storage and computing in an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solutions and advantages of the present application clearer, the various exemplary embodiments to be described below will refer to the corresponding drawings, which constitute a part of the exemplary embodiments, wherein various exemplary embodiments that may be used to implement the present application are described. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation methods described in the following exemplary embodiments do not represent all implementation methods consistent with the present disclosure. It should be understood that they are only examples of processes, methods, and devices that are consistent with some aspects disclosed in the present application as detailed in the attached claims, and other embodiments may also be used, or the embodiments listed herein may be modified in structure and function without departing from the scope and essence of the present application.
[0050] In the description of the present application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. The term "plurality" means two or more. The terms "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, an integral connection, a mechanical connection, an electrical connection, a communication connection, a direct connection, an indirect connection through an intermediate medium, and can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances.
[0051] In order to illustrate the technical solution described in the present application, a specific embodiment is provided below, and only the parts related to the embodiment of the present application are shown.
[0052] Embodiment 1:
[0053] like Figure 1 As shown, the present application provides a quaternion attitude control method based on mixed signal storage and computing, and the quaternion attitude control method based on mixed signal storage and computing includes the following steps S10 to S50.
[0054] S10: Obtain the attitude quaternion of the aircraft at the last moment.
[0055] The unit quaternion can be used to represent the rotation in three-dimensional space. It is equivalent to other commonly used representations, including Euler angles and three-dimensional orthogonal matrices.
[0056] When traditional Euler angles are used to represent rotations in three-dimensional space, for any reference frame, the orientation of a rigid body is determined by rotating the reference frame in three Euler angles in a specific order. Therefore, the orientation of a rigid body can be determined by three basic rotation matrices, and any rotation matrix for a rigid body rotation is composed of three basic rotation matrices. Figure 2 As shown, Figure 2 Schematic diagram showing the rotation of the reference frame through three Euler angles.
[0057] according to Figure 2 , α is the rotation angle of the rigid body around the x-axis, β is the rotation angle of the rigid body around the y-axis, and γ is the rotation angle of the rigid body around the z-axis. The rotation matrix [R] is composed of three basic rotation matrices and is expressed by the following formula:
[0058] ;
[0059] However, when the rigid body is rotated 90° along the y-axis, the x-axis coincides with the z-axis, and a "universal lock" phenomenon occurs, that is, the system loses one degree of freedom.
[0060] The traditional three-dimensional orthogonal matrix cannot give a simple rotation axis and rotation angle.
[0061] Based on the defects of the above-mentioned Euler angle representation method and three-dimensional orthogonal matrix representation method, the present application proposes to use quaternions to represent the rotation axis and rotation angle of the aircraft (rigid body), which can avoid the "universal lock" problem and can concisely give the rotation axis and rotation angle.
[0062] The following is a detailed introduction to the quaternion representation of aircraft rotation:
[0063] In a three-dimensional system, the Cartesian coordinates of a point can be expressed as (x, y, z), which is represented by a pure quaternion (similar to a pure imaginary number, that is, a quaternion with a real part of 0) xi+yj+zk, where i, j, and k are imaginary numbers; in the representation of three-dimensional space rotation, let q be a unit quaternion and p be a pure quaternion, defined by the following formula:
[0064] ;
[0065] Among them, R q is a pure quaternion, representing a rotation that rotates a point p in space to another point R in space q (p). The quaternion can be converted into a matrix through algebraic calculation, expressed as the following formula:
[0066] ;
[0067] Among them, θ represents the rotation angle, x, y, z represent unit vectors, let:
[0068] ;
[0069] ;
[0070] .
[0071] make , , the quaternion matrix after simple transformation can be expressed as the following formula:
[0072] ;
[0073] After a simple trigonometric transformation, , Substituting cosθ and sinθ, we can express it as follows:
[0074] ;
[0075] Where M(v,θ) represents the rotation matrix.
[0076] Using the rotation matrix formula, the rotation matrix M(v,θ) can be defined by a single rotation angle θ and the unit vector v=(x,y,z) around it.
[0077] Therefore, when the aircraft obtains the angular velocity signal of the gyroscope, the rotation matrix formula can be used to represent the attitude information of the aircraft's gyroscope as an angular velocity signal. That is, the angular velocity signal can be stored in the form of quaternions, thereby avoiding the "universal lock" problem caused by using Euler angles to represent attitude information, and releasing the requirements for hardware sensors.
[0078] In some embodiments, step S10 may include:
[0079] Get the last moment attitude information and last moment timestamp of the aircraft;
[0080] The posture information of the previous moment and the timestamp of the previous moment are represented in the form of matrix quaternion, the posture quaternion matrix of the previous moment is obtained, and the posture quaternion matrix of the previous moment is stored in the storage and computing unit of the storage and computing integrated architecture.
[0081] Specifically, in order to obtain the attitude quaternion of the aircraft at the last moment, when obtaining the attitude information (angular velocity signal) of the aircraft at the last moment and the timestamp of the last moment, the attitude information of the last moment and the timestamp of the last moment are represented in the form of matrix quaternion, the attitude quaternion matrix of the last moment is obtained, and the attitude quaternion matrix of the last moment is stored in the storage and computing unit of the storage and computing integrated architecture. Specifically, the acquisition of the attitude quaternion matrix of the last moment can refer to the acquisition of the attitude quaternion matrix of the current moment below.
[0082] By using quaternions to describe the attitude information of the previous moment, the "universal lock" phenomenon can be avoided. Only a 4-dimensional quaternion is needed to perform the rotation around any vector passing through the origin. It is convenient and fast, and in some implementations it is more efficient than calculating the rotation matrix based on Euler angles. It provides a strong foundation for the subsequent calculation of the target attitude.
[0083] S20: Obtain the current attitude information and current timestamp of the aircraft.
[0084] S30: Represent the posture information at the current moment and the current timestamp in the form of matrix quaternion, obtain the posture quaternion matrix at the current moment, and store the posture quaternion matrix at the current moment in the storage and computing unit of the storage and computing integrated architecture.
[0085] When new posture information is input at the current moment, the posture information and the current timestamp of the current moment are obtained, and the posture information and the current timestamp of the current moment are stored in the storage and computing unit of the storage and computing integrated architecture in the form of quaternions.
[0086] In some implementations, step S30 may include:
[0087] The rotation angle of the posture information is expressed as a quaternion to obtain the quaternion data at the current moment;
[0088] Based on the current timestamp, performing differential calculation on the quaternion data at the current moment to obtain the attitude quaternion matrix at the current moment;
[0089] The posture quaternion matrix at the current moment is stored in the storage unit.
[0090] Specifically, the attitude information includes the gyroscope rotation angle θ of the aircraft. The rotation angle of the attitude information is represented by a quaternion, and the quaternion data at the current moment is obtained, which is represented by the following formula 1:
[0091] Formula 1;
[0092] Among them, q represents the quaternion data at the current moment, θ represents the rotation angle of the aircraft's gyroscope, Unit vector representing the axis of rotation.
[0093] Then, based on the current timestamp, the quaternion data at the current moment is differentiated and expressed by the following formula:
[0094] ;
[0095] in, , ; Then, the above formula can be simplified to:
[0096] ;
[0097] The angular velocity of the gyroscope Substituting into formula 1, the attitude quaternion matrix at the current moment is obtained:
[0098] ;
[0099] in, Represents the current attitude quaternion, i, j, k represent imaginary numbers, Respectively represent the components of the rotation angle on the three coordinate axes of x, y, and z; A real number representing a quaternion, , , An imaginary number representing a quaternion;
[0100] Finally, the current attitude quaternion is expressed in matrix form as follows and stored in the storage and computing unit of the storage and computing integrated architecture.
[0101] Formula 9;
[0102] in, .
[0103] When the posture information at the current moment is stored in the storage and computing unit of the storage and computing integrated architecture, the quaternion data at the current moment is obtained.
[0104] Through the organic combination of the integrated storage and computing architecture and the matrix operation of quaternions, the integrated storage and computing architecture can greatly reduce the movement between the "computing" and "storage" units for the subsequent target posture calculation, and the digital matrix multiplication module with mixed analog and digital storage and computing can perform matrix multiplication with high energy efficiency. The application of analog computing units (capacitors) can greatly reduce the accumulation operations in the matrix multiplication performed by traditional integrated circuits through addition trees.
[0105] S40: In the storage and calculation unit, based on the posture quaternion at the previous moment and the posture quaternion matrix at the current moment, the posture quaternion matrix at the current moment is updated to obtain an updated posture quaternion matrix, and multiplication and accumulation operations are performed on the updated posture quaternion matrix to obtain the target posture.
[0106] In some implementations, step S40 may include:
[0107] In the storage and calculation unit, the time interval is obtained by subtracting the timestamp of the previous moment from the current timestamp; or, the time interval is calculated based on the preset attitude update frequency of the aircraft;
[0108] A first-order Longo Kutta equation is constructed based on the attitude quaternion matrix of the previous moment, the time interval and the current timestamp to solve the update of the attitude quaternion matrix of the previous moment at the current moment and obtain an updated attitude quaternion matrix.
[0109] Specifically, the time interval is the minimum time difference between aircraft status updates.
[0110] In some embodiments, the time interval can be obtained by subtracting the previous time stamp from the current time stamp, which can be expressed by the following formula:
[0111] ;
[0112] in, Indicates the time interval, Indicates the current timestamp, Indicates the timestamp of the last moment. And the timestamp of the last moment corresponds to the attitude quaternion of the last moment.
[0113] In some embodiments, the time interval may also be calculated based on a preset attitude update frequency of the aircraft. For example, if the preset attitude update frequency of the aircraft is f, then the time interval is calculated as: .
[0114] Time interval Used for subsequent updates of quaternion data.
[0115] In some embodiments, in step S40, a first-order Longo Kutta equation is constructed based on the attitude quaternion matrix of the previous moment, the time interval and the current timestamp to solve the update of the attitude quaternion matrix of the previous moment at the current moment, and the updated attitude quaternion matrix is obtained, which can be calculated using the following formula:
[0116] ;
[0117] in, Indicates the tth n+1 The attitude quaternion at the moment, Represents the attitude quaternion at the tth moment; Indicates the time interval, Indicates the current timestamp t n Next ,for .
[0118] The updated attitude quaternion matrix is expressed by the following formula:
[0119] .
[0120] This application only needs a 4-dimensional quaternion to perform rotation around any vector passing through the origin, which can solve the "universal lock" problem of describing the rotation angle of the aircraft with Euler angles. It is convenient and fast, and in some implementations it is more efficient than calculating the rotation matrix based on Euler angles. It can also provide smooth interpolation for intermediate states (some scenarios require smoother intermediate states), and at the same time, it can concisely describe the rotation angle and axis of the aircraft.
[0121] The concept of computing in memory (CIM) is derived from the research on brain-like computing in the last century. Compared with the traditional von Neumann architecture computer, the human brain is inseparable from storage and computing. The problems of slow data transfer and high energy consumption in traditional computing architecture have become the key bottleneck of computing. The transfer time of extracting data from the memory outside the processing unit is often hundreds or thousands of times the computing time. The useless energy consumption of the whole process is about 60%-90%, and the energy efficiency is very low. The "storage wall" has become a major obstacle to data computing applications. New aircraft applications have a large number of matrix multiplication calculations, which are essentially multiply-accumulate (MAC) operations. If traditional chip processing is used, it will lead to a huge amount of data to be processed, and the real-time and reliability requirements are getting higher and higher. Whether in the flight control module or in the airborne artificial intelligence module, the energy consumption problem brought by traditional chips has become a major obstacle to the development of aircraft, significantly restricting the endurance performance of aircraft.
[0122] like Figure 3 As shown in the figure, if quaternions are used to solve the attitude angle, but traditional chips are used, then key steps such as the movement, addressing, and calculation of necessary data will be involved. Specifically, the gyroscope data w of the aircraft needs to be stored in the storage unit of the traditional chip, and then the quaternion (q0, q1, q2, q3) is obtained by addressing, and then the quaternion is passed to the calculation unit, the rotation angle w is obtained by addressing, and passed to the calculation unit. The calculation unit completes the multiplication part of MAC through the digital circuit, and completes the MAC addition part through the digital circuit addition tree. Finally, the quaternion is updated by addressing. , and transmit the calculation results.
[0123] Since the data needs to be transmitted to the computing unit, it has the defects of high energy consumption and long time for data movement. In addition, the computing unit has slow calculation speed, low efficiency and large chip area when calculating. When the calculation results are transmitted, the data movement consumes high energy and takes a long time.
[0124] In order to solve the defects of the above-mentioned traditional chips in aircraft, the present application proposes to calculate the attitude quaternion matrix in the storage and computing unit of the storage and computing integrated architecture.
[0125] In some implementations, performing a multiplication-accumulation operation on the updated attitude quaternion matrix to obtain the target attitude may include:
[0126] The updated attitude quaternion matrix is divided into a real part and an imaginary part by the storage and calculation unit, and multiplication and accumulation operations are performed on the real part and the imaginary part respectively to obtain the target attitude.
[0127] Specifically, due to the use of a storage-computing integrated architecture, the storage-computing unit can divide the updated attitude quaternion matrix into real and imaginary parts, and the necessary data movement, addressing, and calculation steps of traditional chips involved will be significantly reduced. Figure 4 As shown, Figure 4 In the example, the posture data w can be directly passed into the storage unit, which internally addresses the quaternion (q0, q1, q2, q3) and updates it to store the quaternion. ,in, Represents quaternions at different times in the same hardware space, including quaternions (q0, q1, q2, q3) and quaternions That is, in the storage unit, the state at the previous moment is the quaternion (q0, q1, q2, q3), and the current state is updated to . Figure 4 In Combination Figure 4 Loop symbol in the storage unit , indicating that in the storage unit (q0,q1,q2,q3)→ The process of continuous updating can finally directly transmit the result of the target posture.
[0128] like Figure 5 As shown, Figure 5 This is a schematic diagram of the storage and computing integrated architecture of this application. Figure 5 In the example, the posture transformation parameters passed in , the format of the attitude quaternion matrix stored in the storage and computing unit is q= (q0, q1, q2, q3). The underlying storage and computing integrated circuit unit directly maps the calculation of the updated attitude quaternion matrix to the storage structure. The system greatly reduces the power consumption and delay caused by data transfer, and the calculated new attitude (output) is the input of the next cycle. This data flow mode effectively saves data movement. In addition, the storage and computing integrated chip also has unique advantages in surface effect, and the chip area required for unit computing power is smaller. In the application of drones and other aircraft, smaller area and lower power consumption means more streamlined boards and lower fuselage weight, which ultimately improves the performance of aircraft hardware.
[0129] S50: Based on the target attitude, adjust the current flight attitude of the aircraft.
[0130] like Figure 6 As shown, Figure 6 This is a schematic block diagram of the quaternion attitude control method based on mixed signal storage and computing of the present application. The attitude sensor can be a gyroscope of the aircraft, and the attitude information is input as a rotation parameter. The initial attitude of the aircraft is set to the attitude at the 0th moment, which is input into the storage and computing unit SRAM of the storage and computing architecture, and then the real number division q0 and the imaginary number division q1, q2, q3 are performed. The controller controls the input of attitude information and the output of target attitude, and the flight control unit adjusts the current flight attitude of the aircraft according to the target attitude.
[0131] In the embodiments of the present application, by converting the attitude information of the aircraft into quaternion form, only one rotation angle information is needed, which can avoid the "universal lock" problem caused by the Euler angle representing the attitude information, and can release the requirements for hardware sensors; and, by utilizing the storage and computing inseparable characteristics of the storage and computing integrated architecture, the update calculation of the attitude quaternion matrix is mapped to the storage and computing structure, which has higher energy efficiency and minimal delay. The digital part of the storage and computing can greatly reduce the energy consumption of the multiplication operation in the matrix multiplication and accumulation operation, and the analog part can significantly reduce the accumulation energy consumption in the matrix multiplication and accumulation operation, and greatly save the chip area. The analog operation has a natural advantage in the operation of nonlinear operators, which improves the speed of attitude solution, efficiently solves the target attitude, improves the timeliness of the aircraft flight control, and greatly reduces the power consumption and area of the aircraft-related computing chips, especially can improve the survival rate of the aircraft in extreme scenarios or the user experience.
[0132] Those skilled in the art can understand that all or part of the features / steps of the above-mentioned method embodiments can be implemented by methods, data processing systems or computer programs, and these features can be implemented without hardware, entirely by software, or by a combination of hardware and software. The aforementioned computer program can be stored in one or more computer-readable storage media, and the storage medium stores a computer program. When the computer program is executed (such as a processor), the steps of the above-mentioned quaternion attitude control method based on mixed signal storage and computing for robot motion prediction and the robot motion prediction method embodiment are executed.
[0133] The aforementioned storage media that can store program codes include: static hard disks, solid-state hard disks, random access memories (SRAM), electrically erasable programmable read-only memories (EEPROM), erasable programmable read-only memories (EPROM), programmable read-only memories (PROM), read-only memories (ROM), optical storage devices, magnetic storage devices, flash memories, magnetic disks or optical disks and / or combinations of the above devices, that is, they can be implemented by any type of volatile or non-volatile storage devices or combinations thereof.
[0134] Embodiment 2:
[0135] The present application also provides a posture control device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors are used to execute the one or more computer programs stored in the memory, so that the one or more processors execute a quaternion posture control method based on mixed signal storage and computing as described in any one of Embodiment 1.
[0136] The attitude control device of the present invention can be a chip. When the attitude control device is a chip, each module in the chip can be implemented in whole or in part by software, hardware, and a combination thereof. The above modules can be embedded in or independent of the processor in the computing device in hardware form, or can be stored in the memory in the computing device in software form, so that the processor can call and execute the operations corresponding to the above modules. The invention can be applied to the fields of high-precision, high-reliability, low-power consumption, and low-area cost computing power requirements such as artificial intelligence and metaverse, artificial intelligence training or reasoning chip products, autonomous driving chips, VR chips, robot built-in chips, and parallel computing deep learning applications.
[0137] The present application also provides an aircraft, the aircraft comprising an attitude control device. The aircraft may be a drone, such as a multi-rotor drone.
[0138] Since the implementation of the aircraft is described in detail in the first embodiment, it will not be repeated here.
[0139] The above description is only the preferred embodiment of the present invention. It is known to those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application belong to the protection scope of the present invention.
Claims
1. A quaternion attitude control method based on mixed signal storage and computing, characterized in that: include: Get the quaternion of the aircraft's attitude at the last moment; Get the current attitude information and current timestamp of the aircraft; The posture information is an angular velocity signal; Representing the posture information at the current moment and the current timestamp in matrix quaternion form, obtaining the posture quaternion matrix at the current moment, and storing the posture quaternion matrix at the current moment in a storage and computing unit of the storage and computing integrated architecture; In the storage and calculation unit, based on the posture quaternion at the previous moment and the posture quaternion matrix at the current moment, the posture quaternion matrix at the current moment is updated to obtain an updated posture quaternion matrix, the storage and calculation unit divides the updated posture quaternion matrix into a real part and an imaginary part, and performs multiplication and accumulation operations on the updated posture quaternion matrix to obtain a target posture; Based on the target attitude, adjusting the current flight attitude of the aircraft; The step of performing a multiplication-accumulation operation on the updated attitude quaternion matrix to obtain the target attitude includes: Dividing the updated attitude quaternion matrix into a real part and an imaginary part by the storage and calculation unit, and performing multiplication and accumulation operations on the real part and the imaginary part respectively to obtain a target attitude; Among them, the angular velocity of the gyroscope The storage unit is passed in, and the storage unit internally addresses and obtains the attitude quaternion (q0, q1, q2, q3) of the previous moment, and updates the attitude quaternion matrix stored as the current moment ; The angular velocity of the gyroscope is passed in The format of the attitude quaternion matrix stored in the storage and computing unit is q=(q0, q1, q2, q3). The underlying storage and computing circuit unit maps the calculation of updating the attitude quaternion matrix to the storage structure, reducing the power consumption and delay caused by data transfer. The calculated new attitude is the input of the next cycle, saving data transfer.
2. The quaternion attitude control method based on mixed signal storage and calculation according to claim 1 is characterized in that: The method of expressing the posture information at the current moment and the current timestamp in the form of matrix quaternion, obtaining the posture quaternion matrix at the current moment, and storing the posture quaternion matrix at the current moment in a storage and computing unit of the storage and computing integrated architecture includes: The rotation angle of the posture information is expressed as a quaternion to obtain the quaternion data at the current moment; Based on the current timestamp, performing differential calculation on the quaternion data at the current moment to obtain the attitude quaternion matrix at the current moment; The posture quaternion matrix at the current moment is stored in the storage unit.
3. The quaternion attitude control method based on mixed signal storage and calculation according to claim 2 is characterized in that: The rotation angle of the posture information is expressed by a quaternion to obtain the quaternion data at the current moment, which is expressed by the following formula 1: Formula 1; Among them, q represents the quaternion data at the current moment, θ represents the rotation angle of the aircraft's gyroscope, represents the unit vector of the rotation axis; and, , ; The angular velocity of the gyroscope Substituting into Formula 1, based on the current timestamp, the quaternion data at the current moment is differentiated to obtain the attitude quaternion matrix at the current moment, which is expressed by the following formula: ; in, Represents the current attitude quaternion, i, j, k represent imaginary numbers, Respectively represent the components of the angular velocity on the three coordinate axes of x, y, and z; A real number representing a quaternion, , , An imaginary number representing a quaternion; The current attitude quaternion is expressed in matrix form using the following formula: ; in, .
4. The quaternion attitude control method based on mixed signal storage and calculation according to claim 3 is characterized in that: In the storage and calculation unit, based on the posture quaternion at the previous moment and the posture quaternion matrix at the current moment, the posture quaternion matrix at the current moment is updated to obtain an updated posture quaternion matrix, including: In the storage and calculation unit, the time interval is obtained by subtracting the timestamp of the previous moment from the current timestamp; or, the time interval is calculated based on the preset attitude update frequency of the aircraft; A first-order Longo Kutta equation is constructed based on the attitude quaternion matrix of the previous moment, the time interval and the current timestamp to solve the update of the attitude quaternion matrix of the previous moment at the current moment and obtain an updated attitude quaternion matrix.
5. The quaternion attitude control method based on mixed signal storage and calculation according to claim 4 is characterized in that: The first-order Longo Kutta equation is constructed based on the attitude quaternion matrix of the previous moment, the time interval and the current timestamp to solve the update of the attitude quaternion matrix of the previous moment at the current moment, and obtain the updated attitude quaternion matrix, which is expressed by the following formula: ; in, Indicates the tth n+1 The attitude quaternion at the moment, Represents the attitude quaternion at the tth moment; Indicates the time interval, Indicates the current timestamp t n Next ,for .
6. The quaternion attitude control method based on mixed signal storage and calculation according to claim 5 is characterized in that: The updated attitude quaternion matrix is expressed by the following formula: 。 7. The quaternion attitude control method based on mixed signal storage and calculation according to claim 1 is characterized in that: The step of obtaining the attitude quaternion of the aircraft at the last moment includes: Get the last moment attitude information and last moment timestamp of the aircraft; The posture information of the previous moment and the timestamp of the previous moment are represented in the form of matrix quaternion, the posture quaternion matrix of the previous moment is obtained, and the posture quaternion matrix of the previous moment is stored in the storage and computing unit of the storage and computing integrated architecture.
8. A posture control device, characterized in that: include: one or more processors; A memory for storing one or more computer programs, and one or more processors for executing one or more computer programs stored in the memory, so that one or more processors execute a quaternion attitude control method based on mixed signal storage and computing as described in any one of claims 1 to 7.
9. An aircraft, characterized in that: The aircraft comprises the attitude control device according to claim 8.
Citation Information
Patent Citations
Processor data operation method, processor, equipment and storage medium
CN115221111A
Unmanned aerial vehicle flight attitude control method
CN117742380A