**3. Building an expert system**

To design an automated system and its control for process, main part of this project, the procedure used is defined in Fig. 4.

b. In the other hand it provides continuous monitoring of sewage treatment. Also displays historical process data and manage the process notices provided by the system. This not only allows real time monitoring of the plant but also to make predictions or future

There is a relationship between the different elements of the control system SCADA and the work they do within the system. With these automated systems achieve optimize sewage treatment with comparison of actual and theoretical graphics. Modification of the existing situation assumptions are made and are valued, quantifying their effects to the objectives

From a technological perspective, the following requirements for the development of the

a. Take advantage of, where possible, equipment and processes of the plant that is the

b. The control system must govern all elements of the wastewater treatment plant

c. A program must be available for their daily operations and for emergencies and

d. Provide clear and detailed system status, based on records and alarms, to facilitate

On the basis of these requirements, and prioritizing the relation cost-versatility, for the

c. Re-using of existing equipment when it not minimizes the requirements for the control system. Elements strictly necessary are added for increasing the efficiency of the

To design an automated system and its control for process, main part of this project, the

a. A series PLC Siemens S7-200 control system [SIMATIC, 1999; Siemens, 1998, 2000]. b. "WinCC Flexible SCADA" Siemens Software to design and monitor the Human-Machine Interface [Siemens, 2005](Penin, 2006). Fig. 3 shows a scheme of blocks of this

set. Therefore, the objective of operation of the plant is granted.

performance, and monitor its proper functioning.

human decisions making, if were necessary.

implementation of the system the following were chosen:

prospects.

system control have been established:

object of this study.

maintenance.

system.

system.

Fig. 3. Human-machine interface

**3. Building an expert system** 

procedure used is defined in Fig. 4.

Fig. 4. Procedure for building an expert system

With reference to the development of the operative part of the system, it is necessary to do two basic aspects:


As to the first point, the process of purification consists of the following processes: Filtering, elimination of the colloids through the process physical-chemical clotting and flocculation, treatment to regulate the Ph of the water, biological treatment and finally, decanting and

C100

Expert System Design for Sewage Treatment Plant 69

The water to be treated is stored in a basin. The purification process starts when the water enters the storage basin at the entrance well, in the well there is a pump that constantly circulates the water towards a static sieve which takes care of the solid waste. Once the water from the entrance well reaches the work level, it is directed to the mixer of the first

In the mixers of the 1st and 2nd stage a variety of preparations will be added to water: ferric chloride, poly-electrolyte and aluminium chloride, to decant the water pollutants by coagulation and flocculation (process where colloids come out of suspension in the form of floc or flakes), in a solid waste called flocs. In order that this process takes place under optimum conditions of pH, calcium hydroxide will be added at the 1st stage. A motor will be continuously working throughout the process for mixing the different chemicals preparations to water. The waste water treated with these agents will be moved to some decanters in where the solid remains of the process, or flocs, will collect and will be stored in a deposit for that purpose. And the cycle of waste water treatment by biological treatment in

In the pools, the "biological treatment", it is made by the growth of a bacterial flora that eats dirt. The Ph level in the pools should not be very high because but bacteria responsible for the purification will not carry out its work correctly as it will protect itself due to the high Ph level. There is also in these pools a flow of sludge, which is removed in proportion to the water flow in it. In this way the excess of bacterial population is removed and recycled at the same time, which in turn maintains its capacity for purification. To maintain a level of oxygenation appropriate in the pools, air is injected, producing a bubbling of air from the

Both the sludge from the decanters and sludge extracted (Lindberg, 1997) from the pools of biological treatment will be removed to some tanks. In these tanks will be working some motors to prevent it from solidifying. To remove the sludge from the tanks will be used some pumps operated by some air motors, taking advantage of the air installation that exists

In the second point for the selection and sizing of components, a deep knowledge of technology is needed. Diminishing the importance of this fact may bring irreparable losses in addition to endanger human lives. In their technical catalogues and software some manufacturers print the phrase "Failure or improper selection or improper use of the products and/or systems described herein or related items can cause death, personal injury and property damage". Depending on the engineer's previous experience the information

With the description of these two aspects, what has been tried to highlight is the need to consider many other factors, besides cost and technical performance when attempting to

