# Model of Emotion Judgment Based on Features of Multiple Physiological Signals
## 3 Data Analysis of Physiological Signal
### Processing of ECG Data  
Typical ECG waveform is shown in Figure 9, where the ECG shape is divided into single wave (P, T, U wave), QRS composite wave, P-R and Q-T interval, and ST segment; these four parts are combined to form a set of completed P-QRS-T-U waveform.  
The frequency band of ECG, QRS composite wave, and P, T wave are generally 0.05\(\sim\)100, 3\(\sim\)40, and 0.5\(\sim\)10 Hz, respectively. The detection of ECG waveform is mainly aimed at QRS wave. Compared with other single waves, the frequency band of QRS wave is more centered, and R wave has high amplitude. Firstly, the repeated signal in the heartbeat interval is eliminated to recover the missed detection signal, and then the WT is used to remove the noise. The heartbeat interval refers to the time interval between two heart beats, and it can be obtained by the RR interval of ECG signal. The RR interval is the time interval between the peaks of two adjacent R waves in the time domain as shown in Figure 10.  
Figure 8: Segment cutting of skin electrical signal according to game events.  
Figure 9: Typical ECG waveform.  
The 20% rule is used to give the abnormal judgment of RR interval [12]. This rule means the two RR intervals belong to abnormal RR intervals when the difference between the current RR interval and the nearest previous RR interval exceeds 20% of the previous RR interval. This kind of abnormality is usually modified by using the method of difference replacement. An adaptive filtering method of abnormal RR interval was proposed to solve this problem. There are the following main steps in this method: (1) Removing the obviously abnormal RR interval less than 200 ms which is the heartbeat interval for human to reach difficultly. (2) Proportional adaptive filtering is adopted for the signals:  
\[t_{n}=(x_{n-3}+6x_{n-2}+15x_{n-1}+20x_{n}+15x_{n+1}+6x_{n+2}+x_{n+3})/64 \tag{6}\]  
where \([x_{1},\,x_{2},\,\ldots,\,x_{n}]\) is the signals of heartbeat interval. (3) The adaptive mean \(\mu_{a}\) and standard deviation \(\sigma_{a}\) are calculated with \(t_{n}\) sequence:  
\[\mu_{a}(n)=\mu_{a}(n-1)-c[\mu_{a}(n-1)-t_{n-1}],\,\,\,\sigma_{a}(n)=\sqrt{\mu_ {a}(n)^{2}-\lambda_{a}(n)} \tag{7}\]  
where \(c\) is the control coefficient. When RR interval \(x_{n}\) satisfies:  
\[|x_{n}-x_{n-1}|>\frac{p}{100}x_{n-1}+c_{f}\overline{\sigma}_{a},\,\,and\,\, \big{|}x_{n}-x_{\eta}\big{|}>\frac{p}{100}x_{\eta}+c_{f}\overline{\sigma}_{a} \tag{8}\]  
the abnormal RR interval will be replaced by a random number in the interval of \([\mu_{a}(n)-\sigma_{a}(n)/2,\,\mu_{a}(n)+\sigma_{a}(n)/2]\). In Equation (8), \(p\) is the proportional threshold, \(x_{\eta}\) is the last valid RR interval, and \(\overline{\sigma}_{a}\) is the average value of \(\sigma_{a}\). (4) The new sequence obtained is filtered adaptively again, and new adaptive mean \(\mu_{a}\) and standard deviation \(\sigma_{a}\) are calculated again till the new sequence satisfies:  
\[|x_{n}-\mu_{a}(n)|>c_{f}\sigma_{a}(n)+\sigma_{b}\]  
this point is considered as abnormal point and is replaced.  
In the processing of ECG data, the method of WT and cutting signal segments, and normalization of each signal segment are the same as that in the processing of skin electrical signal in Section 3.1.