PID control device

By introducing observation error adjustment amount and scaling factor into the PID control system, the PID control coefficient is automatically adjusted, which solves the contradiction between control requirements in different tracking stages, reduces the complexity of parameter adjustment and improves control accuracy.

CN119472251APending Publication Date: 2025-02-18BEIJING GL MICROELECTRONICS TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411823517.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

It is difficult for existing PID control systems to take into account the needs of proportion, integral and differential control in different tracking stages, resulting in complexity and large workload of parameter adjustment.

Method used

On the basis of classic PID control, the observation error adjustment amount is increased, and the scaling factor is automatically generated based on the adjustment amount to achieve overall adjustment of the PID control coefficient.

Benefits of technology

By automatically adjusting the PID control coefficient, the system's parameter adjustment complexity and workload are reduced, while taking into account the improvement of tracking dynamic response and steady-state error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119472251A_ABST
    Figure CN119472251A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a PID (Proportion Integration Differentiation) control device, which comprises a PID control module, a scaling control module and a scaling execution module, the PID control module is used for outputting a first adjustment amount of the controlled system according to the current output error of the controlled system; the scaling control module is used for generating a scaling factor according to the current output error and the previous output error of the controlled system; and the scaling execution module is connected to the output ends of the PID control module and the scaling control module, and is used for adjusting the first adjustment amount according to the scaling factor to generate a second adjustment amount of the controlled system. According to the technical scheme provided by the embodiment of the invention, on the basis of classic PID control, an observation error adjustment amount is added, and a scaling factor is automatically generated according to the adjustment amount, so that the overall adjustment of the PID control coefficient is realized, and the parameter adjustment workload and complexity of the system are reduced while the control accuracy is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of PID control, and in particular to a PID control device. Background Art

[0002] The Proportional-Integral-Derivative Controller (hereinafter referred to as "PID") is a commonly used feedback control method and one of the most widely used closed-loop control methods. Each PID controller usually consists of three parts: proportional control (Proportional), integral control (Integral) and derivative control (Derivative). It has a simple structure, strong robustness and adaptability, and its adjustment rarely depends on the specific model of the system.

[0003] In the early stage of PID closed-loop tracking (the stage with large errors), it is hoped to have a larger proportional coefficient to improve the faster tracking response speed and a smaller integral coefficient; when the closed-loop tracking approaches the stable stage, it is hoped to have a smaller proportional coefficient to avoid large overshoot and oscillation, and a larger integral coefficient to quickly reduce the steady-state error. Therefore, the requirements for the three controls at different stages of PID closed-loop tracking are contradictory. If a PID system with a single coefficient is used, the requirements of different stages cannot be taken into account. At present, a nonlinear PID structure with multiple coefficient groups is generally used to solve this problem. According to the size of the error, different PID branch coefficients are used for closed-loop tracking at different tracking stages. However, this method requires the adjustment of multiple sets of coefficients, which increases the workload and complexity of the system parameter adjustment. Summary of the invention

[0004] Based on the above situation of the prior art, the purpose of an embodiment of the present invention is to provide a PID control device, which adds an observation error adjustment amount on the basis of classical PID control, and automatically generates a scaling factor according to the adjustment amount, thereby realizing the overall adjustment of the PID control coefficient.

[0005] To achieve the above object, according to one aspect of the present invention, a PID control device is provided, comprising a PID control module, a scaling control module and a scaling execution module;

[0006] The PID control module is used to output a first adjustment amount of the controlled system according to a current output error of the controlled system;

[0007] The scaling control module is used to generate a scaling factor according to a current output error and a previous output error of the controlled system;

[0008] The scaling execution module is connected to the output ends of the PID control module and the scaling control module, and is used to adjust the first adjustment amount according to the scaling factor to generate a second adjustment amount of the controlled system.

[0009] Furthermore, the scaling control module generates a scaling factor according to the current output error and the previous output error of the controlled system, including:

[0010] Generate an error difference according to the difference between the previous output error and the current output error;

[0011] adjusting the scaling factor according to the error difference and a sign of a previous output error;

[0012] The initial value of the scaling factor is 0.

[0013] Further, adjusting the scaling factor according to the error difference and the sign of the previous output error includes:

[0014] If the error difference has an opposite sign to the previous output error, then increase the value of the scaling factor;

[0015] If the error difference has the same sign as the previous output error, adjusting the scaling factor according to a comparison result of the first error absolute value and the second error absolute value;

