11 PID

Last modified by Devin Chen on 2024/04/15 09:59

PID/PID calculation

PID

This instruction is used to perform PID control that changes the output value according to the amount of input change.

-[PID (s1)(s2)(s3)(d)]

Content, range and data type

ParameterContentRangeData typeData type (label)
(s1)Device number for storing the target value (SV)-32767 to 32767Signed BIN 16 bitANY16
(s2)Device number for storing the measured value (PV)-32767 to 32767Signed BIN 16 bitANY16
(s3)Device number for storing parameters1 to 32767Signed BIN 16 bitANY16
(d)Device number for storing output value (MV)-32767 to 32767Signed BIN 16 bitANY16

Device used

InstructionParameterDevices

Offset modification

Pulse extension

DRSD[D]XXP
PIDParameter 1  
Parameter 2  
Parameter 3  
Parameter 4  

Features

This instruction is to complete the PID operation and is used to control the parameters of the closed-loop control system. PID control has a wide range of applications in mechanical equipment, pneumatic equipment, constant pressure water supply and electronic equipment, etc. among them:

11_html_1c6bb88c06ac24cf.png is the target value of PID control;

11_html_fb5122fb6e3a43d5.png is the measured feedback value;

11_html_6c3fad4a32a3db43.png The starting address of the buffer area for setting parameters required for PID operation and saving intermediate results, occupies a total of 26 variable units in the subsequent addresses, the value range is D0 to D7974, it is best to specify the power failure retention area, which will remain after the power is OFF Set the value, otherwise the buffer area needs to be assigned value before starting the operation for the first time. The function and parameter description of each unit are described in this section;

11_html_b126b1b2673dc1f4.png is the storage unit of the PID calculation result. Please designate 11_html_d47cd1f59b766ed3.png as a non-battery holding area, otherwise it needs to be initialized and cleared before starting the calculation for the first time.

Programming example

11_html_888504306151fa15.png

The parameter description is as follows:

What is stored in D9 is the target value of PID adjustment, and D10 is the closed-loop feedback value. Note that D9 and D10 must be of the same dimension, such as both 0.01MPa units, or 1℃ units, etc.;

A total of 26 units of D200 to D225 are used to store the set value and process value of PID operation. These values must be set item by item before the first PID calculation;

The D130 unit is used to store the calculated control output value to control the execution of the action.

The function and setting method of the parameter value of each unit about starting of 11_html_6c3fad4a32a3db43.png are described in the following table:

UnitFeaturesSetting instructions
11_html_6c3fad4a32a3db43.pngSampling time (TS)The setting range is 1 to 32767 (ms), but it needs to be greater than the PLC program scan period
11_html_6c3fad4a32a3db43.png +1Action direction (ACT)

bit0: 0 = positive action; 1 = reverse action bit3: 0 = unidirectional; 1 = bidirectional

bit4: 0 = auto-tuning does not work; 1 = auto-tuning is executed, others cannot be used.

11_html_6c3fad4a32a3db43.png +2Maximum ascent rate (DeltaT)Setting range 0 to 32000 is the threshold of integral increment
11_html_6c3fad4a32a3db43.png +3Proportional gain (Kp)Setting range 0 to 32767, note that this value is enlarged by 256 times, the actual value is Kp/256
11_html_6c3fad4a32a3db43.png +4Integral gain (Ki)Setting range 0 to 32767, Ki=16384Ts/Ti, Ti is the integral time
11_html_6c3fad4a32a3db43.png +5Differential gain (Kd)Setting range 0 to 32767, Kd≈Td/Ts, Td is the derivative time
11_html_6c3fad4a32a3db43.png +6Filtering (C0)Setting range 0 to 1023, integral part filtering
11_html_6c3fad4a32a3db43.png +7Output lower limit

Recommended setting range -2000 to 2000

When bit3 of S3+1=0, set to 0; When bit3 of S3+1=1, set to -2000;

