A FUZZY LOGIC MODEL FOR HUMAN DISTRESS DETECTION

: Distress occurs when a person is in anxiety or fear. Existing research in distress detection arising from physical attacks focused mainly on the use of machine learning techniques. To extend research efforts, this study proposes an alternate approach using fuzzy logic. Parameters to describe physically triggered distress were identified and used as input to the designed fuzzy model. Experiments were carried out using random samples of data values to test the behavior of the model. In all cases, the model was able to show outcomes that are expected and achieved high accuracy.


INTRODUCTION
Distress can be referred to as an emotion that depicts fear or panic, which can emanate from various situations including psychological/emotional causes such as stress [1], health issues [2], physical causes such as fall [3], violence or physical attacks [4], etc. and can have both emotional and physiological reactions.A distress situation can be viewed as a concept of "life or death" which is synonymous to the terms: "critical", "fatal", "urgent", "persistent", "helpless" [5].It describes an emergency situation, which is usually accompanied by a distress call that indicates a person is in danger.There are certain physical reactions usually associated with distress.These reactions are an indication of strong physical and emotional arousal.When a person is being physically attacked, the person shows the "flight or fight response" which is the physiological or physical change triggered by extreme fear.For example, a rise in blood pressure, an increase in heart rate, and an increase in breathing rate making the body ready to take action immediately when faced with danger [6].These physical changes (signals) which are referred to as parameters in this study are defined as any property that is used to characterize and determine the presence of distress.Proper and timely distress monitoring and detection can improve individual safety.
The advent of automated methods for distress detection, have brought about significant change in emergency reporting for individuals.Research in this area has considered greatly the emotional/psychological aspects of distress such as stress, depression, mental illness [1,[7][8][9][10].However, there has been less effort in the consideration of the physiological/physical responses since it is also as significant in determining a person in distress.Few existing works have focused on distress detection arising from physical attacks using sound/speech parameter.For instance, [11] proposed a 75 solution to the issue of identifying distress sounds when other noises are present: audio sound event identification for distress circumstances.In order, to increase the recognition accuracy, a wavelet transform technique for detection and usage of unsupervised estimate of Gaussian mixture model (GMM) arranged in hierarchical fashion was applied.The context of the work is in the classification of various sounds in an environment.In addition, [12] proposed a 24/7 human distress detection and signaling system.Screaming and crying sounds were considered and raw sounds data were converted to feature vectors.SVM was used for classification of the sounds.Every three hours, results from the period of monitoring will be posted to friends and at the detection of a distress sound a friend can alert law enforcement.The posting every three hours is believed to increase the computational complexity of the system and may most likely be annoying to friends at some point.Another issue arises in the channel for alerting distress having to go through a friend instead of a direct call.Furthermore, [13] aimed at detecting fear or anxiety in the voice of a victim or anger in the voice of an attacker.Speech features such as MelFrequency Cepstral Coefficient (MFCC), Principal Component Analysis (PCA) and Relief F were applied on the set of features and Support Vector Machine (SVM) was used for classifying sound dataset collected from EmoDB.Evaluation of the distress detection technique was carried out and the result from the evaluation showed high classification accuracy values.
Existing works have also focused on the use of machine learning techniques majorly for detection of distress.This study considered the fuzzy logic approach to distress detection which provides an alternate method.Furthermore, fuzzy logic was adopted because of its human-like reasoning nature in representing ambiguities; imprecise nature of the parameters considered; determination of the level to which an instance belongs; suitability in representing expert knowledge and simplicity in modeling complex behaviour.Fuzzy logic is used in order to make accurate decisions under confusing or imprecise settings in human reasoning and communication [14,15].This paper specifically attempts to (i) present specific parameters responsible for determining distress in violent attack situations (ii) design a fuzzy logic model for distress detection (iii) evaluate the performance of the designed model.The rest of this paper is organized as follows.Section 2 presents the design and experimental process used in the study, section 3 presents the results obtained and the conclusion is presented in section 4.

Parameter Definition
Information about properties that can be used to characterize a distress situation from physical attack was identified from literature through study, expert knowledge through interview and personal experiences.The properties were then generalized to come up with individual parameters.These parameters include activity, sound and proximity.These parameters become input to the fuzzy logic model.Table 1 shows the definition for each of the parameters considered.The distance between a victim and an attacker.Distance For the activity parameter, the tri-axis acceleration and angular velocity data was used to characterize a user's activity level.For the sound parameter, the frequency and pitch of a person can be used to determine the type of sound the person makes whether it is a distress sound or not.A distress sound is characterized by high sound intensity represented here in decibels.The proximity defines the distance between two individuals in a violent situation.

Fuzzy logic design
The design of the distress classifier model was done using the Fuzzy Inference System Toolbox in MATLAB R2013a as shown in Figure 1 following three main stages: i) Fuzzification of Inputs; ii) Creation of Inference rules and iii) Defuzzification.
Three vector parameters are defined for trimf [a, b, c] where a<b<c, while four vector parameters are specified for trapmf [a, b, c, d], where:>a<b≤c<d.
The membership function values for each input element were defined as well as the linguistic term associated presented in Table 2. Activity range of 0 -10 / 2 was used.Also, sound with a high intensity was given value range of 80db to 120db following the study of the scale of sound intensities, since high intensity sounds increase from 80db.It means, any value less than is considered 'normal' to 'low' intensity.Normal conversations occur at 60db.Furthermore, two membership functions are chosen for proximity, when the distance is 'close' between 1 to 3 meters and when the distance is 'not_close' greater than 3 meters.

