A detection method for biological electric shock based on improved sample entropy

Biological electric shock detection is the key to safeguarding of persons in grids. However, present methods cannot make protectors trip correctly by extracting the characteristics of living things. To improve the situation, this paper presents an innovation by which the protectors can be adaptive to trip correctly when the biological electric shock happens. The basic principle of proposed method is extracting biological electric shock characteristics (BESC) from measured current based on the sample entropy (SampEn). It can distinguish whether the electric shock is caused by mammals or not. Besides, for practical need, a fast BESC calculation method is proposed in order to reduce redundant computation. Moreover, an execution module for electric shock protection based on DSP is developed. And electric shock experiments have been carried out to validate the effectiveness of proposed method. The results show that accuracy of biological electric shock detection is improved and proposed method is practical even in strong noise environment.


Introduction
As the electricity is widely used in daily life and industry, the biological electric shock hazards have already become serious problems. The residual current devices (RCDs) are applied to low-voltage grids as the electric shock safeguard [1]. However, present RCDs trip usually incorrectly for it's hard to determine whether electric shock of mammals (especially persons) happens or not [1][2][3]. Actually, the devices trip depending on the total residual current, which is the vector sum of normal residual current and fault current, instead of characteristic of the biological electrical shock. Therefore, how to detect biological electrical shock needs to be solved.
Many scholars have found out that mammals have special impedance characteristics with complexity and uncertainty, which are different from intrinsic characteristics of power grids [4][5]. Researches prove that only the impedance of mammals which follows the dispersion characteristics is of complexity [6]. Hence, researches focusing on the detection method of biological electric shock characteristics (BESC) have been carried out [7][8][9]. On the one hand, human body impedance models are constructed to simulate electric shock effects [7]. On the other hand, local mean decompositions (LMD) based method [8] and support vector machine (SVM) based method [9] are applied to extract BESC. However, these methods cannot characterize the complexity of BESC and are easily affected by several factors (such as noise, normal leakage, environment, and the operation way of power grid). As a result, how to extract BESC from the total residual current and detect whether there is biological electric shock, is still an unsolved problem.
Considering overcoming shortcomings above, this paper proposes a biological electric shock detection method based on Sample Entropy (SampEn). As well known, SampEn is developed from approximate entropy (ApEn) and can measure the complexity and irregularity of a time-series signal [10][11]. Firstly, SampEn is applied to extract the BESC. Then, the method has been embedded into DSP as an execution module for biological electric shock protection. Finally, numerous data from experiments on mammals are applied to validate the effectiveness of proposed method. The results show that proposed method has good performance on computation and detection.
The remainder of the paper is organized as follow. The complexity of BESC is described in Section 2. Following, a SampEn based BESC detection method and an execution module for electric shock protection is introduced in Section 3. The proposed method is corroborated in Section 4. Finally, conclusions are discussed in Section 5.

Complexity of biological electric shock characteristics
Biological electric shock is kind of fault that the touch current passing through a living thing's body leads to shock hazard. When the power system operates normally, the total residual current x detected by RCD, mainly contains normal leakage current i r . When a fault happens, the touch current with intrinsic characteristics of impedance will add to i r randomly. The maloperation occurs, for the amplitude of x may be less than the rated operating value of the RCD. Only if the RCD could identify the fault, it will trip correctly.
During the biological electric shock fault, characteristics of the touch current differ from the physical property of power system. Experiments in the Literature [9] verify that the touch current is with weak amplitude, quick oscillation starting, fast damping and continuous oscillation finally. Those characteristics depend on the impedance of mammals which follows the dispersion characteristics and is of complexity [6]. However, it is hard to detect directly by RCD in power grid. Therefore, we consider characterizing signal complexity and extracting the non-linear characteristics, in order to detect electric shock quickly.
During the normal state of power grid, the detected signal is a stationary process varying slowly and periodically, and its complexity rarely changes. However, when electric shock happens, the complexity of detecting current is different. Besides, the touch current with short transient process presents periodic waveform after the attenuation of non-periodic variation and the complexity of the detecting signal increases in short time. So, the complexity of the detecting current increases and decreases in short time, and finally stay the same.

Algorithm
SampEn can measure the emergency probability of the new model and characterize the complexity and non-linearity of the observing signal with great accuracy [11]. The higher the signal complexity is, the larger SampEn value is.
The RCD usually detect the total residual current series {x} by a single channel. Given the length of a detecting window is L and the standard deviation SD. After normalization of the detected signal, the SampEn can be calculated by the steps [12][13].
Intrinsically, the SampEn characterizes the emergency probability of the new model when the dimension of vectors changes from m to m+1. To reduce the influence of L and ensure the rationality of SampEn value, m and r is separately set as 2 and 0.15SD [13]. To reduce the computational redundancy when calculating the rate of distance within the threshold r, "0-1" method [14] is applied to calculate the amount of d ij , the value of which is within r in the ith vector. Construct M-dimension distance matrix S, where the elementary s ij is Because of the symmetry of the elements, calculation of B is simplified, and we need to judge whether the distance of any two comparison vectors exceed r. So, when m is set as 2, it is equivalent to judge whether | x(i)-x(j)|≤r and | x(i+1)-x(j+1)|≤r are true, that is, the expression s ij s i+1j+1 =1 is true or not. Therefore, when the amount of d ij , the value of which is within r in the ith vector is needed, summing up these values can solve the value of The series of SampEn value is represented as When biological shock happens, the touch current with electric shock characteristic is regarded as the new model emerging in the total residual current. Correspondingly, the SampEn value of the total residual current changes following to the same tendency of the touch current, i.e., it increases and then decreases, and finally reaches to a constant.