and assistance required from manufacturers may vary considerably.

 Process 5: "Process of Aluminium chloride preparation". Process 6. "Process of physical-chemical sludge removal".

Process 7: "Biological sludge Extraction Process".

bottom together with the action of some ventilators.

choose a make or type of system components.

Process 8: "The emergency stop".

stage.

pools will continue.

to inject air into the pools.

< EV108 EV107 EV106 EV104 EV105B EV105A EV101 EV102 EV100 EV103 M109 M110 P104 P108 P107 P105B P105A M106 M107 M108 P104 P111 M104 M103 P103 M105 M101 P101 P102 M102 P110 P100 P109 S400 < < S410 S409 S408 < S414 S413 < < S407 S406 S405 <sup>&</sup>lt; S404 S404B < S403 S403B < S412 S412B S417 > S416 S415 S401 > S402 < S411 S411B Towards sewer system Biological Sludge Extraction sludge Physicochemical Sludge Pool 2 Pool 1 Static sieve Ferric Chloride Tank Ferric Chloride Preparation Calcium Hydroxide Preparation Towards Basin Sewage flow Mixer 1st stage Polyelectrolyte Preparation Aluminium Chloride Tank Aliminium Chloride Preparation Mixer 2nd stage Decation tank 1st stage Decation tank 2nd stage Ph Sensor  **Biological Pools Biological Sludge Income Well Decantion Tank Decantion Tank st Mixer 1 Stage Mixer 2nd Stage Flocculation Sludge**

sludge extraction. In Fig. 5 is shown a sewage treatment plant scheme where have place these processes.

Fig. 5. Sewage Treatment Plant Scheme

The control system must govern all elements of performance of the sewage treatment Plant, and monitor its proper functioning. Moreover, it has to have a program for its daily operations and emergencies. All this accompanied by an information system supported by records and alarms to facilitate human decisions making, if were necessary. The control system may operate automatically according to operating programs daily and/or manually in case of emergency or tuning on.

Normally, in each of the control processes in a plant a programmable automation model is chosen. The process used here is continuous. Due to need for an algorithm as open as possible, in order to be able to work in different PLC's, depending on the needs of clients, and the capacities of the system, it has opted for a program in language of contacts that allow to be implemented in any PLC of the market. There is a cycle of working with seven processes that operate simultaneously or selectively. The activation of each of the processes will depend on the necessity to activate the process in question (Lira et al., 2003). The processes of the system are following:


sludge extraction. In Fig. 5 is shown a sewage treatment plant scheme where have place

M103

Polyelectrolyte Preparation

P103

Decation tank 1st stage

**st Mixer 1 Stage Mixer 2nd Stage**

**Decantion Tank**

< S403 S403B

M105

Mixer 1st stage

P102

Ph Sensor

Ferric Chloride Preparation

EV108 EV107 EV106

P104

The control system must govern all elements of performance of the sewage treatment Plant, and monitor its proper functioning. Moreover, it has to have a program for its daily operations and emergencies. All this accompanied by an information system supported by records and alarms to facilitate human decisions making, if were necessary. The control system may operate automatically according to operating programs daily and/or manually

Normally, in each of the control processes in a plant a programmable automation model is chosen. The process used here is continuous. Due to need for an algorithm as open as possible, in order to be able to work in different PLC's, depending on the needs of clients, and the capacities of the system, it has opted for a program in language of contacts that allow to be implemented in any PLC of the market. There is a cycle of working with seven processes that operate simultaneously or selectively. The activation of each of the processes will depend on the necessity to activate the process in question (Lira et al., 2003). The

EV104

Biological Sludge

 **Flocculation Sludge**

> **Biological Sludge**

P108

EV105B

P105B

C100

Extraction sludge

EV105A

S405 <sup>&</sup>lt;

Aluminium Chloride Tank

< <  S407 S406

**Decantion Tank**

P105A

< S414

S413

Decation tank 2nd stage

EV101 EV102

Mixer 2nd stage

Physicochemical Sludge

M106 M107 M108

P104 P111

M104

 S404 S404B

Aliminium Chloride Preparation

P107

Pool 2 Pool 1

< < S410 S409 S408

M109 M110

 **Biological Pools**

these processes.

EV103

Towards Basin

