New Technique for Unobtrusive Sensing of Human Postures by a Smart Prayer

12pt,Bold) Muslim praying ritual is quite complex and challenging especially for old and forgetful people. This paper presents new technique for sensing Muslim praying postures and counting posture cycles by a smart mat. Unlike related methods, the proposed technique detects human postures in a sequence based on voltage patterns generated by mat sensors. Experiments show that it provides unobtrusive and robust detection of all six Rakah postures and reliable Rakat counting. Its prototype implementation is inexpensive, easy to use and quite helpful for users.


Introduction
Praying is an obligatory religious ritual for Muslim people to be performed five times a day at prescribed times.The ritual is quite challenging especially for elders whose attentive and cognitive capabilities are deteriorating with age.In each pray a worshiper has to repeat a sequence of six postures (Fig. 1) called Rakah (in singular) and Rakat (in plural).Because the sequence must be repeated a number of times, while reciting passages from the Quran, it becomes difficult for an old person to remember which Rakah has being performed.Incomplete Rakah however is not acceptable.Once forgotten, the worshiper must go back and perform an extra cycle to ensure that he has done the proper number of Rakat.Furthermore, the number of Rakat which must executed by a worshiper varies according the time of day as well as the day.For example, two Rakat must be performed at dawn prayer, four at each prayer at noon, afternoon and evening, and three at sunset prayer.Old forgetful people have problem not only remembering how many ritual cycles have to be performed in a pray, but also lose track of the sequences that they have already completed.Hence, information and communication technologies capable of assisting Muslims in praying become important.
There have been also many research efforts to assist Muslims in computing the number of Rakat.Khatri [1] used a solar powered electrical switch pad and LCD operable by a forehead of a worshipper when prostrate on the mat.Faouaz [2] also used LCD with a switch built in the prayer mat with the difference that the switch is turned on and off by the user.Abdelmohsen [3] advocated placing a so called "pressurable plate" under an ordinary mat to detect a prostration posture anytime the user's forehead touches the mat while counting and displaying only every even posture.Basheer et al, [4] developed a portable cycle counter based on IR sensors embedded into the prayer rug.Ibrahim Kantarceken [5] presented a prayer assistance device with built-in camera, IR sensors, microphones, Bluetooth and acoustic transducers for detecting postures and the spoken words of prayer.Ismail [6] et al, used pressure sensors embedded in the mat under the forehead area to detect the prostration posture.Despite differences in implementation, all these applications and devices have a common drawback.Namely, the Rakat countering devices but [21] (which is actually non-portable and non-foldable) focus on detecting the prostration posture not considering the other postures.As result they might increment the Rakat counter when the user skips a posture or makes two prostration consequently, which is inacceptable.
In this paper, we describe new technique for counting the number of Rakat completed by a person in a pray and present its implementation in a smart mat.Unlike related methods, the proposed technique differentiates postures based on voltage patterns generated by mat sensors.According to experimental evaluation, it provides unobtrusive and robust detection of all six Rakah postures and reliable Rakat counting.Its implementation is simple, efficient yet inexpensive.
This rest of the paper is organized as follows.In the next section we discuss the proposed smart mat architecture and its prototype implementation.Section 3 describes experimental evaluation and results.Section 4 summarizes our findings and work for the future.

