DESIGN OF MONITORING SYSTEM FOR OXIDATION DITCH BASED ON FUZZY ASSISTED MULTIVARIATE STATISTICAL PROCESS CONTROL 1 Katherin Indriawati 1, Metrik Kresna P 1 Engineering Physics Department, Faculty of Industrial Technology, Institut Teknologi Sepuluh Nopember Kampus ITS, Keputih – Sukolilo, Surabaya 60111 email : katherin@ep.its.ac.id ABSTRACT Monitoring system in industrial process is needed to diagnose any situation that happen the process. For a complex system, there are many variables affecting the process, therefore Multivariate Statistical Process Control (MSPC) is needed to replace Statistical Process Control (SPC) to analyze situation of process. In this paper, MSPC have been implemented to monitor some situation modes in simulation happened in oxidation ditch at the waste water treatment system assisted by fuzzy system as decision taker. Principal Component Analysis (PCA) is a MSPC method that could reduce multivariate data variable to become some new variables, and then from the new variables is applied T² to detect does the process stay in normal condition. Each condition that described have different T² value, then is applied fuzzy logic to determine the condition from T² value. Result of decision of simulation can identify the situation with level of success of 100 %. Keywords: MSPC, PCA, Oxidation Ditch, Fuzzy Logic. 1 INTRODUCTION Oxidation Ditch (OD) or also known as oxidation pond is one of the methods used for waste treatment system plant developed from direct liquid waste disposal methods. It disposes liquid waste directly to the tailing pond. In an oxidation pond system, the concentration of microorganism is relatively small and oxygen supply and agitation takes place naturally. These cause degradation process of organic materials occur naturally for relatively long time over a wide area. The process in the oxidation pond is very sensitive to direct disturbances such as pressure variations from the dividing valve, changes in weather (rain), and variations of composition. Hence a monitoring system is required to give information about the state of the process and also about the process behavior. Then, based on that information, further handling or action can be taken to ensure optimal running of the plant. Modern system such as oxidation ditch is a complex process therefore it involves multiple process variables. Due to the number of variables, it will be difficult to design a control or monitoring system for the process. To solve this problem, it can be used the Multivariate Statistical Process Control (MSPC) method (Mac Gregor and Kourti, 1995). MSPC changes multidimensional information into a number of latent variables that explain the variability of the measured variable, including the relations between measured variables. MSPC makes use of statistical methods to analyze, control and influence improvement on process performance based on the existing multivariable. Reducing multivariable to a few main variables can be done by using the Principle Component Analysis (PCA) (Lowry and Montgomery, 1995). However, the latent variable acquired from PCA cannot explain the condition of the ongoing process. This can cause difficulties for operators to interpret them into physical forms. Therefore to interpret these new variables and to classify the current condition of the process, an algorithm for decision-making is needed. One of the current methods often used for decision making is the Fuzzy System. The research done by Indriawati and et. all (2006) incorporates fuzzy system application on SPC which uses fuzzy system for interpreting two control graphics (Shewhart and CUSUM) to determine the conditions of a non-correlated process whether it is on Normal, Warning or Action. In this paper, a fuzzy logic assisted MSPC oxidation ditch monitoring system design is explained. The system used fuzzy logic assistance to make decision about the operating state of the plant. The oxidation ditch modeled in this paper is <Page number for first page> ISSN 2085-1944 <even page number > The 5th International Conference on Information & Communication Technology and Systems based on the Waste Water Treatment Plant at IPAL PT. SIER. Hypothetically the state mode for the plant comprises of normal mode, varied compositions, wastewater flow rate change, temperature change and equipment malfunction. For simulation purposes, the used model complies with International Association on Water Quality (IAWQ) Active Sludge model No.1. The considered / monitored variables are biochemical oxygen demand (BOD), ammonia concentration and nitrate concentration. 2 The value of m is influenced by a number of parameter changes, i.e. the maximum bacterial growth rate are stated by: DO μ' = μ e0.098(T 15 ) [1 0.833 (7.2 pH )] (3) m m KO2 + DO which ’m is the maximum bacteria growth rate affected by temperature changes, oxygen and pH (h1 ), T is temperature (ºC), DO is disolved oxygen concentration (mg/l), KO2 is half saturation constant of dissolved oxygen, and pH is pH level. MODEL, ANALYSIS, DESIGN, AND IMPLEMENTATION 2.1 Oxidation Ditch Modeling Oxidation ditch is a stabilization basin that resembles an open oval-shaped waterway equipped with four aerators called mammoth rotor. The usage of oxidation ditch is determined by pollution of an incoming wastewater flow rate. The aerator serves as oxygen circulator from the air to the water. In this pond, the biological processes that take place are nitrification and de-nitrification which need oxygen for the microorganism (aerobic bacteria) during the wastewater degradation process. The oxidation ditch process is a completely mixed activated sludge process with aeration typically accomplished by mechanical aerators. At oxidation ditch there are multiple input and output variables that influence the process. Therefore, the model structure of oxidation ditch is multi input multi output (MIMO). Both nitrification and de-nitrification process is occurred in the same reactor and works continuously for every process. Each process (nitrification / de-nitrification) can be modeled as one continuous stirred tank reactor (CSTR). As a whole, oxidation ditch is a series of CSTR as shown in figure 1 (Metcalf & Eddy, 1991). In each CSTR, mass balance for every component can be written as: dx Vr = Q x0 Q x +Vr rg dt rg = - k x (1) which Vr is the reactor volume (l), Q is flow rate (l/h), x0 is influent concentration (mg/l), x is effluent concentrration (mg/l), and k is reaction rate (h-1). In the nitrification process, maximum reaction rate as follows : k= μm Y (2) Figure 1. Oxidation Ditch (Metcalf & Eddy, 1991) The concentration change rate of DO in aerator area is: dC (4) = K L a(C s C) dt which Cs is concentration of saturated oxygen (mg/l), C is concentration of oxygen (mg/l), and KLa is mass transfer coefficient for oxygen (s-1) where generally affected by temperature based on van't Hollf – Arrhenius equation: (5) K L a(T) = K L a( 20°C)θ T 20 BOD decline rate under aerobic condition: (6) kT = k20θ T 20 Under anerobic condition, nitrate from the nitrification reaction will be disintegrated into nitogen. The nitrification reaction rate is stated by : (7) U'DN = U DN 1.09(T 20 ) ( 1 DO) which U’DN is total de-nitrification reaction rate (h1 ) and UDN is de-nitrification reaction rate (h-1). BOD decline rate is stated using the same equation in (6). Hypothetically, the state mode for the plant comprises of normal mode, varied compositions, wastewater flow rate change, temperature change and equipment malfunction. To acquire simulation data, it was assumed that for every state, changes in input variables occured and interconnecte, as described in table 1. 2.2 Monitoring System Design The design of monitoring system based MSPC are mentioned in the following section: which m is the maximum specific bacterial growth rate and Y is the true yield coefficient. ISSN 2085-1944 <document ID-Title-first author’s name> < odd page number> Multiway PCA Implementation Principal Component Analysis (PCA) is one of MSPC methods which is usually applied to analyze a set of variables. The purpose of PCA is to reduce data dimension by finding a new variables (called as principal components) which is a linear combination of the original set of variables so that the variation of the new components became maximum and the new components became independent to each other. There are some PCA methods that has been developed, and for the monitoring system design in this paper, the applied method is multiway principal component analysis (MPCA). Table 1. State Mode in Oxidation Ditch Condition State in Oxidation Ditch Normal behavior Composition Variations Weather Change No changes that affects the process state Influent concentration of BOD and NH4 changes Temperature change detected. Wastewater flow rate change due to rain fall. Aerator malfunction caused O2 transfer disturbance that lead to declining of Dissolved Oxygen. The pump in sedimentation basin is malfunctioning, this caused changes in flow rate inside oxidation ditch. Equipment Malfunction Figure 2. Data Grouping in MPCA In simple terms, the data grouping in MPCA is described in figure 2. Measurement data acquired from aeration basin is grouped based on the matrix x RIJK, for i oxidation ditch with j = 1,2...J measurment variable based on time k = 1,2...K. The matrix data (I x J) represents the numbers of reaction basin variables j = 1,2....J, and the matrix (J x K) at horizontal side represent changes in every variable for reaction basin at time of k. The principle components are not correlated to each other and group from the smallest to biggest variant. The first principle component is the linear combination of the maximum variant value. Generally the MPCA method is described in figure 3. In MPCA, the data must be changed into 2 dimensional form. From the simulation result of the oxidation ditch model, a three dimensional data is acquired (i,j,k) for i oxidation ditch, j measurement variable, and k time. Then they are grouped into a (ij x k) matrix form. For the case in this paper, i = 1 and k = 21 with sampling time of 168 hours. j is the number of variables (BOD, NH4, and NO3 concentration). Mean of each variable can be determine as: 1 n (8) xj = x n k k =1 and the standard deviation is: 1 n (9) (xkj x j )2 n 1 k =1 The principal components can be calculated directly or, more commonly, after different centering and scaling operations on the data matrix x according to: Mean centering: x j x j sj = Scalling: xj xj s One of the techniques to find principle components are Singular Value Decomposition (SVD) algorithm, where the matrix for principle components and it's variations could be find directly. In singular value decomposition, SVD, the matrix x is decomposed according to: x = U VT (10) which U is a matrix (k x j), V is a matrix ( j x j), and Σ is a diagonal matrix (k x j) containing the eigenvalue of covariance matrix x, σ on the diagonal. The largest singular value (σ) in column of matrix V, (p1) determines the direction of the first principal component, and the second largest singular value (σ) in column of matrix V, (p2) determines the direction of the second principal component, and so on. Each observation in time xk R J of the variables is projected on to the score space tR(k), by multiplying x(k) with matric of T principal components P R , with R is the number of principal components in the model, and it is defined as: (11) t R k = PRT xk A new matrix projection is acquired (12) xk = PRtR k giving the residual ~ (13) x k = xk xk . To determine if the value of principle component stays within the limit, a statistical test Hotelling T² control map is used to check whether the process is in controlled state. The statistical test used is: (14) T 2 k = t R S R1t Rk ISSN 2085-1944 The 5th International Conference on Information & Communication Technology and Systems <even page number > which S R R R R is the matrix with R as the first eigenvector. Determining State Mode Using Fuzzy From the hotelling T² control chart, it can be acquired the data of the deviation value in every state, by finding the mean and deviation from the T 2 value. Then, those values are used to build a membership function for the input of fuzzy (takagi sugeno). The number of fuzzy input for every considered state depends on the number of choosed principle components. If the membership components of the fuzzy input for every considered state is joined each other, then it should use two principal components as fuzzy inputs to prevent classification mistakes. Fuzzy rule for 1 principle components is: If (input 1 is state 1) then (output is state 1) Fuzzy rule for 2 principle components is: If (input 1 is state 1) and (input 2 is state 1) then (output is state 1) 3 RESULT 3.1 Model Response for Some State Mode From the SVD result, the variation of the principle components matrix (3x3) are: First principal component = 89.75 % of variation Second principal component = 10.11 % of variation Third principal component = 0.14 % of variation Principle Components analysis shows the first principle components has the biggest variation so it can be picked to be used in finding the original data projection. For the normal condition of the oxidation ditch, the variable input is listed in table 2. Figure 4 shows the output model respond and hotelling T² chart for normal state. Under normal state, all T2 values are below the upper limit control. Table .2. Input variable for normal state plant Variable input Wastewater flow rate Temperature BOD concentration NH4 concentration Start Acquiring data from output variable process Value 17.5 L/sec ± 1.5 L/sec 25° C 240 mg/L ± 5 mg/L 30 mg/L ± 2 mg/L Data grouping into matrix form _ Data column Mean centering_ with Xj – Xj, and Scalling (Xj – Xj) / s Count the principle component matrix using SVD algorithm (a) Determining the number of principle components based on the variant size New data projection using equation 11 Statistical test using Hotelling Control Map with equation 14 STOP (b) Figure 4 (a) Model respond in normal condition (b) Hotelling T² control chart Figure 3. The Flowcart of MPCA method ISSN 2085-1944 <document ID-Title-first author’s name> < odd page number> (a) Figure 9. Hotelling T² control chart for DO concentration change. (b) Figure 5. (a) Model respond with increase of waste water flow rate to ± 5.25 L/s . (b). Hotelling T² control chart The model respond of the case increasing wastewater flowrate to ± 5.25 l/sec and its hotelling T² control chart is shown in figure 5. It is shown that the increase in wastewater flow cause the T2 values are above the upper control limit of the hotelling T² control chart. The same resut is obtained for the concentration change case in influent, BOD, NH4, and DO as well as for the temperature change case, as shown in figure 6 – 10. Figure 6. Hotelling T² control chart for influent concentration change (± 30 %) Figure 7. Hotelling T² control chart for BOD concentration change. . Figure 10. Hotelling T² control chart for surrounding temperature change (±3° C) 3.2 Determining the membership function for Fuzzy Input Based on the T² value of the first principal component for every state mode, then the mean value and its deviation was got as follows: State Mean Deviation Normal 15.03 29.16 DO decrease 72.34 8.37 Temperatur change 98.74 39.25 Concentration change 228 57.16 Flow rate change 476.5 68.27 A fuzzy membership function was made due to each state by using gaussian function. The result is shown in figure 11. It is shown that under temperature change and DO concentration change, the membership function curve is joined. Therefore to prevent misclassification, an input membership function for the second principle component is introduced for both states. Meanwhile for other states, it is concluded that one principle component is sufficient. Based on the T² value of the second principal component for temperature change and DO decrease state mode, then the mean value and its deviation was got as follows: State Mean Deviation DO decrease 9.571 3.474 Temperatur change 3.136 1.199 The input membership function for this problem is shown in figure 12. Figure 8. Hotelling T² control chart for NH4 concentration change. ISSN 2085-1944 <even page number > The 5th International Conference on Information & Communication Technology and Systems Table 3. Simulation results for DO concentration change Figure 11. Input membership function for the first principal components Trial DO Concentration State Classification Results 1 1 mg/L 2 0.7 mg/L 3 0.5 mg/L 4 0.2 mg/L DO concentration changes DO concentration changes DO concentration changes DO concentration changes Table 4. Simulation results for temperature change Trial 1 2 3 4 Figure 12. Input membership function for the second principal components The fuzzy rule for the proposed monitoring system are as follows: If (T² value from the first principle components is normal) then (output is normal) If (T² value from the first principle components is DO) and (T² value from the second principle components is DO) then (output is DO concentration change) If (T² value from the first principle components is temp) and (T² value from the second principle components is temp) then (output is temperature change) If (T² value from the first principle components is konsent) then (output is concentration change) If (T² value from the first principle components is debit) then (output is wastewater flow rate change) 3.3 Mode State Classification The proposed monitoring system had been applied to the oxidation ditch model. To investigate the performance of the monitoring system, it was conducted four experiments due to four mode state. The simulation result is shown in tables 3 to 6. Based on the results, it is shown that the proposed monitoring system yields decision of the state condition correctly. Temperature Change ± 2° C ± 3° C ± 4° C ± 5° C State Classification Results Temperature changes Temperature changes Temperature changes Temperature changes Table 5 Simulation results for concentration change Trial Concentration Change 1 ± 20 % BOD & NH4 2 ± 25 % BOD & NH4 3 ± 30 % BOD & NH4 4 ± 30 % BOD 5 ± 30 % NH4 State Classification Results Concentration changes Concentration changes Concentration changes Concentration changes Concentration changes Table 6 Simulation results for waste water flow rate change Trial 1 Waste Water Flow Rate Change ± 10000 L/hour 2 ± 15000 L/hour 3 ± 20000 L/hour 4 ± 25000 L/hour 5 ± 30000 L/hour ISSN 2085-1944 State Classification Results Wastewater flow rate change Wastewater flow rate change Wastewater flow rate change Wastewater flow rate change Wastewater flow rate change <document ID-Title-first author’s name> 4 < odd page number> CONCLUSION There are a number of conclusions drawn during this research, i.e.: Membership function using single principle component may result in two joined membership function curve, such as the case in DO concentration change and temperature change condition. Therefore two fuzzy inputs are needed to reduce misclassification. The simulation results is able to identify the state comprehensively with 100% success rate. Interpretasi Data SPC Untuk Pemantauan Kinerja Plant”, Industri - Jurnal Ilmiah Sains dan Teknologi: Volume 5 No. 2. Metcalf dan Eddy. 1991. Wastewater Engineering, Treatment Disposal, and Reuse. McGraw Hill, New York. Mac Gregor , J. F., Kourti , T., 1995, Statistical process control of multivariate processes. Contr. Engng Pr., 3, 403±414. Lowry CA, Montgomery DC (1995) A review of Multivariate control of training NDCs by comparing those restricted to particular recharts. IIE Trans 27:800–810 REFERENCES Indriawati, K., Kurniadi, D., Yuliar, S., (2006) ”Penerapan Fuzzy Inferential System Pada ISSN 2085-1944