INDUSTRIAL RATED WATER TEMPERATURE AND LEVEL CONTROL USING PID
By
Raharja Dion Ariesto 11601058
BACHELOR’S DEGREE in
MECHANICAL ENGINEERING – MECHATRONICS CONCENTRATION FACULTY OF ENGINEERING AND INFORMATION TECHNOLOGY
SWISS GERMAN UNIVERSITY The Prominence Tower
Jalan Jalur Sutera Barat No. 15, Alam Sutera Tangerang, Banten 15143 - Indonesia
July 2020
Revision after the Thesis Defense on July 10 2020
Raharja Dion Ariesto
I hereby declare that this submission is my own work and to the best of my knowledge, it contains no material previously published or written by another person, nor material which to a substantial extent has been accepted for the award of any other degree or diploma at any educational institution, except where due acknowledgement is made in the thesis.
Raharja Dion Ariesto
_____________________________________________
Student Date
Approved by:
Edward Boris Manurung, M.Eng
_____________________________________________
Thesis Advisor Date
Nova Kristian
_____________________________________________
Thesis Co-Advisor Date
Dr. Maulahikmah Galinium, S .Kom., M. Sc.
_____________________________________________
Dean Date
Raharja Dion Ariesto ABSTRACT
INDUSTRIAL RATED WATER TEMPERATURE AND LEVEL CONTROL USING PID
By
Raharja Dion Ariesto
Edward Boris Manurung, S. T, M.T, Advisor Nova Kristian, Co-Advisor
SWISS GERMAN UNIVERSITY
In the world as we know today, efficiency has become one of the most important factors when looking at any type of technology. The applies more so for the production industry where time is literally worth money. This is coupled by the growing production industry in the world which would require the newly recruited to be able to have some understanding of control systems.
Unfortunately, the control and application of systems with PID has long been a technology that was reserved for industries and businesses. Students are limited to studying only the theory.
This system is created in order for students to see the effects of PID control onto an actual system. Because of this, it has been decided that the two aspects that should be controlled are the level of water in a tank as well as the temperature of water within the tank. Both, being first order systems would allow the students to try putting in individual values without much worry for instability in the system.
Keywords: PID, Level Control, Temperature Control, Math Modelling, PLC.
Raharja Dion Ariesto
© Copyright 2020 by Raharja Dion Ariesto
All rights reserved
Raharja Dion Ariesto DEDICATION
I dedicate this works to my family and for the future of the country I love: Indonesia
Raharja Dion Ariesto ACKNOWLEDGEMENTS
I wish to extend my deepest gratitude to Mr. Edward Boris Manurung and Mr. Nova Kristian for putting up with all of my less than academic level questions and staying patient throughout the process of creating this thesis. They have both helped me and without them, this project could not have succeeded. I also wish to thank Dr. Yunita Umniyati for the help in mathematical modelling of the system as well as the advice that she has given throughout the process.
I would also thank my colleagues for supporting me in the middle of the corona virus pandemic, it is a stressful time for all of us especially because of it. I would also like to thank Mr. Yohanes Fredhi Sangandi for allowing me to bring the system home in order to work on it.
Raharja Dion Ariesto TABLE OF CONTENTS
Page
STATEMENT BY THE AUTHOR ... 2
ABSTRACT ... 3
DEDICATION... 5
ACKNOWLEDGEMENTS ... 6
TABLE OF CONTENTS ... 7
LIST OF FIGURES ... 10
CHAPTER 1 - INTRODUCTION... 13
1.1. Background ... 13
1.2 Research Problem... 14
1.3 Research Objectives ... 14
1.4 Significance of Study ... 15
1.5 Research Questions ... 15
1.6 Hypothesis ... 15
CHAPTER 2 - LITERATURE REVIEW ... 16
2.1. Components ... 16
2.1.1. Resistance Temperature Detector ... 16
2.1.2. Flow Sensor ... 17
2.1.3. Capacitive Level Sensor... 17
2.2. Proven Theories... 18
2.2.2. PID ... 18
2.2.3. Transfer Functions ... 20
2.2.4. Open Loop Transfer Functions ... 21
2.2.5. Closed Loop Transfer Functions ... 21
2.2.6. Poles and Zeros ... 22
2.3. Previous Studies ... 23
2.3.1. Model Driven PID Controller in Water Heater System ... 23
2.3.2. A Simple Method for Estimation of Parameters in First Order Systems ... 23
2.3.3. Heat Exchanger System Using Fuzzy Logic Controller ... 24
2.3.4. Modelling and Application Liquid Level Tank System ... 24
2.3.5. Thermal modelling, analysis and control using an electrical analogy ... 24
2.3.6. The PLC-based Industrial Temperature Control System: Design and Implementation ... 25
CHAPTER 3 – RESEARCH METHODS ... 26
3.1.1 Modelling of Tank Temperature with method 1 ... 26
Raharja Dion Ariesto
3.1.2. Modelling of tank temperature with method 2 ... 28
3.1.2.1. Equivalent RC Circuit modelling ... 29
3.1.3. Modelling of Tank Level ... 31
3.1.3.1. Transfer Function of Tank Level ... 33
3.2. Mechanical and Electrical Design ... 34
3.2.1. Overall System Design ... 34
3.2.1.1. Water Piping connections ... 35
3.2.1.2. Wiring ... 36
3.2.1.3. Electrical and Mechanical Components ... 37
3.2.1.3.1. Solid State Relay ... 37
3.2.1.3.2. 12 Volt Power Supply ... 38
3.2.1.3.3. 24 Volt Power Supply ... 38
3.2.1.3.4. PLC S7 1200 +Analogue IO ... 39
3.2.1.3.5. Acrylic Water Tanks ... 40
3.2.1.3.6. Water pump ... 41
3.2.1.3.7. Heater ... 42
3.2.1.3.8. Fan + Radiator ... 43
3.2.2. Sensor Calibration ... 44
3.2.2.1. Resistance Temperature Detector ... 44
3.2.2.2. Level Sensor (HPT612) ... 46
3.3. PLC Programming ... 48
3.3.1. PLC Logic ... 48
3.3.2. Siemens Spec PLC PID... 54
3.3.3. HMI Programming... 56
3.3.3.1. HMI Design ... 57
CHAPTER 4 – RESULTS AND DISCUSSIONS ... 60
4.1. Level Control ... 60
4.1.1. Open loop function ... 60
4.1.2. Closed loop function ... 61
4.1.4. Kp ... 65
4.1.5. Ki ... 67
4.1.6. Kd ... 72
4.2. Temperature Control ... 75
4.2.1. Open loop function ... 75
4.2.2. Closed loop function ... 76
4.2.3. Kp ... 78
Raharja Dion Ariesto
4.2.4. Ki ... 80
4.2.5. Kd ... 83
CHAPTER 5 – CONCLUSIONS AND RECOMMENDATIONS ... 86
5.1. Conclusions ... 86
5.2. Recommendations ... 87
Raharja Dion Ariesto
Page
Figure 1 An illustration of how a PWM works ... 18
Figure 2 The illustration of an open loop transfer function ... 21
Figure 3 An illustration of the poles and zeros in a transfer function ... 22
Figure 4 An illustration of the second tank. ... 26
Figure 5 The illustration of the level control in the first tank ... 32
Figure 6 A Picture of the device itself ... 34
Figure 7 The diagram of the water connections ... 35
Figure 8 The wiring of the sensors and outputs to the PLC ... 36
Figure 9 The schematics of a Solid State Relay ... 37
Figure 10 An AC SSR Figure 11 A DC SSR ... 37
Figure 12 A 12 Volt DC Power Supply... 38
Figure 13 A 24 Volt DC Power Supply... 38
Figure 14 The PLC and Analog IO ... 39
Figure 15 Wiring diagram of just the PLC and Analog IO... 40
Figure 16 A 6 Litre per Minute Water Pump ... 41
Figure 17 The wiring for the Water Pump ... 41
Figure 18The 1000W water heater in the system. ... 42
Figure 19 The wiring diagram for the Heater ... 42
Figure 20 The rear view of the radiator Figure 21 The front view of the radiator .... 43
Figure 22 The wiring diagram for the fan ... 43
Figure 23 The program to translate the RTD current into degrees Celsius ... 44
Figure 24 The RTD tested for noise and accuracy. ... 45
Figure 25 The level sensor being tested for noise and accuracy. ... 47
Figure 26 The Program to test the PWM functions of the Pump. ... 48
Figure 27 The program to test the PWM functions of the Heater. ... 49
Figure 28 The program to test the PWM functions of the Fan. ... 50
Figure 29 The closed loop Program in TIA Portal for the Level Control... 51
Figure 30 The closed loop Program in TIA Portal for the Temperature Control ... 51
Figure 31 The PID Program for the Water Level Control ... 52
Figure 32 The PID Control Program for the Temperature Control ... 53
Figure 33 The PID parameters in the Siemens PLC. ... 54
Figure 34 The translation of Kp, Ti and Td into Ki and Kd ... 56
Figure 35 The HMI display for the PID control of the Level ... 57
Figure 36 The HMI display for the PID control of the Temperature ... 58
Figure 37 The level control transfer function in an open loop in the simulation. ... 60
Figure 38 The open loop transfer function graph from the simulation is given a step input .. 61
Figure 39 The closed loop transfer function in the simulation... 61
Figure 40 The closed loop transfer function in the simulation... 62
Figure 41 The closed loop data taken from testing... 63
Figure 42 The closed loop PID transfer function in the simulation ... 63
Figure 43 The result of a tuned system using PID... 64
Figure 44 The closed loop transfer function being given a Kp of 3.6. ... 65
Figure 45 The closed loop transfer function being given a Kp of 43.2. ... 66
Figure 46 The closed loop level control system being given a Kp of 25 ... 67
Figure 47 The closed loop level control system being given a Kp of 100 ... 67
Raharja Dion Ariesto
Figure 48 The closed loop transfer function being given a Kp of 3.6 and Ki of 0.367319 .... 68
Figure 49 The closed loop transfer function being given a Kp of 43.2 with the Ki scaled in a real-world test. ... 69
Figure 50 The closed loop transfer function having the same Ki as above without the Kp. .. 69
Figure 51 The PLC displaying how it has safety measures to prevent the output from staying on for too long. ... 70
Figure 52 The level control system having a Ki of 0.4 ... 70
Figure 53 The level control system being given a Ki of 0.2 ... 71
Figure 54 The level control system being given a Kp of 25 and Ki of 0.4 ... 71
Figure 55 The level control system being given a Kp of 25 and Ki of 0.2 ... 71
Figure 56 The simulation results of a PID controller with a Kd value of 4.5. ... 72
Figure 57 The output of a PD controller with a Kp of 43 and a Kd of 1. ... 73
Figure 58 The output of a PID Control where Kp is 25, Ki is 0.4 and Kd is 1. ... 73
Figure 59 The output of a PID Control where Kp is 25, Ki is 0.4 and Kd is 2. ... 74
Figure 60 The open loop transfer function being given a step input ... 75
Figure 61 The output of the transfer function being given a step input in the simulation. ... 75
Figure 62 The closed loop function in the simulation being given a step input. ... 76
Figure 63 The closed loop system being given a set point of 45... 76
Figure 64 The temperature output after applying PID onto the system. ... 77
Figure 65 The transfer function and PID in the simulation ... 77
Figure 66 The transfer function simulation with a Kp of 22.4773 applied to it. ... 78
Figure 67 The transfer function output with a Kp of 22.4773 applied to it. ... 78
Figure 68 The temperature control system with a Kp of 25... 79
Figure 69 The temperature control system with a Kp of 12... 79
Figure 70 The transfer function simulation output with a Ki of 0.02. ... 80
Figure 71 The transfer function output with a Kp of 22.43 and Ki of 0.02 as well as a step input. ... 81
Figure 72 The transfer function output with the same Kp and Ki as the simulation. ... 81
Figure 73 The temperature control output when the Ki is 0.1 ... 82
Figure 74 The temperature control output when the Ki is 0.05 ... 82
Figure 75 Temperature control with Kp 25 and Ki 0.1. ... 83
Figure 76 Temperature control with Kp 25 and Ki 0.05. ... 83
Figure 77 The simulation output with the same Kp and a Kd of 1 and a step input. ... 84
Figure 78 The real system output with a Kp of 22.43 and a Kd of 1. ... 84
Figure 79 The Temperature control when Kp is 25, Ki is 0.1, Kd is 1 ... 85
Figure 80 The Temperature control when Kp is 25, Ki is 0.1, Kd is 2 ... 85
Raharja Dion Ariesto