A Self-Tuning Method for PID Parameters of Longitudinal Attitude of UAVs Based on LQR

By constructing a relationship model between LQR and PID and using a Bayesian optimization algorithm, the longitudinal attitude PID parameters of the UAV are automatically optimized, solving the problem that the UAV PID parameter tuning depends on experience and achieving precise control.

CN120065688BActive Publication Date: 2025-10-28INST OF MECHANICS CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510176618.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-10-28
Estimated Expiration
2045-02-18

AI Technical Summary

Technical Problem

Tuning the PID parameters of UAVs relies on the designer's experience, and the workload is large and complex, making it difficult to achieve excellent control results.

Method used

The LQR-based self-tuning method for UAV longitudinal attitude PID parameters automatically optimizes PID parameters by constructing a relationship model between the LQR control law and the PID control law, and using Monte Carlo random shooting and Bayesian optimization algorithms, thus reducing reliance on experience.

Benefits of technology

It achieves precise tuning of PID parameters for UAVs, reduces the complexity of parameter tuning, and improves control performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120065688B_ABST
    Figure CN120065688B_ABST
Patent Text Reader

Abstract

This invention discloses a self-tuning method for PID parameters of UAV longitudinal attitude based on LQR, comprising the following steps: constructing a relationship model between the LQR control law and the PID control law of the UAV pitch attitude based on a longitudinal state-space model; establishing scoring models for each parameter in the time and frequency domains, and then constructing a black-box model describing the relationship between weights and total performance score; establishing a surrogate model and updating the surrogate model using the black-box model; and using Bayesian optimization iterative calculation to select the PID parameters matched with the weight of the highest total performance score. This invention transforms LQR state feedback into PID form, uses LQR to design PID parameters, analyzes the obtained parameters in the time and frequency domains, proposes a scoring standard, and uses a Bayesian optimization algorithm to iteratively obtain the set of parameters with the highest score as the final parameters. This effectively reduces the dependence of the designed control parameters on experience and achieves excellent control performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of unmanned aerial vehicle (UAV) control technology, and specifically to a method for self-tuning the longitudinal attitude PID parameters of a UAV based on LQR. Background Technology

[0002] With the development of the low-altitude economy, the drone-related industries have risen rapidly and shown huge market potential and development prospects, including but not limited to logistics and distribution, agricultural plant protection, geographic surveying and mapping, environmental monitoring, disaster relief, news reporting, film and television shooting, and infrastructure inspection.

[0003] For commercial applications of drones, such as material delivery and performances, drones need to have excellent maneuverability. In engineering, the most commonly used and mature method for drone control is traditional PID control. Tuning the parameters of a PID controller typically involves manual parameter adjustment based on the linearized transfer function, and then optimizing the parameters through repeated trial and error based on time and frequency domain indicators. This process relies heavily on the designer's experience, especially for aircraft with wide flight envelopes, where parameter tuning is extremely labor-intensive and complex.

[0004] Therefore, the tuning of various parameters of the PID controller for UAVs currently relies on designers to manually adjust the parameters based on experience. This tuning process is very large and complex, making it difficult to achieve optimal control results. Summary of the Invention

[0005] The purpose of this invention is to provide a self-tuning method for PID parameters of longitudinal attitude of UAVs based on LQR, so as to solve the technical problem that the existing technology requires designers to manually adjust parameters based on experience, which is very large and complex, and thus it is difficult to achieve better control effect.

[0006] In order to solve the above technical problems, the present invention specifically provides the following technical solutions:

[0007] A self-tuning method for PID parameters of longitudinal attitude of a UAV based on LQR includes the following steps:

[0008] Step 100: Using the steady, sideslip-free flight of the UAV as the reference motion, after balancing and linearizing the operating points of the UAV to obtain the longitudinal state space model, the relationship model between the LQR control law and the PID control law of the UAV pitch attitude is constructed using the longitudinal state space model.

[0009] Step 200: Divide the control effect of the PID control law into the time domain and frequency domain. After establishing the scoring model of each parameter in the time domain and frequency domain, use the total performance score of each parameter in the time domain and frequency domain as the index describing the control effect of the PID control law. Then, establish a relationship between the weight of the LQR control law and the total performance score to construct a black box model describing the relationship between the weight and the total performance score.