11_html_6c3fad4a32a3db43.png +8Output upper limitRecommended setting value 2000
11_html_6c3fad4a32a3db43.png +9ReservedReserved
11_html_6c3fad4a32a3db43.png +25ReservedReserved

Auto tuning example

11_html_c64303b9c6a47ae9.png

✎Note:

● When multiple instructions are used, the device number of (d) cannot be repeated.

● During the execution of auto-tuning, the (s3) parameter space cannot be modified.

● The instruction occupies 26 point devices from the device specified in (s3).

● PID instruction can be used multiple times in the program and can be executed at the same time, but the variable area used in each PID instruction should not overlap; it can also be used in step instructions, jump instructions, timing interrupts, and subroutines, in this case When executing the PID instruction, the (s3)+9 cache unit must be cleared in advance.

● The maximum error of the sampling time Ts is -(1 operation cycle +1ms) +(1 operation cycle). If the sampling time Ts ≤ 1 operation cycle of the programmable controller, the following PID operation error (4D86H) will occur, and the PID operation will be executed with TS = operation cycle. In this case, it is recommended to use constant scan mode or use PID instruction in timer interrupt.

Error code

Error codeContent
4085HWhen the device specified in the read application instructions (s1), (s2), (s3), (d) exceeds the range of the corresponding device.
4086HWhen the device specified in the write application instruction (s3) and (d) exceeds the range of the corresponding device.
4D80HThe sampling time is out of range.​(TS≤0)
4D81HInput filter constant ( α ) is out of range (α​<0 or α>1023)
4D82HThe maximum ascent rate (△T) is out of range.(△T​<0 or △T​>1023)
4D83HThe proportional gain (Kp) is out of range.​​​​(Kp<0)
4D84HThe integral gain (Ki) is out of range.(Ki​<0)
4D85HThe differential gain (Kd) is out of range.​​​​(Kd<0)
4D86HThe sampling time (Ts) is less than the operation cycle.​​​​(Ts<Scanning cycle)

Example

See manual.

CCPID/CCPID calculation

CCPID

This instruction is used to perform PID control that changes the output value according to the amount of input change.

-[CCPID (s1) (s2) (s3) (d)]

Content, range and data type

ParameterContentRangeData typeData type (label)
(s1)Device number for storing the target value (SV)-32767 to 32767Signed BIN 16 bitANY16
(s2)Device number for storing the measured value (PV)-32767 to 32767Signed BIN 16 bitANY16
(s3)Device number for storing parameters1 to 32767Signed BIN 16 bitANY16
(d)Device number for storing output value (MV)-32767 to 32767Signed BIN 16 bitANY16

Device used

InstructionParameterDevices

Offset modification

Pulse extension

DRSD[D]XXP
CCPIDParameter 1  
Parameter 2  
Parameter 3  
Parameter 4  

Features

After setting target value (s1), measured value (s2), parameter (s3) to (s3) +12 and executing the program, the calculation result (MV) will be stored to the output according to the first sampling time (s3) in the parameter Value (d). For details, please refer to the user manual of "Wecon CC Series ccpid Function Description v1.4".

✎Note:

It can be executed multiple times at the same time (there is no limit to the number of loops), but please note that the device numbers (s3) and (d) used in the calculation cannot be repeated.

The instruction occupies 52 points of devices starting from the device specified in (s3).

During the execution of auto-tuning, the (s3) parameter space cannot be modified.

Error code

Error codeContent
4085HWhen the device specified in the read application instructions (s1), (s2), (s3), (d) exceeds the range of the corresponding device.
4086HWhen the device specified in the write application instruction (s3) and (d) exceeds the range of the corresponding device.
4D80HThe sampling time is out of range.​(TS≤0)
4D81HInput filter constant (​​​​​​​α) is out of range (​​​​​​​α​<0 or α>1023)
4D82HThe maximum ascent rate (​​​​​​​△T) is out of range.(△T​<0 or △T​>1023)
4D86HThe sampling time (Ts) is less than the operation cycle.​​​​​​​​​​​(Ts<Scanning cycle)
4D87HThe proportional gain (Kp) is out of range.​​​​(Kp<1 or Kp>32000)​​​​​​​
4D88HThe integral time constant (Ti) is out of range.(Ki​<0 or Ki>3600)
4D89HThe differential time constant (Td) is out of range.(Kd<0 or Kd>1000)
4D90HThe upper limit of CCPID output is less than the lower limit.

