PID controller optimization method and system based on LESO, and storage medium

By introducing an extended observer (LESO) into the gimbal angular velocity loop, the total system disturbance is estimated and compensated, and the PID controller is optimized. This solves the problems of weak anti-disturbance capability and cumbersome parameter tuning in traditional gimbal control systems, and achieves more efficient gimbal control.

CN120993716AActive Publication Date: 2025-11-21SIYI TECH (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511542335.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2025-11-21
Estimated Expiration
2045-10-27

AI Technical Summary

Technical Problem

Traditional PTZ control systems have weak anti-disturbance capabilities, cumbersome parameter tuning, and high risk of noise amplification, making it difficult to meet control requirements under complex working conditions.

Method used

An extended observer (LESO) is introduced into the gimbal angular velocity loop to optimize the parameter settings of the PID controller by estimating and compensating for the total system disturbance.

Benefits of technology

It improves the gimbal's anti-disturbance capability, simplifies the parameter tuning process, reduces angular velocity overshoot and steady-state fluctuations, and enhances the response speed and stability of the control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120993716A_ABST
    Figure CN120993716A_ABST
Patent Text Reader

Abstract

The invention provides a PID controller optimization method and system based on LESO, and a storage medium. The method comprises the following steps: initializing parameters of a speed loop PID controller and an expansion observer; gyroscope data and a magnetic encoder angle are obtained and decoupled to serve as feedback values of a speed loop PID controller, and output of a position loop PID controller serves as expectation of the speed loop PID controller; subtracting the expectation of the speed loop PID controller from the feedback value to obtain the error of the speed loop PID controller, and calculating the output of the speed loop PID controller according to the error; the feedback value of the speed loop PID controller and the input of the controlled object are used as the input of the expansion observer, and the total interference of the system is calculated; and calculating a correction value of the expansion observer according to the total interference of the system, and subtracting the output of the speed loop PID controller from the correction value of the expansion observer to obtain the final input of the controlled object. According to the invention, the LESO is introduced into the angular velocity ring of the holder, so that disturbance estimation and compensation are realized, and the control performance of the holder under a complex working condition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automation control technology, specifically to a PID controller optimization method, system, and storage medium based on LESO. Background Technology

[0002] With the increasing demands for gimbal stability in fields such as aerial surveying, security monitoring, and industrial inspection, the dynamic response speed, disturbance rejection capability, and latency adaptability of the gimbal's angular velocity loop have become core technical indicators. Currently, gimbal control systems generally employ traditional PID (proportional-integral-derivative) controllers to achieve closed-loop angular velocity control. These controllers adjust the response speed through the proportional element, eliminate steady-state error through the integral element, and suppress overshoot through the derivative element, thus meeting basic control requirements in scenarios with stable loads and low interference.

[0003] The most commonly used control scheme for the gimbal's angular velocity loop is the traditional three-level PID closed-loop control, specifically implemented as follows: It employs a three-level closed-loop architecture of "position loop - angular velocity loop - current loop," where the angular velocity loop is the core control layer. Using a classic PID algorithm, it receives the angular velocity setpoint from the position loop and outputs a current command to the current loop, ultimately driving the motor to adjust the gimbal's attitude. However, the traditional three-level PID closed-loop control scheme has the following core drawbacks: 1. Weak anti-disturbance capability: It only suppresses slow disturbances through integral elements, and has poor suppression effect on dynamic load changes and mechanical vibrations. 2. Cumbersome parameter tuning: K p (proportionality coefficient), K i (Integral coefficient), K d (Differential coefficients) exhibit coupling relationships (e.g., increasing K). p Improved response speed but prone to overshoot, requiring simultaneous adjustment of K. d It relies on engineers' experience for repeated testing, and the tuning process is time-consuming and difficult to adapt to different load conditions. 3. Noise amplification risk: The differentiating element is sensitive to high-frequency noise, which can easily cause fluctuations in the control output. An additional filtering element is required, which further increases the system delay. Summary of the Invention

[0004] To address the aforementioned technical issues, this application proposes a PID controller optimization method, system, and storage medium based on LESO. By introducing LESO into the angular velocity loop of the gimbal, disturbance estimation and compensation are achieved, thereby improving the control performance of the gimbal under complex operating conditions.

[0005] According to a first aspect of this application, a PID controller optimization method based on LESO is proposed, comprising: Initialize the parameters of the speed loop PID controller and the extended observer according to the given parameters; The gyroscope data and magnetic encoder angle are acquired and decoupled from the gimbal, then used as the feedback value for the speed loop PID controller. y The output of the position loop PID controller is used as the expected value of the speed loop PID controller. v ; Expectations for the speed loop PID controller v With feedback value y The error of the speed loop PID controller is obtained by performing difference calculation. e 1. Based on the error of the speed loop PID controller e 1. Calculate the output of the speed loop PID controller. O ; The feedback value of the speed loop PID controller y Input of the controlled object u The total system disturbance is calculated as input to the extended observer. f ; Based on the total system interference f The correction value of the extended observer is calculated. C The output of the speed loop PID controller O With the correction value of the extended observer C Perform difference calculation to obtain the final input of the controlled object at the current moment. u k .

[0006] Preferably, the parameter initialization process of the speed loop PID controller includes: The parameters of the speed loop PID controller are calculated using a trial-and-error method. These parameters include the proportional gain. K p Integral coefficient K i and differential coefficients K d .

[0007] Preferably, the parameter initialization process of the extended observer includes: The model for the extended observer is: in, e 2 represents the error of the extended observer. Feedback value of the speed loop PID controller y The estimate, Total system interference f The estimate, , They are respectively , The prior value, , They are respectively , The first derivative, b 0 β1 and β2 are the parameters of the extended observer. b 0 The formulas for calculating β1 and β2, obtained from the inherent parameters of the controlled object, are as follows: in, To expand the bandwidth of the observer.

[0008] Preferably, the gyroscope data and magnetic encoder angle are obtained and then decoupled by the gimbal as the feedback value of the speed loop PID controller. y ,include: The feedback values ​​of the speed loop PID controllers on the pitch axis motor, roll axis motor, and yaw axis motor of the gimbal are calculated according to the following formulas. y : in, y pitch , y roll , y yaw These are the feedback values ​​from the speed loop PID controllers on the pitch axis motor, roll axis motor, and yaw axis motor, respectively. g x , g y , g z These are the data for the x, y, and z axes of the gyroscope, respectively, and α and β are the pitch and roll angles of the magnetic encoder, respectively.

[0009] Preferably, the step of adjusting the speed loop PID controller based on the error... e 1. Calculate the output of the speed loop PID controller. O ,include: The output of the speed loop PID controller is calculated according to the following formula. O : in, k This refers to the current moment.

[0010] Preferably, the feedback value of the speed loop PID controller is... y Input of the controlled object u The total system disturbance is calculated as input to the extended observer. f ,include: The feedback value of the speed loop PID controller y Input of the controlled object at a previous time step u k-n The output of the extended observer is calculated using the input of the extended observer. and Thus, the total system disturbance can be estimated. f ,in, k For the current moment, n This represents the system's delay time.

[0011] Preferably, the step is based on the total interference of the system. f The correction value of the extended observer is calculated. C ,include: The correction value of the extended observer is calculated according to the following formula. C : in, r This is the total interference compensation gain parameter, with a value ranging from 0 to 1, used to adjust the total interference of the system. f The compensation ratio.

[0012] According to a second aspect of this application, a PID controller optimization system based on LESO is proposed, comprising: The initialization unit configures parameters for initializing the speed loop PID controller and the extended observer based on given parameters. The decoupling unit is configured to acquire gyroscope data and magnetic encoder angles, which, after decoupling via the gimbal, serve as the feedback value for the speed loop PID controller. y The output of the position loop PID controller is used as the expected value of the speed loop PID controller. v ; The initial output unit is configured for the desired output of the speed loop PID controller. v With feedback value y The error of the speed loop PID controller is obtained by performing difference calculation. e 1. Based on the error of the speed loop PID controller e 1. Calculate the output of the speed loop PID controller. O ; The interference calculation unit is configured to process the feedback value of the speed loop PID controller. y Input of the controlled object u The total system disturbance is calculated as input to the extended observer. f ; Correction unit, configured to adjust according to the total interference of the system f The correction value of the extended observer is calculated.C The output of the speed loop PID controller O With the correction value of the extended observer C Perform difference calculation to obtain the final input of the controlled object at the current moment. u k .

[0013] According to a third aspect of this application, an electronic device is proposed, comprising: one or more processors; and a memory for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the LESO-based PID controller optimization method provided in any embodiment of the first aspect above.

[0014] According to a fourth aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the LESO-based PID controller optimization method provided in any of the embodiments of the first aspect above.

[0015] This application proposes a PID controller optimization method, system, and storage medium based on LESO. By introducing a LESO extended observer into the gimbal angular velocity loop to estimate the total system disturbance, and then performing correction compensation at the output, the disturbance rejection capability of the gimbal angular velocity loop is improved. This effectively suppresses unmodeled disturbances such as dynamic load changes and mechanical vibrations, reduces angular velocity overshoot and steady-state fluctuations, and simplifies the controller parameter tuning process, reduces parameter coupling, and shortens the tuning time. Attached Figure Description

[0016] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments and, together with the description, serve to explain the principles of the invention. Other embodiments and many anticipated advantages of the embodiments will be readily recognized as they become better understood through reference to the following detailed description. Elements in the drawings are not necessarily to scale. The same reference numerals refer to corresponding similar parts.

[0017] Figure 1 This is a flowchart of a PID controller optimization method based on LESO according to a specific embodiment of this application; Figure 2 This is a schematic diagram of a PID controller optimization system based on LESO according to a specific embodiment of this application; Figure 3 This is a schematic diagram of an electronic device according to a specific embodiment of the present application. Detailed Implementation

[0018] The features and exemplary embodiments of various aspects of the present invention will now be described in detail. To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the invention.

[0019] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0020] This application proposes a PID controller optimization method, system, and storage medium based on LESO. Figure 1 A flowchart of a LESO-based PID controller optimization method according to a specific embodiment of this application is shown, as follows: Figure 1 As shown, the method includes the following steps: Step S101: Initialize the parameters of the speed loop PID controller and the extended observer according to the given parameters.