[0016] The first error absolute value is the absolute value of the error difference, and the second error absolute value is the absolute value of the previous output error.

[0017] Further, adjusting the scaling factor according to a comparison result of the first error absolute value and the second error absolute value includes:

[0018] If dabs≤eabs / M, increase the value of the scaling factor;

[0019] If dabs≥eabs / N, then reduce the value of the scaling factor;

[0020] Wherein, dabs represents the first error absolute value, eabs represents the second error absolute value, M represents the first threshold, N represents the second threshold, M is greater than N, and M and N are positive integers.

[0021] Furthermore, the scaling execution module adjusts the first adjustment amount according to the scaling factor to generate a second adjustment amount of the controlled system, including using the following formula to determine the second adjustment amount:

[0022] A2=A1·2 sca

[0023] Wherein, A1 represents the first adjustment amount, A2 represents the second adjustment amount, and sca represents the scaling factor.

[0024] Furthermore, the zoom control module also includes a limit unit;

[0025] The limiting unit is used to limit the value of the scaling factor.

[0026] Furthermore, the zoom control module also includes a reset unit;

[0027] The resetting unit is used to reset the scaling control module when the absolute value of the second error is less than or equal to a reset threshold.

[0028] Furthermore, it also includes a control execution module;

[0029] The control execution module is connected to the output end of the scaling execution module, and is used to adjust the controlled system according to the second adjustment amount of the controlled system.

[0030] In summary, an embodiment of the present invention provides a PID control device, including a PID control module, a scaling control module and a scaling execution module; the PID control module is used to output a first adjustment amount of the controlled system according to the current output error of the controlled system; the scaling control module is used to generate a scaling factor according to the current output error and the previous output error of the controlled system; the scaling execution module is connected to the output ends of the PID control module and the scaling control module, and is used to adjust the first adjustment amount according to the scaling factor to generate a second adjustment amount of the controlled system. The technical solution provided by the embodiment of the present invention, on the basis of the classical PID control, adds an observation error adjustment amount, and automatically generates a scaling factor according to the adjustment amount, thereby realizing the overall adjustment of the PID control coefficient, without the need to set multiple sets of coefficients for each link of the PID control, thereby reducing the workload and complexity of the system parameter adjustment while ensuring the control accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is a classic structural diagram of a PID closed-loop control system;

[0032] Figure 2 Schematic diagram of the overall structure of the PID control device according to an embodiment of the present invention;

[0033] Figure 3 Schematic diagram of the circuit structure of the zoom control module provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.

[0035] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in one or more embodiments of the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in one or more embodiments of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.

[0036] Figure 1 The classic structure diagram of PID closed-loop control system is shown in Figure 1 As shown, the PID control system includes proportional control, integral control and derivative control.

[0037] Proportional control: used to respond to deviations instantly. Once a deviation occurs, the control system immediately takes control action, causing the control amount to change in the direction of reducing the deviation. The strength of the control action depends on the proportional control coefficient. The larger the proportional control coefficient, the stronger the control action, the faster the transition process, and the smaller the static deviation of the control process; however, it is also more likely to produce oscillations, destroying the stability of the system.

[0038] Integral control: used to eliminate static errors, but it will also reduce the response speed of the control system and increase the overshoot of the control system.

[0039] Differential control: used to prevent the change of deviation. Differential control is based on the change trend (speed of change) of the deviation. The faster the deviation changes, the greater the output of the differential control link. The introduction of the differential control link will help reduce overshoot, overcome oscillation, and stabilize the control system, which is particularly beneficial for high-order control systems. However, the differential control link is very sensitive to the noise of the input signal. For those control systems with large noise, the differential control link is generally not used, or the input signal is filtered before the differential control link takes effect.

[0040] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings. An embodiment of the present invention provides a PID control device, Figure 2 The overall structure diagram of the PID control device according to the embodiment of the present invention is shown in FIG. Figure 2 As shown, the PID control device includes a PID control module, a scaling control module and a scaling execution module.

[0041] The PID control module is used to output a first adjustment amount of the controlled system according to the current output error of the controlled system. The PID control module is, for example, Figure 1 The classic PID control module shown in can realize proportional control, integral control and differential control of the controlled object.

[0042] A scaling control module is used to generate a scaling factor according to a current output error and a previous output error of a controlled system. The scaling control module receives the current output error and the previous output error of the controlled system, and generates a scaling factor according to the current output error and the previous output error of the controlled system. The generated scaling factor is used to adjust the adjustment amount of the PID control module to adaptively track the output change of the controlled system. The scaling control module may include a register, a subtractor, a first absolute value operation module, a second absolute value operation module and a scaling module. The process of generating the scaling factor may include:

[0043] S202, generate an error difference value according to the difference between the previous output error and the current output error. The scaling control module obtains the current output error err_in and the previous output error rerr after two adjacent PID adjustments, and calculates the error difference derr and the absolute value of the error difference derr, wherein the error difference derr is calculated according to the following formula:

[0044] derr = rerr - err_in

[0045] The output error after each PID adjustment can be put into a register, and a subtractor can be used to calculate the error difference derr between the current output error err_in and the previous output error rerr. The error difference derr can be input into the second absolute value calculation module to obtain the absolute value dabs of the error difference derr, and the previous output error rerr can be input into the first absolute value calculation module to obtain the absolute value eabs of the previous output error rerr. The absolute value eabs of the previous output error rerr, the absolute value dabs of the error difference derr, the error difference derr and the previous output error rerr are all input into the scaling module to generate a scaling factor.

[0046] S204, adjusting the scaling factor according to the error difference and the sign of the previous output error. When the system is reset and starts working, the initial value of the scaling factor is 0, indicating no adjustment. The scaling factor can be adjusted according to the following steps:

[0047] S2041. If the error difference is opposite to the sign of the previous output error, increase the value of the scaling factor. When the sign of the error difference derr is opposite to the sign of the previous output error rerr, it means that the loop adjustment of the PID control module is too slow, the error is still increasing, the loop cannot be locked, and the adjustment speed needs to be accelerated. At this time, increase the value of the scaling factor, such as the scaling factor sca+1, that is, double the adjustment amount generated by the PID control module, thereby improving the tracking speed.

[0048] S2042. If the error difference has the same sign as the previous output error, the scaling factor is adjusted according to the comparison result of the first error absolute value and the second error absolute value. The first error absolute value is the absolute value of the error difference, and the second error absolute value is the absolute value of the previous output error. Let dabs represent the first error absolute value, eabs represent the second error absolute value, M represent the first threshold, N represent the second threshold, M is greater than N, and M and N are positive integers. The values ​​of M and N cannot be too close, otherwise it may cause the system to oscillate back and forth. Usually, M is greater than the value of N by more than 2. If the error difference derr has the same sign as the previous output error rerr, the scaling factor is adjusted according to the following rules:

[0049] If dabs≤eabs / M, increase the value of the scaling factor; if dabs≥eabs / N, decrease the value of the scaling factor. For example, the preferred values ​​are M=8, N=2. When dabs≤eabs / 8, it means that the loop tracking speed of the PID control module is slow, and the reduction in the error of one adjustment is less than 1 / 8 of the previous error. The adjustment speed can be accelerated, and the scaling factor sca+1 can be used, that is, the adjustment amount generated by the PID control module is doubled, thereby increasing the tracking speed; when dabs≥eabs / 2, it means that the loop tracking speed of the PID control module is very fast, and the error of one adjustment is reduced by more than 1 / 2, and overshoot is likely to occur. At this time, the adjustment speed should be reduced, and the scaling factor sca-1 can be used, that is, the adjustment amount generated by the PID control module is reduced by half, thereby reducing the tracking speed. When dabs is not within the above value range, the scaling factor is not adjusted.

[0050] A scaling execution module is connected to the output end of the PID control module and the scaling control module, and is used to adjust the first adjustment amount according to the scaling factor to generate a second adjustment amount of the controlled system. In an embodiment of the present invention, the second adjustment amount may be determined by using the following formula:

[0051] A2=A1·2sca

[0052] Wherein, A1 represents the first adjustment amount, A2 represents the second adjustment amount, and sca represents the scaling factor.

[0053] That is, when the scaling factor sca is positive, a power exponential multiplication operation is performed on the first adjustment amount A1 generated by the PID control module. When the hardware is implemented, it can be implemented by performing a left shift operation on the first adjustment amount A1. For example, when sca=1, it is shifted left by 1 bit (i.e., the first adjustment amount A1 is multiplied by 2), and when sca=2, it is shifted left by 2 bits (i.e., the first adjustment amount A1 is multiplied by 4) to determine the second adjustment amount; when the scaling factor sca is negative, a power exponential division operation is performed on the first adjustment amount A1 generated by the PID control module. When the hardware is implemented, it can be implemented by performing a right shift operation on the first adjustment amount A1. For example, when sca=-1, it is shifted right by 1 bit (i.e., the first adjustment amount A1 is divided by 2), and when sca=-2, it is shifted right by 2 bits (i.e., the first adjustment amount A1 is divided by 4) to determine the second adjustment amount.