Static sieve

S400

S401

Sewage flow

P100 P109

**Income Well**

Towards sewer system

Fig. 5. Sewage Treatment Plant Scheme

in case of emergency or tuning on.

processes of the system are following: Process 1: "Water filling process".

 Process 2: "Process of polyelectrolyte preparation": Process 3 "Process of calcium hydroxide preparation".. Process 4: "Process of Ferric Chloride Preparation"..

> S402 <

 S417 > S416 S415

EV100

Ferric Chloride Tank

M101

< S411 S411B

P110

P101

Calcium Hydroxide Preparation

M102

< S412 S412B

The water to be treated is stored in a basin. The purification process starts when the water enters the storage basin at the entrance well, in the well there is a pump that constantly circulates the water towards a static sieve which takes care of the solid waste. Once the water from the entrance well reaches the work level, it is directed to the mixer of the first stage.

In the mixers of the 1st and 2nd stage a variety of preparations will be added to water: ferric chloride, poly-electrolyte and aluminium chloride, to decant the water pollutants by coagulation and flocculation (process where colloids come out of suspension in the form of floc or flakes), in a solid waste called flocs. In order that this process takes place under optimum conditions of pH, calcium hydroxide will be added at the 1st stage. A motor will be continuously working throughout the process for mixing the different chemicals preparations to water. The waste water treated with these agents will be moved to some decanters in where the solid remains of the process, or flocs, will collect and will be stored in a deposit for that purpose. And the cycle of waste water treatment by biological treatment in pools will continue.

In the pools, the "biological treatment", it is made by the growth of a bacterial flora that eats dirt. The Ph level in the pools should not be very high because but bacteria responsible for the purification will not carry out its work correctly as it will protect itself due to the high Ph level. There is also in these pools a flow of sludge, which is removed in proportion to the water flow in it. In this way the excess of bacterial population is removed and recycled at the same time, which in turn maintains its capacity for purification. To maintain a level of oxygenation appropriate in the pools, air is injected, producing a bubbling of air from the bottom together with the action of some ventilators.

Both the sludge from the decanters and sludge extracted (Lindberg, 1997) from the pools of biological treatment will be removed to some tanks. In these tanks will be working some motors to prevent it from solidifying. To remove the sludge from the tanks will be used some pumps operated by some air motors, taking advantage of the air installation that exists to inject air into the pools.

In the second point for the selection and sizing of components, a deep knowledge of technology is needed. Diminishing the importance of this fact may bring irreparable losses in addition to endanger human lives. In their technical catalogues and software some manufacturers print the phrase "Failure or improper selection or improper use of the products and/or systems described herein or related items can cause death, personal injury and property damage". Depending on the engineer's previous experience the information and assistance required from manufacturers may vary considerably.

With the description of these two aspects, what has been tried to highlight is the need to consider many other factors, besides cost and technical performance when attempting to choose a make or type of system components.

Expert System Design for Sewage Treatment Plant 71

Fig. 6. Procedure for design and development of process control

As for the second phase, "Control Design and development", develops the functional and operational aspects of the expert system and will be dealt with in depth in the next section. The estimate of the same ones, in programmable controller, option chosen in this project, is achieved frequently using a complex mathematical model or control algorithm. Obviously, the 'programmable' attribute increases the potential and the flexibility that has the designer but in contrast increases the complexity, the number of possible solutions and the time spent. Because of this there is a need to define procedures that save time and complexity, and that allow to obtain the optimum solution.

In phase 3, schematic diagrams and circuit diagrams will be made, which are particularly important to build the system and subsequently for realizing the installation and maintenance on site. These diagrams reflect the composition of the built system and will include all units of measurement, technical data of elements and their reference numbers.

For the phase 4, implementation of the control system, it will be necessary know specifications and principles of functioning of control elements used, that will be fundamental for their implementation.

In phase 5, 'Test & Improvement', is to compare the expert system built with the initial requirements and the specification. This complete control of their functioning and operating mode must be made prior to its installation on site.

And last, but not least important, the documentation is an essential prerequisite to facilitate installation, final preparation and maintenance of the designed system. The documentation of the individual phases, including control programs should be available so on paper as on digital media. It goes without saying that the real state of the built expert system must coincide with the documentation.