Example

See "CCPID Instruction Manual".

FPID/FPID calculation

FPID

The function of this instruction is to adjust PID control parameters by fuzzy algorithm.

-[FPID (s) (d1) (d2) (d3)]

Content, range and data type

ParameterContentRangeData typeData type (label)
(s)Store the start number of the device of the fuzzy parameter table (no input required)-Signed BIN 16 bitANY16
(d1)Start number of the device storing the initialization parameters-Signed BIN 16 bitANY16
(d2)Store the start number of the device of the input PID parameter-Signed BIN 16 bitANY16
(d3)The start number of the device that stores the adjusted PID parameters-Signed BIN 16 bitANY16

Device used

InstructionParameterSoft componentOffset modification

Pulse extension

DRSDLC[D]XXP
FPIDParameter 1  
Parameter 2  
Parameter 3  
Parameter 4  

Features

This instruction needs to be used in conjunction with the PID instruction. It completes the fuzzy calculation of the adjustments of the three parameters of PID, Kp, Ki, and Kd. By passing in the three parameters of the PID, the new three parameters are calculated and substituted into the PID for output control.

Parameter Description:

S parameter setting
ParameterOffset addressNameFormatInstructionRange
Parameter 1S----
d1 parameter setting
ParameterOffset addressNameFormatInstructionRange
Parameter 1d1em domainFloating pointTemperature difference>0
d1+1
Parameter 2d1+2ecm domainFloating pointTemperature difference>0
d1+3
Parameter 3d1+4kpm coefficientFloating point0.5 (fixed) (not set)-
d1+5
Parameter 4d1+6kim coefficientFloating point1 (fixed) (not set)-
d1+7
Parameter 5d1+8kdm coefficientFloating point1 (fixed) (not set)-
d1+9
Parameter 6d1+10EM32-bit integer6 (fixed) (not set)-
d1+11
Parameter 7d1+12ECM32-bit integer6 (fixed) (not set)-
d1+13
Parameter 8d1+14UM32-bit integer6 (fixed) (not set)-
d1+15
Parameter 9d1+16Size_x32-bit integer13 (fixed) (not set)-
d1+17
Parameter 10d1+18Size_y32-bit integer13 (fixed) (not set)-
d1+19
Parameter 11d1+20Kpm reserved for internal useReservedReserved-
Parameter 12d1+21Kim reserved for internal useReservedReserved-
Parameter 13d1+22Kdm reserved for internal useReservedReserved-
Parameter 14d1+23Kukp reserved for internal useReservedReserved-
Parameter 15d1+24Kuki reserved for internal useReservedReserved-
Parameter 16d1+25Kukd reserved for internal useReservedReserved-
Reserved-
Parameter 20d1+37Reserved for internal useReservedReserved-
d2 parameter setting
ParameterOffset addressNameFormatInstructionRange
Parameter 1d2Current Temperature16-bit integerCurrent test temperature-
Parameter 2d2+1set temperature16-bit integerSet temperature-
Parameter 3d2+2Calculation period16-bit integerTake an integer multiple of the pid sampling time, usually the same-
Parameter 4d2+3Kp16-bit integerPID initial Kp value-
Parameter 5d2+4KI16-bit integerPID initial Ki value-
Parameter 6d2+5KD16-bit integerPID initial Kd value-
Parameter 7d2+6Sampling cycle16-bit integerNo need to enter-
Parameter 8d2+7Initialization flag16-bit integerReserved for internal use-
Parameter 9d2+8Last calculation time32-bit integerView usage (not operable)-
d2+9
Parameter 10d2+10Last temperature16-bit integerView usage (not operable)-
Parameter 11d2+11Reserved16-bit integerReserved 
d3 parameter setting
ParameterOffset addressNameformatInstructionRange
Parameter 1d3Current Temperature16-bit integerCurrent test temperature-
Parameter 2d3+1set temperature16-bit integerSet temperature-
Parameter 3d3+2Calculation period16-bit integerTake an integer multiple of the pid sampling time, usually the same-
Parameter 4d3+3Kp16-bit integerKp value of PID after adjustment-
Parameter 5d3+4KI16-bit integerKi value of PID after adjustment-
Parameter 6d3+5KD16-bit integerKd value of PID after adjustment-
Parameter 7d3+6Sampling cycle16-bit integerNo need to enter-
Parameter 8d3+7Reserved16-bit integerReserved-