[0021] In one specific embodiment, the parameters of the speed loop PID controller include a proportional gain. K p Integral coefficient K i and differential coefficients K d The parameters of the speed loop PID controller are calculated by trial and error.

[0022] In one specific embodiment, the parameters of the extended observer include b 0 β1 and β2, the parameters will be explained in detail below. b 0 The initialization process of β1 and β2.

[0023] Assume the system model of the input and output of the controlled object is as follows: in, Feedback value of the speed loop PID controller y First derivative ,f Let b be the total system disturbance, and b be the inherent parameter of the controlled object. u For the input of the controlled object.

[0024] The model for the extended observer is: in, e 2 represents the error of the extended observer. Feedback value of the speed loop PID controller y The estimate, Total system interference f The estimate, , They are respectively , The prior value, , They are respectively , The first derivative, b 0 β1 and β2 are the parameters of the extended observer.

[0025] In the system model of the input and output of the controlled object, due to b It cannot be measured precisely, therefore... b Depend on b Replace with 0, and the error is incorporated into the total system disturbance. f From this, we can obtain: β1 and β2 can be calculated using the bandwidth method, and the specific calculation formula is as follows: in, To expand the bandwidth of the observer, Generally, the bandwidth is taken as 10 times that of the speed loop.

[0026] Step S102: Acquire gyroscope data and magnetic encoder angle, and use them as feedback values ​​for the speed loop PID controller after decoupling by the gimbal. y The output of the position loop PID controller is used as the expected value of the speed loop controller. v .