[0010] Step 300: Establish a proxy model using the known weights and total performance score as the parameter tuning history. Select the weights of multiple LQR control laws using the Monte Carlo random shooting method. Calculate the total performance score based on the black box model and update the proxy model accordingly.

[0011] Step 400: Based on the Bayesian optimization method, derive the acquisition function according to the surrogate model to obtain the adjusted weights and calculate the total performance score. Set a maximum number of iterations and a performance score that meets the requirements. Select the next weight as a new observation point according to the acquisition function and add it to the parameter tuning history for iterative calculation. When the number of iterations is greater than the set maximum number of iterations or the performance score is greater than the set performance score that meets the requirements, the iterative calculation ends. After selecting the weight with the highest performance score, use the relational model to obtain the parameters of the PID control law that matches this weight as the pitch attitude loop PID parameters after optimization tuning.

[0012] As a preferred embodiment of the present invention, the specific method for obtaining the longitudinal state space model of the UAV in step 100 is as follows:

[0013] Using steady, sideslip-free flight of the UAV as the baseline motion, a linear longitudinal state-space model of the UAV can be obtained using the small perturbation method:

[0014]

[0015] y = Cx + Du;

[0016] in, C is the identity matrix, D is 0, and x is the transpose matrix of the state variables (V α q θ H). T u is the transpose matrix of the input (δ) ele δ T ) T y is the transpose matrix of the output, and its value is equal to the transpose matrix of the state. a and b are the coefficient values ​​in the linearized state space, respectively.

[0017] As a preferred embodiment of the present invention, in step 100, the specific method for constructing the relationship model between the LQR control law and the PID control law for the pitch attitude of the UAV is as follows:

[0018] Establish the input relationship for longitudinal pitch attitude PID control:

[0019] δ ele =K p (θ cmd -θ)+K i ∫(θ cmd -θ)dt+K d ·q;

[0020] Extracting state variables from the linear longitudinal state space of the UAV yields:

[0021] x = q, y = q, u = δ ele ;

[0022] We can obtain:

[0023] x = a 33 q+b3δ ele ;

[0024] Extending the extracted state variables, the angular deviation e = θ cmd -θ, the integral of the deviation ∫edt is regarded as state x1, the angular deviation e is regarded as state x2, and together with the extracted state q, they form a new state space;

[0025] because θ cmd Treating it as a constant, the expanded state space is described as follows:

[0026]

[0027] The state space can be simplified as follows:

[0028]

[0029] Using the LQR algorithm, the feedback form is u = -Kx. Since the extended state variables are:

[0030] x=[∫edt eq] T ;

[0031] but:

[0032]

[0033] Among them, K i =-K1,K p =-K2,K d =-K3.

[0034] As a preferred embodiment of the present invention, in step 200, the scoring model includes a rise time scoring model of the step response, an overshoot scoring model, a magnitude margin scoring model of the system, a phase margin scoring model of the system, and a delay margin scoring model of the system.

[0035] Among them, the rise time scoring model and overshoot scoring model of the step response are time-domain scoring models, while the gain margin scoring model, phase margin scoring model, and delay margin scoring model of the system are frequency-domain scoring models.

[0036] As a preferred embodiment of the present invention, in step 200, the total performance score is specifically as follows:

[0037]

[0038] Among them, Score sum Score is the overall performance score. rimetime The rise time of the step response is scored. The gain margin score of the system, The phase margin score of the system. The Score is the system's delay margin score. overshoot The score is for overshoot.

[0039] As a preferred embodiment of the present invention, in step 200, the black-box model specifically comprises:

[0040] Score sum = f(Q,R);

[0041] Where f is a black-box function, Q and R are the input weights of the LQR control law, and Score sum This is the output of the black-box function, and the overall performance score.

[0042] In a preferred embodiment of the present invention, in step 300, the parameter tuning history specifically includes:

[0043] Γ((Q 1:k ,R 1:k ),H 1:k );

[0044] The specific method for establishing the proxy model is as follows:

[0045] Using Gaussian process regression with Bayesian optimization algorithm, the objective function is estimated as follows:

[0046] Score sum ~GP(m(x),k(x,x) * ));

