# Combination of Robust Algorithm and Head-Tracking for a Feedforward Active Headrest
## 2 Design of the Optimal Filter Coefficients of Active Headrest with Traditional Algorithm
### Head-Tracking System  
When the head position changes, the secondary path of the active headrest system will also greatly change. Hence, the performance further degrades. To solve this problem, a head-tracking system is designed for a sleeper in a high-speed train, as shown in Figure 2. The head-tracking system consists of nine infrared rangefinders. Five rangefinders are placed on the top of the head, marked as No. 1-No. 5, and four rangefinders are placed on both sides of the head, marked as No. 6-No. 9. The coordinate value of the center of the head is acquired with the head-tracking system. The shortest distance is measured by rangefinders No. 1-No. 5 and then 100 mm is added as the coordinate value of the \(y\)-axis of the head center, where 100 mm is the distance from the top to the center of the head. Then, the coordinate value of the \(x\)-axis of the head position is obtained by rangefinders No. 6-No. 9 located on both sides of the head. If the measured coordinate value of the \(y\)-axis is less than 200 mm, then rangefinders No. 6 and No. 7 work, otherwise rangefinders No. 8 and No. 9 work. The \(x\)-axis coordinate value of the head center is derived from the distance information of the two rangefinders and the total width of the sleeper. There is measurement error during the acquisition of the coordinates. Therefore, the measured coordinate values \(\mathbf{M}=(x,y)\) are then processed by a Kalman filter to decrease the noise in the measurement [23]. The Kalman filter model assumes that the true coordinate value \(\mathbf{Z}(n)=[x,y]^{T}\) at time \(n\) evolves from the coordinate value \(\mathbf{Z}(n-1)\) according to  
\[\mathbf{Z}(n)=\mathbf{F}\mathbf{Z}(n-1)+\mathbf{u}(n). \tag{10}\]  
Equation (10) shows how we estimate the true coordinate values at the current time from the coordinate values at the previous time. \(\mathbf{u}(n)\) represents the estimation noise. Suppose the \(x\) and \(y\) coordinates are independent of each other, thus the state-transition model \(\mathbf{F}\) is identity matrix. The coordinate values at the current time is obtained by adding noise to the coordinate values at the previous time [24]. The measurement \(\mathbf{M}(n)\) of the true state \(\mathbf{Z}(n)\) at the current time is made according to  
\[\mathbf{M}(n)=\mathbf{H}\mathbf{Z}(n-1)+\mathbf{v}(n). \tag{11}\]  
Equation (11) presents how we obtain the observed coordinate values from the true coordinate values. \(\mathbf{v}(n)\) represents the observation noise. The observation model \(\mathbf{H}\) is identity matrix on the assumption that the \(x\) and \(y\) coordinates are independent of each other. \(\mathbf{Z}(n)\) is estimated from \(\mathbf{M}(n)\) as Equation (12) based on the Kalman filter [25]. \[\mathbf{\hat{Z}}(n) =\mathbf{F}\mathbf{\hat{Z}}(n-1), \tag{12}\] \[\mathbf{P}(n) =\mathbf{F}\mathbf{P}(n-1)\mathbf{F}^{H}+\mathbf{Q},\] \[\mathbf{K(n)} =\mathbf{P}(n)\mathbf{H}^{H}(\mathbf{H}\mathbf{P}(n)\mathbf{H}^{H}+\mathbf{R})^{-1},\] \[\mathbf{\hat{Z}}(n) =\mathbf{\hat{Z}}(n)+\mathbf{K}(n)(\mathbf{M}(n)-\mathbf{H}\mathbf{Z}(n)),\] \[\mathbf{P(n)} =\mathbf{P(n)}-\mathbf{K(n)}\mathbf{H}\mathbf{P(n)}.\]  
\(\mathbf{Q}\) and \(\mathbf{R}\) are covariance matrices of noise in estimation \(\mathbf{u}(n)\) and observation processes \(\mathbf{v}(n)\), respectively. Their values depend on the degree of trust in the estimation and observation processes. Figure 2: Schematic diagram of the head-tracking system. Validation experiments were conducted to verify the accuracy of the tracking system. The results show that the difference between the \(x\)-axis and \(y\)-axis coordinates of the true position of the head's center and the output of the tracking system was less than 1 cm. When the coordinate value of the head changed, the delay of the head-tracking system was less than 1 s.  
The human head can be moved to any position.