[0054] According to some optional embodiments, the scaling control module may further include a limiting unit, which is used to limit the value of the scaling factor. Since the scaling operation directly affects the loop bandwidth of the PID control module, the loop bandwidth increases when the left shift is performed, the tracking speed is accelerated, and the high-frequency noise increases; the loop bandwidth decreases when the right shift is performed, the tracking speed decreases, and the high-frequency noise decreases. Therefore, the scaling operation cannot be continued indefinitely, and restrictions need to be added. The limitation of the scaling operation can be achieved by the limiting unit. For example, the minimum scaling value sca_min and the maximum scaling value sca_max are input to the limiting unit. The scaling module is used to limit the scaling factor sca between the minimum scaling value sca_min and the maximum scaling value sca_max, that is, the scaling factor sca can only be adjusted within the range determined by the two thresholds of the minimum scaling value sca_min and the maximum scaling value sca_max. The minimum scaling value sca_min and the maximum scaling value sca_max can both be input into the scaling module to limit the value of the scaling factor.

[0055] According to some optional embodiments, the scaling control module further includes a reset unit, which is used to reset the scaling control module when the absolute value of the second error is less than or equal to a reset threshold. The reset threshold sca_th is preset. When eabs≤sca_th, it indicates that the loop error of the PID control module is already small. In order to avoid loop oscillation caused by the scaling operation of the PID control module, the scaling operation can be turned off at this time, that is, the scaling factor sca is set to 0, indicating that no scaling operation is performed. The preset reset threshold sca_th can be input into the scaling module to reset the scaling control module.

[0056] According to some optional embodiments, the PID control device further includes a control execution module, which is connected to the output end of the scaling execution module and is used to adjust the controlled system according to the second adjustment amount of the controlled system.

[0057] Figure 3 FIG. 4 shows a schematic diagram of the circuit structure of the zoom control module provided by an embodiment of the present invention. Figure 3 As shown, it includes a first comparison module, a second comparison module, a third comparison module, a saturation processing module, an adder and a D flip-flop, and a number of logic gate circuits. The sign bit derr_sign of the error difference derr and the sign bit rerr_sign of the previous output error rerr are passed through an XOR gate to determine whether the signs of the two are the same or opposite. When the sign of the error difference derr is opposite to the sign of the previous output error rerr, the XOR gate XOR outputs a high level, and the output end of the XOR gate XOR is connected to an input end of the OR gate OR, so the OR gate outputs a high level, and the output end of the OR gate OR is connected to the addition port of the adder and subtractor, and the adder and subtractor add 1 to realize the scaling factor sca plus 1; when the sign of the error difference derr is the same as the sign of the previous output error rerr, the XOR gate XOR outputs a low level, and the output end of the XOR gate XOR is also connected to the inverter INV, at this time the inverter INV outputs a high level, and the output end of the inverter INV is connected to an input end of the first AND gate AND1 and an input end of the second AND gate AND2, and is adjusted according to the following rules:

[0058] (1) The absolute value dabs of the error difference derr is compared with the absolute value eabs of the previous output error rerr through the first comparison module. When dabs≤eabs / M, the first comparison module outputs a high level, and the output end of the first comparison module is connected to the other input end of the first AND gate AND1. At this time, the first AND gate AND1 outputs a high level, and the output end of the first AND gate AND1 is connected to the other input end of the OR gate OR. The OR gate OR outputs a high level, and the adder-subtractor adds 1, so that the scaling factor sca is added by 1;

[0059] (2) The absolute value dabs of the error difference derr is compared with the absolute value eabs of the previous output error rerr through the second comparison module. When dabs ≥ eabs / N, the second comparison module outputs a high level, and the output end of the second comparison module is connected to the other input end of the second AND gate AND2. At this time, the second AND gate AND2 outputs a high level, and the output end of the second AND gate AND2 is connected to the subtraction port of the adder-subtractor. The adder-subtractor subtracts 1, thereby realizing that the scaling factor sca is subtracted by 1;

[0060] (3) The absolute value eabs of the previous output error rerr is compared with the reset threshold sca_th through the third comparison module. When eabs≤sca_th, the third comparison module outputs a high level. The output end of the third comparison module is connected to the reset end of the D flip-flop to set the scaling factor sca to 0.