[0047] Where m(x) is the mean function of the Gaussian process, and x is the current sampling point, i.e., x = [Q, R]; k(x, x * ) for different sampling points x and x * The covariance function between them.

[0048] In a preferred embodiment of the present invention, in step 400, the desired improvement is used as the acquisition function for Bayesian optimization, and the point that maximizes the desired improvement is selected at each optimization step, specifically:

[0049]

[0050] Where, μ(x) * ) is the new sampling point x * The predicted mean (given by the Gaussian process model), σ(x) * ) is the new sampling point x * The predicted standard deviation (given by the Gaussian process model), Let Φ(·) be the optimal performance total score obtained from the currently sampled points, where Φ(·) is the cumulative distribution function of the standard normal distribution and Θ(·) is the probability density function of the standard normal distribution.

[0051] Compared with the prior art, the present invention has the following beneficial effects:

[0052] This invention transforms LQR state feedback into PID control, uses LQR to design PID parameters, analyzes the obtained parameters in the time and frequency domains, proposes a scoring standard, and uses a Bayesian optimization algorithm to iteratively obtain the set of parameters with the highest score as the final parameters. This can effectively reduce the dependence of the design control parameters on experience and achieve excellent control performance. Attached Figure Description

[0053] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0054] Figure 1 A flowchart illustrating the LQR-based self-tuning method for UAV longitudinal attitude PID parameters provided in this embodiment of the invention;

[0055] Figure 2 A schematic diagram of the rise time score of the LQR-based UAV longitudinal attitude PID parameter self-tuning method provided in an embodiment of the present invention;

[0056] Figure 3 A schematic diagram of the overshoot score of the LQR-based UAV longitudinal attitude PID parameter self-tuning method provided in an embodiment of the present invention;

[0057] Figure 4A schematic diagram of the gain margin score for the LQR-based UAV longitudinal attitude PID parameter self-tuning method provided in this embodiment of the invention;

[0058] Figure 5 A schematic diagram of the phase margin score for the LQR-based UAV longitudinal attitude PID parameter self-tuning method provided in this embodiment of the invention;

[0059] Figure 6 A schematic diagram of the time margin score for the LQR-based UAV longitudinal attitude PID parameter self-tuning method provided in this embodiment of the invention;

[0060] Figure 7 The parameter score diagram is provided for the LQR-based UAV longitudinal attitude PID parameter self-tuning method in an embodiment of the present invention. Detailed Implementation

[0061] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0062] like Figure 1 As shown, this invention provides a method for self-tuning PID parameters of UAV longitudinal attitude based on LQR, comprising the following steps:

[0063] Step 100: Using the steady, sideslip-free flight of the UAV as the reference motion, after balancing and linearizing the operating points of the UAV to obtain the longitudinal state space model, the relationship model between the LQR control law and the PID control law of the UAV pitch attitude is constructed using the longitudinal state space model.

[0064] Step 200: Divide the control effect of the PID control law into the time domain and frequency domain. After establishing the scoring model of each parameter in the time domain and frequency domain, use the total performance score of each parameter in the time domain and frequency domain as the index describing the control effect of the PID control law. Then, establish a relationship between the weight of the LQR control law and the total performance score to construct a black box model describing the relationship between the weight and the total performance score.

[0065] Step 300: Establish a proxy model using the known weights and total performance score as the parameter tuning history. Select the weights of multiple LQR control laws using the Monte Carlo random shooting method. Calculate the total performance score based on the black box model and update the proxy model accordingly.

[0066] Step 400: Based on the Bayesian optimization method, derive the acquisition function according to the surrogate model to obtain the adjusted weights and calculate the total performance score. Set a maximum number of iterations and a performance score that meets the requirements. Select the next weight as a new observation point according to the acquisition function and add it to the parameter tuning history for iterative calculation. When the number of iterations is greater than the set maximum number of iterations or the performance score is greater than the set performance score that meets the requirements, the iterative calculation ends. After selecting the weight with the highest performance score, use the relational model to obtain the parameters of the PID control law that matches this weight as the pitch attitude loop PID parameters after optimization tuning.