✎Note:

The instruction starts from the device specified in (d1) and occupies 38 points of the device, and initializes the parameters. Normally, it only needs to be initialized once before calling (some parameters are fixed) (occupies 38 words space).

The instruction starts with the device specified in (d2) and occupies 12 points of the device, input parameters, and input the first 6 parameters, where Kp, Ki, Kd are the initial values of the PID control parameters (occupies 12 words space) .

The instruction starts from the device specified in (d3) and occupies 8 points of soft elements and output parameters, among which Kp, Ki, Kd are the parameter values after fuzzy adaptive calculation, which can be input to the designated position of PID (occupy 8 words space).

The FPID instruction occupies 58 words. The address of each operand must have a specified interval interval, which cannot be occupied by other instructions.

Error code

Error codeContent
4085HWhen the device specified in the read application instructions (d1), (d2), (d3) exceeds the range of the corresponding device.
4086HWhen the device specified in the write application instructions (d1), (d2), (d3) exceeds the range of the corresponding device.
4D91HFPID calculation cycle is less than or equal to 0
4D92HFPID parameter range error
4D93HFPID initial flag error

Example

1. Parameter d1

11_html_93e9f66475d6eb0c.png

2. Parameter d2

11_html_548b859bc5568099.png

3. Invoke FPID

11_html_599ccfa817c379fd.png

CCPID instruction introduction manual

Background and purpose

(1) Background:

PID (proportion, integral, derivative) controller has been the earliest practical controller for nearly a hundred years, and it is still the most widely used industrial controller. The PID controller is simple and easy to understand, and does not require precise system models and other prerequisites in use, making it the most widely used controller.

(2) Purpose:

You might not be familiar with the parameter settings in the new series of CCPID for the first time, this manual could let you quickly understand the meaning of each parameter in the CCPID and the influence on the control effect, so that you can quickly learn the CCPID.

Description of the host CCPID instruction

Instruction description

Content, range and data type

NameFeaturesBits (bits)Whether pulse typeInstruction formatStep count
CCPIDPID Operation16NoCCPID 11_html_253eb1176b58e989.png 11_html_80fccb1046bf8776.png 11_html_8760537828f7beaf.png 11_html_8b4fbd61f8ea9808.png9
InstructionParameterDevicesOffset modificationPulse extension
DRSD[D]XXP
CCPIDParameter 1  
Parameter 2  
Parameter 3  
Parameter 4  

Device used

11_html_954290ac172c672b.jpg is the target value (SV) of PID control;

11_html_31f47ac5eec30067.jpg is the measured feedback value (PV);

11_html_6dcdd8fc88703a47.jpg is the start address of the buffer area for setting parameters required for PID operation and saving intermediate results, occupying a total of 52 variable units of subsequent addresses (recommended to reserve 100 continuous spaces).The value range is D0 to D7,948, it is better to specify power failure retention, and the setting value remains after power supply is off. Otherwise,the buffer needs to be assigned value before starting the calculation for the first time. The function and parameter description of each unit are described in this section;

11_html_7e06d96423d5de52.jpg is the storage unit (MV) of the PID calculation result. Please specify it as a non-battery retentive area, otherwise it needs to be initialized and cleared before the first start of calculation.

11_html_8eeef07485b91193.jpg

Programming example

The parameter description is as follows:

In D9, the target value of PID adjustment is stored, and D10 is the closed-loop feedback value. Note that D9 and D10 must be of the same dimension, such as both 0.01MPa units, or 1℃ units, etc.;

A total of 52 units of D200 to D224 are used to store the set value and process value of PID operation. These values must be set item by item before the first PID calculation;

D130 unit is used to store the calculated control output value to control the execution of the action.

The functions and setting methods of the parameter values of each unit used by 11_html_6dcdd8fc88703a47.jpg are described in the following table:

11_html_6dcdd8fc88703a47.jpg to 11_html_6dcdd8fc88703a47.jpg +14 is the parameter range that can be set (parameters set when CCPID is executed).

11_html_6dcdd8fc88703a47.jpg +15 to 11_html_6dcdd8fc88703a47.jpg +21 is the space used internally by CCPID control.

11_html_6dcdd8fc88703a47.jpg +22 to 11_html_6dcdd8fc88703a47.jpg +51 is the parameter space used in the auto-tuning process.

UnitFeaturesSetting instructionsSupplement
 Sample time (TS)The set range is 1 to 32,767 (ms), but greater than PLC program scan cycle.It is how often the instruction calculates and updates the output value (MV). When TS is less than one scan time, PID instruction is executed with one scan time and alarm 4D86H. When TS ≤ 0, alarm 4D80H and no execution.
+1Action direction (ACT)

bit0: 0=positive action; 1=reverse action bit2: auto-tuning transition zone switch. 0=not open;1=open

bit3: 0=unidirection; 1=bidirection

Bit4: 0=auto-tuning does not execute; 1=execute auto-tuning

[Bit6:0=Two-stage auto-tuning does not execute. 1=Execute two-stage auto-tuning (bit4 must be set to 1).

bit7: 0=Three-stage auto-tuning does not execute. 1=Execute three-stage auto-tuning (bit4 must be set to 1 )]

The Others cannot be used.

bit0: Positive action: similar heating system, when the temperature is lower than the set value, increases the output ; Reverse action: similar cooling system, when the temperature is greater than the set value, increases the output.

bit2: Self-tuning transition zone switch. There is a transition zone size of 1.5℃ when opened.

bit3: Bidirection indicates that outputs the positive and negative values to the heating system or the cooling system to control two external systems by one PID.

bit4: When bit4=1 and bit6 and bit7 are not 1, auto-tuning is not executed. When bit4=0 and one of bit6 and bit7 is 1, auto-tuning is not executed. When bit4=1 and bit6 and bit7 are both 1, auto-tuning is executed

+2Filter coefficientThe first-order inertia filter of feedback amount (0 to 100%) has a range of 0 to100When the value is greater than or equal to 100, it will be executed as 0, that is, no filtering will be executed;
+3Proportional gain(Kp)Set range: 0 to 30,000[%]Overrun error 4D87H
+4Integration time (Ti)Ti is integration time, and the range is 0 to 3,600 (s)Overrun error 4D88H
+5Differential time (Td)Td is derivative time, and the range is 0 to 1,000 (s)Overrun error 4D89H
+6Working intervalOperating temperature setting enabled by PID (0 indicates no effect) The range is 0 to 1,000It is recommended to be greater than 5°C, that is, 50 (precision 0.1°C). If it exceeds the range, the boundary value will be taken.
+7Output low limit

Range: -10,000 to 10,000.

Recommended setting range: -2,000 or 0 (when S3+1 bit3=0, the lower limit = 0;

when bit3=1, the lower limit = -2,000)

1. Self-tuning initialization:

① Unidirection control: the lower limit is 0;

② Bidirection control: If the lower limit is greater than 0, adjust the lower limit to 0; if the upper limit and the lower limit are equal to 0, the default lower limit is -2,000. Note: If set to -2,000, and the output value (MV) is less than -2,000, it will output -2,000.

2. During the control process, the lower limit is dynamically adjustable. If the lower limit is greater than or equal to the upper limit, error 4D90H will be reported.