Creation of inference rules
Fuzzy logic systems use rules to process the inputs and give output.The rules can easily be formed using expert knowledge and can be understood by humans.Mamdani-type inference was adopted in this study.It expects the output membership functions to be fuzzy sets.Nineteen (19) rules to determine a distress situation were formed under the rules view of the inference toolbox as shown in Figure 3.

Defuzzification
Defuzzification converts the fuzzy output to a single output.Membership functions are also defined for the output 'distress status' which are 'no_distress', 'distress' and 'distress_alert'.As shown in Figure 4, trapmf and trimf were used in order to get the most probable output value for each term using distress weight range from 1 to 100 and output weights of 30, 50 and 70 were assigned to 'no_distress', 'distress' and 'distress_alert' outputs respectively Membership functions are assumed symmetrical and the continuous center of gravity (COG) also known as centroid method was applied to the defuzzification as given in equation (3) where  represents the centroid output, (  ) represents membership values for points and   represents associated weights for points with  ranging from 1 to 19 since there are 19 rules in the inference system.

RESULTS AND DISCUSSION
The designed model performance analysis was done through simulation by studying the behavior of the model and its interaction with data to show the effectiveness of the outcomes.An experimental approach was used in which random samples of corresponding sensor data were presented to the model as input in order to view and determine the inference process for the model.The model was simulated in the MATLAB R2013a environment.The corresponding output for each fuzzy rule and the aggregated fuzzy set output were determined based on the rules that were created.Test cases for 20, 40, 60 and 100 input instances were simulated.Figure 5-7 shows the output detection inferred from the simulation and evaluated for accuracy given in equation ( 4).Averagely, the model achieved an accuracy of 94.44%t at 20 data instances percent, 96.67% at 40 data instances 95.24% at 60 data instances and 95.45% at 100 data instances as recorded in Table 3. From the results obtained, it is observed that the number of instances does not show to progressively affect the accuracies as this may vary with input values.Furthermore, the number of wrong classifications may increase with the increase in input data Figure 8 shows the graphical representation of the comparisons.

CONCLUSIONS
This paper presents the design of a fuzzy logic model for human distress detection.Three key parameters that can characterize a distress situation from physical attacks were used as input to the model and the behavior of the model was simulated.Experiments were carried out using random samples of sensor data values to test the behavior of the model.In all cases, the model was able to show outcomes that are expected clearly and achieved high accuracy results.This work showed that fuzzy logic approach can be used to model the intelligent detection

Accuracy
of distress in humans and the proposed approach when implemented in safety applications can be used for effective distress detection.Our next objective will be to implement the model in real-time on sensor based devices.

Fig. 1 .
Fig. 1.Fuzzy inference system design for distress detection.2.1.1.Fuzzification of inputsThis stage entailed the definition of membership functions for each parameter which is referred to as input and their corresponding linguistic terms.The triangular membership function (trimf) and trapezoidal membership function (trapmf) were used to define membership functions by determining the degree to which inputs belong for each of the appropriate fuzzy sets via linguistic terms.trimf   () and trapmf   () is defined expressively as shown in equation (1) and (2) respectively.

Table 2 .
Description of linguistic terms and membership functions.'trapmf', [0 0 30 50] MF2 = distress 'trimf', [30 50 70] MF3 = distress_alert 'trapmf', [50 70 100 100]Values that correspond to these linguistic terms are indicated in order to determine the degree of membership.The values for the degree of membership for each input were determined by studying the possible minimum and maximum values obtainable in reality from data values.The first value for the trimf indicates the lowest value that can be obtained or the starting point, the second value indicates the most probable outcome and the third value indicates the highest possible value that can be obtained.Similarly, trapmf indicates the lowest value that can be obtained or the starting point, the second and third values indicate the most probable values and the fourth value indicates the highest possible value that can be obtained.

Figure 2 (
a) to (c) shows the membership plot for each input.(a) Activity Input (b) Sound Input (c) Proximity Input Fig. 2. Membership functions for inputs.
S/N Number of OutcomesCorrect Classification Wrong Classification Accuracy(%)