Design and Optimisation of

This paper deals with using fuzzy logic to minimize uncertainty effects in surveillance. It studies the conception of an efficient fuzzy expert system that had two characteristics: generic and robust to uncertainties. Analyzing distance between variables optimal and real values is the main idea of the research. Fuzzy inference system decides, then, about significant variables state: normal or abnormal. A comparison between three proposed fuzzy expert systems is presented to highlight the effect of membership number and type. Beside, being generic this system could also be applied in three fields: industrial surveillance, camera surveillance and medical surveillance. To expose results in these fields, matlab is used to realize this approach and to simulate systems responses which revealed interested conclusions.


I. INTRODUCTION
Ambiguous environments constitute an enormous problem for decision makers.As a matter of fact, uncertainties affect decision making especially for surveillance in many fields.These uncertainties are the result of many sources such as: nonlinearities, non exhaustive mathematical models, non effectiveness of sensors/detection equipments and qualitative knowledge representation.The most common methodologies that had dealt with this issue are traditional tools as probability theory, error interval analysis and especially fuzzy theory [1].The first link between fuzzy theory and decision making was introduced in [2].It was based on the fact that according to a criterion good solutions are fuzzy sets.Besides, the best solution set is obtained from their intersections [3].The most popular fuzzy sets approach, in decision-making, is the maximum ranking solutions.This method is natural when interpreting the fuzzy sets as flexible constraints.While uncertainty affects several domains and has many facets (randomness, fuzziness etc.), fields and applications concerned with this issue are, especially in the last decade, growing proving the efficiency of fuzzy logic use.
Fuzzy Expert Systems (FES) are expert system that uses fuzzy sets to reason [5].In another words, FES are intelligent tools capable of making decisions dealing with ambiguous data.A recent research [4] had proved that, in 2010, that the number of published papers adopting fuzzy systems approaches is the most important.Besides, the same article confirms that industrial and medical applications and especially diagnosis is the most growing application field of these techniques.

II. FUZZY EXPERT SYSTEM OVERVIEW
Fuzzy expert system or fuzzy inference system is composed of three units: fuzzification, inference engine and defuzzification.It treats qualitative data with vague and fuzzy descriptions.The application of fuzzy expert system touched many fields especially industrial and medical surveillance.
Recent works used FES in fault diagnosis applications.[11] had realized a diagnosis application which based on FES to identify failures in power system by analyzing amplitude and signal orientation then by classifying abnormalities.In the same spirit, many applications in power system had been developed with FES such as [29][14] [8].Detecting episodes of poor water quality is realized by fuzzy inference system in [15].In the same domain these works using FES treated aluminum electrolysis [16] and detecting failures in computer [17].Research results also in developing decision making applications using fuzzy expert systems in medical diagnosis.[18] presents a fuzzy application to analyze diabetic state.In another hand, using fuzzy logic many systems take decision: [19] about hypertension state, [20] about lever state, [21] about state of prostate cancer, [22] about heart state, [23] about breast cancer.

Medical diagnosis
[47], [52], [46] , [48], [49] , [18], [19], [20], [21], [53], [23], [54], [19], [45] Video surveillance [54], [60] Economic domain [55], [56], [51] Civil domain [34], [10], [27] Software domain [57] www.ijacsa.thesai.orgThis state of art on FES between 2007 and 2013 took into account 50 new publications.We conclude on the importance of fuzzy inference systems in decision making issue.In fact, uncertainty is a matter that affects all kind of field which explains the applications diversification.This research confirms the conclusions made in [4] about the most significant application field which is diagnosis (industrial and medical).We explain these facts by the need of decision aid systems in diagnosis and by the abundance of fuzzy data in these environments.Results generated by different expert systems are robust against vagueness and uncertainty and a certitude coefficient is usually calculated to enhance the effectiveness and the interpretation of outputs.
We remark also that each application had its particular inputs and outputs.Thus, the developed fuzzy expert systems are specific for each treated problem.This point had been the key of our research issue.
The abundance of articles in this issue indicated efficient results in industrial and medical diagnosis and surveillance.However, other fields are concerned with fuzzy systems.[52] used genetic algorithm to build rule base, [43] evaluated the performance of software based on certain characteristics, [24] developed FES to evaluate the state of public discharge land, [25] realized a multi agent system and FES decided about the role of each agent, [26] used FES in supply chain localization, [27] used FES in travelling domain, [28] used FES in renewable energy.