+8Output upper limit

Value range: -10,000 to 10,000.

Recommended setting value is 2,000

1. Self-tuning initialization:

① Unidirection control: If the upper limit is less than 0, the default upper limit is 2,000;

② Bidirection control: If the upper limit is less than 0, adjust the upper limit to 0; if the upper limit and the lower limit are equal to 0, the default upper limit is -2,000. Note: If set to -2,000 and the output value (MV) is greater than -2,000, it will output 2,000.

2. During the control process, the upper limit is dynamically adjustable. If the lower limit is greater than or equal to the upper limit, error 4D90H will be reported.

+9Mode setting

0: Overshoot allowed

1: Slight overshoot or no overshoot

2: Dynamic setting

0:Overshoot allowed (ukd = 100)

1: Slight overshoot or no overshoot mode (ukd = 300)

+10

Scale factor

(ukp)

Typically sets value to 100 (default 100) [enabled when S3+9 is set to 2].The range is 1 to 500.When the value is less than or equal to 0, or greater than 500, the boundary value will be taken.
+11Integral coefficient (uki)Typically sets value to 50 (default 50) [enabled when S3+9 is set to 2]. The range is 1 to 300.When the value is less than or equal to 0, or greater than 300, the boundary value will be taken.
+12Differential coefficient (ukd)Typically sets value to 50 (default 100. 300 to 400 can be set when slight overshoot is required) [Enable when S3+9 is set to 2]. The range is 1 to 500.When the value is less than or equal to 0, or greater than 500, the boundary value will be taken.
+13Maximum ascent rate (DeltaT)The range is 0 to 32,000, which is the threshold of integral incrementOverrun error 4D82H
+14Filtering (C0)The range is 0 to 1,023, integral part filteringOverrun error 4D81H
+15reserved for internal controlInternal control space occupation 
+21
+22used space for self-tuningNew self-tuning space for internal use 
+51

1) The auto-tuning process occupies the space of S3+22 to S3+51. When the auto-tuning is successful, the adjusted parameters will be written into the space of S3+2 to S3+21.

2) +2 filter coefficient α: Processing in first-order inertial filter

Formula: Tnow=(100-α)×Tα+α×Told

Tα is the currently measured temperature. Told is the temperature that participated in the PID calculation last time. Tnow is the temperature used for the current PID calculation. α is the filter coefficient (when α=0, no filtering is performed, and the range of α is 0 to 100.(If there is a temperature with a small overshoot but a long stabilization time, the parameter can be set to 80, and analyze the specific problems in detail)

3) +6 work range: Twork(example: 170 represents 17℃)

11_html_7ab814bb49fffa5a.gif

4) +9 working mode:

0: Working mode that allows overshoot

1: Slight overshoot or no overshoot working mode

2: Custom settings; to achieve by setting +10, +11, +12 three coefficients.

5) +1 bit2 self-tuning transition zone switch: (upper limit 1℃, low limit 0.5℃)

The transition zone description in forward control:

11_html_d90c24627566bf2f.gif

In the heating process, when PV≤SV+1℃, 100% power output; when PV>SV+1℃, no output.

In the cooling process, when PV<SV-0.5℃, 100% power output; When PV≥SV-0.5℃, no output.

The transition zone description in reverse control:

11_html_d3c25044a54c62ce.gif

In the cooling process, when PV≥SV-1℃, 100% power output; when PV<SV-1℃, no output.

In the heating process, when PV>SV+0.5℃, 100% power output; When PV≤SV+0.5℃, no output.

The transition zone description in bidirectional control:

11_html_9eb35607c95b1580.gif

In the heating process, when PV≤SV+1℃, 100% power heating output; when PV>SV+1℃, 100% power cooling output.

In the cooling process, when PV<SV-0.5℃, 100% power heating output. When PV≥SV-0.5℃, 100% power cooling output

Programming case

CCPID application configuration

(1) Parameter setting

11_html_36a152ee534a7f24.png

(2) CCPID control process setting

11_html_51d50fa8b154baca.png