[0027] In one specific embodiment, the gimbal includes a pitch axis motor, a roll axis motor, and a yaw axis motor, thus affecting the feedback value of the speed loop PID controller.y The calculation includes the feedback values ​​from the speed loop PID controllers on the pitch axis motor, roll axis motor, and yaw axis motor. The specific calculation formula is as follows: in, y pitch , y roll , y yaw These are the feedback values ​​from the speed loop PID controllers on the pitch axis motor, roll axis motor, and yaw axis motor, respectively. g x , g y , g z These are the data for the x, y, and z axes of the gyroscope, respectively, and α and β are the pitch and roll angles of the magnetic encoder, respectively.

[0028] Step S103: Expectations for the speed loop PID controller v With feedback value y Perform difference calculations to obtain the error of the speed loop PID controller. e 1. Based on the error of the speed loop PID controller e 1. Calculate the output of the speed loop PID controller O .

[0029] In one specific embodiment, the output of the speed loop PID controller O The calculation formula is as follows: in, k This refers to the current moment.

[0030] Step S104: Input the feedback value of the speed loop PID controller y Input of the controlled object u As input to the extended observer, the total system disturbance is calculated. f .

[0031] In one specific embodiment, the feedback value of the speed loop PID controller is... y Input of the controlled object at a previous time step u k-n The output of the extended observer is calculated using the input of the extended observer. and Substituting into the specific formula as follows: in, k For the current moment, n The approximate delay time of the system is... Feedback value of the speed loop PID controller y The estimate, Total system interference f The estimate.