[0067] The LQR-based self-tuning method for UAV longitudinal attitude PID parameters of this invention mainly utilizes the UAV's longitudinal state-space model to construct a relationship model between the LQR control law and the PID control law for the UAV's pitch attitude, and establishes scoring models for each parameter in the time and frequency domains of the PID control law. This allows for the construction of a black-box model describing the relationship between the weights of the LQR control law and the total performance score. After establishing a surrogate model using the parameter tuning history, the surrogate model is updated using the black-box model. The acquisition function is derived from the surrogate model to obtain the adjusted weights, and the total performance score is calculated iteratively. A maximum number of iterations and a required total performance score are set. The iterative calculation ends when the number of iterations exceeds the set maximum number of iterations or the total performance score exceeds the set required total performance score. After selecting the weight of the highest total performance score, the parameters of the PID control law matching this weight are obtained using the relationship model as the optimized pitch attitude loop PID parameters.

[0068] Based on this, the present invention transforms the LQR state feedback of the UAV pitch attitude into the form of PID, uses LQR to design PID parameters, analyzes the obtained parameters through time and frequency domains, and proposes a scoring standard. The Bayesian optimization algorithm is used to iteratively obtain the set of parameters with the highest score as the final parameters, which can effectively reduce the dependence of the design control parameters on experience and obtain excellent control effect. Therefore, there is no need to manually tune the PID parameters based on experience, and the tuning is more accurate.

[0069] In step 100, the specific method for obtaining the UAV's longitudinal state space model is as follows:

[0070] Using steady, sideslip-free flight of the UAV as the baseline motion, a linear longitudinal state-space model of the UAV can be obtained using the small perturbation method:

[0071]

[0072] y = Cx + Du;

[0073] in, C is the identity matrix, D is 0, and x is the transpose matrix of the state variables (V α q θ H).T u is the transpose matrix of the input (δ) ele δ T ) T y is the transpose matrix of the output, which is equal to the transpose matrix of the state, and a and b are the coefficients in the linearized state space, respectively.

[0074] Based on the linear longitudinal state-space model, in step 100, the specific method for constructing the relationship model between the LQR control law and the PID control law for the UAV pitch attitude is as follows:

[0075] Establish the input relationship for longitudinal pitch attitude PID control:

[0076] δ ele =K p (θ cmd -θ)+K i ∫(θ cmd -θ)dt+K d ·q;

[0077] Extracting state variables from the linear longitudinal state space of the UAV yields:

[0078] x = q, y = q, u = δ ele ;

[0079] We can obtain:

[0080] x = a 33 q+b3δ ele ;

[0081] Extending the extracted state variables, the angular deviation e = θ cmd -θ, the integral of the deviation ∫edt is regarded as state x1, the angular deviation e is regarded as state x2, and together with the extracted state q, they form a new state space;

[0082] because θ cmd Treating it as a constant, the expanded state space is described as follows:

[0083]

[0084] The state space can be simplified as follows:

[0085]

[0086] Using the LQR algorithm, the feedback form is u = -Kx. Since the extended state variables are:

[0087] x=[∫edt eq] T ;

[0088] but:

[0089]

[0090] Among them, K i =-K1,K p =-K2,K d =-K3;

[0091] This transforms the state-space LQR into a problem of adjusting the PID parameters of the UAV's pitch attitude.

[0092] Using LQR optimization theory, the performance index function is selected as follows:

[0093]

[0094] Known state space And select appropriate state weight matrix Q and input weight matrix R, and substitute them into the Riccati equation:

[0095]

[0096] Solving for P, we can ultimately obtain the optimal control strategy:

[0097]

[0098] Of course, a relationship model between the PD control law, the longitudinal statically unstable control law, and the LQR control law can also be established. Specific examples are provided below.

[0099] Establish the input relationship of the longitudinal pitch attitude PD control law:

[0100] δ ele =K p (θ cmd -θ)+K d ·q;

[0101] The design of the pitch attitude PD control law for the UAV is similar to that of the aforementioned PID control law; only the integral term of the described state space needs to be simplified. The simplified state space can be described as follows:

[0102]

[0103] The LQR technique, which also employs state feedback, is used, with the feedback format as follows: Simplified state:

[0104] x = [eq] T ;

[0105] but:

[0106]

[0107] Where K p=-K1,K d =-K2. In this way, LQR is transformed into pitch attitude PD control.

[0108] Establish the input relationship for the longitudinal static instability control law of longitudinal pitch attitude:

[0109] δ ele =K p (θ cmd -θ)+K d ·q+K nz nz;

[0110] For aircraft with relaxed static stability, under certain flight conditions, the aircraft is statically unstable. Therefore, a stability augmentation system is needed to improve the aircraft's static stability, transforming it from statically unstable to statically stable. For the aircraft's longitudinal direction, static stability can be improved by feeding back signals of the aircraft's angle of attack or overload. mα It is the pitch moment coefficient C m The derivative with respect to the angle of attack α is called the static stability derivative, when C mα When <0, the aircraft is statically stable, C mα When the angle of attack is greater than 0, the aircraft is statically unstable. Feedback on the aircraft's angle of attack: δ ele =L α • α, without considering the dynamic derivative, the pitching moment coefficient:

[0111]

[0112] Elevator angle of attack feedback δ ele =L α Substituting α, the above equation becomes: but Therefore, L can be adjusted. α The size of C makes mα A value less than 0 makes the aircraft change from statically unstable to statically stable. In practical engineering, angle-of-attack information cannot be accurately obtained, but overload can be converted into angle of attack; therefore, feedback overload signals can also achieve a stabilization effect. The conversion relationship between overload and angle of attack is shown below:

[0113]

[0114] For LQR-based designs of relaxed static stability control laws, the parameters can be designed first using the angle of attack α, and then the above formula can be used to convert them into overload commands for verification.

[0115] Extracting the state (q, α) from the aforementioned state space, and expanding the angular deviation e as state x1, and the pitch rate q and angle of attack α as states x2 and x3 respectively, we obtain the state space:

[0116]

[0117] Its state variable x = [eq α] T Using LQR for full-state feedback, we can obtain:

[0118]

[0119] Among them, K p =-K1,K d =-K2,K α =-K3. Since the feedback at this point is the angle of attack used to improve the aircraft's static instability.

[0120]

[0121] Therefore, the LQR feedback for angle of attack was transformed into LQR feedback for overload.

[0122] As shown in the figure, according to LQR, by selecting appropriate Q and R weight matrices, a set of pitch angle attitude PID / PD / statically unstable state control parameters can be obtained. The generated parameters are then substituted into the state space to observe their control effect. Since only the aircraft pitch angle attitude control is considered, the effects of speed and altitude are ignored; only the controller's control effect on the aircraft state is considered, and the servo transfer function is connected in series before inputting into the state space.

[0123] For linear controllers like PID controllers, the evaluation criteria for their control performance are divided into two parts: time domain and frequency domain. For the attitude inner loop of a UAV, the time domain indicators mainly focus on the rise time, settling time, and steady-state error of the step response; the frequency domain mainly includes the system's gain margin, phase margin, delay margin, and closed-loop bandwidth.

[0124] A scoring mechanism is established to score the performance indicators of high concern in the system's time and frequency domains based on their actual performance. The four most concerned performance indicators—rise time, gain margin, phase margin, and delay margin—are scored. Let the performance indicators required for the inner-loop attitude loop of a certain UAV be:

[0125] Rise time: t1≤t≤t2;

[0126] Overshoot: tp≤v;

[0127] Gain margin: G m ≥kdB;

[0128] Phase margin: P m ≥m°;

[0129] Delay margin: T m ≥s times the control cycle;

[0130] like Figure 2As shown, the rise time is a range of t1 to t2. A rise time t < t1 indicates an excessively fast response, potentially causing the UAV to diverge due to excessive angular velocity; t > t2 indicates an excessively slow attitude loop response, making it difficult to design external loop components. Within a reasonable time range, a faster response is considered better. A linear function is used as the scoring standard for rise time, with a maximum score of 1 point. A rise time of t1 receives a full score of 1 point, a rise time of t2 is considered passing (0.6 points), and other ranges receive no points. The rise time scoring function is shown below:

[0131]

[0132] like Figure 3 As shown, regarding overshoot, the smaller the better, while still meeting the requirements. Similarly, a linear function is used as the scoring criterion.

[0133]

[0134] Regarding the performance metrics of margin, the larger the better, provided that the requirements are met. An exponential function is used as the scoring standard for margin. When it is less than the minimum margin, the score is 0; when it is equal to the minimum margin standard, the score is 0.6; and as the margin increases, the score gradually approaches 1.