III. RESEARCH ISSUE
Our aim is to propose a generic fuzzy expert system that could be applied in several domains to monitor the state of significant variables characterizing the studied situation.In this optic, we should first determinate these variables and fixe their optimal and desired values.Then, the proposed FES is responsible of deciding whether the variable is behaving in optimal trajectory.We gave a special attention to research of Evsukoff [7] that presents a FES based on the analysis of significant variables residual and their variation.It was applied in industrial fault detection where partial decisions are made about variables (normal-OK or alarm-AL).In an earlier work [58], we've proposed a modified version of Evsukoff FES which minimized rules number and raised robustness against uncertainties by weighting rules with triangular functions instead of fixed values.In the same way and applied in control, [59] analyzed the error end its variation using fuzzy expert system with seven membership functions for each input.Figure 4 illustrates its inference system.After studying different points of view, we are trying to determinate the most appropriate fuzzy expert system to be adopted and to be a generic tool for monitor a situation and for helping in decision making about its state.
We are proposing a system which gives partial conclusion about each variable by analyzing its residual.Also, we are studying in this work the effects of raising the number of membership function in FES.Finally, we should prove that the approach is generic by applying same FES in different fields.

IV. CONCEPTION OF FES FOR SURVEILLANCE
Surveillance is, generally, assured through two steps: detection of anomalies and their diagnosis.The FES we are proposing is responsible of detecting abnormal situation.Figure 5 is schema block that defines the inputs and the outputs of the system.www.ijacsa.thesai.orgIn fact, It has two inputs: residue/error ( r ) and residue derivative ( dr ).The residue is considered in this case as distance separating variables actual/real values from desired/optimal ones.Then, we could define second input as residue derivative that could inform about residue evolution.The output, in another hand, is certitude factor ( cf ) that evaluates the state of concerned variable.Matlab is used to develop and to simulate FES because it had fuzzy logic toolbox.

B. Defuzzification
In this system output calculation, a crisp value is required.Thus, the defuzzification operation is requisite.In this approach, the gravity centre is the method adopted to get the crisp value traducing the severity of generated alarm, from the output membership function.

C. Inference engine
Linguistic model relating variables r and dr to variable D is written as rule base, relating the terms of A(r) and B(dr) to those of C(cf) in n rules : In our research, we are studying the effect of raising the number of symbolic labels describing the linguistic variable.We suppose these hypotheses: H1: Raising symbolic labels enhance robustness against uncertainty.
H2: It could lead to the augmentation of rule number which affects negatively time response.
We are working within three scenarios depending on the number of membership functions representing variables.For each case, an inference system relating inputs to outputs is proposed.
-FES1 : r (5 MF) and dr (3MF): In this case, residual associated with five symbolic labels and dr with three symbolic labels.The number of rules n=15.Table 4 is an illustration of the inference.In this case, residual associated with five symbolic labels and dr with five symbolic labels.The number of rules n=25.Table 5 is an illustration of the inference.-FES3: r (7MF) and dr (7MF) In this case, residual associated with seven symbolic labels and dr with seven symbolic labels.The number of rules n=49.Table 6 is an illustration of the inference.To compare and define conclusions, we fix the universe of discourse inputs and output: r is in [-2 2], dr is in [-8 8].We should mention that these intervals depend on studied situations and variables.
Assuming that the construction of three inference system obeyed to the same logic which is: When residual is zero the variable is normal.Otherwise, negative or positive values are synonyms of abnormality.Derivative magnitude informs about residual evolution.Next figures 7, 8 and 9 illustrate 3 d response of three FES.We could notice that the three systems have the same evolution: cf is around zero when residual is null and it raised to reach 1 when residual absolute value rises.However, when number of MF is important system response is more slow and soft.
Let's study with precision the three fuzzy expert systems for minimal and for important variations of residual.
For minimal variations of residual, we remark that the three systems don't reach zero even when cf is equal to 0. Minimal value is 0.06: this fact is justified by the uncertainty of measures and of information.Around zero the third system is more precise and the confidante zone, where the variable is normal, is larger than the other FES.In this case, we could conclude on the fact that first and second systems are more suitable for critical situations where little variations of residues are significant for system safety.However, the third system could be best used in non critical situations.For important variation of residual, three systems are reaching their maximum value which is 0.93.This coefficient is synonym of evident abnormal situation for the considered variable.
To highlight these results, FES proposed must be applied on systems from different fields.The next section is reserved to three applications of FES for surveillance: industrial and medical one.