[0032] Step S105: Based on the total system interference f The correction value for the extended observer is calculated. C The output of the speed loop PID controller O Correction values ​​with extended observer C Perform difference calculations to obtain the final input of the controlled object at the current moment. u k .

[0033] In one specific embodiment, the correction value of the extended observer is calculated according to the following formula. C : in, r This is the total interference compensation gain parameter, with a value ranging from 0 to 1, used to adjust the total interference of the system. f The compensation ratio.

[0034] In summary, the LESO-based PID controller optimization method proposed in this application improves the anti-disturbance capability of the gimbal angular velocity loop by introducing a LESO extended observer into the gimbal angular velocity loop to estimate the total system disturbance and then performing correction compensation at the output. This effectively suppresses unmodeled disturbances such as dynamic load changes and mechanical vibrations, reduces angular velocity overshoot and steady-state fluctuations, and simplifies the controller parameter tuning process, reduces parameter coupling, and shortens the tuning time.

[0035] Based on the above-described LESO-based PID controller optimization method, and based on the same inventive concept, this application also proposes a LESO-based PID controller optimization system. Figure 2 A schematic diagram of a LESO-based PID controller optimization system according to a specific embodiment of this application is shown, as follows: Figure 2 As shown, the system includes: Initialization unit 201 configures parameters for initializing the speed loop PID controller and the extended observer based on given parameters.

[0036] Decoupling unit 202 is configured to acquire gyroscope data and magnetic encoder angles, which are then decoupled from the gimbal and used as feedback values ​​for the speed loop PID controller. y The output of the position loop PID controller is used as the expected value of the speed loop controller. v .

[0037] Initial output unit 203, configured for the desired speed loop PID controllerv With feedback value y Perform difference calculations to obtain the error of the speed loop PID controller. e 1. Based on the error of the speed loop PID controller e 1. Calculate the output of the speed loop PID controller O .

[0038] Interference calculation unit 204, configured to process the feedback value of the speed loop PID controller y Input of the controlled object u As input to the extended observer, the total system disturbance is calculated. f .

[0039] Correction unit 205, configured to adjust according to the total system interference f The correction value for the extended observer is calculated. C The output of the speed loop PID controller O Correction values ​​with extended observer C Perform difference calculations to obtain the final input of the controlled object at the current moment. u k .

[0040] Based on the above-described LESO-based PID controller optimization method, and based on the same inventive concept, this application also proposes an electronic device.

[0041] Figure 3 A schematic diagram of an electronic device according to a specific embodiment of this application is shown, such as... Figure 3 As shown, the electronic device includes one or more processors 301, a memory 302, a bus 303, and a communication interface 304. The one or more processors 301, the memory 302, and the communication interface 304 are connected via the bus 303. The memory 302 stores one or more programs, which, when executed by one or more processors 301, cause the electronic device to implement the LESO-based PID controller optimization method provided in any of the above embodiments.

[0042] Based on the above-described LESO-based PID controller optimization method, and based on the same inventive concept, this application also proposes a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the LESO-based PID controller optimization method provided in any of the above embodiments.

[0043] In the embodiments of this application, it should be understood that the disclosed technical content can be implemented in other ways. The device / system / method embodiments described above are merely illustrative. For example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0044] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0045] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0046] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0047] It is evident that those skilled in the art can make various modifications and alterations to the embodiments of the present invention without departing from the spirit and scope of the invention. In this way, the invention is also intended to cover such modifications and alterations if they fall within the scope of the claims and their equivalents. The word "comprising" does not exclude the presence of other elements or steps not listed in the claims. The simple fact that certain measures are described in mutually different dependent claims does not indicate that a combination of these measures cannot be used for profit. Any reference numerals in the claims should not be considered as limiting the scope.

Claims