The Sensing Array Design
The key idea behind our method is to embed into a prayer mat an array of unobtrusive pressure sensors and then use the sensor readings to differentiate the postures and count the Rakat.We assume that sensors are placed at the backside of the mat and connected to the microcontroller (M), as shown in Fig. 2. When a pressure is put over a sensor, the sensor generates an active signal to microcontroller, which decodes the signals received, evaluates the pressure pattern and based on it identifies the posture currently performed by the user.Because a prayer mat has fixed orientation (i.e. the feet area is fixed mistaken), we define three areas in the sensing array, associated with the feet, the knees, and the head, respectively, as shown in Fig. 3.The sensors of area 1 are activated in standing or bowing postures; the sensors of area 2 are activated in sitting and prostrating postures; while the sensors of area 3 are activated by the prostrating posture only.Since the cost of the smart mat grows linearly with the number of sensors embedded into the mat, we conducted an empirical study to determine the minimum number of sensors and their placement within the prayer mat which will allow correct detection of all six postures of the Rakah sequence.
The study involved 30 Muslims aged from 20 to 60 years old.The participants had different height (168~180cm), weight (65~85kg), shape (slim, ordinary, fat) and feet size (25~27cm).In the study, each participant was asked to perform Salah using same mat lined by squares of 5cm×5cm in size.We measured positions of prayers over the mat while doing the praying ritual and recorded the squares touched by the participant's feet, knees, forehead or hands in different postures.
Fig. 4 shows the results observed in terms of the square usage for each posture.The results revealed that in spite of differences in mat usage, all 30 participants had their feet over the line 3 of area 1 while standing, used line 3 of area 1 and line 2 of area 2 while sitting and had feet over line 4 of area 1, knees over line 4 of area 2 and forehead over line 3 of area 3 in the prostration posture.Because the FSR 408 strip-type sensor placed under the mat responds to pressure applied from up to ±5cm from it, we use 5 sensors in the smart mat allocated as shown in Fig. 3 in order to detect six postures of the Rakah sequence.
Table 1 lists the voltage levels of sensor outputs measured at different postures.Here Sensor 1 represents the leftmost sensor of Fig. 3; Sensor 5 is the rightmost sensor.We observe that the standing posture causes the highest output voltage from the sensors.This is because the user presses the mat by his entire weight.In the bowing posture the voltage levels of the Area 1 sensors are around 90%-100% of the peak voltage.The sitting posture outputs only 80% of the peak signal for sensors in Area 1 and 60% and sensors in Area 2. In prostrating posture, the sensors of Areas 2 and 3 generate voltages in the range of 50% -75% and 4% -25%, respectively of the peak, respectively.We store in the memory the voltage ranges associated with each posture and use them for posture detection.