V. STUDY CASE
The aim of this work is to propose generic fuzzy expert system that could monitor several kinds of situations.

A. Industrial application : Three tanks system
The system under consideration is a pilot plant of the research unit: System analysis and command located in ENIT (National Engineer Institute of Tunisia).The considered system is composed of three interconnected cylindrical tanks, two pumps, six valves, pipes, water reservoir in the bottom, measurement of liquid levels and other elements.The pumps pump water from the bottom reservoir to the top of the left and right tanks.

-System Modeling
While tanks 1, 2 and 3 are identical with cross section S and maximum fluid level l max , Drain tank is characterized with cross section S d and maximum fluid level l dmax .Tanks 1 and 3 are coupled with tank 2 by two AON (all-or-none) valves with cross section S n and outflow coefficients.Two proportional valves EV1 and EV2 directly connected to a pump, with highest possible flow rate denoted q max supply tanks 1 and 2. Three sensors are installed to measure the three levels l 1 , l 2 and l 3 .The experimental plant that is equipped with sensors  Measurable variables that could inform about system state are summarized in table 13.After fixing studied variables, residues and their variations are calculated.In this system we are installing three FES associated with all variables.In this section, we suppose that studied system is having an actuator failure in the tank 1 that leaks.Tank1 leaking is happening at the 70 th second and its value is equal to 0.02.We are studying in the following paragraphs three FES responses to simulated failure.Figure 12 is an illustration of certitude coefficient calculated for tank1 level by both 3 proposed FES.It is remarkable that they respond with the same shape and variations while they obey to the same logic.Alarm is generated immediately when cf is superior to 0.2. Figure 13 illustrates that: FES1 generates alarm at 70.27 s time, FES2 at 70.275 s and FES3 at 70.29 s.However, FES1 is having most important maximum value (cf reaches 0.625 ) and FES 2 and FES 3 reaches 0.6 for maximum cf value.These results mean that an alarm is generated in appropriate time for variable l1 that is immediately related with leak.In this study case, we conclude that the generic fuzz expert system applied to industrial field provides a decision support system.It detects failures and generates alarms with severity or certitude factors in one hand.In another hand, it helps locating failure origin root based on certitude factor and first alarm generation time.Industrial field supposes that n (number of variables characterizing system) FES has to be installed.These FES are running in real time while the studied process is functional which makes the first FES the more suitable to be applied because of its time response and time execution.