[0061] (4) Since the scaling operation cannot continue indefinitely, it is necessary to add limiting values, namely, the minimum scaling value sca_min and the maximum scaling value sca_max. The scaling factor sca can only be adjusted within the range determined by these two thresholds. If the scaling factor sca is greater than the maximum scaling value sca_max, the output scaling factor sca is equal to the maximum scaling value sca_max; if the scaling factor sca is less than the minimum scaling value sca_min, the output scaling factor sca is equal to the minimum scaling value sca_min.

[0062] The D flip-flop is used to store the latest scaling factor sca.

[0063] In summary, an embodiment of the present invention relates to a PID control device, including a PID control module, a scaling control module and a scaling execution module; the PID control module is used to output a first adjustment amount of the controlled system according to the current output error of the controlled system; the scaling control module is used to generate a scaling factor according to the current output error and the previous output error of the controlled system; the scaling execution module is connected to the output ends of the PID control module and the scaling control module, and is used to adjust the first adjustment amount according to the scaling factor to generate a second adjustment amount of the controlled system. The technical solution provided by the embodiment of the present invention eliminates the setting of multiple groups of PID coefficients in the commonly used nonlinear PID control structure, saves circuit resources and the setting process of multiple groups of coefficients; the scaling is adaptive, does not require manual participation, and is easy to use; it can take into account the improvement of loop dynamic response and steady-state error; the circuit structure is simple and easy to implement.

[0064] It should be understood that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present invention (including claims) is limited to these examples; under the idea of ​​the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of one or more embodiments of the present invention as described above, which are not provided in detail for the sake of simplicity. The above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, and do not constitute a limitation of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the scope of protection of the present invention. In addition, the claims attached to the present invention are intended to cover all changes and modifications that fall within the scope and boundaries of the attached claims, or the equivalent forms of such scope and boundaries.

Claims

1. A PID control device, characterized in that: It includes a PID control module, a scaling control module and a scaling execution module; The PID control module is used to output a first adjustment amount of the controlled system according to a current output error of the controlled system; The scaling control module is used to generate a scaling factor according to a current output error and a previous output error of the controlled system; The scaling execution module is connected to the output ends of the PID control module and the scaling control module, and is used to adjust the first adjustment amount according to the scaling factor to generate a second adjustment amount of the controlled system.

2. The device according to claim 1, characterized in that The scaling control module generates a scaling factor according to the current output error and the previous output error of the controlled system, including: Generate an error difference according to the difference between the previous output error and the current output error; adjusting the scaling factor according to the error difference and a sign of a previous output error; The initial value of the scaling factor is 0.

3. The device according to claim 2, characterized in that Adjusting the scaling factor according to the error difference and a sign of a previous output error includes: If the error difference has an opposite sign to the previous output error, then increase the value of the scaling factor; If the error difference has the same sign as the previous output error, adjusting the scaling factor according to a comparison result of the first error absolute value and the second error absolute value; The first error absolute value is the absolute value of the error difference, and the second error absolute value is the absolute value of the previous output error.

4. The device according to claim 3, characterized in that Adjusting the scaling factor according to a comparison result of the first error absolute value and the second error absolute value includes: If dabs≤eabs / M, increase the value of the scaling factor; If dabs≥eabs / N, then reduce the value of the scaling factor; Wherein, dabs represents the first error absolute value, eabs represents the second error absolute value, M represents the first threshold, N represents the second threshold, M is greater than N, and M and N are positive integers.

5. The device according to any one of claims 1 to 4, characterized in that: The scaling execution module adjusts the first adjustment amount according to the scaling factor to generate a second adjustment amount of the controlled system, including using the following formula to determine the second adjustment amount: <h2 style=";text-align:left;direction:ltr">A2=A1·2<h2 style=";text-align:left;direction:ltr"> sca Wherein, A1 represents the first adjustment amount, A2 represents the second adjustment amount, and sca represents the scaling factor.

6. The device according to claim 5, characterized in that The zoom control module also includes a limit unit; The limiting unit is used to limit the value of the scaling factor.

7. The device according to claim 6, characterized in that The zoom control module also includes a reset unit; The resetting unit is used to reset the scaling control module when the absolute value of the second error is less than or equal to a reset threshold.

8. The device according to claim 7, characterized in that Also includes a control execution module; The control execution module is connected to the output end of the scaling execution module, and is used to adjust the controlled system according to the second adjustment amount of the controlled system.