Hello. 1
In this video we are going to learn to PID control technical informations. 2
This is PID instruction and S1 is target value or set value S2 is present value than we are reading 3
from the external devices and S3 is parameters. 4
But if our PID instruction is sixteen bit S3 the parameter is use 20 continues device 5
for 32 bit instruction. 6
It used 21 continues device 7
That's okay. 8
Doesn't matter for a moment and D means output value so we will get output of the PDI 9
Instruction from here GPWM and this is S1 is another PID command(used with PID-General pulse width modulation) PID command means we will use these 10
GPWM command with the PID command S1 is pulse output with S2 is pulse output cycle and 11
D means pulse output device. 12
This is also another an important command for the PID than we will do an example in the next video 13
as exercise and we will heat one system and we will cool one system according to PID 14
we are going to use PID - GPWM command. 15
That's okay but before the instruction PIDis executed this is another one important point for the 16
PID the parameters of the PD needs to be set and in here I just copied the complete page that because 17
we need this page then we can use this page to understand PID parameters. 18
You can see in here S3 is sampling time it is starting from S3. 19
What was the S3. 20
Remember S3 was parameter. 21
If this instruction is 16 bit so it was using 20 continues devices 22
So in here it is starting from S3 AND in the end s3 + 19. 23
So what is these parameters for the PID sampling time. 24
And here are the range S3 +1. 25
Proportional gain integral gain integral time constant and etc. but in here S3+4 control 26
mode. 27
This is really really important for us because how we are going to control PID if it is equals 28
to 0 it is automatically controls if it equals to 1 forward control. 29
So that means E =SV-PV ,reverse control equals E=PV-SV 30
-- 31
And if we select this control mode S3 parameters are adjusted automatically for temperature control. 32
Important point if we adopted. 33
As 4 temperature control which has been adjusted and if İT equals to 5 it is an automatic mode 34
and manual control and manual control 2. 35
But you can read this page and this section and we will adapt our PID command according to our system. 36
So how we are going to control our PID automatically or are we going to control temperature 37
and how we are going to control this temperature manual or automatically. 38
So for example if we are going to control temperature as automatically we can write three as control 39
mode and in here. 40
Also you can see in other parameters max. integral value or accumulated integral value an etc. 41
and timing diagram for the instruction of the PID 42
You can see in here scan cycle sampling time so sampling time works PID reads, works or process 43
to information in this time. 44
So sampling time can be 1 or sampling time. 45
1 to 2000 but unit is ten milliseconds so if we put one s3 46
So what will happen. 47
It will equal to 10 milliseconds. 48
This is just to technical information. 49
Technical page to understand PID parameters and these are all the parameters. 50
But after example you will understand completely how can we work with this parameter in here. 51
We have a control diagram and in Figure 2 in here you can see set value is in here and we here from 52
here present value this algorithm is designed for the temperature controller. 53
If the sampling time is set four second. 54
So K400 means it was the ten millisecond right here ten millisecond multiplied by 400 and 55
it will equal 4000 milliseconds and it will equal to for second the output value range will be zero 56
to four thousand and cycle time of the instruction GPWM needs to be for second important. 57
If users have no idea about the parameter adjustment they can select K3 first. 58
Another one really important point. 59
If you don't know anything about parameter you can adjust it as 3 control mode and after parameters 60
are adjusted the value will be changed to K4 automatically. 61
So what is that means four was the temperature controller which has been adjusted we can adapt it as 62
3 and then automatically it will . 63
turn on to 4 and user can change the parameters to better ones according to results of the adjustment. 64
What is this adjustment. 65
You can see these pictures but before we have suggestions for you there are a lot of environments where 66
PID can be used and therefore users have to select control functions appropriately 67
-- 68
For example if s3+4 is K3 What is that means. 69
That means control mode the instruction cannot be used in a motor control environment otherwise improper 70
control may occur when the users have when users adjust three main parameters KP KI and KD 71
-- 72
S3+4 K0 K1 K1 K5. 73
they have to adjust the KP first. 74
this is the parameters for the PID. 75
And other really important point. 76
You need to adjust to. 77
KP First according to experiences and set the KI and the KD to 0 then users can handle the control 78
they can increase the KI and KD 79
-- 80
Okay. 81
You want to adapt your PID instruction as manually with yourself first you need to adjust KP first that 82
moment. 83
You should put zero to KI and KD and then you can increase KI and KD to prevent the parameters 84
which has been adjusts automatically from disappearing after a power cut. 85
This is really another important point here. 86
It is suggested that users should store the parameters in the retentive to data register remain data registers. 87
If S3+4 is K3 or K4 88
If you are using control mode S3 and 4 we are suggesting to you you should use retentive 89
to data registers. 90
The parameters which have been adjusted automatically are not necessarily suitable for every controlled 91
environment. 92
Therefore the users can modify the parameters which have been adjust automatically. 93
This is another really important point. 94
However it is suggested that the users only modify the KI or KD 95
the action of the PID depends on many parameters. 96
You can see it them all in here and to prevent improper control from occurring. 97
Please do not set parameters randomly in the left picture you can see KP.. 98
and KP 99
It was 5 10 20 and 40 and set value was 1. 100
You can see it. 101
It is increasing 5 to 10 and we are closing to set value and a little bit increased to 20. 102
It is so close and if we increase it to 40 for example in the beginning you can see it reached to top 103
level or top value but in here you can see kp=10 104
KI= 8 or selected or adjusted to 8 and KD=0.2 and present value equals to set value. 105
So how can you adjust your PID control. 106
For example you can increase to kp first and then kı and KD these are you can just increase or decrease 107
a little bit then you can follow your scheme or output or the values from your device or from your plc 108
to the devices. 109
And that moment you can understand ah - ki is a little bit high. 110
Let's increase it or decrease it or kd let's increase or decrease it. 111
So how it is reacting to my system than you can adapt these three important parameters and I'am 112
finished for this with. 113
In the next video we will do PID the example heating and cooling that moment we will understand completely 114
how PID and GPWM instructions works. 115
See you in the next video.