[0135] like Figure 4 As shown, the amplitude margin scoring formula and scoring curve are as follows, where e is a natural number and a1 is an adjustment coefficient. The larger the number, the more volatile the curve.

[0136]

[0137] like Figure 5 As shown, the phase margin scoring formula and scoring curve are as follows, where a2 is the phase margin adjustment coefficient.

[0138]

[0139] like Figure 6 As shown, the time margin scoring formula and scoring curve are as follows, where a3 is the time margin adjustment coefficient.

[0140]

[0141] With the PID parameters fixed, the scores for each performance indicator can be obtained through step 200. Adding the scores of each performance indicator together yields the total performance score.

[0142]

[0143] A higher total score indicates better controller performance for that parameter. The total score is used as a standard to judge the design quality of PID parameters.

[0144] From using LQR to design parameters to finally calculating the performance score of PID parameters, a series of transformations are involved. It is difficult to express the entire transformation using formulas. The process from initializing the weight coefficients Q and R to obtaining the performance score can be regarded as a "black box". The Bayesian optimization algorithm is used to find the Q and R weights corresponding to the maximum performance score, and the "optimal" PID parameters are obtained based on these weight coefficients.

[0145] Bayesian optimization is an algorithm for finding the optimal value of a "black box" function. It uses the performance of previously searched parameters to predict the next observation point, thereby reducing the search space and improving search efficiency. Let the black box function be f, and its expression is as follows:

[0146] Score sum = f(Q,R);

[0147] Its input is the Q and R weight matrices, and its output is the performance score. sum .

[0148] The steps of Bayesian optimization are as follows:

[0149] Based on existing parameter tuning history Γ((Q 1:k ,R 1:k ),H 1:k Establish an agent model;

[0150] Based on the retrieved function, select the next parameter (Q). k+1 ,R k+1 );

[0151] The newly observed point (Q) k+1 ,R k+1 ), add to Γ;

[0152] The process is repeated until the maximum number of iterations is reached or a satisfactory performance score S is obtained. des ;

[0153] Set a maximum number of iterations n and a satisfactory total score S. des When the number of iterations is greater than n or the total performance score is Score sum >S des Then the iterative calculation ends, and the control parameter of the highest-scoring item in the final iteration is used as the optimized pitch attitude loop PID parameter.

[0154] like Figure 7 As shown, using a linearized model of a certain UAV, Bayesian optimization was used to obtain the pitch angle step response, open-loop Bode plot, closed-loop Bode plot, and scores of various performance indicators corresponding to the parameters obtained from 50 different Q and R matrices.

[0155] The above embodiments are merely exemplary embodiments of this application and are not intended to limit this application. The scope of protection of this application is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to this application within its substance and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of this application.

Claims

1. A method for self-tuning PID parameters of longitudinal attitude of an unmanned aerial vehicle based on LQR, characterized in that, Includes the following steps: Step 100: Using the steady, sideslip-free flight of the UAV as the reference motion, after balancing and linearizing the operating points of the UAV to obtain the longitudinal state space model, the relationship model between the LQR control law and the PID control law of the UAV pitch attitude is constructed using the longitudinal state space model. Step 200: Divide the control effect of the PID control law into the time domain and frequency domain. After establishing the scoring model of each parameter in the time domain and frequency domain, use the total performance score of each parameter in the time domain and frequency domain as the index describing the control effect of the PID control law. Then, establish a relationship between the weight of the LQR control law and the total performance score to construct a black box model describing the relationship between the weight and the total performance score. Step 300: Establish a proxy model using the known weights and total performance score as the parameter tuning history. Select the weights of multiple LQR control laws using the Monte Carlo random shooting method. Calculate the total performance score based on the black box model and update the proxy model accordingly. Step 400: Based on the Bayesian optimization method, derive the acquisition function according to the surrogate model to obtain the adjusted weights and calculate the total performance score. Set a maximum number of iterations and a performance score that meets the requirements. Select the next weight as a new observation point according to the acquisition function and add it to the parameter tuning history for iterative calculation. When the number of iterations is greater than the set maximum number of iterations or the performance score is greater than the set performance score that meets the requirements, end the iterative calculation. After selecting the weight with the highest performance score, use the relational model to obtain the parameters of the PID control law that matches this weight as the pitch attitude loop PID parameters after optimization tuning. In step 200, the overall performance score is as follows: Among them, Score sum Score is the overall performance score. rimetime The rise time of the step response is scored. The gain margin score of the system, The phase margin score of the system, The Score is the system's delay margin score. overshoot The score is for overshoot.