B. Medical application : ECG analysis
An electrocardiogram (ECG) is a simple and commonly performed test that records the electrical activity of the heart.An ECG is used to measure the rate and rhythm of the heart.It is a useful investigation in screening for heart disease and for those people who have a cardiovascular disorder.An ECG can show the presence of any damage to the heart, although not all heart conditions can be detected by an ECG.The calculation of residue is as the folowing equations shows : If v ϵ [l minl max ] then r = 0 If v < l min or then r = v-l min v > l max then r = v-l max Considering that t i is the actual date of analysis, t i-1 is the last one, so we could calculate:  The whole system output is in this case the maximum between eleven calculated cf.If system output is superior then 0.2, ECG is abnormal.In the same way, ECG diagnosis could be done using heart anomalies signatures.In this case signature is equal to [0 1 1 0 0 0 0 0 0 0 0 ] which is equivalent to "Complete bundle brunch block"

VI. CONCLUSION
This research work aims to study fuzzy expert system for monitoring.These support decision systems are very used in several applications and fields.A state of art has proved that developed fuzzy expert systems are usually specific to studied process whether in variables choice or in inference logic.
Proposing generic fuzzy expert system for surveillance independently of its application had been the subject of this paper.The main idea is to characterize concerned application with measurable variables.Fuzz expert system is installed to monitor each one by analyzing the distance between variable and its optimum behavior (error or residue).
Three generic fuzzy expert systems were proposed.The number of membership functions describing error and its variations differentiates between different proposed systems.Two criteria had been discussed time response and incertitude minimization.Increasing membership functions improves precision and describes better each variable variation.However, system time response rises which is annoying especially in real time.
When applying FES in industrial and medical diagnosis, results confirms that it provides decision support systems that detects abnormal situations and affects certitude coefficient enhancing uncertainty.

VII. FUTURE WORKS
Diagnosis process which is in our approach based on anomalies signatures could be improved by using artificial

Fig. 6 .
Fig. 6.Matlab Schema bloc of r and dr calculation dr are variables ranging respectively in sets of symbolic labels A(r) and B(dr).The terms describe qualitative value of magnitude of both residue and its variations.Fuzzification of the two inputs could adopt three scenarios with: 3 membership functions, 5 membership functions, 7 membership functions.

Fig. 12 .
Fig. 12. Cf(t) (-:FES1, -: FES2, -:FES3) failed www.ijacsa.thesai.orgVariable l1(t) that monitors Tank 1 is the most and the first affected one.Consequently, this decision support system guides human operator in his decision.To diagnosis the current situation, a normalized fault signature depending on calculated certitude coefficient is proposed.Having a vector r(k) (k in {1,2,3}) describing respectively residues of the three tanks levels, we define a normalized vector r n (k) : n A failure signature matrix could indicate about the incidence of failures on residues:

TABLE I .
FES APPLICATION

TABLE II .
FUZZIFICATION R AND DR

TABLE III .
FUZZIFICATION OF CF

TABLE VII .
FES1: CF FOR SMALL VARIATIONS OF RESIDUES

TABLE VIII .
FES2: CF FOR SMALL VARIATIONS OF RESIDUES

TABLE IX .
FES3: CF FOR SMALL VARIATIONS OF RESIDUES

TABLE X .
FES1: CF FOR IMPORTANT VARIATIONS OF RESIDUES

TABLE XI .
FES2: CF FOR IMPORTANT VARIATIONS OF RESIDUES

TABLE XII .
FES3: CF FOR IMPORTANT VARIATIONS OF RESIDUES Because the modeled system presents much non linearity, we've tried to model each component in separate block.All individual parts models were incorporated into single block in Matlab/Simulink environment.The block has 11 inputs: 2 float signals controlling the pumps ( 1 and 2 ) and 9 Boolean signals controlling the valves (EV12, EV32 and EV2 ).

TABLE XIII .
MEASURABLE VARIABLES

TABLE XIV .
MEASURABLE VARIABLES

Table 14
[61]arizes the inputs of this module which are deduced from the signal in figure14of ECG.The table gives also normal values of the inputs.Limits and thersholds for normal values are those of an athlete[61].

TABLE XVI .
RESULTS WITH NORMAL ECG www.ijacsa.thesai.orgneural networks (ANN).Multi layer perceptron (MLP) is a suitable tool for anomalies classification that had been used in many applications.