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