Execution module for electric shock protection
In order to test the suggested method, we designed an execution module, which consists of a zerosequence current transformer, a signal condition circuit, a digital signal processor (DSP), a signal isolation circuit and a relay, shown in Figure 1. The original signal {x'} (total residual current), is detected by zero-sequence current transformer. Then, the signal condition circuit alternates {x'} to{x}, adapting to detected domain of DSP. And the suggested method is embedded in DSP. Once the electric shock happens, DSP outputs an action signal to make the relay trip. In order to reduce inference, an integrated isolation amplifier is applied.
Besides, the response time of the execution module should be taken into consideration when designing the protective module [15]. There will be more fatal risks with more duration of current flow through human body human and touch current. Under the experimental condition in this paper, the shock current is within the range of 10mA to 200mA, so that the response time should be less than 300ms according to the curve of safety threshold of 0% of ventricular fibrillation recommended by International Electrical Commission (IEC) [16].

Data collection
The experiments are carried out under laboratory condition and the principle is shown in Figure 2. During the experiments, we set the parameters as follow: sampling frequency f s =10 kHz, every recording time t s =2s, normal leakage resistance Z l =20k, the imitating power supply including harmonics. The amplitude of voltage can be adjusted from 0V to 220V. What's more, we also ensure that all equipment have high insulation level.
We applied 3 typical electric shock models to the experiments, including the electric shock of mammals (e.g. fresh pork in recently slaughtered, 2.5kg) by direct touching (case1), by indirect touching (case2), and the electric shock of dry twigs about 150k (the twigs with moisture content less than 5% ,case3). For ethical consideration, we used the fresh pork to imitate "mammal" instead of living animals during experiments. Besides, the experimental environment was dry. Other influenced factors of harmonics and noise are also considered. The experimental data include 3 cases and are partly shown in Figure 3, where there are 6-cycle sample points including 300 points. Notice that the shock start point is at the 150th sample point.

SampEn analysis
In the subsection, simulations including 200 groups of experimental data selected by random sampling were operated in Matlab to corroborate. The length of a detecting window is L is set as 100 every time  Figure 4. According the researches [10][11][12][13][14], the entropy value can reflect the variation of the frequency components. The entropy values of electric shock fault state are greater than those of normal state and soon keep in the same value in Figure 4 a), b), which complies with the theory in Section 2. The values under the indirect touching case are less than those under the direct touching case. It is related to the indirect touch way which changes the network structure of the object and may decrease the complexity. However, there is difference in Figure 4 c).
The SampEn values of fresh pork are greater than those of twigs because the front signals contain BESC of the living mammals' organizations with complexity and irregularity [7]. The resistance of twig is relatively great to mitigate the touch current and make the complexity change little, so that the SampEn value barely varies. Therefore, the proposed method can figure out the difference of characteristics between living things and non-living things.  Moreover, it shows advantages of the proposed method as follow: (1) No obvious effect on the amplitude of power supply or touch current. Alternate the amplitude of power supply separately to Un, 5Un, and 10Un, the results present the same because the normalization in the algorithm eliminate the effects of different signal amplitude and the complexity of currents stay still. (2) Better robustness. Considering there is noise and harmonics in practice, we added weak noise and harmonics during data acquisition. The results present the same tendency because the threshold r in SampEn algorithm can be a filter to reduce those small interference.

Module test
We embedded the method into the execution module and have several tests. We focused on time consumption of the algorithm and the relay operation which should satisfy with the safety value in the IEC standard.
The selected DSP is working at 150MHz and the ADC (Analog to Digital Conversion) module operates 1.53us every time. And the operation time of relay is about 10ms according to the instruction. During the test, it cost about 60ms to sample 3-cycle points including analogy-digital converting time of 0.2ms. And the whole time of the proposed BESC detection method is about 172.2ms calculating by the emulator. The whole protection time is about 242ms in all, less than 300ms.
The results of different cases are listed in Table 1. In the pork shock experiments (case1,2), during the period of normal state (c=1, 2), the absolute values of CCR of proposed method are less than 0.015, that is, the complexity of signal keeps almost unchanged. When electric shock happens (c=3), CCRs of proposed method is greater than 0.7, for the complexity of signal increases obviously. And during the post-fault period (c=4, 5), the entropy values decrease sharply and soon reach to constant. In the twig shock experiments (case3), the absolute values of CCR change little for the BESC of twig has lower complexity. However, under all cases, the CCRs of Shannon entropy change little and less than 0.05. Therefore, the proposed method has a better property to extracting BESC compared to the Shannon entropy-based method. According to the experimental experience, we provide criteria to help BESC extraction, that is, the electric shock happens if CCR(c)>0.6 and CCR(c+1) <-0.4, while |CCR(c)|<0.2, it is regarded as normal operation.
Also, the proposed method is compared with widely used method introduced in the Literature [17], in order to study the effectiveness. The results are shown in Table 2. These symbols I t0 and I ts separately express the amplitudes of total residual current under normal state and under shock fault state. The proposed method has better accuracy than the present method to determine electric shock faults.

Conclusions
Electric shock detection plays an important part in electrical safety for modern power grids, and BESC extraction is the key. This method based on SampEn extracts BESC from detected signals easily and validly, without influence of noise in some extent, dependency of amplitude, and way of touch. Also, the execution can determine electric shock faults. The enhancements in the paper provide opportunities for improving the performance of the present protectors that can be more adaptive and smarter to trip correctly when the electric shock occurs, that is, the enhancements can reduce maloperation and provide effective protection.