PID (Proportion Integration Differentiation) control method, device and equipment and readable storage medium
By dynamically adjusting the integral gain coefficient Ki of the PID algorithm, and judging based on the decreasing target value and phase difference, the cumulative value of the integral gain is optimized, thus solving the phase difference problem of PID control when the target value decreases and improving control accuracy.
Patent Information
- Application Number
- CN202511390247.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2026-01-16
AI Technical Summary
Existing PID control suffers from a significant phase difference problem when the target value decreases, resulting in insufficient control accuracy.
By dynamically adjusting the integral gain coefficient Ki of the PID algorithm, and judging from the decrease in the target value and the phase difference, c1*Ki and c2*Ki are used to replace Ki in the normal state respectively, thereby optimizing the cumulative value of the integral gain and reducing the phase difference.
It significantly reduces the phase difference and improves control accuracy, especially in fluctuating conditions where the target value decreases, achieving more precise target tracking.
Smart Images

Figure CN121348701A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of PID control technology, and in particular to a PID control method, apparatus, device, and readable storage medium. Background Technology
[0002] PID control is one of the most widely used control algorithms in industrial control. Its core is to calculate the control quantity by using a linear combination of proportional, integral and derivative operations based on the error between the system output and the desired target.
[0003] For stable targets, i.e., targets with constant values, PID control is ideal, quickly approaching the target with minimal oscillation. However, for fluctuating targets, i.e., targets with changing values, especially when the target value is decreasing, PID control suffers from a significant phase difference problem. When approaching the target, the PID controller, due to integral accumulation, will exceed the target before adjusting. Since the target is decreasing, if the actual value exceeds the target by too much and for a long period, it will lead to a significant phase difference between the actual and target values. Existing technologies struggle to reduce this phase difference when the target value is decreasing, resulting in insufficient control precision. Summary of the Invention
[0004] This invention provides a PID control method, apparatus, device, and readable storage medium to solve the technical problem in the prior art that it is difficult to reduce the phase difference when the target value decreases, resulting in insufficient control accuracy.
[0005] In a first aspect, embodiments of the present invention provide a PID control method, the PID control method comprising the following steps: Obtain the target value and the actual value, and calculate the phase difference based on the target value and the actual value; Determine if the target value has decreased; If so, determine whether the actual value is in an overshoot or undershoot state based on the phase difference; If it is in an under-adjustment state, use c1*Ki as the integral gain coefficient in the PID algorithm formula; If it is in an overshoot state, use c2*Ki as the integral gain coefficient in the PID algorithm formula; Wherein, c1 is a constant greater than 0 and less than 1, c2 is a constant greater than 1, and Ki is the integral gain coefficient in the normal state.
[0006] In some embodiments, the step of determining whether the target value has decreased includes the following steps: Calculate the slope of the target value; Compare whether the slope of the target value is greater than the preset slope threshold. If it is, the target value has not decreased; otherwise, the target value has decreased.
[0007] In some embodiments, the step of determining whether the actual value is in an overshoot or undershoot state based on the phase difference includes the following steps: Determine whether the phase difference is greater than 0 and less than the first preset difference value; If so, the actual value is under-adjusted.
[0008] In some embodiments, the first preset difference is 0.8-1.2 km / h.
[0009] In some embodiments, if so, the step of determining whether the actual value is in an overshoot or undershoot state based on the phase difference further includes the following steps: Determine whether the phase difference is less than 0 and greater than the second preset difference value; If so, the actual value is in an overshoot state.
[0010] In some embodiments, the second preset difference is -1.2 to 0.8 km / h.
[0011] In some embodiments, c1 is 0.5-0.8 and c2 is 1.2-1.5.
[0012] Secondly, a PID control device is provided, the PID control device comprising: The acquisition unit is used to acquire the target value and the actual value, and calculate the phase difference based on the target value and the actual value; The first judgment unit is used to determine whether the target value has decreased; The second judgment unit is used to determine whether the actual value is in an overshoot or undershoot state based on the phase difference. The first control unit is used to control the integral gain coefficient in the PID algorithm formula if the state is under-adjusted, using c1*Ki as the integral gain coefficient. The second control unit is used to control the integral gain coefficient in the PID algorithm formula if the system is in an overshoot state, using c2*Ki as the integral gain coefficient.
[0013] Thirdly, a computer device is provided, the computer device including a memory and a processor, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to implement the aforementioned PID control method.
[0014] Fourthly, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions that, when executed by a computer, cause the computer to perform the aforementioned PID control method.
[0015] The beneficial effects of the technical solution provided by this invention include: This invention provides a PID control method, control device, computer equipment, and readable storage medium. The PID control method includes the following steps: S10: obtaining a target value and an actual value, and calculating the phase difference based on the target value and the actual value; S20: determining whether the target value has decreased; S30: if so, determining whether the actual value is in an overshoot or undershoot state based on the phase difference; S40: if in an undershoot state, using c1*Ki as the integral gain coefficient in the PID algorithm formula; S50: if in an overshoot state, using c2*Ki as the integral gain coefficient in the PID algorithm formula, where c1 is a constant greater than 0 and less than 1, c2 is a constant greater than 1, and Ki is the integral gain coefficient in the normal state. In this invention, when in an undershoot state, c1*Ki replaces the integral gain coefficient Ki in the PID algorithm formula, thus reducing the cumulative value of the integral gain. When in an overshoot state, c2*Ki replaces the integral gain coefficient Ki in the PID algorithm formula, amplifying the coefficient c2 of Ki, allowing the overshoot condition to converge quickly. By dynamically adjusting the integral gain coefficient Ki, optimization is performed for the special operating condition of target value decline in fluctuating targets, thereby reducing the phase difference and improving control accuracy. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart of a PID control method provided in an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] This invention provides a PID control method, apparatus, device, and readable storage medium, which can solve the technical problem in the prior art that it is difficult to reduce the phase difference when the target value decreases, resulting in insufficient control accuracy.
[0020] This invention provides a PID control method, which includes the following steps: Step S10: Obtain the target value and the actual value, and calculate the phase difference based on the target value and the actual value; Step S20: Determine if the target value has decreased; Step S30: If yes, determine whether the actual value is in an overshoot or undershoot state based on the phase difference; Step S40: If under-adjustment is in effect, use c1*Ki as the integral gain coefficient in the PID algorithm formula; Specifically, without changing the integral gain coefficient Ki in the PID algorithm formula under normal operating conditions (i.e., a stable target), the optimization logic is applied only under fluctuating conditions where the target value decreases. By dynamically adjusting the PID algorithm formula, the corresponding phase difference is significantly improved, making the actual value more accurately close to the target. In this embodiment of the invention, when in an under-adjusted state, c1*Ki is used instead of the integral gain coefficient Ki in the PID algorithm formula, where c1 is a constant greater than 0 and less than 1. This reduces the cumulative value of the integral gain, decreasing the impact of the integral gain on control when the actual value exceeds the target value. This makes it easier for the actual value to decrease to the target value, shortening the descent time, reducing the phase difference, and improving control accuracy.
[0021] Step S50: If in overshoot state, use c2*Ki as the integral gain coefficient in the PID algorithm formula.
[0022] Specifically, without changing the integral gain coefficient Ki in the PID algorithm formula under normal operating conditions (i.e., a stable target), the optimization logic is applied only under fluctuating operating conditions where the target value decreases. By dynamically adjusting the PID algorithm formula, the corresponding phase difference is significantly improved, making the actual value more accurately close to the target. In this embodiment of the invention, when in an overshoot state, c2*Ki replaces the integral gain coefficient Ki in the PID algorithm formula, where c2 is a constant greater than 1. This amplifies the coefficient c2 of Ki, increasing its reduction value and causing the total cumulative value of the integral gain coefficient Ki to decrease rapidly. This allows the overshoot condition to converge quickly, reducing the phase difference and improving control accuracy. In this embodiment of the invention, by dynamically adjusting the integral gain coefficient Ki, optimization is performed for the special operating condition of a decreasing target value in a fluctuating target, reducing the phase difference and improving control accuracy.
[0023] This invention provides a PID control method, comprising the following steps: S10: acquiring a target value and an actual value, and calculating the phase difference based on the target value and the actual value; S20: determining whether the target value has decreased; S30: if so, determining whether the actual value is in an overshoot or undershoot state based on the phase difference; S40: if in an undershoot state, using c1*Ki as the integral gain coefficient in the PID algorithm formula; S50: if in an overshoot state, using c2*Ki as the integral gain coefficient in the PID algorithm formula. In this invention embodiment, when in an undershoot state, c1*Ki replaces the integral gain coefficient Ki in the PID algorithm formula, where c1 is a constant greater than 0 and less than 1, thus reducing the cumulative value of the integral gain and reducing the influence of the integral gain on the control when the actual value exceeds the target value. This makes it easier for the actual value to decrease to the target value, shortens the descent time, reduces the phase difference, and improves control accuracy. When in overshoot mode, c2*Ki replaces the integral gain coefficient Ki in the PID algorithm formula, where c2 is a constant greater than 1. This amplifies the coefficient c2 of Ki, increasing its reduction value and causing the total cumulative value of the integral gain coefficient Ki to decrease rapidly. This allows the overshoot condition to converge quickly, reducing the phase difference and improving control accuracy. By dynamically adjusting the integral gain coefficient Ki, optimization is performed on the special condition of target value decline in fluctuating targets, reducing the phase difference and improving control accuracy.
[0024] As an optional implementation, in one embodiment of the invention, the step S20 of determining whether the target value has decreased includes the following steps: Step S210: Calculate the slope of the target value; Step S220: Compare whether the slope of the target value is greater than the preset slope threshold. If yes, the target value has not decreased; otherwise, the target value has decreased.
[0025] Specifically, by accurately identifying the downward trend of the target value, misjudgments can be avoided, noise can be effectively filtered, and the optimization logic can be triggered only when the target value continues to decline steadily, significantly improving the accuracy of judgment and enhancing reliability. In this embodiment of the invention, the preset slope threshold is -0.05 to ensure that the optimization logic is triggered accurately and reliably.
[0026] As an optional implementation, in one embodiment of the invention, step S30, which determines whether the actual value is in an overshoot or undershoot state based on the phase difference, includes the following steps: Step S310: Determine whether the phase difference is greater than 0 and less than the first preset difference value; Step S320: If yes, then the actual value is in an under-adjusted state.
[0027] Specifically, by setting a first preset difference value 'b', the judgment conditions for under-adjustment are precisely defined. This ensures that the integral gain increase logic is activated only within the critical range where the actual value is close to the target value but has not yet reached it. This avoids misjudging under-adjustment when the deviation between the actual value and the target value is large, thus preventing a decrease in control accuracy due to premature reduction of the integral gain. This allows the actual value to approach the target value more efficiently, significantly shortening the control response time. Simultaneously, it effectively ensures the stability and safety of the control process. In scenarios such as vehicle control, accurate identification of under-adjustment avoids potential risks caused by excessive acceleration, such as sudden braking due to excessive speed approaching the target. It also ensures that integral gain adjustment is triggered only when necessary, maintaining robustness under other operating conditions. While improving control accuracy, it significantly reduces safety hazards.
[0028] As an optional implementation, in one embodiment of the invention, the first preset difference is 0.8-1.2 km / h. To avoid large errors due to slow response in the initial stage, a first preset difference b is set. The value of b is determined according to the actual situation. Taking vehicle speed as the closed-loop target control as an example, the first preset difference b is 1 km / h. This ensures that the anti-phase difference optimization strategy is activated only when the actual value approaches the target value and the fine-tuning stage begins, significantly improving the comprehensive control capability under different dynamic operating conditions.
[0029] As an optional implementation, in one embodiment of the invention, if so, step S30, which determines whether the actual value is in an overshoot or undershoot state based on the phase difference, further includes the following steps: Step S330: Determine whether the phase difference is less than 0 and greater than the second preset difference value; Step S340: If yes, then the actual value is in an overshoot state.
[0030] Specifically, by setting a second preset difference c, the judgment conditions for overshoot state are precisely defined, ensuring that the logic of reducing integral gain is triggered when the overshoot amount (i.e., phase difference) is small and 0 > e(t) > c, thereby effectively suppressing excessive overshoot of actual value, significantly reducing overshoot duration, and maintaining stability, providing more accurate and safer dynamic response guarantee for high-safety scenarios such as vehicle control.
[0031] As an optional implementation, in one embodiment of the invention, the second preset difference is -1.2 to 0.8 km / h, which enables accurate capture of typical overshoot conditions that require accelerated convergence, ensuring that the integral term can quickly generate a reverse correction force, prompting the actual value to quickly return to the target value and effectively suppressing the phase difference; and because it eliminates overshoot cases that are too large or too small, it avoids malfunctions under abnormal conditions, further improving the comprehensive control capability under different dynamic conditions.
[0032] As an optional implementation, in one embodiment of the invention, c1 is 0.5-0.8 and c2 is 1.2-1.5.
[0033] Specifically, this embodiment of the invention precisely limits the integral gain adjustment coefficient c1 under the undershoot state to an optimized range of 0.5-0.8, avoiding the problems of excessively fast undershoot suppression due to c1 being too small or insufficient undershoot suppression due to c1 being too large, thus maintaining stability under the undershoot condition and further improving control accuracy, significantly enhancing the response accuracy and safety in high-safety scenarios such as vehicle control. Similarly, by precisely limiting the integral gain adjustment coefficient c2 under the overshoot state to an optimized range of 1.2-1.5, this invention avoids the problems of slow response due to c2 being too small or system oscillation due to c2 being too large, while maintaining dynamic stability under the overshoot state and further improving control accuracy.
[0034] This invention also provides a PID control device, the PID control device comprising: The acquisition unit is used to acquire the target value and the actual value, and calculate the phase difference based on the target value and the actual value; The first judgment unit is used to determine whether the target value has decreased; The second judgment unit is used to determine whether the actual value is in an overshoot or undershoot state based on the phase difference. The first control unit is used to control the integral gain coefficient in the PID algorithm formula if the state is under-adjusted, using c1*Ki as the integral gain coefficient. The second control unit is used to control the integral gain coefficient in the PID algorithm formula if the system is in an overshoot state, using c2*Ki as the integral gain coefficient.
[0035] This invention also provides a computer device, which includes a memory and a processor. The memory stores at least one instruction, which is loaded and executed by the processor to implement the aforementioned PID control method.
[0036] A processor can be a CPU, or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor, or any conventional processor. The processor is the control center of a computer device, connecting all parts of the computer device through various interfaces and lines.
[0037] Memory can be used to store computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for at least one function (such as video playback, image playback, etc.), etc.; the data storage area can store data created based on the use of the mobile phone (such as video data, image data, etc.). In addition, memory can include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, SmartMedia Cards (SMC), Secure Digital (SD) cards, Flash Cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.
[0038] In one embodiment of the invention, the processor is used to run a computer program stored in a memory to perform the following steps: Step S10: Obtain the target value and the actual value, and calculate the phase difference based on the target value and the actual value; Step S20: Determine if the target value has decreased; Step S30: If yes, determine whether the actual value is in an overshoot or undershoot state based on the phase difference; Step S40: If under-adjustment is in effect, use c1*Ki as the integral gain coefficient in the PID algorithm formula; Step S50: If in overshoot state, use c2*Ki as the integral gain coefficient in the PID algorithm formula.
[0039] As an optional implementation, in one embodiment of the invention, the step S20 of determining whether the target value has decreased includes the following steps: Step S210: Calculate the slope of the target value; Step S220: Compare whether the slope of the target value is greater than the preset slope threshold. If yes, the target value has not decreased; otherwise, the target value has decreased.
[0040] Specifically, by accurately identifying the downward trend of the target value, avoiding misjudgments, effectively filtering noise, and ensuring that the optimization logic is triggered only when the target value continues to decline steadily, the accuracy of judgment is significantly improved and the reliability is enhanced.
[0041] As an optional implementation, in one embodiment of the invention, step S30, which determines whether the actual value is in an overshoot or undershoot state based on the phase difference, includes the following steps: Step S310: Determine whether the phase difference is greater than 0 and less than the first preset difference value; Step S320: If yes, then the actual value is in an under-adjusted state.
[0042] Specifically, by setting a first preset difference value 'b', the judgment conditions for under-adjustment are precisely defined. This ensures that the integral gain increase logic is activated only within the critical range where the actual value is close to the target value but has not yet reached it. This avoids misjudging under-adjustment when the deviation between the actual value and the target value is large, thus preventing a decrease in control accuracy due to premature reduction of the integral gain. This allows the actual value to approach the target value more efficiently, significantly shortening the control response time. Simultaneously, it effectively ensures the stability and safety of the control process. In scenarios such as vehicle control, accurate identification of under-adjustment avoids potential risks caused by excessive acceleration, such as sudden braking due to excessive speed approaching the target. It also ensures that integral gain adjustment is triggered only when necessary, maintaining robustness under other operating conditions. While improving control accuracy, it significantly reduces safety hazards.
[0043] As an optional implementation, in one embodiment of the invention, the first preset difference is 0.8-1.2 km / h. To avoid large errors due to slow response in the initial stage, a first preset difference b is set. The value of b is determined according to the actual situation. Taking vehicle speed as the closed-loop target control as an example, the first preset difference b is 1 km / h. This ensures that the anti-phase difference optimization strategy is activated only when the actual value approaches the target value and the fine-tuning stage begins, significantly improving the comprehensive control capability under different dynamic operating conditions.
[0044] As an optional implementation, in one embodiment of the invention, if so, step S30, which determines whether the actual value is in an overshoot or undershoot state based on the phase difference, further includes the following steps: Step S330: Determine whether the phase difference is less than 0 and greater than the second preset difference value; Step S340: If yes, then the actual value is in an overshoot state.
[0045] Specifically, by setting a second preset difference c, the judgment conditions for overshoot state are precisely defined, ensuring that the logic of reducing integral gain is triggered when the overshoot is small, i.e., 0 > e(t) > c. This effectively suppresses excessive overshoot of the actual value, significantly reduces the overshoot duration, and maintains stability, providing more accurate and safer dynamic response protection for high-safety scenarios such as vehicle control.
[0046] As an optional implementation, in one embodiment of the invention, the second preset difference is -1.2 to 0.8 km / h, which enables accurate capture of typical overshoot conditions that require accelerated convergence, ensuring that the integral term can quickly generate a reverse correction force, prompting the actual value to quickly return to the target value and effectively suppressing the phase difference; and because it eliminates overshoot cases that are too large or too small, it avoids malfunctions under abnormal conditions, further improving the comprehensive control capability under different dynamic conditions.
[0047] This invention also provides a computer-readable storage medium, which includes a memory and a processor. The memory stores at least one instruction, which is loaded and executed by the processor to implement the aforementioned PID control method.
[0048] The embodiments of the present invention can implement all or part of the aforementioned processes, or they can be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various methods described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0049] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, servers, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0050] The working principle of this invention embodiment is as follows: The PID algorithm formula is usually expressed as: u(t)=Kp*e(t)+Ki*∫[0tot]e(τ)dτ+Kd*de(t) / dt; Where u(t) is the sum of the output values of the PID controller at time t, e(t) is the phase difference at time t, the phase difference is the target value minus the actual value, Kp is the proportional gain coefficient, Ki is the integral gain coefficient, and Kd is the derivative gain coefficient. The main contributor to the phase difference in a fluctuating target response is Ki. When the actual value has not reached the target value, Ki has a cumulative positive effect. When the actual value exceeds the target value, Ki gradually becomes negative by cumulatively decreasing. Since the target value is decreasing at this time, if the time for Ki to change from positive to negative effect is too long, it will cause the actual value to exceed the target value by too much and for a long period. This embodiment of the invention optimizes the special condition of target value decreasing in fluctuating targets by dynamically adjusting the integral gain coefficient Ki, thereby reducing the phase difference and improving control accuracy.
[0051] In the description of this invention, it should be noted that the terms "upper," "lower," etc., indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Unless otherwise expressly specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication between two elements. For those skilled in the art, the specific meaning of the above terms in this invention can be understood according to the specific circumstances.
[0052] It should be noted that in this invention, 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. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0053] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.
Claims
1. A PID control method characterized by, The PID control method comprises the following steps: acquiring a target value and an actual value, and calculating a phase difference according to the target value and the actual value; judging whether the target value is reduced; if yes, judging whether the actual value is in an over-adjustment state or an under-adjustment state according to the phase difference; if in the under-adjustment state, taking c1*Ki as an integral gain coefficient in a PID algorithm formula; if in the over-adjustment state, taking c2*Ki as the integral gain coefficient in the PID algorithm formula; wherein the c1 is a constant greater than 0 and less than 1, the c2 is a constant greater than 1, and Ki is an integral gain coefficient in a normal state.
2. The PID control method of claim 1, wherein, The step of judging whether the target value is reduced comprises the following steps: calculating a slope of the target value; comparing whether the slope of the target value is greater than a preset slope threshold value, if yes, the target value is not reduced, and if no, the target value is reduced.
3. The PID control method of claim 1, wherein, The step of judging whether the actual value is in the over-adjustment state or the under-adjustment state according to the phase difference if yes comprises the following steps: judging whether the phase difference is greater than 0 and less than a first preset difference value; if yes, the actual value is in the under-adjustment state.
4. The PID control method of claim 3, wherein: The first preset difference value is 0.8-1.2 km / h.
5. The PID control method of claim 1, wherein, The step of judging whether the actual value is in the over-adjustment state or the under-adjustment state according to the phase difference if yes further comprises the following steps: judging whether the phase difference is less than 0 and greater than a second preset difference value; if yes, the actual value is in the over-adjustment state.
6. The PID control method of claim 5, wherein: The second preset difference value is -1.2--0.8 km / h.
7. The PID control method of claim 1, wherein: The c1 is 0.5-0.8, and the c2 is 1.2-1.
5.
8. A PID control device characterized by comprising: comprise: an acquisition unit configured to acquire a target value and an actual value, and calculate a phase difference according to the target value and the actual value; a first judging unit configured to judge whether the target value is reduced; a second judging unit configured to judge whether the actual value is in an over-adjustment state or an under-adjustment state according to the phase difference if yes; a first control unit configured to control taking c1*Ki as an integral gain coefficient in a PID algorithm formula if in the under-adjustment state; a second control unit configured to control taking c2*Ki as the integral gain coefficient in the PID algorithm formula if in the over-adjustment state.
9. A computer device, comprising: comprise: a memory and a processor, the memory has at least one instruction stored therein, the at least one instruction is loaded and executed by the processor to implement the PID control method in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer readable storage medium stores computer instructions, when the computer instructions are executed by a computer, the computer instructions make the computer execute the PID control method in any one of claims 1 to 7.