A PID control system and method
By converting the analog signal into a digital signal and calculating the output value and constant, the problems of low oscillation and parameter adjustment efficiency of the PID control system are solved, and the stability of the system and the accuracy of the long-distance control are improved.
Patent Information
- Application Number
- CN202310206052.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-27
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2043-02-27
AI Technical Summary
When the external load is large and the industrial site environment changes irregularly, the existing PID control system is prone to cause large deviations in the control signal, resulting in oscillation of the analog PID control system, while the digital PID control system has the problems of low control accuracy and low parameter adjustment efficiency.
The analog signal is converted into a digital signal through the signal acquisition module, and the first output value and the second output value are calculated by the processing module. The PID control module calculates the proportion, integral and differential constants based on the output value. The HMI module sets parameters to reduce the overshoot of the output value, and uses the limit cycle method to calculate the constant to improve the parameter adjustment efficiency.
It reduces the oscillation of the PID control system, improves the parameter adjustment efficiency and the system's ability to adapt to complex environments, and enhances the accuracy of long-distance control.
Smart Images

Figure CN116300404B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of PID control, and in particular, to a PID control system and method. Background Art
[0002] In the history of the development of industrial process control, PID (Proportional-Integral-Derivational) control is the oldest and most vital control method, and also the most general control method so far.
[0003] The existing PID control systems mainly include analog PID control systems and digital PID control systems. The analog PID control system has a simple and reliable structure, low cost, and wide and mature applications. The digital PID control system has a flexible structure, mature technology, and flexible and common applications.
[0004] The control process of the analog PID control system is as Figure 1 shown: The first signal acquisition module acquires an analog reference signal and an analog feedback signal. The first preprocessing module performs a deviation operation on the analog reference signal and the analog feedback signal to obtain a deviation operation result. The deviation operation result is input into the first PID control module, and after being calculated by the first PID control module, a control signal (this control signal is an analog signal) is obtained. The control signal is input into the first execution module to control the first actuator to operate. The analog quantity PID control system has a simple structure and high control accuracy. However, when the load of the external first execution module is large and the industrial field environment factors change irregularly, the change of the analog feedback signal fed back by the first actuator is also large, resulting in a large initial value deviation between the analog reference signal and the analog feedback signal, which easily causes a large deviation of the control signal and makes the entire analog PID control system oscillate.
[0005] The control process of the digital PID control system is as Figure 2 shown: The second signal acquisition module acquires a digital reference signal and a digital feedback signal. The second preprocessing module performs a deviation operation on the digital reference signal and the digital feedback signal to obtain a deviation operation result. The deviation operation result is input into the second PID control module, and after being calculated by the second PID control module, a control signal (this control signal is a digital signal) is obtained. The control signal is input into the second execution module to control the second actuator to operate. The negative feedback signal output by the second actuator is an analog feedback signal, and after being sampled and converted by an analog-to-digital converter, a digital feedback signal is obtained. The digital PID control system adds a negative feedback function, which can effectively solve the disadvantage that the output of the second PID control module is prone to saturation when the digital reference signal changes greatly. However, the entire digital PID control system has problems of low control accuracy parameters and low PID parameter adjustment efficiency, resulting in slow system response and low long-distance control accuracy. Summary of the Invention
[0006] The objective of the embodiments of the present invention is to provide a PID control system and method, which improve the adjustment efficiency of the PID control system parameters and reduce the oscillation generated by the PID control system.
[0007] To achieve the above objective, the embodiments of the present invention provide the following solutions:
[0008] A PID control system, comprising:
[0009] A signal acquisition module, configured to acquire analog signals; the analog signals include an analog reference signal and an analog feedback signal;
[0010] A processing module, configured to:
[0011] Convert the analog reference signal into a digital reference signal; convert the analog feedback signal into a digital feedback signal; the digital reference signal is used to represent a digital reference value, and the digital feedback signal is used to represent a digital feedback value;
[0012] Perform a difference calculation on the digital reference value, the digital feedback value, and a first interference value to obtain a first output value;
[0013] Perform a difference calculation on the first output value, the feedback value, and a second interference value to obtain a second output value;
[0014] A PID control module, configured to:
[0015] Obtain three constants according to the second output value; the three constants include: a proportional action constant, an integral action constant, and a derivative action constant;
[0016] Obtain a third output value according to the second output value, the proportional action constant, the integral action constant, and the derivative action constant; the third output value is a control instruction;
[0017] An HMI module, configured to:
[0018] Set parameters; the parameters include: an upper limit value of the output value, a lower limit value of the output value, an output value target value, a first threshold, the digital reference value, the digital feedback value, the first interference value, the second interference value, and the feedback value;
[0019] Display the output value and the parameters; the output value includes: the third output value; the first output value, the second output value, and the third output value are all greater than or equal to the lower limit value of the output value, and the first output value, the second output value, and the third output value are all less than or equal to the upper limit value of the output value.
[0020] Optionally, the processing module includes: an analog-to-digital converter, a first data operation module, and a second data operation module;
[0021] The analog-to-digital converter is configured to convert an analog signal into a digital signal;
[0022] The first data operation module includes:
[0023] A first deviation value calculation unit, configured to calculate the difference between the digital reference value and the digital feedback value to obtain a first deviation value;
[0024] A first control value calculation unit, configured to calculate the sum of the first deviation value and the digital reference value to obtain a first control value;
[0025] A first control unit, configured to calculate the sum of the first control value and the first interference value to obtain the first output value;
[0026] A first feedback unit, configured to:
[0027] When the first deviation value is equal to 0, output the first output value;
[0028] When the first deviation value is not equal to 0, if the digital feedback value is equal to the first output value, return to perform the operation of calculating the difference between the digital reference value and the digital feedback value;
[0029] The second data operation module includes:
[0030] A second deviation value calculation unit, configured to calculate the difference between the first output value and the feedback value to obtain a second deviation value;
[0031] A second control value calculation unit, configured to calculate the sum of the second deviation value and the first output value to obtain a second control value;
[0032] A second control unit, configured to calculate the sum of the second control value and the second interference value to obtain the second output value;
[0033] A second feedback unit, configured to:
[0034] Calculate the difference between the second output value and the first output value to obtain a third deviation value;
[0035] When the third deviation value is equal to 0, output the second output value;
[0036] When the third deviation value is not equal to 0, if the feedback value is equal to the second output value, return to perform the operation of calculating the difference between the first output value and the feedback value.
[0037] Optionally, the PID control module includes:
[0038] A constant calculation unit for obtaining three constants according to the second output value, specifically including:
[0039]
[0040]
[0041]
[0042] Among them, P represents the proportional action constant, I represents the integral action constant, D represents the derivative action constant, a is the amplitude, ULV represents the upper limit value of the output value, LLV represents the lower limit value of the output value, t represents the oscillation period, and ton represents the oscillation time;
[0043] A third output value calculation unit for obtaining a third output value according to the second output value, the proportional action constant, the integral action constant, and the derivative action constant, specifically including:
[0044]
[0045] tW represents the third output value, KW represents a preset parameter, and the setting range is -0.5 to +327.17;
[0046] A fourth deviation value calculation unit for calculating the difference between the third output value and the output value target to obtain a fourth deviation value;
[0047] When the fourth deviation value is less than the first threshold, output the control instruction; when the fourth deviation value is greater than or equal to the first threshold, return to execute the operation of calculating the difference between the digital reference value, the digital feedback value, and the first interference value.
[0048] Optionally, the HMI module is further configured to:
[0049] When the fourth deviation value is less than the first threshold, while outputting the control instruction, display a system initialization success signal;
[0050] When the fourth deviation value is greater than or equal to the first threshold, while returning to execute the operation of calculating the difference between the digital reference value, the digital feedback value, and the first interference value, display a system initialization failure signal.
[0051] Optionally, the PID control system further includes:
[0052] A communication module, which is respectively connected to the signal acquisition module, the processing module, the PID control module and the HMI module, and is used for receiving and sending signals; the signals include: the analog signal, the second output value, the three constants or the third output value.
[0053] To achieve the above object, the embodiments of the present invention also provide the following solutions:
[0054] A PID control method, including:
[0055] Obtain an analog signal; the analog signal includes an analog reference signal and an analog feedback signal;
[0056] Convert the analog reference signal into a digital reference signal; convert the analog feedback signal into a digital feedback signal; the digital reference signal is used to represent a digital reference value, and the digital feedback signal is used to represent a digital feedback value;
[0057] Perform a difference calculation on the digital reference value, the digital feedback value and the first interference value to obtain a first output value;
[0058] Perform a difference calculation on the first output value, the feedback value and the second interference value to obtain a second output value;
[0059] Obtain three constants according to the second output value; the three constants include: a proportional action constant, an integral action constant and a derivative action constant;
[0060] Obtain a third output value according to the second output value, the proportional action constant, the integral action constant and the derivative action constant; the third output value is a control instruction;
[0061] Set parameters; the parameters include: an upper limit value of the output value, a lower limit value of the output value, a target value of the output value, a first threshold, the digital reference value, the digital feedback value, the first interference value, the second interference value and the feedback value;
[0062] Display the output value and the parameters; the output value includes: the third output value; the first output value, the second output value and the third output value are all greater than or equal to the lower limit value of the output value, and the first output value, the second output value and the third output value are all less than or equal to the upper limit value of the output value.
[0063] Optionally, the performing a difference calculation on the digital reference value, the digital feedback value and the first interference value to obtain a first output value specifically includes:
[0064] Perform a difference calculation on the digital reference value and the digital feedback value to obtain a first deviation value;
[0065] Sum the first deviation value and the digital reference value to obtain a first control value;
[0066] Sum the first control value and the first interference value to obtain the first output value;
[0067] When the first deviation value is equal to 0, output the first output value;
[0068] When the first deviation value is not equal to 0, the digital feedback value is equal to the first output value, and return to execute the step of calculating the difference between the digital reference value and the digital feedback value;
[0069] The calculation of the difference between the first output value, the feedback value and the second interference value to obtain the second output value specifically includes:
[0070] Calculate the difference between the first output value and the feedback value to obtain a second deviation value;
[0071] Sum the second deviation value and the first output value to obtain a second control value;
[0072] Sum the second control value and the second interference value to obtain the second output value;
[0073] Calculate the difference between the second output value and the first output value to obtain a third deviation value;
[0074] When the third deviation value is equal to 0, output the second output value;
[0075] When the third deviation value is not equal to 0, the feedback value is equal to the second output value, and return to execute the step of calculating the difference between the first output value and the feedback value.
[0076] Optionally, obtaining three constants according to the second output value specifically includes:
[0077]
[0078]
[0079]
[0080] Wherein, P represents the proportional action constant, I represents the integral action constant, D represents the derivative action constant, a is the amplitude, ULV represents the upper limit value of the output value, LLV represents the lower limit value of the output value, t represents the oscillation period, and ton represents the oscillation time;
[0081] Obtaining a third output value based on the second output value, the proportional action constant, the integral action constant, and the derivative action constant specifically includes:
[0082]
[0083] tW represents the third output value, and KW represents a preset parameter with a setting range of -0.5 to +327.17;
[0084] Calculating the difference between the third output value and the output value target to obtain a fourth deviation value;
[0085] When the fourth deviation value is less than the first threshold, output the control instruction; when the fourth deviation value is greater than or equal to the first threshold, return to execute the step of calculating the difference between the digital reference value, the digital feedback value, and the first interference value.
[0086] Optionally, when the fourth deviation value is less than the first threshold, while outputting the control instruction, display a system initialization success signal;
[0087] When the fourth deviation value is greater than or equal to the first threshold, while returning to execute the step of calculating the difference between the digital reference value, the digital feedback value, and the first interference value, display a system initialization failure signal.
[0088] Optionally, the PID control method further includes:
[0089] Receiving and sending signals; the signals include: the analog signal, the second output value, the three constants, or the third output value.
[0090] In the embodiment of the present invention, by collecting the analog reference signal and the analog feedback signal through the signal acquisition module, and the processing module calculates the first output value and the second output value, the combination of the dual signals of the analog reference signal and the analog feedback signal, and the combination of the dual output values of the first output value and the second output value, it solves the problem that the output value of the PID control system is prone to excessive overshoot, which makes the output of the PID module control prone to enter the saturation state and causes the entire PID control system to oscillate, reducing the oscillation generated by the PID control system.
[0091] Calculating three constants from the second output value through the limit cycle method, and the HMI module can also set parameters, improving the operation speed of the constants and the adjustment efficiency of the PID control system parameters.
[0092] Because the oscillation generated by the PID control system is reduced, the operation speed of the constants and the adjustment efficiency of the parameters are improved, making the PID control system more adaptable to complex working environments, thereby improving the accuracy of the PID control system during long-distance control. Brief Description of the Drawings
[0093] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0094] Figure 1 It is a schematic structural diagram of an existing analog PID control system;
[0095] Figure 2 It is a schematic structural diagram of an existing digital PID control system;
[0096] Figure 3 It is a schematic structural diagram of the PID control system provided by the embodiment of the present invention;
[0097] Figure 4 It is a comparison schematic diagram of the upper limit value of the output value, the lower limit value of the output value, and the target value of the output value provided by the embodiment of the present invention;
[0098] Figure 5 It is a schematic flowchart of the PID control method provided by the embodiment of the present invention.
[0099] Symbol Description:
[0100] The first signal acquisition module - 1, the first preprocessing module - 2, the first PID control module - 3, the first execution module - 4, the first actuator - 5, the second signal acquisition module - 6, the second preprocessing module - 7, the second PID control module - 8, the second execution module - 9, the second actuator - 10, the analog - to - digital converter - 11, the signal acquisition module - 12, the processing module - 13, the PID control module - 14, the HMI module - 15. Detailed Embodiments
[0101] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0102] The purpose of the present invention is to provide a PID control system and method to solve the problems of low adjustment efficiency of parameters in the existing PID control system and oscillation generated by the PID control system.
[0103] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0104] Figure 3 An exemplary structure of the above-mentioned PID control system is shown, including a signal acquisition module 12, a processing module 13, a PID control module 14, and an HMI module 15. Each module will be introduced in detail below.
[0105] The signal acquisition module 12 is used to acquire analog signals; the analog signals include an analog reference signal and an analog feedback signal.
[0106] In one example, the signal acquisition module 12 can specifically be an analog sensor. The analog reference signal and the analog feedback signal can be acquired in real time on-site through the signal acquisition module 12, and the analog feedback signal can also be a signal emitted by the PID control system itself.
[0107] The processing module 13 is connected to the signal acquisition module 12. The processing module 13 is used to convert the analog reference signal into a digital reference signal. The processing module 13 converts the analog feedback signal into a digital feedback signal. The digital reference signal is used to represent the digital reference value, and the digital feedback signal is used to represent the digital feedback value.
[0108] The digital reference value, the digital feedback value, and the first interference value are subjected to a difference calculation to obtain a first output value.
[0109] The first output value, the feedback value, and the second interference value are subjected to a difference calculation to obtain a second output value.
[0110] The PID control module 14 is connected to the processing module 13. The PID control module 14 is used to obtain three constants according to the second output value; the three constants include: a proportional action constant, an integral action constant, and a derivative action constant.
[0111] The PID control module 14 obtains a third output value according to the second output value, the proportional action constant, the integral action constant, and the derivative action constant; the third output value is a control instruction.
[0112] The HMI module 15 is used to set parameters.
[0113] The parameters include: an upper limit value of the output value, a lower limit value of the output value, a target value of the output value, a first threshold, a digital reference value, a digital feedback value, a first interference value, a second interference value, and a feedback value.
[0114] In one example, the digital reference value and the digital feedback value can be collected in real time by the signal acquisition module 12 or preset through the HMI module 15. The upper limit value of the output value, the lower limit value of the output value, the target value of the output value, the first threshold value, and the feedback value can be preset through the HMI module 15. The first interference value and the second interference value refer to the interference generated by the external electromagnetic environment on the PID control system itself during the actual operation of the PID control system. The first interference value and the second interference value are the same. In the PID control system, except for the external environment, there will be interference in the connection between different modules.
[0115] The HMI module 15 displays the output value and parameters.
[0116] The output value includes a third output value. The first output value, the second output value, and the third output value are all greater than or equal to the lower limit value of the output value. The first output value, the second output value, and the third output value are all less than or equal to the upper limit value of the output value. The HMI module 15 can specifically be a human-machine interface, which refers to the interface of input / output devices that establish a connection and exchange information between humans and computers. These devices include keyboards, monitors, printers, mice, etc.
[0117] In summary, by collecting the analog reference signal and the analog feedback signal through the signal acquisition module 12, and calculating the first output value and the second output value by the processing module 13, the combination of the double signals of the analog reference signal and the analog feedback signal, and the combination of the double output values of the first output value and the second output value, the problem that the output value of the PID control system is prone to excessive overshoot, which causes the output of the PID module control 14 to easily enter the saturation state and makes the entire PID control system oscillate, is solved, and the oscillation generated by the PID control system is reduced. Each module is connected through Ethernet.
[0118] Three constants are calculated from the second output value through the limit cycle method, and the HMI module 15 can also set parameters, which improves the operation speed of the constants and the adjustment efficiency of the parameters of the PID control system.
[0119] Because the oscillation generated by the PID control system is reduced, the operation speed of the constants and the adjustment efficiency of the parameters are improved, making the PID control system more adaptable to complex working environments, thereby improving the accuracy of the PID control system during long-distance control.
[0120] The processing module 13 at least includes: an analog-to-digital converter, a first data operation module, and a second data operation module. The first data operation module and the second data operation module are based on the limit cycle method for calculation.
[0121] The analog-to-digital converter is used to convert the analog signal into a digital signal.
[0122] In one example, the signal acquisition module 12 acquires an analog signal, and the analog-to-digital converter converts the analog signal into a digital signal.
[0123] The first data operation module at least includes: a first deviation value calculation unit, a first control value calculation unit, a first control unit, and a first feedback unit.
[0124] The first deviation value calculation unit is used to calculate the difference between the digital reference value and the digital feedback value to obtain a first deviation value.
[0125] The first control value calculation unit is used to calculate the sum of the first deviation value and the digital reference value to obtain a first control value.
[0126] The first control unit is used to calculate the sum of the first control value and the first interference value to obtain a first output value.
[0127] The first feedback unit is used for:
[0128] When the first deviation value is equal to 0, output the first output value.
[0129] When the first deviation value is not equal to 0, the digital feedback value is equal to the first output value, that is, the first output value is assigned to the digital feedback value, and then the operation of calculating the difference between the digital reference value and the digital feedback value is performed again.
[0130] The second data operation module at least includes: a second deviation value calculation unit, a second control value calculation unit, a second control unit, and a second feedback unit.
[0131] The second deviation value calculation unit calculates the difference between the first output value and the feedback value to obtain a second deviation value.
[0132] The second control value calculation unit calculates the sum of the second deviation value and the first output value to obtain a second control value.
[0133] The second control unit calculates the sum of the second control value and the second interference value to obtain a second output value.
[0134] The second feedback unit is used for:
[0135] Calculate the difference between the second output value and the first output value to obtain a third deviation value.
[0136] When the third deviation value is equal to 0, output the second output value.
[0137] When the third deviation value is not equal to 0, the feedback value is equal to the second output value, that is, the second output value is assigned to the feedback value, and then the operation of calculating the difference between the first output value and the feedback value is performed again.
[0138] The PID control module 14 at least includes: a constant calculation unit, a third output value calculation unit, and a fourth deviation value calculation unit.
[0139] Please refer to Figure 4 , the constant calculation unit is used to calculate three constants according to the second output value, and the specific calculation formulas specifically include:
[0140]
[0141]
[0142]
[0143] Among them, P represents the proportional action constant, I represents the integral action constant, D represents the derivative action constant, a is the amplitude, ULV represents the upper limit value of the output value, LLV represents the lower limit value of the output value, t represents the oscillation period, and ton represents the oscillation time.
[0144] When only one proportional action constant needs to be calculated:
[0145]
[0146] When only two constants, namely the proportional action constant and the integral action constant, need to be calculated:
[0147]
[0148]
[0149] The third output value calculation unit is used to calculate the third output value according to the second output value, the proportional action constant, the integral action constant, and the derivative action constant. The specific calculation formulas specifically include:
[0150]
[0151] tW represents the third output value, and KW represents a preset parameter, and the setting range is -0.5 to +327.17.
[0152] The fourth deviation value calculation unit is used to calculate the difference between the third output value and the output value target to obtain the fourth deviation value.
[0153] When the fourth deviation value is less than the first threshold, an output control instruction is output. The control instruction is used to control the actuator to act. When the fourth deviation value is greater than or equal to the first threshold, the operation of calculating the difference between the digital reference value, the digital feedback value, and the first interference value is performed again.
[0154] In the embodiment of the present invention, the HMI module 15 is further used for:
[0155] When the fourth deviation value is less than the first threshold, while outputting a control instruction, a system initialization success signal is displayed. The first threshold can be preset by the HMI module 15.
[0156] When the fourth deviation value is greater than or equal to the first threshold, while returning to execute the operation of calculating the difference between the digital reference value, the digital feedback value and the first interference value, a system initialization failure signal is displayed.
[0157] In the embodiment of the present invention, the PID control system further includes: a communication module.
[0158] The communication module is respectively connected between the signal acquisition module, the processing module, the PID control module and the HMI module. The communication module is used for receiving and sending signals; the signals include: analog signals, second output values, three constants or third output values.
[0159] To achieve the above object, the embodiment of the present invention also provides the following solution:
[0160] Please refer to Figure 5 , a PID control method, including:
[0161] Step 1: Obtain analog signals; the analog signals include an analog reference signal and an analog feedback signal.
[0162] Step 1 can be specifically executed by the aforementioned signal acquisition module 12. For details, please refer to the introduction of the aforementioned signal acquisition module 12, which will not be elaborated here.
[0163] Step 2: Convert the analog reference signal into a digital reference signal; convert the analog feedback signal into a digital feedback signal; the digital reference signal is used to represent the digital reference value, and the digital feedback signal is used to represent the digital feedback value.
[0164] Step 2 can be specifically executed by the aforementioned analog-to-digital converter. For details, please refer to the introduction of the aforementioned analog-to-digital converter, which will not be elaborated here.
[0165] Step 3: Calculate the difference between the digital reference value, the digital feedback value and the first interference value to obtain a first output value.
[0166] Step 3 can be specifically executed by the aforementioned first data operation module. For details, please refer to the introduction of the aforementioned first data operation module, which will not be elaborated here.
[0167] Step 4: Calculate the difference between the first output value, the feedback value and the second interference value to obtain a second output value.
[0168] Step 4 can be specifically executed by the aforementioned second data operation module. For details, please refer to the introduction of the aforementioned second data operation module, which will not be elaborated here.
[0169] Step 5: Obtain three constants according to the second output value; the three constants include: a proportional action constant, an integral action constant, and a derivative action constant.
[0170] Step 5 can be specifically executed by the aforementioned constant calculation unit. For details, refer to the introduction of the aforementioned constant calculation unit, which will not be elaborated here.
[0171] Step 6: Obtain a third output value according to the second output value, the proportional action constant, the integral action constant, and the derivative action constant; the third output value is a control instruction.
[0172] Step 6 can be specifically executed by the aforementioned third output value calculation unit. For details, refer to the introduction of the aforementioned third output value calculation unit, which will not be elaborated here.
[0173] Step 7: Set parameters. The parameters include: an upper limit value of the output value, a lower limit value of the output value, a target value of the output value, a first threshold value, a digital reference value, a digital feedback value, a first interference value, a second interference value, and a feedback value.
[0174] Step 7 can be specifically executed by the aforementioned HMI module 15. For details, refer to the introduction of the aforementioned HMI module 15, which will not be elaborated here.
[0175] Step 8: Display the output value and the parameters. The output value includes: the third output value. The first output value, the second output value, and the third output value are all greater than or equal to the lower limit value of the output value. The first output value, the second output value, and the third output value are all less than or equal to the upper limit value of the output value.
[0176] Step 8 can be specifically executed by the aforementioned HMI module 15. For details, refer to the introduction of the aforementioned HMI module 15, which will not be elaborated here.
[0177] In other embodiments of the present invention, the digital reference value, the digital feedback value, and the first interference value are subjected to a difference calculation to obtain a first output value, which specifically includes:
[0178] Step 31: Perform a difference calculation on the digital reference value and the digital feedback value to obtain a first deviation value.
[0179] Step 31 can be specifically executed by the aforementioned first deviation value calculation unit. For details, refer to the introduction of the aforementioned first deviation value calculation unit, which will not be elaborated here.
[0180] Step 32: Perform a summation calculation on the first deviation value and the digital reference value to obtain a first control value.
[0181] Step 32 can be specifically executed by the aforementioned first control value calculation unit. For details, refer to the introduction of the aforementioned first control value calculation unit, which will not be elaborated here.
[0182] Step 33: Calculate the sum of the first control value and the first interference value to obtain the first output value.
[0183] Step 33 can specifically be executed by the aforementioned first control unit. For details, refer to the introduction of the first control unit above, which will not be elaborated here.
[0184] Step 34: When the first deviation value is equal to 0, output the first output value.
[0185] When the first deviation value is not equal to 0, the digital feedback value is equal to the first output value, and return to execute the step of calculating the difference between the digital reference value and the digital feedback value.
[0186] Step 34 can specifically be executed by the aforementioned first feedback unit. For details, refer to the introduction of the first feedback unit above, which will not be elaborated here.
[0187] In other embodiments of the present invention, calculate the difference between the first output value, the feedback value and the second interference value to obtain the second output value, specifically including:
[0188] Step 41: Calculate the difference between the first output value and the feedback value to obtain the second deviation value.
[0189] Step 41 can specifically be executed by the aforementioned second deviation value calculation unit. For details, refer to the introduction of the second deviation value calculation unit above, which will not be elaborated here.
[0190] Step 42: Calculate the sum of the second deviation value and the first output value to obtain the second control value.
[0191] Step 42 can specifically be executed by the aforementioned second control value calculation unit. For details, refer to the introduction of the second control value calculation unit above, which will not be elaborated here.
[0192] Step 43: Calculate the sum of the second control value and the second interference value to obtain the second output value.
[0193] Step 43 can specifically be executed by the aforementioned second control unit. For details, refer to the introduction of the second control unit above, which will not be elaborated here.
[0194] Step 44: Calculate the difference between the second output value and the first output value to obtain the third deviation value.
[0195] When the third deviation value is equal to 0, output the second output value.
[0196] When the third deviation value is not equal to 0, the feedback value is equal to the second output value, and return to execute the step of calculating the difference between the first output value and the feedback value.
[0197] Step 44 can specifically be executed by the aforementioned second feedback unit. For details, refer to the introduction of the second feedback unit above, which will not be elaborated here.
[0198] In other embodiments of the present invention, three constants are obtained according to the second output value, and the specific calculation formulas include:
[0199]
[0200]
[0201]
[0202] Among them, P represents the proportional action constant, I represents the integral action constant, D represents the derivative action constant, a is the amplitude, ULV represents the upper limit value of the output value, LLV represents the lower limit value of the output value, t represents the oscillation period, and ton represents the oscillation time.
[0203] According to the second output value, the proportional action constant, the integral action constant, and the derivative action constant, a third output value is obtained, and the specific calculation formulas include:
[0204]
[0205] tW represents the third output value, KW represents a preset parameter, and the setting range is -0.5 to +327.17.
[0206] Step 61: Calculate the difference between the third output value and the output value target to obtain a fourth deviation value.
[0207] When the fourth deviation value is less than the first threshold, an output control instruction is issued; when the fourth deviation value is greater than or equal to the first threshold, return to execute the step of calculating the difference between the digital reference value, the digital feedback value, and the first interference value.
[0208] Step 61 can specifically be executed by the aforementioned fourth deviation value calculation unit. For details, refer to the introduction of the fourth deviation value calculation unit above, which will not be elaborated here.
[0209] Step 62: When the fourth deviation value is less than the first threshold, while issuing an output control instruction, display a system initialization success signal.
[0210] When the fourth deviation value is greater than or equal to the first threshold, while returning to execute the step of calculating the difference between the digital reference value, the digital feedback value, and the first interference value, display a system initialization failure signal.
[0211] Step 62 can specifically be executed by the aforementioned HMI module 15. For details, refer to the introduction of the HMI module 15 above, which will not be elaborated here.
[0212] In other embodiments of the present invention, the PID control method further includes:
[0213] Step 9: Receive and send signals. The signals include: analog signals, second output values, three constants, or third output values.
[0214] Step 9 can specifically be performed by the aforementioned communication module. For details, refer to the introduction of the aforementioned communication module, which will not be elaborated here.
[0215] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the system disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple. For related parts, reference can be made to the description in the method section.
[0216] Specific examples are used in this article to elaborate on the principles and implementation manners of the embodiments of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the embodiments of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the embodiments of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation on the embodiments of the present invention.
Claims
1. A PID control system, characterized in that, Including: A signal acquisition module for acquiring analog signals; the analog signals include an analog reference signal and an analog feedback signal; A processing module for: Converting the analog reference signal into a digital reference signal; converting the analog feedback signal into a digital feedback signal; the digital reference signal is used to represent a digital reference value, and the digital feedback signal is used to represent a digital feedback value; Performing a difference calculation on the digital reference value, the digital feedback value and a first interference value to obtain a first output value; Performing a difference calculation on the first output value, a feedback value and a second interference value to obtain a second output value; A PID control module for: Obtaining three constants according to the second output value; the three constants include: a proportional action constant, an integral action constant and a derivative action constant; Obtaining a third output value according to the second output value, the proportional action constant, the integral action constant and the derivative action constant; the third output value is a control instruction; An HMI module for: Setting parameters; the parameters include: an upper limit value of the output value, a lower limit value of the output value, a target value of the output value, a first threshold, the digital reference value, the digital feedback value, the first interference value, the second interference value and the feedback value; Displaying the output value and the parameters; the output value includes: the third output value; the first output value, the second output value and the third output value are all greater than or equal to the lower limit value of the output value, and the first output value, the second output value and the third output value are all less than or equal to the upper limit value of the output value; The PID control module includes: A constant calculation unit for obtaining three constants according to the second output value, specifically including: Wherein, P represents the proportional action constant, I represents the integral action constant, D represents the derivative action constant, a is the amplitude, ULV represents the upper limit value of the output value, LLV represents the lower limit value of the output value, t represents the oscillation period, and ton represents the oscillation time; A third output value calculation unit for obtaining a third output value according to the second output value, the proportional action constant, the integral action constant and the derivative action constant, specifically including: tW represents the third output value, KW is a preset parameter, and the setting range is -0.5 to +327.17; A fourth deviation value calculation unit for performing a difference calculation on the third output value and the target value of the output value to obtain a fourth deviation value; When the fourth deviation value is less than the first threshold, outputting the control instruction; when the fourth deviation value is greater than or equal to the first threshold, returning to execute the operation of performing a difference calculation on the digital reference value, the digital feedback value and the first interference value.
2. The PID control system according to claim 1, wherein The processing module includes: an analog-to-digital converter, a first data operation module and a second data operation module; The analog-to-digital converter is used to convert analog signals into digital signals; The first data operation module includes: A first deviation value calculation unit for performing a difference calculation on the digital reference value and the digital feedback value to obtain a first deviation value; A first control value calculation unit for performing a summation calculation on the first deviation value and the digital reference value to obtain a first control value; The first control unit is configured to perform a summation calculation on the first control value and the first interference value to obtain the first output value; The first feedback unit is configured to: Output the first output value when the first deviation value is equal to 0; When the first deviation value is not equal to 0, the digital feedback value is equal to the first output value, and return to perform the operation of calculating the difference between the digital reference value and the digital feedback value; The second data operation module includes: A second deviation value calculation unit configured to calculate the difference between the first output value and the feedback value to obtain a second deviation value; A second control value calculation unit configured to perform a summation calculation on the second deviation value and the first output value to obtain a second control value; A second control unit configured to perform a summation calculation on the second control value and the second interference value to obtain the second output value; The second feedback unit is configured to: Calculate the difference between the second output value and the first output value to obtain a third deviation value; Output the second output value when the third deviation value is equal to 0; When the third deviation value is not equal to 0, the feedback value is equal to the second output value, and return to perform the operation of calculating the difference between the first output value and the feedback value.
3. The PID control system according to claim 1, characterized in that, The HMI module is further configured to: When the fourth deviation value is less than the first threshold, while outputting the control instruction, display a system initialization success signal; When the fourth deviation value is greater than or equal to the first threshold, while returning to perform the operation of calculating the difference between the digital reference value, the digital feedback value and the first interference value, display a system initialization failure signal.
4. The PID control system according to claim 1, wherein The PID control system further includes: A communication module, which is respectively connected to the signal acquisition module, the processing module, the PID control module and the HMI module, and is configured to receive and send signals; the signals include: the analog signal, the second output value, the three constants or the third output value.
5. A PID control method, characterized in that, It includes: Obtain an analog signal; the analog signal includes an analog reference signal and an analog feedback signal; Convert the analog reference signal into a digital reference signal; convert the analog feedback signal into a digital feedback signal; the digital reference signal is used to represent the digital reference value, and the digital feedback signal is used to represent the digital feedback value; Calculate the difference between the digital reference value, the digital feedback value and the first interference value to obtain a first output value; Calculate the difference between the first output value, the feedback value and the second interference value to obtain a second output value; Obtain three constants according to the second output value; the three constants include: a proportional action constant, an integral action constant and a derivative action constant; Obtain a third output value according to the second output value, the proportional action constant, the integral action constant and the derivative action constant; the third output value is a control instruction; Set parameters; the parameters include: an upper limit value of the output value, a lower limit value of the output value, an output value target value, a first threshold, the digital reference value, the digital feedback value, the first interference value, the second interference value and the feedback value; Display the output value and the parameter; the output value includes: the third output value; the first output value, the second output value, and the third output value are all greater than or equal to the lower limit value of the output value, and the first output value, the second output value, and the third output value are all less than or equal to the upper limit value of the output value; The obtaining of three constants according to the second output value specifically includes: Where P represents the proportional action constant, I represents the integral action constant, D represents the derivative action constant, a is the amplitude, ULV represents the upper limit value of the output value, LLV represents the lower limit value of the output value, t represents the oscillation period, and ton represents the oscillation time; The obtaining of the third output value according to the second output value, the proportional action constant, the integral action constant, and the derivative action constant specifically includes: tW represents the third output value, KW represents a preset parameter, and the setting range is -0.5 to +327.17; Perform a difference calculation between the third output value and the target value of the output value to obtain a fourth deviation value; When the fourth deviation value is less than the first threshold, output the control instruction; when the fourth deviation value is greater than or equal to the first threshold, return to execute the step of performing a difference calculation on the digital reference value, the digital feedback value, and the first interference value.
6. The PID control method according to claim 5, wherein The performing of a difference calculation on the digital reference value, the digital feedback value, and the first interference value to obtain a first output value specifically includes: Perform a difference calculation between the digital reference value and the digital feedback value to obtain a first deviation value; Perform a summation calculation on the first deviation value and the digital reference value to obtain a first control value; Perform a summation calculation on the first control value and the first interference value to obtain the first output value; When the first deviation value is equal to 0, output the first output value; When the first deviation value is not equal to 0, the digital feedback value is equal to the first output value, and return to execute the step of performing a difference calculation on the digital reference value and the digital feedback value; The performing of a difference calculation on the first output value, the feedback value, and the second interference value to obtain a second output value specifically includes: Perform a difference calculation between the first output value and the feedback value to obtain a second deviation value; Perform a summation calculation on the second deviation value and the first output value to obtain a second control value; Perform a summation calculation on the second control value and the second interference value to obtain the second output value; Perform a difference calculation between the second output value and the first output value to obtain a third deviation value; When the third deviation value is equal to 0, output the second output value; When the third deviation value is not equal to 0, the feedback value is equal to the second output value, and return to execute the step of performing a difference calculation on the first output value and the feedback value.
7. The PID control method according to claim 5, wherein When the fourth deviation value is less than the first threshold, while outputting the control instruction, display a system initialization success signal; When the fourth deviation value is greater than or equal to the first threshold value, return to execute the step of calculating the difference between the digital reference value, the digital feedback value, and the first interference value, and at the same time, display a system initialization failure signal.
8. The PID control method according to claim 5, characterized in that The PID control method further includes: Receiving and sending signals; the signals include: the analog signal, the second output value, the three constants, or the third output value.
Citation Information
Patent Citations
Power supply apparatus and testing apparatus using same
CN103513073A
Method and device for controlling of industrial systemusing 2-DOF PID controller with target filter
KR1020050096780A