The Posture Detection and Rakat Counting
The proposed posture detection technique is based on identifying patterns of sensor readings associated with each posture of the Rakah sequence.In contrast to related techniques, which differentiate patterns by the position of sensors within the mat, we distinguish patterns (and hence postures) by voltage levels generated by sensors.At each time of a pray, we read the output voltages from sensors and compare them to pre-defined thresholds.A posture is considered detected, if and only if all sensors associated with the posture produce voltages within the specified range.If the completed sequence of postures matches the correct order of Rakah sequence (Fig. 1), the Rakah counter is incremented.Otherwise it remains unchanged.
Fig. 4 illustrates the proposed Rakat counting technique in terms of state transition diagram.In this figure, circles represent postures; arrows show their execution order in Rakah sequence, the formulas above the arrows represent conditions at which the posture is considered detected i.e. the state transition occurs.As the user starts the counter, the system evaluates the outputs of both sensors in Area 1 during 3 sec in order to identify the peak voltage of the standing posture.This voltage is applied as a reference (V0) for computing voltage ranges of the detection conditions.Namely,   ( 2 ) L 3 = 1.5×V 0 , ( 3 ) L 4 = 0.65×V 0 , ( 4 ) L 5 = 0.05×V 0 , ( 5 ) L 6 = 0.12×V 0 , ( 6 ) L 7 = 0.1×V 0 , ( 7 ) L 8 = 0.8×V 0 , ( 8 ) L 9 = 0.05×V 0 , ( 9 ) L 10 = 0.4×V 0 .( For example, the bowing posture is detected when the output voltages of Area 1 sensors are within the range L 1 ≤ V 1 ≤ L 2 .Otherwise, the system waits until the user implements the posture correctly i.e. the outputs of sensors 1 and 2 satisfy the specified condition.Note, that even if the specified condition is satisfied but there is non-zero output from other sensors, the system will remain in the current state.To detect the prostration posture we use Area 2 and 3 sensors.If outputs of the Area 2 sensors satisfy condition: 3 ≤ V 2 ≤ L 4 , and outputs of the Area 3 sensors satisfy condition: L 5 ≤ V 3 ≤ L 6 then the system identifies the prostration posture.Otherwise, it continues waiting for correct implementation of the required posture.To detect the sitting posture, we check whether the area 1 voltages (V 1 ) and the area 2 voltages (V 2 ) are within the ranges: L 7 ≤ V 1 ≤ L 8 and L 9 ≤ V 2 ≤ L 10 .If any of these two conditions is unsatisfied or there is a non-zero voltage output from the area 3 sensors, the posture is rejected as incorrect.Thus we proceed to the next state if the user correctly implements the postures.As the second prostration is identified, the system increments Rakat counter (RC) by 1 and repeats the cycle.

Implementation
To evaluate efficiency of the proposed method we developed a prototype implementation of a smart mat.The smart mat electronics consists of three modules (see Fig. 7):  five force-sensing resistive strips (FSR 406), distributed over the Sensing Areas 1-3 as discussed in Section 2.1;  Control panel, which includes a 128x64 graphical LCD display and two push buttons, by which the user can turn the power ON/OFF and reset the Rakat counter (RC);  16MHz 8bit microcontroller (AVR ATmega32), which receives data from the sensors, and the control panel, identifies postures, increments the RC with completion of a Rakah sequence, and outputs the value of RC to the display.The electronics was embedded into a praying mat of 110 cm × 70 cm in size dedicated for a medium height user.The sensing strips were attached to the backside of the mat, while the microcontroller and the control panel shared the same board, placed on the foreside of the mat.The proposed posture detection and Rakat counting technique was implemented in software.The total cost of the smart-mat electronics was less than 5000JPY.
Fig. 8 shows photographs of the smart mat and its usage in a pray.The user activates the smart mat by pushing the Power bottom on the control panel.By default, the RC is zero.If the system recognizes that the user completed a Rakah, it increments the value of RC.Otherwise the value of RC remains unchanged.At any time, the user can reset the counter or switch the power OFF if necessary.

Evaluation and results
To evaluate the quality of the proposed posture recognition and Rakat counting algorithm, we performed a number of tests, which involved 10 participants (faculty and students ages 20 to 60).The participants had different heights (from 155cm to 174cm), feet size (from 23cm to 29cm) and shape.During the experiment, each participant was asked to perform Salah with three Rakat correctly and then randomly skip or perform incorrectly (e.g.sitting instead bowing or vs. versa) one or several postures in a Rakah sequence.These scenarios were repeated three times by each subject in a random order.In between the tests, the power was switched OFF.
The tests totaled 120 simulated cycles of 6 postures each.The results reveal that the posture detection of the smart mat was 100%.The embedded sensors were able to effectively distinguish all postures of the Rakah sequence and correctly count the Rakat.However, we should notice that the posture detection and recognition depends on the person's height.Namely, it might be possible that a mat dedicated for a person of an average height may fail to correctly identify postures of a tall or a short person or vs. versa.We assume, that this issue will not pose a problem in reality, because people usually use mats of sizes proportional to their height.
Finally, the tests showed that the sensors in the mat successfully detect gait characteristics and are not perceptible to the people as they stay, sit or prostrate.Overall, all the participants of the evaluation experiments reported the proposed smart mat useful and quite helpful.

Conclusion
In this paper, we presented a new technique for unobtrusive human posture identification by s mart-mat for assisting Muslims in praying.As prototype evaluation revealed, the proposed technique provides robust recognitions of postures taken by the user during a pray and correct counting of the Rakat cycles in real time.
In the current work, we experimented with prototype design in laboratory settings.We are now working on providing a foldable, small and portable solution of battery-operated smart-mat electronic which can be not only portable and easy to use but also reliable and easy to attach/detach to a praying mat whenever is necessary.

Figure 4 :Fig. 5 .
Figure 4: The mat area usage in different postures

Fig. 7 .
Fig.7.Block diagram of the smart mat

Table 1 :
Sensing readings (in Volts) at different postures