# Mathematical modeling and parameter estimation for water quality management system.

date post

19-Aug-2014Category

## Engineering

view

101download

19

Embed Size (px)

description

This report describes various problem solving techniques in mathematical modeling for calculating various parameters of water e.g. temperature, pH, Dissolved oxygen. A mathematical model provides the ability to predict the contaminant concentration levels of a river. Here we are using an advection-diffusion equation as our mathematical model. The numerical solution of equation is calculated using Matlab & Mathematica. Parameter estimation is necessary in water modeling to predict the different parameters of water at different point with minimal errors. So here we use 2D & 3D interpolation technique for parameter estimation.

### Transcript of Mathematical modeling and parameter estimation for water quality management system.

- Mathematical Modeling and Parameter Estimation for Water Quality Management System. Summer Internship report May 15, 2014 July 15, 2014 Student: Kamal Pradhan (12BTCSE04) Program: B.Tech Computer Sc. Department: SUIIT Supervisor: Dr. Nihar Satapathy Project name: AquaSense SAMBALPUR UNIVERSITY INSTITUTE OF INFORMATION TECHNOLOGY Submitted by: Kamal Pradhan, B.Tech CSE. Guided By: Dr. Nihar Satapathy H.O.D, Dept .of Mathematics, Sambalpur University
- AquaSense, Internship 2014 2 Acknowledgement First I would like to thank Dr. Nihar Satapathy, H.O.D Dept. of Mathematics and P.I (AquaSense), Sambalpur University for giving me the opportunity to do an internship within the organization. For me it was a unique experience to be in Sambalpur and to study an interesting subject. It also helped to get back my interest in ecological research and to have new plans for my future career. I also would like to thank all the people that worked in the lab of ITRA in Sambalpur University Institute of Information Technology. With their patience and openness they created an enjoyable working environment. Furthermore I want to thank all the Research fellows and students, with whom I did the fieldwork. At last I would like to thank the ITRA Group, especially Dr. Nihar Satapathy, Principal Investigator of the project AquaSense, to allow me to do this interesting internship.
- AquaSense, Internship 2014 3Abstract This report describes various problem solving techniques in mathematical modeling for calculating various parameters of water e.g. temperature, pH, Dissolved oxygen. A mathematical model provides the ability to predict the contaminant concentration levels of a river. Here we are using an advection-diffusion equation as our mathematical model. The numerical solution of equation is calculated using Matlab & Mathematica. Parameter estimation is necessary in water modeling to predict the different parameters of water at different point with minimal errors. So here we use 2D & 3D interpolation technique for parameter estimation. Introduction This report is a short description of my two month internship carried out as a component of the B.Tech in computer science. The internship was carried out within the organization Sambalpur University Institute of Information Technology in from May 15-July 15 2014. Since my I am interested in Programming and quite acquainted with mathematical toolbox such as matlab and mathematica, the work was concentrated on solving complex mathematical problems programmatically. This internship report contains my activities that have contributed to project. In the following chapter a description of the organization ITRA and the activities is given. After this a reflection on my functioning, the unexpected circumstances and the learning goals achieved during the internship are described.
- AquaSense, Internship 2014 4Description of the internship 1. The organization ITRA IT Research Academy (ITRA) is a National Programme initiated by Department of Electronics and Information Technology (DeitY), Ministry of Communications and Information Technology (MCIT), Government of India, aimed at building a national resource for advancing the quality and quantity of R&D in Information and Communications Technologies and Electronics (IT) and its applications at a steadily growing number of academic and research institutions, while strengthening academic culture of IT based problem solving and societal development. ITRA is currently operating as a Division of Media Lab Asia (MLAsia), a Section-25 not-for-profit organization of DeitY. 2. About the project AquaSense To develop an indigenous, intelligent and adaptive decision support system for on-line remote monitoring of the water flow and water quality across the wireless sensor zone to generate data pertaining to utilization of water and raising alerts in terms of mails/messages/alarm following any violation in the safety norms for the drinking water quality and usage of amount of water. This proposed research objective is also to provide simple, efficient, cost effective and socially acceptable means to detect and analyze water bodies and distribution regularly and automatically to design and develop wireless sensing hardware for collecting hydraulic parameters like pressure, flow and volume, and water quality parameters like Salinity, Color, pH, DO, Turbidity, Temperature, Fluoride, Arsenic, Mercury, Lead, Selenium, Nitrate, Iron, Manganese and pathogens like Algal toxins (cyan bacteria) etc to design wireless sensor network zone architecture for drinking water flow and quality monitoring to develop the interface modules (both hardware and software) for the wireless sensor nodes and probes to develop an user interface for logging data after data fusion from the different sensor nodes To design a database schema for storing on-line data received from the sensors. a data collection and visualization infrastructure to develop modeling and analysis tools (on-line estimation and prediction of the water distribution systems hydraulic state and leak/burst detection and localization) to develop a Rule-base by incorporating the feedback of users to include the quality perception of users based on the locality and preferences through machine learning algorithms to develop a knowledge-base for different regions and applications to develop an expert system for adaptive setting up of new bench mark for water quality of drinking water and other usage
- AquaSense, Internship 2014 5 3. Mathematical Modeling and finding numerical solutions Mathematical Model for the Concentration of Pollution using Advection- Diffusion equation A mathematical model provides the ability to predict the contaminant concentration levels of a river. We present a simple mathematical model for river pollution. The model consists of a pair of coupled reaction diffusion-advection equations for the pollutant and dissolved oxygen concentrations, respectively. We consider the steady state case in one spatial dimension. For simplified cases the model is solved analytically by considering the case of zero dispersion, thats mean ( Dp=0 and Dx=0). The standard advection-diffusion-equation may be written as follows: C: Concentration of pollutant D: Diffusion Coefficient u: Mean flow velocity x: Position t: Time Solving the equation through programmatically: Mathematica Code Here we are solving the advection diffusion equation where the time is varying from 0-2 seconds and the position is varying from pi to pi. sol = NDSolve[{[[, ], ] == 0.5[[, ], , ] + [, ][[, ], ], [, Pi] == [, Pi] == 0, [0, ] == Sin[]}, , {, 0,2}, {, Pi, Pi}]; By plotting solutions evaluated from the above equation we obtain the following graphs. Plot3D[Evaluate[[, ]/. First[sol]], {, 0,2}, {, Pi, Pi}, PlotRange All] Fig. 1. Graphs of advection diffusion equation
- AquaSense, Internship 2014 6 Now if we vary the position and time over a period of t=30 with density =0.7 and concentration of pollutant. Solution of advection dispersion equation using matlab Fig. 2 Graph of advection diffusion equation with varying parameters
- AquaSense, Internship 2014 7
- AquaSense, Internship 2014 8 Matlab functions to solve the equations 1. %Boundary Condition function [ p1,q1,pr,qr ] = pdebc( x1,cl,xr,cr,t ) p1=cl-1; q1=0; pr=cr; qr=0; end %Boundary Condition function [ p1,q1,pr,qr ] = pdebc( x1,cl,xr,cr,t ) p1=cl-1; q1=0; pr=cr; qr=0; end %Initial Condition function [ c0 ] = pdeic( x ) c0=0; end % Main Function function [ g,f,s ] = pdefun( x,t,c,DcDx ) %PDEFUN Summary of this function goes here % Detailed explanation goes here D=2; g=4; f=D*DcDx; s=0; end Fig. 3 Graph obtained by varying x= (0, 2.5, 200) & t= (0, 5,100)
- AquaSense, Internship 2014 94. Parameter Estimation in Modeling Parameter estimation plays a critical role in accurately describing system behavior through mathematical models such as statistical probability distribution functions, parametric dynamic models, and data-based models. In the mathematical field of numerical analysis, interpolation is a method of constructing new data points within the range of a discrete set of known data points. As water body is dynamic i.e. it contains more than coordinate so we cannot use linear interpolation to estimate a particular parameter in a given point. Let us assume that we place sensors in the upper surface of water so now the sensors are in a 2 dimensional coordinate system (Fig. 4). Here we can see that the river is a regular body i.e. square in shape. The sensors are placed in the body such that it exactly covers the river. Here we cannot use linear interpolation as a single point in the grid is surrounded by 4 sensors. Therefore the value at a single point depends upon the value that is accused by the neighboring sensors. The solution to this problem is bilinear interpolation or gridded interpolation.
- AquaSense, Internship 2014 10 Bilinear interpolation is used when we need to know values at random position on a regular 2D grid. The key idea is to perform linear interpolation first in one direction, and then again in the other direction. Although each step is linear in the sampled values and in the position, the interpolation as a whole is not linear but rather quadratic in the sample location. Here the input data of temperature is between points -5