11_html_66c8a636f6176c1f.png

(3) Bidirection control

11_html_234093eac2fe184d.png

✎Note:

1. CCPID is a special instruction for operation control. CCPID operation will be executed only after the sample time is reached.

2. There is no limit to the number of times the CCPID instruction can be used, but+51 cannot be repeated.

3. Before CCPID instruction is executed, CCPID parameters need to be set.

Case analysis

(1) Control requirements

The control environment of this example is a kettle. The configuration is controlled by PLC-5V2416 host with 4PT module, and PI8070 screen is used for data storage and process curve viewing.

(2) Sample program

11_html_f0a22955a8da7129.png

11_html_ad08c65bd672c66e.png

(3) Parameter description

PLC deviceControl instructions
M0Set auto tuning
M1CCPID instruction calculation start
M2CCPID operating status
Y0Pulse output with adjustable pulse width
D0Temperature measured value
D1Temperature setting value
D100sample time
D101Control detail settings
D102First-order inertial filter coefficient
D106Working interval
D109Operating mode

(4) Parameter control effect description

1) Boiling water experiment

① Auto-tuning process and control process (no transition zone setting), take two-stage auto-tuning as an example

11_html_9149b1e837158a17.gif

Figure 1 Auto-tuning process curve without transition zone

When the control system is a single temperature control system or a system where environmental interference does not cause large fluctuations. Generally the automatic tuning without transition zone is selected, so that the self-tuning process can be completed more quickly than the method with transition zone.

②Self-tuning process and control process (transition zone setting)

11_html_a1e8ad7a31bb04af.gif

Figure 2 Self-tuning process curve with transition zone

It is more suitable in a two-way control system with transition zone self-tuning process. The transition zone has a range of 1.5°C. The upper limit is 1°C, and the lower limit is 0.5°C.

2) Difference in working interval setting

11_html_4140432ce11883ad.gif

Figure 3 Process curve under different working interval parameters

11_html_f742d80c8cc95f35.gif

Figure 4 Process curve without different working interval parameters (heating process diagram)

It can be seen from the partially enlarged graph that the parameters of the working interval have a certain influence on the overshoot and the stable time. In the case of allowing overshoot, setting the working interval parameters can make the overshoot smaller. This is because the deviation E of PID starting to work is relatively small, and the integration accumulation will not quickly saturate.

3) Result of filter coefficient setting

11_html_815ec6c129ae3891.gif

Figure 5 Process curve under different filtering parameters

The figure above is the experimental result under the small overshoot coefficient, the sample time is 1s. The coefficients of the first-order inertial filtering are (20, 50, 70, 80, 90). After adding the inertia coefficient, the stability time of system control is greatly accelerated, and it is increased by about 6 minutes for the boiling water experiment. The overshoot is about 1.2°C to 1.7°C.

Therefore, the introduction of first-order inertial filtering could greatly improve the PID environment where the temperature fluctuates to a certain extent and increase stabilization time.

✎Note: This parameter of filter coefficient is helpful for systems with not very large hysteresis or the control effect of the phenomenon that the control amount fluctuates back and forth has been greatly improved.

4) The difference in mode selection

0: Overshoot allowed(ukd = 100)

1: Small overshoot or no overshoot (ukd = 300)

11_html_3a7b42c8f4672ce4.gif

Figure 6 Process curves in different working modes

When selecting mode 1 (small overshoot or no overshoot), the stable temperature may be slightly higher than the set temperature (fluctuates above the set temperature).

5) The function of the coefficient

11_html_74a7527eace55103.gif

Figure 7 Process curve under dynamic setting

When selecting working mode 2, there are three corresponding adjustable parameters: ukp[S3+10], uki[S3+11], ukd[S3+12]. Usually, the default parameters can be used for ukp and uki. Adjust the value of ukd could achieve the control effect.

Ukp is adjusted when the value of Kp reaches the maximum value, and the default value is usually 100.

Uki is adjusted when periodic oscillations occur. Gradually increase the value of uki to track the control effect.