2. The method for self-tuning PID parameters of UAV longitudinal attitude based on LQR according to claim 1, characterized in that, In step 100, the specific method for obtaining the UAV's longitudinal state space model is as follows: Using steady, sideslip-free flight of the UAV as the baseline motion, a linear longitudinal state-space model of the UAV can be obtained using the small perturbation method: y = Cx + Du; in, C is the identity matrix, D is 0, and x is the transpose matrix of the state variables (V α q θ H). T u is the transpose matrix of the input (δ) ele δ T ) T y is the transpose matrix of the output, and its value is equal to the transpose matrix of the state. a and b are the coefficient values ​​in the linearized state space, respectively. Where α is the angle of attack and q is the pitch rate.

3. The method for self-tuning PID parameters of UAV longitudinal attitude based on LQR according to claim 2, characterized in that, In step 100, the specific method for constructing the relationship model between the LQR control law and the PID control law for the UAV pitch attitude is as follows: Establish the input relationship for longitudinal pitch attitude PID control: δ ele =K p (θ cmd -θ)+K i ∫(θ cmd -θ)dt+K d ·q; Extracting state variables from the linear longitudinal state space of the UAV yields: x=q,y=q,u=δ ele ; We can obtain: x=a 33 q+b3δ ele ; Extending the extracted state variables, the angular deviation e = θ cmd -θ, the integral of the deviation ∫edt is regarded as state x1, the angular deviation e is regarded as state x2, and together with the extracted state q, they form a new state space; because θ cmd Treating it as a constant, the expanded state space is described as follows: The state space can be simplified as follows: Using the LQR algorithm, the feedback form is u = -Kx. Since the extended state variables are: x=[∫edt e q] T ; but: Among them, K i =-K1,K p =-K2,K d =-K3.

4. The method for self-tuning PID parameters of UAV longitudinal attitude based on LQR according to claim 3, characterized in that, In step 200, the scoring model includes the rise time scoring model of the step response, the overshoot scoring model, the gain margin scoring model of the system, the phase margin scoring model of the system, and the delay margin scoring model of the system. Among them, the rise time scoring model and overshoot scoring model of the step response are time-domain scoring models, while the gain margin scoring model, phase margin scoring model, and delay margin scoring model of the system are frequency-domain scoring models.

5. The method for self-tuning PID parameters of UAV longitudinal attitude based on LQR according to claim 4, characterized in that, In step 200, the black-box model specifically refers to: Score sum =f(Q,R); Where f is a black-box function, Q and R are the input weights of the LQR control law, and Score sum This is the output of the black-box function, and the overall performance score.

6. The method for self-tuning PID parameters of UAV longitudinal attitude based on LQR according to claim 5, characterized in that, In step 300, the parameter tuning history is as follows: Γ((Q 1:k ,R 1:k ),H 1:k ); The specific method for establishing the proxy model is as follows: Using Gaussian process regression with Bayesian optimization algorithm, the objective function is estimated as follows: Score sum ~GP(m(x),k(x,x * )); Where m(x) is the mean function of the Gaussian process, x is the sampling point, x = [Q, R], k(x, x * ) for different sampling points x and x * The covariance function between them.

7. The method for self-tuning PID parameters of UAV longitudinal attitude based on LQR according to claim 6, characterized in that, In step 400, the desired improvement is used as the acquisition function for Bayesian optimization. At each optimization step, the point that maximizes the desired improvement is selected, specifically: Where, μ(x) * ) is the new sampling point x * The predicted mean (given by the Gaussian process model), σ(x) * ) is the new sampling point x * The standard deviation of the prediction Let Φ(·) be the optimal performance total score obtained from the currently sampled points, where Φ(·) is the cumulative distribution function of the standard normal distribution and Θ(·) is the probability density function of the standard normal distribution.

Citation Information

Patent Citations

  • PID and LQR compound control method for semi-active suspension

    CN116373524A

  • System and Method for Clutch Pressure Control

    US20160069402A1