A drag-free spacecraft control method based on a combination of BP neural network and PID control
By combining BP neural networks and PID control, the problem of high-precision control of dragless spacecraft in gravitational wave detection was solved, achieving adaptive capability to complex disturbances and improving control accuracy and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
- Filing Date
- 2024-04-25
- Publication Date
- 2026-06-30
AI Technical Summary
Traditional PID control algorithms cannot effectively handle nonlinear and time-varying systems in dragless spacecraft, especially in gravitational wave detection where they cannot meet high-precision requirements and cannot adapt to complex space disturbances.
By combining BP neural networks and PID control, a dynamic model and neural network structure are established, an initial BP neural network structure is generated, forward and backward propagation are performed, weight values are optimized, and PID control force is calculated. This solves the coupling problem between spacecraft and inspection quality and achieves precise dynamic control.
It enables drag-free spacecraft to adjust and handle complex disturbances with high precision and speed, meeting the high precision requirements of gravitational wave detection and improving the accuracy and reliability of PID control.
Smart Images

Figure CN118579280B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of dynamics and control technology, specifically relating to a dragless spacecraft control method based on a combination of BP neural network and PID control. Background Technology
[0002] PID control, short for Proportional-Integral-Derivative control, is one of the earliest developed classic control strategies. It consists of three parts: proportional control, integral control, and derivative control. It adjusts the proportional coefficient k of the controller. p Integral coefficient k i Differential coefficient k d Three parameters are used to adjust the proportions of the three control methods to achieve precise, rapid, and stable control of the system. PID control dominates industrial control processes due to its simple principle, high reliability, and robustness, and is widely used in industrial production, chemical engineering, machinery, and aerospace. However, PID control also has limitations; its over-reliance on control parameters and system models leads to poor performance when handling nonlinear and time-varying systems.
[0003] Dragless control technology is a crucial approach and key technology for obtaining ultra-low disturbance spacecraft platforms. Proposed by Lange et al. in the 1960s, it has provided support for high-precision research such as space science experiments and Earth observation. The dragless satellite design makes gravitational wave detection possible. A gravitational wave detection scientific satellite consists of a spacecraft platform and two test masses, each suspended in an electrode cage at a 60° angle. Due to the high nonlinearity of the spacecraft system itself, the presence of various uncertain and complex disturbances in space, and the coupling effect between the dragless spacecraft and the dragless control loop and electrostatic levitation control loop, traditional PID control cannot approximate the nonlinear model well and lacks good adaptive capability when facing uncertain disturbances, thus failing to meet the ultra-low microgravity requirements for gravitational wave detection.
[0004] To overcome the shortcomings of traditional PID control algorithms and better adapt to the complexity of the controlled object, PID algorithms are constantly being improved. With the rapid development of artificial intelligence in recent years, intelligent control algorithms combining BP neural networks and PID control have also emerged. For example, patent CN111897347B discloses a heading maintainer and a heading method for a dual-motor propulsion unmanned surface vessel based on neural network PID control. The heading maintainer includes: a heading deviation analysis unit, a first PID controller, a second PID controller, a first PWM duty cycle regulator, a second PWM duty cycle regulator, a first motor, a second motor, and a magnetometer. This method enables the unmanned surface vessel to maintain its original heading and reach its destination even under the influence of wind and waves without having to replan its route. The shortcomings of this method are that there is no coupling effect between the controlled variables, the input and output of the controller are relatively small, and the model complexity is relatively low. Therefore, it is not well applied to high-precision systems with complex dynamic properties. Summary of the Invention
[0005] This invention provides a dragless spacecraft control method based on a combination of BP neural network and PID control, which solves the problem that there is no dragless spacecraft control method for gravitational wave detection in the prior art. It can achieve high-precision targets when the spacecraft is in orbit and has the advantages of high precision, fast adjustment speed and good handling of complex space disturbances.
[0006] To achieve the above-mentioned technical effects, the technical solution of the present invention is as follows:
[0007] A drag-free spacecraft control method based on a combination of BP neural network and PID control includes the following steps:
[0008] Step 1: Establish a dynamic model of the dragless spacecraft and the test mass: First, establish the inertial coordinate system, the spacecraft body coordinate system, and the electrode cage coordinate system. Through force analysis, derive the translational and rotational dynamic equations of the spacecraft and the test mass. After reasonable linearization, convert them into linear differential equations for use as a model of the control system. Since the spacecraft and the two test masses have a total of 9 degrees of freedom in the plane, in the gravitational wave detection scientific mode, the sensitive axis direction of the test mass is unconstrained, with a total of 7 degrees of freedom, requiring the output of 7 control forces.
[0009] Step 2: Generate the initial structure of the BP neural network: Determine the number of layers and nodes in each layer. The input layer has 21 nodes, including initial values for 7 differential equations. Each equation corresponds to 3 nodes: the target value, the actual value, and the error between them. The output layer also has 21 nodes, including control forces for 7 differential equations. Each equation corresponds to 3 nodes: the proportional coefficient k of the controller. p Integral coefficient k iDifferential coefficient k d , where n is the parameter of the PID controller; and the number of hidden layers n and the number of nodes in each layer N = [N1, N2... N] of the neural network. n It needs to be obtained through repeated trials and continuous adjustments and optimizations;
[0010] Step 3: Initialize the weight values of the BP neural network: In the initial adjustment stage, the initial values of the weight matrix are obtained by random generation. After multiple experiments, a set of initial values with better control effect can be selected as the initial weight values for subsequent use.
[0011] Step 4: Input initial spacecraft pose information: Input the initial pose information of the spacecraft and the mass inspection as the input signal yout into the neural network, set the target value rin (usually set to 0), calculate the error between the two, and obtain the input value of the neural network. The error calculation formula is:
[0012] error(k) = rin(k) - youout(k);
[0013] Where k is the number of iterations.
[0014] Step 5: Forward Propagation of the Neural Network: Based on the input values of the neural network obtained in Step 4 and the weight matrix obtained in Step 3, the output signal of the neural network is calculated layer by layer. This step is the forward propagation. During the propagation process, regularization and normalization processing need to be performed on each layer node. Considering that the network output consists of three parameters of a PID controller, which are generally greater than 0, the tanh function is selected as the activation function based on the comparison of the characteristics of various activation functions. The activation function for the intermediate layers is selected as follows: Output layer activation function selection in x This is the input value for the node at this layer.
[0015] Step 6: Calculate the PID control force: Calculate the magnitude of the control force output by the controller based on the error obtained in Step 4 and the PID parameters obtained in Step 5;
[0016] Step 7: Solve the established dynamic differential equation: Substitute the magnitude of the control force obtained in Step 6 into the right side of the differential equation to solve it. The result is the numerical solution of the differential equation. In MATLAB, the ODE solver can be used to solve it. The disturbance force in the dynamic equation is assigned to a random disturbance of the same order of magnitude.
[0017] Step 8: Backpropagation of the Neural Network: Based on the node values obtained in Step 5, the weight coefficients are adjusted using the gradient descent method. The learning algorithm is as follows:
[0018] Loss function: E(k) = 0.5(rin(k) - youout(k)) 2
[0019] The search is performed using the negative gradient method with respect to the weighting coefficients based on E(k). An inertia term is added to accelerate the convergence of the search, resulting in the following learning algorithm for the output layer weights:
[0020]
[0021] In the formula, η is the learning rate and α is the inertia coefficient; by calculating layer by layer, the updated weight coefficients can be obtained.
[0022] Step 9: Determine if the iteration termination condition is met: If it is met, exit and draw the result diagram; if it is not met, update the neural network input signal with the pose result obtained in Step 7 and return to Step 5 to continue iterating.
[0023] Step 10: Determine if the accuracy requirement is met. If it is met, the process ends. If not, there are two possibilities: First, the initial value of the randomly generated weight matrix is not good, causing it to get stuck in a local optimum. In this case, it is necessary to return to Step 3 to change the initial value of the weight matrix and iterate again. Second, the structure of the neural network does not match the model, and it cannot achieve a good fitting effect. In this case, it is necessary to return to Step 2 to adjust the network structure according to the results, change the number of hidden layers and the number of nodes in each layer of the BP neural network until the output meets the accuracy requirement.
[0024] Beneficial effects: This invention provides a dragless spacecraft control method based on the combination of BP neural network and PID control. It combines the intelligent algorithm of BP neural network with traditional PID control and applies it to dragless spacecraft. The resulting controller can adjust the number of inputs and outputs and the network structure according to the specific model. It can perform precise dynamic control of the dragless spacecraft multi-body multi-degree-of-freedom system. In the scientific mode of gravitational wave detection, it solves the coupling problem between different loops of spacecraft and test mass. It has good adaptive ability in the face of random disturbances in space. Ultimately, it can meet the high-precision index requirements of space science exploration and achieve ultra-low microgravity level. Attached Figure Description
[0025] Figure 1 This is a flowchart of the high-precision control method for drag-free spacecraft based on the combination of BP neural network and PID control in this embodiment of the invention.
[0026] Figure 2 This is a schematic diagram of the control loop of a dragless spacecraft for gravitational wave detection in an embodiment of the present invention;
[0027] Figure 3 This is a schematic diagram of the control system combining BP neural network and PID control in an embodiment of the present invention. Detailed Implementation
[0028] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments:
[0029] like Figures 1 to 3 As shown, a high-precision control method for drag-free spacecraft based on a combination of BP neural network and PID control is presented. In this embodiment, the gravitational wave detection spacecraft, during its on-orbit operation, is limited by external environmental disturbances such as atmospheric damping, solar radiation pressure, and cosmic rays, as well as its own disturbances such as structural vibration, attitude adjustment, and internal component movement. Its residual disturbance level is far below the requirements for high-precision space experiments. However, space gravitational waves are extremely weak, causing very small distance changes. Therefore, a very large measurement baseline and extremely high measurement accuracy are required. Drag-free control technology is one of the important approaches and key technologies for obtaining ultra-low disturbance spacecraft platforms. The drag-free spacecraft control loop for space gravitational wave detection is as follows: Figure 2 As shown, a dragless spacecraft is a space multibody system consisting of a satellite and a test mass. The system itself has multiple degrees of freedom and nonlinearity. This invention, from a dynamics perspective, combines a BP neural network intelligent algorithm with traditional PID control for dragless spacecraft, enabling precise dynamic control of the dragless spacecraft's multibody multi-degree-of-freedom system. The specific implementation steps are as follows:
[0030] Step 1: Establishing a dynamic model of the dragless spacecraft and the test mass: First, establish the inertial coordinate system, the spacecraft body coordinate system, and the electrode cage coordinate system. Through force analysis, derive the translational and rotational dynamic equations of the spacecraft and the test mass. After reasonable linearization, convert them into linear differential equations, which are used as the model for the control system. The model is as follows:
[0031]
[0032] Where c and k are the coupling force coefficients of the test mass and the interaction between the spacecraft through the vacuum electrode cage, which are decomposed according to the form of virtual springs, and c′, k′, c″, and k″ are the pose coupling coefficients. The poses given in the model are all vectors. The model is only used to simulate the actual system and to solve the pose change. In the actual experiment, the real-time pose information is directly obtained through the sensor.
[0033] Since the spacecraft and the two test masses each have three degrees of freedom in the x-direction, y-direction, and rotational direction around the z-axis, totaling nine degrees of freedom in the plane of observation, and since the sensitive axis direction of the test masses is not constrained, totaling seven degrees of freedom, seven control forces need to be output.
[0034] Step 2: Generate the initial structure of the BP neural network: Determine the number of layers and nodes in each layer. The input layer has 21 nodes, including initial values for 7 differential equations. Each equation corresponds to 3 nodes: the target value, the actual value, and the error between them. The output layer also has 21 nodes, including control forces for 7 differential equations. Each equation corresponds to 3 nodes: the proportional coefficient k of the controller. p Integral coefficient k i Differential coefficient k d , where n is the parameter of the PID controller; and the number of hidden layers n and the number of nodes in each layer N = [N1, N2... N] of the neural network. n It needs to be obtained through multiple trials and continuous adjustments and optimizations. Initially, n = 1 and N = [5] can be taken.
[0035] Step 3: Initialize the weight values of the BP neural network: In the initial adjustment stage, the initial values of the weight matrix are obtained by random generation. The initial values of the randomly generated weight matrix should be in the range of [-0.5, 0.5]. After several experiments, a set of initial values with better control effect can be selected as the initial weight values for subsequent use.
[0036] Step 4: Input initial spacecraft attitude information: Input the initial attitude information of the spacecraft and the test mass as the input signal yout into the neural network, set the target value rin (usually set to 0), and calculate the error between the two. The error calculation formula is error(k) = rin(k) - yout(k), thus obtaining the input value of the neural network [rin, yout, error]. The input signal is generated when the spacecraft and the test mass move relative to each other, and is determined by the sensor type as a position, velocity or acceleration value. In this example, a displacement value is used.
[0037] Step 5, Forward Propagation of the Neural Network: Based on the input signal of the neural network obtained in Step 4 and the weight matrix obtained in Step 3, the output signal of the neural network is calculated layer by layer by multiplying the node values. The calculation formula for the intermediate layers is as follows:
[0038]
[0039] The formula for calculating the output layer is:
[0040]
[0041] This step is the forward propagation; during the propagation process, regularization and normalization processing need to be performed on each layer node. Considering that the network output consists of three parameters of the PID, which are generally greater than 0, based on the comparison of the characteristics of various activation functions, the tanh function is selected as the activation function, and the activation function for the intermediate layers is selected as follows. Output layer activation function selection
[0042] Step Six: Calculate the PID control force: Based on the error obtained in Step Four and the PID parameters obtained in Step Five, calculate the magnitude of the control force output by the controller. In this embodiment, a more intuitive positional PID calculation method is used. The positional PID calculation formula is as follows:
[0043]
[0044] Step 7: Solve the established dynamic differential equation: Substitute the control force obtained in Step 6 into the right-hand side of the differential equation to solve for the numerical solution, which represents the updated pose information. This solution can be obtained using the ODE solver in MATLAB. The disturbance force in the dynamic equation is assigned to the same order of magnitude (approximately 10). -5 Random perturbations;
[0045] Step 8: Backpropagation of the Neural Network: Based on the node values obtained in Step 5, the weight coefficients are adjusted using the gradient descent method. The learning algorithm is as follows:
[0046] Loss function: E(k) = 0.5(rin(k) - youout(k)) 2
[0047] The search is performed using the negative gradient method with respect to the weighted coefficients based on E(k). Adding an inertia term allows the search to converge quickly, according to the chain rule.
[0048]
[0049] because Unknown, approximated using function notation The resulting computational inaccuracies can be compensated for by adjusting the learning rate η.
[0050] because:
[0051]
[0052] O1 out =k p O2 out =k i O3 out =k d
[0053] so:
[0054]
[0055] and Differentiate the activation function of the output layer:
[0056]
[0057] For intermediate layer output,
[0058] Therefore, the weight learning algorithm for the output layer can be obtained as follows:
[0059] Δw ij (k)=aΔw ij (k-1)+ηd i out O j n (k)
[0060]
[0061] Similarly, the weight learning algorithm for the intermediate layer of the nth layer can be obtained:
[0062] Δw ij (k)=aΔw ij (k-1)+ηd i n O j n-1 (k)
[0063] d i n =f(x)'(d i' n+1 w i'j' n+1 )
[0064] In the formula, η is the learning rate and α is the inertial frame. Taking η = 0.01 and α = 0.05, the updated weight coefficients can be obtained by calculating layer by layer.
[0065] Step 9: Determine if the iteration termination condition is met: If it is met, exit and draw the result diagram; if it is not met, update the neural network input signal with the pose result obtained in Step 7 and return to Step 5 to continue iterating.
[0066] Step 10: Determine if the accuracy requirement is met. If it is met, the process ends. If not, there are two possibilities: First, the initial value of the randomly generated weight matrix is not good, causing it to get stuck in a local optimum. In this case, it is necessary to return to Step 3 to change the initial value of the weight matrix and iterate again. Second, the structure of the neural network does not match the model, and it cannot achieve a good fitting effect. In this case, it is necessary to return to Step 2 to adjust the network structure according to the results, change the number of hidden layers and the number of nodes in each layer of the BP neural network until the output meets the accuracy requirement.
[0067] The aforementioned method combines a BP neural network intelligent algorithm with traditional PID control for use on dragless spacecraft. The resulting controller can adjust the number of inputs and outputs and the network structure according to the specific model, enabling precise dynamic control of multi-body, multi-degree-of-freedom systems in dragless spacecraft. It has significant advantages, especially in handling nonlinear systems that cannot be precisely modeled. In the scientific mode of gravitational wave detection, it solves the nonlinear coupling problem between the spacecraft and the test mass loops, exhibits good adaptability to random disturbances in space, and ultimately meets the high-precision requirements of space science exploration, achieving ultra-low microgravity levels. The combination with the BP neural network greatly improves the accuracy and reliability of PID control, overcomes the shortcomings of traditional PID control algorithms, and allows it to better adapt to more complex control objects.
[0068] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements can be made without departing from the principle of the present invention, and these improvements should also be considered within the scope of protection of the present invention.
Claims
1. A drag-free spacecraft control method based on a combination of BP neural network and PID control, characterized in that, Includes the following steps: Step 1: Establish a dynamic model of the dragless spacecraft and the test mass; Step 2: Generate the initial structure of the BP neural network and determine the number of layers and nodes in each layer; Step 3: Initialize the weight values of the BP neural network by randomly generating the initial values of the weight matrix; Step 4: Input the initial pose information of the spacecraft and the test mass as the input signal youout into the neural network, set the target value rin, calculate the error between the two, and thus obtain the input value of the neural network. Step 5: Based on the input values of the neural network obtained in Step 4 and the weight matrix obtained in Step 3, calculate the output signal of the neural network layer by layer. This step is called forward propagation. Step 6: Calculate the magnitude of the control force output by the controller based on the error obtained in Step 4 and the PID parameters obtained in Step 5; Step 7: Substitute the magnitude of the control force obtained in Step 6 into the right-hand side of the differential equation to solve for the numerical solution of the differential equation. Step 8: Based on the node values of each layer obtained in Step 5, adjust the weight coefficients according to the gradient descent method to obtain the output layer weights; Step 9: Determine if the iteration termination condition is met: If it is met, exit and draw the result diagram; if it is not met, update the neural network input signal with the pose result obtained in Step 7 and return to Step 5 to continue iterating. Step 10: Determine if the accuracy requirement is met. If it is met, the process ends. If not, there are two possibilities: First, the initial value of the randomly generated weight matrix is not good, causing it to get stuck in a local optimum. In this case, it is necessary to return to Step 3 to change the initial value of the weight matrix and iterate again. Second, the structure of the neural network does not match the model, and it cannot achieve a good fitting effect. In this case, it is necessary to return to Step 2 to adjust the network structure according to the results, change the number of hidden layers and the number of nodes in each layer of the BP neural network until the output meets the accuracy requirement.
2. The drag-free spacecraft control method based on a combination of BP neural network and PID control according to claim 1, characterized in that, The specific process of step one is as follows: First, establish the inertial coordinate system, the spacecraft body coordinate system, and the electrode cage coordinate system. Through force analysis, derive the translational and rotational dynamic equations of the spacecraft and the test mass. After reasonable linearization, convert them into linear differential equations, which are used as the model of the control system. Since the spacecraft and the two test masses have a total of 9 degrees of freedom in the plane, in the gravitational wave detection scientific mode, the sensitive axis direction of the test mass is not constrained, with a total of 7 degrees of freedom, and 7 control forces need to be output.
3. The drag-free spacecraft control method based on the combination of BP neural network and PID control according to claim 1, characterized in that, The specific process of step two is as follows: First, the input layer of the neural network has 21 nodes, including the initial values of 7 differential equations. Each equation corresponds to 3 nodes, namely the target value, the actual value, and the error between the two. The output layer has 21 nodes, including the control force of 7 differential equations. Each equation corresponds to 3 nodes, namely the proportional coefficient k of the controller. p Integral coefficient k i Differential coefficient k d Here, represents the parameters of the PID controller, and represents the number of hidden layers n and the number of nodes in each layer N = [N1, N2... N]. n It needs to be obtained through multiple trials and continuous adjustments and optimizations.
4. The drag-free spacecraft control method based on the combination of BP neural network and PID control according to claim 1, characterized in that, The weighting coefficients randomly generated in step three are in the range of [-0.5, 0.5].
5. The drag-free spacecraft control method based on the combination of BP neural network and PID control according to claim 1, characterized in that, In step four, the error calculation formula is error(k) = rin(k) - yout(k).
6. The drag-free spacecraft control method based on a combination of BP neural network and PID control according to claim 4 or 5, characterized in that, In step five, during the forward propagation process, regularization and normalization processing are required for each layer of nodes. Considering that the network output consists of three parameters of a PID, which are generally greater than 0, the tanh function is selected as the activation function based on a comparison of the characteristics of various activation functions. The activation function for the intermediate layers is selected as follows: Output layer activation function selection Where x is the input value of the node in this layer.
7. The drag-free spacecraft control method based on a combination of BP neural network and PID control according to claim 6, characterized in that, Step six employs a more intuitive positional PID calculation method. The positional PID calculation formula is as follows:
8. The drag-free spacecraft control method based on the combination of BP neural network and PID control according to claim 6, characterized in that, The learning algorithm for step eight is as follows: Loss function: E(k) = 0.5(rin(k) - youout(k)) 2 The search is performed using the negative gradient method with respect to the weighting coefficients based on E(k). An inertia term is added to accelerate the convergence of the search, resulting in the following learning algorithm for the output layer weights: Δw ij (k)=aΔw ij (k-1)+ηd i out O j n (k) In the formula, η is the learning rate and α is the inertia coefficient; by calculating layer by layer, the updated weight coefficients can be obtained.