1. A PID controller optimization method based on LESO, characterized in that, include: Initialize the parameters of the speed loop PID controller and the extended observer according to the given parameters; The gyroscope data and magnetic encoder angle are acquired and decoupled from the gimbal, then used as the feedback value for the speed loop PID controller. y The output of the position loop PID controller is used as the expected value of the speed loop PID controller. v ; Expectations for the speed loop PID controller v With feedback value y The error of the speed loop PID controller is obtained by performing difference calculation. e 1. Based on the error of the speed loop PID controller e 1. Calculate the output of the speed loop PID controller. O ; The feedback value of the speed loop PID controller y Input of the controlled object u The total system disturbance is calculated as input to the extended observer. f ; Based on the total system interference f The correction value of the extended observer is calculated. C The output of the speed loop PID controller O With the correction value of the extended observer C Perform difference calculation to obtain the final input of the controlled object at the current moment. u k .

2. The method according to claim 1, characterized in that, The parameter initialization process of the speed loop PID controller includes: The parameters of the speed loop PID controller are calculated using a trial-and-error method. These parameters include the proportional gain. K p Integral coefficient K i and differential coefficients K d .

3. The method according to claim 1, characterized in that, The parameter initialization process for the extended observer includes: The model for the extended observer is: in, e 2 represents the error of the extended observer. Feedback value of the speed loop PID controller y The estimate, Total system interference f The estimate, , They are respectively , The prior value, , They are respectively , The first derivative, b 0 β1 and β2 are the parameters of the extended observer. b 0 The formulas for calculating β1 and β2, obtained from the inherent parameters of the controlled object, are as follows: in, To expand the bandwidth of the observer.

4. The method according to claim 1, characterized in that, The acquired gyroscope data and magnetic encoder angle, after being decoupled by the gimbal, are used as the feedback value of the speed loop PID controller. y ,include: The feedback values ​​of the speed loop PID controllers on the pitch axis motor, roll axis motor, and yaw axis motor of the gimbal are calculated according to the following formulas. y : in, y pitch , y roll , y yaw These are the feedback values ​​from the speed loop PID controllers on the pitch axis motor, roll axis motor, and yaw axis motor, respectively. g x , g y , g z These are the data for the x, y, and z axes of the gyroscope, respectively, and α and β are the pitch and roll angles of the magnetic encoder, respectively.

5. The method according to claim 2, characterized in that, The error based on the speed loop PID controller e 1. Calculate the output of the speed loop PID controller. O ,include: The output of the speed loop PID controller is calculated according to the following formula. O : in, k This refers to the current moment.

6. The method according to claim 3, characterized in that, The feedback value of the speed loop PID controller y Input of the controlled object u The total system disturbance is calculated as input to the extended observer. f ,include: The feedback value of the speed loop PID controller y Input of the controlled object at a previous time step u k-n The output of the extended observer is calculated using the input of the extended observer. and Thus, the total system disturbance can be estimated. f ,in, k For the current moment, n This represents the system's delay time.

7. The method according to claim 1, characterized in that, The total interference of the system f The correction value of the extended observer is calculated. C ,include: The correction value of the extended observer is calculated according to the following formula. C : in, r This is the total interference compensation gain parameter, with a value ranging from 0 to 1, used to adjust the total interference of the system. f The compensation ratio.

8. A PID controller optimization system based on LESO, characterized in that, include: The initialization unit configures parameters for initializing the speed loop PID controller and the extended observer based on given parameters. The decoupling unit is configured to acquire gyroscope data and magnetic encoder angles, which, after decoupling via the gimbal, serve as the feedback value for the speed loop PID controller. y The output of the position loop PID controller is used as the expected value of the speed loop PID controller. v ; The initial output unit is configured for the desired output of the speed loop PID controller. v With feedback value y The error of the speed loop PID controller is obtained by performing difference calculation. e 1. Based on the error of the speed loop PID controller e 1. Calculate the output of the speed loop PID controller. O ; The interference calculation unit is configured to process the feedback value of the speed loop PID controller. y Input of the controlled object u The total system disturbance is calculated as input to the extended observer. f ; Correction unit, configured to adjust according to the total interference of the system f The correction value of the extended observer is calculated. C The output of the speed loop PID controller O With the correction value of the extended observer C Perform difference calculation to obtain the final input of the controlled object at the current moment. u k .

9. An electronic device, characterized in that, include: One or more processors; A memory for storing one or more programs that, when executed by one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 7.

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

Citation Information

Patent Citations

  • Electro-hydraulic position servo control system, computer terminal and storage medium

    CN108958023A

  • Three-degree-of-freedom helicopter robust output feedback control method based on time-varying observer

    CN116679548A

  • Gyroscope stabilized platform sliding mode control method and device, storage medium and electronic equipment

    CN116819970A

  • Scaling and parameterizing a controller

    US20030199997A1