1    CONTINUOUS TURBIDITY MONITORING SYSTEM K.A.K.G Kuruppu (09/8710) Degree of Master of Science Department of Electrical Engineering University of Moratuwa Sri Lanka April 2014 2    CONTINUOUS TURBIDITY MONITORING SYSTEM K.A.K.G Kuruppu (09/8710) Dissertation submitted in partial fulfillment of the requirements for the degree Master of Science Department of Electrical Engineering University of Moratuwa Sri Lanka April 2014 3    DECLARATION “I declare that is my own work and this thesis does not incorporate without acknowledgment any material previously submitted for a Degree or Diploma in any other University or institute of higher learning and to the best of my knowledge and belief it does not contain any material previously published or written by another person except where the acknowledgement is made in the text. Also, I hereby grant to University of Moratuwa the non-exclusive right to reproduce and distribute my dissertation, in whole or in part in print, electronic or other medium. I retain the right to use this content in whole or part in future works (such as articles or books). Signature: Date: The above candidate has carried out research for the Masters Dissertation under my supervision. Signature of the supervisor: …………………………… Date: Dr.D.P Chandima               4    ABSTRACT It is very important to measure the turbidity of raw water because the turbidity of treated water should be less than 5 NTU. In water treatment plants, three water samples per day are taken for turbidity testing. The main objective of this research is to propose on alternative continuous turbidity monitoring system instead of manual test. Several experiments were alone to fine out a relationshipbetween colour difference and turbidity. Colour difference was measured and calculated by MATLAB program. Turbidity was measured by “HACH” turbidity meter. Thereafter best fitted curve was development by using E - views software. After few verification experiments the project was implemented at the laboratory of the treatment plant at Kandana. Final implementations was done at Ingiriya Water Supply Scheme and according to the results arrange error percentage is below 4.14% Accuracy of the proposed System can be further improved by fitting a better models and by increasing the population of sample data set. 5    DEDICATION I dedicate my dissertation work to both my parents. My Father late Mr.Lionel Kuruppu did not only raise and nurture me but also taxed himself dearly over the years for my education and intellectual development. Also motherly care and support of my mother Mrs.Nanda Kuruppu, have been shown in incredible ways recently. 6    ACKNOWLEDGEMENT I wish to acknowledgment and express my sincere thanks to my Supervisor Dr.ChandimaPathirana Senior Lecture, University Moratuwa for the technical support and advice he gave me. I am also grateful to Professor Lanka Udawatta former senior Lecturer of University of Moratuwa and all other members of Department of Electrical Engineering, University of Moratuwa for the support given to me from the beginning of Industrial Automation MSc class. I would also like to all reviewers who attended in the progress review presentation for giving me their valuable comments and guidance. Without the help and support given by Mr.Shehan Fernando, Lecturer, KDA, I would not have been to able to complete this research project in time and I am very thankful to him for his support. I would also like to thank Mr.C.P Malalanayaka, staff Technical officer, Dept. of Textile & Clothing Technology, University of Moratuwa, M/s Nanda Ranaweera Chemist and M/s Sasadara Udahawadugedara, Office Assistant of National Water Supply and Drainage Board who gave me full support to complete this project. Love and affection to my mother Nanda Kuruppu, my wife Manjula Kurppu and my daughter Thisari & Senali for their patience and understanding. Lastly, I should thank many individuals, friends and colleagues who have not been mentioned here personally in making this educational process a success. May be I could not have made it without your support.   7    TABLE OF CONTENTS Declaration i Abstract ii Dedication iii Acknowledgment iv Table of Contents v List of Figures viii List of Tables x List of Abbreviations xi List of Appendices xii 1.Introduction 1 1.1 Water Treatment 1 1.2 Turbidity of Water 2 1.3 Measurement 2 1.4 Problem Background 3 1.5 Research Objective 3 1.6 Organization of Dissertation 4 2. Literature Review 5 2.1 Continuous turbidity monitoring in streams 5 Of North Western clarification 2.2 Continuous turbidity monitoring and Regression Analysis 5 2.3 Turbidity Measurement: 6 2.4 Continuous Monitoring of Suspended sediment in 9 Rivers by use of optical sensor 8    3. Research and Methodology11 3.1 Selection of a Suitable place 11 3.2 Water treatment operation 11 3.3 Design of the measuring system 12 3.3.1 selecting a light source 12 3.3.2 Selecting a Camera 13 3.3.3 Glass tank 13 3.4 Digital Turbidity Meter 14 3.5 Methodology of the proposed System 14 4. Colour Space and Image Processing 16 4.1Colour 16 4.2 Matching colours 16 4.3Colur Spaces 17 4.3.1 RGB colour space 17 4.3.2 CIE based colour spaces 18 4.3.3 HSL Type colour spaces 19 4.3.4 CIE x YZ colour space 19 4.3.5 CIE Lab colour space 20 4.4 Transformation between colour spaces 20 4.4.1 Transformation between XYZ plane and LMS plane 21 4.4.2 Transformation between RGB colour space to XYZ space 21 4.4.3 Transformation between XYZ colour space to CIE lab colour space 22 4.5 Colour Difference 23 5. Research Findings 24 5.1 Introduction 24 5.2 First experiment 24 5.3 Second experiment 26 9    5.4 Analysis of results 31 5.4.1 Polynomials 31 5.4.2 Curve fitting 33 5.5 Skewness 33 5.6 Kurtosis 34 5.7 R2 Valve 34 5.8 Experimented Models 34 5.9 Conclusion of analysis 37 5.10 Measuring Turbidity of actual water sample 39 6 Implementation and Results 41 6.1 Introduction 41 6.2 Flushing System 41 6.3 Implementation 42 6.4 Results 44 6.5 Analysis of results 45 6.6 Better model 45 6.7Implementation at Ingiriya water supply scheme 47 6.8Analysis of final results 48 7 Conclusion and recommendation 49 7.1 Conclusion, Recommendation and Discussion 49 8 Reference 50     10    LIST OF FIGURES Figure Page Figure 2.1: The 900 detection angle 7 Figure 2.2: The attenuated detection angle 8 Figure 2.3: The backscatter detector 9 Figure 3.1: Background of the image 13 Figure 3.2: “HACH” brand digital turbidity meter 14 Figure 4.1: RGB colour space 17 Figure 4.2: CIE Lab colour space 20 Figure 4.3: Colour Distance of CIE Lab colour space 22 Figure 5.1: Glass tank and the cover box 24 Figure 5.2: Image of the sample No.1 25 Figure 5.3: Image of the sample No.2 25 Figure 5.4: Image of the sample No.3 26 Figure 5.5: Apparatus Arrangement 27 Figure 5.6: Reference image 28 Figure 5.7: The 2nd image 28 Figure 5.8: First fifteen images 30 Figure 5.9: Observed data points 31 Figure 5.10: Common 2nd degree polynomial graph 32 Figure 5.11: Common 3rd degree graph 33 11    Figure 5.12: Residual plot of model 1 35 Figure 5.13: Residual plot of model 2 36 Figure 5.14: Residual plot of 3 36 Figure 5.15 Graph: comparing different models on observed data points 37 Figure 5.16: Best fitted Model 38 Figure 5.17: Best fit model with five new points 39 Figure 6.1: Turbidity measuring with flushing 41 Figure 6.2: Measuring arrangement 42 Figure 6.3: Digital Turbidimeter 42 Figure 6.4: Results given by the computer 43 Figure 6.5: Results given by the computer 43 Figure 6.6: Reading given by the Turbidimeter 44 Figure 6.7: Best fit curve (upper part) 45 Figure 6.8: Best fit curve (lower part) 46 Figure 6.9: Best fit curve (with 50 samples) 46               12    LIST OF TABLES Table Page Table 5.1: Test Result of the 2nd Experiment 29 Table 5.2: Measured data of water samples taken from the river 40 Table 6.1: Results 44 Table 6.2: Results of the final practical test 47 Table 6.3: Results obtained from Ingiriya test 47 13    LIST OF ABBREVIATIONS NTU - Nephelometric Turbidity Units. TSS - Total Suspended Solids. MSE - Mean Square Error LED - Light Emitting Diode MGD - Million Gallons per Day SSC - Suspended – Sediment Concentration HD - High Density CRT - Cathode Ray Tube                               14    LIST OF APPENDICES Appendix A- MATLAB Code for processing image Appendix B -Result sheet