Spacecraft magnetic torque attitude control method based on inverse-free iterative algorithm
By avoiding matrix inversion operations through an inverse-free iterative algorithm, and combining the gradient descent principle and a simplified quaternion linearization method, the numerical instability problem of traditional iterative algorithms in solving discrete periodic Riccati equations is solved, achieving high precision and high reliability of spacecraft magnetic torque attitude control, which is suitable for attitude control of spacecraft in long-term on-orbit operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
- Filing Date
- 2026-01-19
- Publication Date
- 2026-07-24
Smart Images

Figure CN122009527B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a spacecraft attitude control method, specifically to a spacecraft attitude optimal controller design method that relies solely on magnetic torque. Background Technology
[0002] Spacecraft attitude control is a key technology for ensuring the success of space missions such as Earth observation, deep space exploration, and satellite communication. Its fundamental goal is to ensure that spacecraft maintain or adjust to a specific attitude and orientation in the complex space environment to meet mission requirements such as payload operation, energy acquisition, and orbit maintenance. Traditional attitude control mainly relies on propellant injection or momentum exchange devices, such as reaction wheels and control moment gyroscopes. These methods are technically mature, but face limitations such as propellant depletion, wear or failure of moving parts during long-term on-orbit missions. In contrast, the method of generating control torque solely through the interaction of a spaceborne magnetoresistor with the Earth's magnetic field has gained widespread attention and become a research hotspot due to its significant advantages of no propellant consumption, no moving parts, high reliability, and long lifespan, particularly in the attitude control of various long-life spacecraft and microsatellites.
[0003] Because the Earth's magnetic field varies periodically with orbital motion in the spacecraft's coordinate system, the magnetic torque attitude control system is essentially a linear periodic time-varying system. For such periodic time-varying systems, linear quadratic optimal control is a classic theoretical framework for designing high-performance controllers. This framework, by defining quadratic performance indices for state error and control energy consumption, can systematically balance control accuracy and energy consumption, thereby obtaining a periodically optimal state feedback control law. Solving this control law has been mathematically proven to be completely equivalent to solving the accompanying discrete periodic Riccati equation. Therefore, how to efficiently and stably solve the discrete periodic Riccati equation has become a key focus in designing magnetic torque optimal controllers. Currently, many iterative algorithms inevitably involve matrix inversion operations during the solution process. Matrix inversion not only has high computational complexity but, more importantly, can introduce numerical instability problems, especially when the matrix condition number is large or the computational resources of embedded systems are limited, affecting the reliability and accuracy of the controller. To overcome the limitations of traditional iterative algorithms, many researchers are dedicated to seeking innovative iterative algorithms to avoid matrix inversion operations. Against this backdrop, spacecraft magnetic torque attitude control methods based on inverse-free iterative algorithms have attracted considerable attention. Summary of the Invention
[0004] To overcome the limitations of traditional methods and provide reliable support for the successful execution of space missions and the advancement of scientific research, this invention provides a novel spacecraft magnetic torque attitude control method based on an inverse-free iterative algorithm. This method combines the optimal control problem of periodic systems with an inverse-free gradient iterative algorithm. By constructing an error function and applying the gradient descent principle, it achieves a stable and efficient solution to the discrete periodic Riccati equation, thereby designing a periodic optimal controller with higher numerical robustness and control accuracy. This provides a solid technical foundation for the stable pointing and long-term reliable operation of spacecraft relying solely on magnetic torque in complex space environments.
[0005] The objective of this invention is achieved through the following technical solution:
[0006] A spacecraft magnetic torque attitude control method based on an inverse-free iterative algorithm includes the following steps:
[0007] Step 1: Based on simplified quaternions and linearization methods, establish a linearized periodic model of the spacecraft attitude control system using only magnetic torquers. The specific steps are as follows:
[0008] Step 1-1: Set the inertial matrix of the spacecraft. Defined as:
[0009]
[0010] in, It is a constant. , ;
[0011] Steps 1-2: The attitude of the spacecraft is represented as the rotation of the spacecraft's body coordinate system relative to the local vertical and local horizontal LVLH coordinate system, let... Let be the angular velocity of the body relative to the LVLH coordinate system. It is a constant. The quaternion representing the rotation of the body coordinate system relative to the LVLH coordinate system, where, These are the four components of a unit quaternion. A rotation axis per unit length To bypass The rotation angle; the control torque generated by the interaction between the magnetic coil and the Earth's magnetic field is shown below:
[0012]
[0013] in, It is the Earth's magnetic field in the spacecraft coordinate system. All are time-varying variables; The magnetic torque induced by the spacecraft's magnetic coils in the spacecraft coordinate system. All are time-varying variables;
[0014] Approximately expressed as:
[0015]
[0016] in, The inclination of the spacecraft's orbit relative to the magnetic equator. The magnetic field dipole strength, time Defined as the moment when a spacecraft crosses the ascending node of the magnetic equator. The angular velocity of the orbit relative to the inertial coordinate system;
[0017] Steps 1-3: The simplified quaternion linear time-varying system is represented in the following form:
[0018]
[0019] in
[0020]
[0021]
[0022] and
[0023]
[0024] in, A suitable identity matrix;
[0025] Step 2: Based on the linear quadratic optimal control theory, the optimal controller design problem is transformed into the problem of solving the associated discrete periodic Riccati equations. The specific steps are as follows:
[0026] Step 2-1: The spacecraft controller adopts the following discrete periodic system:
[0027] (1)
[0028] in, Represents the discrete-time sequence number. and They represent the system in The state and controller at any given moment and All are system matrices;
[0029] Step 2-2: For the discrete periodic system (1), consider the quadratic performance index function as follows:
[0030] (2)
[0031] in, and The period is The weight matrix;
[0032] Steps 2-3: If the discrete periodic system (1) is stabilizable, then the unique optimal control law that minimizes the quadratic performance index function (2) is:
[0033] (3)
[0034] in, This represents the maximum periodic solution to a discrete-period Riccati equation given in the infinite time domain. The discrete-period Riccati equation has the following form:
[0035] (4)
[0036] Since equation (4) is periodic, solving equation (4) is equivalent to solving equation (5):
[0037] (5)
[0038] Among them, matrix It is the unique positive definite solution of equation (5);
[0039] Furthermore, by applying the matrix inversion lemma, equation (5) is equivalent to:
[0040] (6)
[0041] in ;
[0042] Step 3: Based on the principle of gradient descent, an inverse-free iterative algorithm based on the principle of gradient descent is proposed to solve the discrete periodic Riccati equation by constructing an error function. The specific steps are as follows:
[0043] Step 3-1, for any ,make:
[0044] (7)
[0045] Among them, matrix These are non-singular matrices of suitable dimension;
[0046] Then equation (6) is equivalent to:
[0047] (8)
[0048] From (7), we can know that:
[0049]
[0050] Based on this, a set of matrix value error functions is established:
[0051] (9)
[0052] Therefore, the following objective function is constructed:
[0053] (10)
[0054] in, , represent Norm;
[0055] Step 3-2: Calculate the objective function Regarding matrix groups and The gradient is shown below:
[0056]
[0057] Based on this, an improved gradient descent-based inverse-free iterative algorithm is constructed:
[0058]
[0059] in, These are adjustable parameters;
[0060] Step 4: Using the solution to the Riccati equation obtained in Step 3, the optimal state feedback control law is obtained, thereby realizing optimal attitude control of the spacecraft using only magnetic torque. The specific steps are as follows:
[0061] Based on the improved gradient descent-based inverseless iterative algorithm proposed in step 3, the following is obtained: Thus, the unique positive definite solution of the discrete periodic Riccati matrix equation is obtained. By combining the optimal control law given in step 2, a linear quadratic optimal controller is obtained, which realizes spacecraft attitude control using only magnetic torque.
[0062] Compared with the prior art, the present invention has the following advantages:
[0063] This invention addresses the attitude control problem of spacecraft relying solely on magnetic torque. It designs a periodically optimal controller based on an inverse-free iterative algorithm, achieving higher numerical stability in attitude control. This approach is suitable for space missions requiring long-term on-orbit operation and extremely high control reliability, such as microsatellite formation and space science exploration. Based on the gradient descent principle, a novel error function is constructed, and an inverse-free iterative algorithm based on gradient descent is proposed to solve the discrete periodic Riccati equation. This fundamentally avoids the numerical instability risks caused by matrix inversion operations in traditional algorithms, thus obtaining highly reliable periodically optimal feedback gain. This method enables the controller to accurately compensate for the periodic changes of the system, providing an optimal and highly reliable complete attitude control solution for spacecraft with limited computational resources. Attached Figure Description
[0064] Figure 1 The diagram shows the magnetic torque attitude control block diagram for a spacecraft based on an inverse-free iterative algorithm.
[0065] Figure 2 For different parameters The convergence accuracy variation curve of the inverse iteration algorithm;
[0066] Figure 3 for Convergence accuracy curve of the time-inverse iterative algorithm;
[0067] Figure 4 For spacecraft magnetic moment attitude The response curve;
[0068] Figure 5 For spacecraft magnetic moment attitude The response curve;
[0069] Figure 6 For spacecraft magnetic moment attitude The response curve;
[0070] Figure 7 For the magnetic moment attitude of the spacecraft The response curve;
[0071] Figure 8 For spacecraft magnetic moment attitude The response curve;
[0072] Figure 9 For spacecraft magnetic moment attitude The response curve. Detailed Implementation
[0073] The technical solution of the present invention will be further described below with reference to the accompanying drawings, but it is not limited thereto. Any modifications or equivalent substitutions to the technical solution of the present invention that do not depart from the spirit and scope of the technical solution of the present invention should be covered within the protection scope of the present invention.
[0074] This invention provides a spacecraft magnetic torque attitude control method based on an inverse-free iterative algorithm. The method, targeting spacecraft attitude control systems relying solely on magnetic torque, establishes a linearized periodic model. Based on this, and according to linear quadratic optimal control theory, the optimal controller design problem is transformed into solving the associated discrete-periodic Riccati equations. Based on the gradient descent principle, an inverse-free iterative algorithm based on gradient descent is proposed to solve the discrete-periodic Riccati equations by constructing an error function. This avoids matrix inversion operations in traditional methods, effectively improving computational efficiency and numerical stability. Using the obtained Riccati equation solution, the optimal state feedback control law is obtained, thereby achieving optimal attitude control of spacecraft using only magnetic torque, providing a new solution to the attitude control problem of constrained actuators in space missions. Specifically, the method includes the following steps:
[0075] Step 1: Model the spacecraft attitude control system using only magnetic torque. By simplifying quaternions and using linearization methods, the spacecraft attitude control system using only magnetic torque devices is simplified into a linearized periodic model. The specific steps are as follows:
[0076] A linearized continuous-time model for spacecraft attitude control using only magnetic torque can be represented in simplified quaternion form. Let the spacecraft's inertial matrix be... Defined as:
[0077]
[0078] in, It is a constant. , .
[0079] Here we consider a spacecraft pointing towards the Earth. The spacecraft's attitude is represented by the rotation of the spacecraft's body coordinate system relative to the local vertical-local horizontal (LVLH) coordinate system. Let... Let be the angular velocity of the body relative to the LVLH coordinate system. Let be a constant. The quaternion representing the rotation of the body coordinate system relative to the LVLH coordinate system, where A rotation axis per unit length To bypass The rotation angle. The control torque generated by the interaction between the magnetic coil and the Earth's magnetic field is shown below:
[0080]
[0081] Among them, the geomagnetic field in the spacecraft coordinate system It was calculated using a spherical harmonic model of the spacecraft's position, attitude, and the Earth's magnetic field. All are time-varying variables; The magnetic torque induced by the spacecraft's magnetic coils in the spacecraft coordinate system, where All are time-varying numbers. The time-varying nature of this system is approximately: A periodic function, where The orbital period is expressed as follows:
[0082]
[0083] In the formula, For the orbital radius, , ω is the angular velocity of the orbit (i.e., the LVLH coordinate system) relative to the inertial coordinate system.
[0084] The magnetic field It can be approximated as:
[0085]
[0086] in, The inclination of the spacecraft's orbit relative to the magnetic equator. This represents the strength of the magnetic field dipole. Time. Defined as the moment when the spacecraft crosses the ascending node of the magnetic equator. Thus, the simplified quaternion linear time-varying system can be expressed in the following form:
[0087]
[0088] in
[0089]
[0090]
[0091] and
[0092]
[0093] It is easy to see that the determinant , and when , and At that time, matrix It is strange and unusual.
[0094] Step 2: In practical applications, spacecraft controllers are typically implemented using computer systems, which are inherently discrete systems. Therefore, the following discrete model is often used in specific implementation designs:
[0095] (11)
[0096] in, Represents the discrete-time sequence number. and They represent the system in The state and controller at any given moment and Both are system matrices. Let Given the sampling time, the system matrix in the discrete model is... It can be derived that:
[0097]
[0098] in, It is an identity matrix of suitable dimension.
[0099] It is worth mentioning that, regardless of whether it is a continuous-time model or a discrete-time model, the time-varying characteristics are all derived from the time-varying matrix. or Decision; System Matrix and All are constant matrices and are invertible. Based on the periodicity of the system matrices, we can know... .
[0100] For the discrete periodic system (11), consider the quadratic performance index function as follows:
[0101] (12)
[0102] in, and The period is The weight matrix. If the discrete periodic system (11) is stabilizable, then the unique optimal control law that minimizes the quadratic performance index function (12) is:
[0103] (13)
[0104] in, This represents the maximum periodic solution to a discrete-period Riccati equation given in the infinite time domain. The discrete-period Riccati equation has the following form:
[0105] (14)
[0106] Since equation (14) is periodic, solving equation (14) is equivalent to solving equation (15):
[0107] (15)
[0108] Among them, matrix It is the unique positive definite solution of equation (15).
[0109] Furthermore, by applying the matrix inversion lemma, equation (15) is equivalent to:
[0110] (16)
[0111] in .
[0112] Step 3: Construct an inverse-free iterative algorithm based on the gradient descent principle. The specific steps are as follows:
[0113] For any ,make:
[0114] (17)
[0115] Among them, matrix These are non-singular matrices of appropriate dimension.
[0116] Then equation (16) can be equivalent to:
[0117] (18)
[0118] From (17), we can know that:
[0119]
[0120] Based on this, a set of matrix value error functions is established:
[0121] (19)
[0122] Furthermore, the objective function is constructed as follows, and the optimal matrix set is found. and To minimize it:
[0123] (20)
[0124] in, , represent Norm.
[0125] To obtain the optimal solution to this minimization problem, an iterative algorithm is constructed using the gradient descent principle.
[0126] First, calculate the objective function. about and The gradient is calculated, and the results are as follows:
[0127] (twenty one)
[0128] Based on this, an inverse-free iterative algorithm based on the gradient descent principle is constructed:
[0129] (twenty two)
[0130] in, This is the step size that needs to be specified later. This is the iteration step size.
[0131] In algorithm (22), the iterative sequence and Based on the The estimated value of the next iteration and Perform the calculation. However, when updating the current estimate, the first... The estimated values from the previous iteration step have also been obtained. To fully utilize the estimated values generated in the previous iteration step, an improved gradient descent-based inverse-free iterative algorithm is presented:
[0132] (twenty three)
[0133] in, This is an adjustable parameter.
[0134] Step 4: Based on the gradient descent-based inverse-free iterative algorithm proposed in Step 3, the following can be calculated: Thus, the unique positive definite solution of the discrete periodic Riccati matrix equation is obtained. By combining the optimal control law (13) given in step 2, a linear quadratic optimal controller can be obtained to achieve the attitude stabilization control of the spacecraft.
[0135] Example 1:
[0136] To verify the effectiveness of the proposed inverse-free iterative algorithm, the following numerical simulation example is provided. In this simulation, the parameters are set as follows:
[0137]
[0138]
[0139]
[0140]
[0141] Furthermore, the residual is defined as:
[0142]
[0143] in, .
[0144] For the discrete periodic Riccati matrix equation (6), the period is chosen as... First, the inverse-free iterative algorithm proposed in this invention is used to solve equation (6). For ease of description, let's set:
[0145]
[0146] The convergence curve of the algorithm is as follows: Figure 2 and Figure 3 As shown. (Through) Figure 2 It is clear that, under the same conditions of 100 algorithm iterations, adjusting different... Different convergence accuracies can be obtained when... When the algorithm achieves its highest convergence accuracy, it does so. Figure 3 It can be seen that when At that time, the algorithm's convergence accuracy can reach up to .
[0147] Example 2:
[0148] For a spacecraft magnetic torque attitude control system, let the inertial matrix for track inclination The orbit is circular, at an altitude of 657 km, with an orbital period of 5863 seconds and an orbital speed of [missing information]. Assuming a total of 100 samples are collected within one orbital period, each sample period is 58.6352 seconds. In this simulation, the following settings are used:
[0149]
[0150]
[0151] The attitude and angular velocity response curves of the spacecraft's magnetic torque attitude control system are as follows: Figures 4-9 As shown. Figures 4-6 The attitude response curves of the spacecraft system are given. Figures 7-9 The angular velocity response curves of the spacecraft system are presented. It can be seen that both the attitude response curve and the angular velocity response curve of the spacecraft converge to 0, further verifying the effectiveness of the algorithm and the correctness of the control method.
Claims
1. A spacecraft magnetic torque attitude control method based on an inverse-free iterative algorithm, characterized in that... The method includes the following steps: Step 1: Based on simplified quaternions and linearization methods, establish a linearized periodic model of the spacecraft attitude control system using only magnetic torquers. The specific steps are as follows: Step 1-1: Set the inertial matrix of the spacecraft. Defined as: in, It is a constant. , ; Steps 1-2: The attitude of the spacecraft is represented as the rotation of the spacecraft's body coordinate system relative to the local vertical and local horizontal LVLH coordinate system, let... Let be the angular velocity of the body relative to the LVLH coordinate system. It is a constant. The quaternion representing the rotation of the body coordinate system relative to the LVLH coordinate system, where, These are the four components of a unit quaternion. A rotation axis per unit length To bypass The rotation angle, and the control torque generated by the interaction between the magnetic coil and the Earth's magnetic field, are shown below: in, It is the Earth's magnetic field in the spacecraft coordinate system. All are time-varying variables; The magnetic torque induced by the spacecraft's magnetic coils in the spacecraft coordinate system. All are time-varying variables; Approximately expressed as: in, The inclination of the spacecraft's orbit relative to the magnetic equator. The magnetic field dipole strength, time Defined as the moment when a spacecraft crosses the ascending node of the magnetic equator. The angular velocity of the orbit relative to the inertial coordinate system; Steps 1-3: The simplified quaternion linear time-varying system is represented in the following form: in and in, A suitable identity matrix; Step 2: Based on the linear quadratic optimal control theory, the optimal controller design problem is transformed into the problem of solving the associated discrete periodic Riccati equations. The specific steps are as follows: Step 2-1: The spacecraft controller adopts the following discrete periodic system: (1) in, Represents the discrete-time sequence number. and They represent the system in The state and controller at any given moment and All are system matrices; Step 2-2: For the discrete periodic system (1), consider the quadratic performance index function as follows: (2) in, and The period is The weight matrix; Steps 2-3: If the discrete periodic system (1) is stabilizable, then the unique optimal control law that minimizes the quadratic performance index function (2) is: (3) in, This represents the maximum periodic solution to a discrete-period Riccati equation given in the infinite time domain. The discrete-period Riccati equation has the following form: (4) Since equation (4) is periodic, solving equation (4) is equivalent to solving equation (5): (5) Among them, matrix It is the unique positive definite solution of equation (5); Furthermore, by applying the matrix inversion lemma, equation (5) is equivalent to: (6) in ; Step 3: Based on the principle of gradient descent, an inverse-free iterative algorithm based on the principle of gradient descent is proposed to solve the discrete periodic Riccati equation by constructing an error function. The specific steps are as follows: Step 3-1, for any ,make: (7) Among them, matrix These are non-singular matrices of suitable dimension; Then equation (6) is equivalent to: (8) From (7), we can know that: Based on this, a set of matrix value error functions is established: (9) Therefore, the following objective function is constructed: (10) in, , represent Norm; Step 3-2: Calculate the objective function Regarding matrix groups and The gradient is shown below: Based on this, an improved gradient descent-based inverse-free iterative algorithm is constructed: in, These are adjustable parameters; Step 4: Using the solution to the Riccati equation obtained in Step 3, the optimal state feedback control law is obtained, thereby realizing the optimal attitude control of the spacecraft using only magnetic torque.
2. The spacecraft magnetic torque attitude control method based on an inverse-free iterative algorithm according to claim 1, characterized in that... The ,in The orbital period is expressed as follows: In the formula, For the orbital radius, .
3. The spacecraft magnetic torque attitude control method based on an inverse-free iterative algorithm according to claim 1, characterized in that... In step 2-1, let For sampling time, then .
4. The spacecraft magnetic torque attitude control method based on an inverse-free iterative algorithm according to claim 1, characterized in that... The specific steps of step 4 are as follows: Based on the improved gradient descent-based inverseless iterative algorithm proposed in step 3, the following is obtained: Thus, the unique positive definite solution of the discrete periodic Riccati matrix equation is obtained. By combining the optimal control law given in step 2, a linear quadratic optimal controller is obtained, which realizes spacecraft attitude control using only magnetic torque.
Citation Information
Patent Citations
CN115562003A
CN120069094A