# Anomaly Detection and Identification in Satellite Telemetry Data Based on Pseudo-Period
## 2 Pseudo-Periodic Extraction of Satellite Telemetry Data
### Pseudo-Period Extraction of Telemetry Data Based on Symbolization Method  
Through the symbolization of the data tilt angle, the satellite telemetry data \(X_{m}\) were converted into a character sequence \(\{STR_{m}\}\). In the extraction of the pseudo-period of the measured data, the standard pseudo-period sequence \(\overline{X}_{fT}\) was introduced and transformed into the character sequence \(STR_{fT}\). Then, \(STR_{fT}\) was analyzed to determine the key characters. The keywords in the character sequence of the standard pseudo-periodic were defined as follows:  
**Definition 1**. : _A character with the least number of occurrences in the standard pseudo-periodic character sequence. If there are minimal characters with equal numbers of occurrences, the earlier characters will be used as the keywords \(str_{key}\) in chronological order._  
Taking \(str_{key}\) as the index, \(STR_{fT}\) was used to divide \(STR_{m}\) into subsequences \(\{STR_{i}|i=1,2,\cdots,l\}\), and then the string similarity between \(STR_{i}\) and \(STR_{fT}\) of each subsequence was calculated. The rationality of the pseudo-periodic segmentation points was determined by setting a similarity threshold. Thus, the pseudo-period extraction of the measured data was realized; namely, the data pseudo-period extraction problem was converted into the string similarity calculation problem. Due to the non-stationarity of \(X_{m}\), it was difficult to align the characters of \(STR_{i}\) and \(STR_{fT}\) in each subsequence on the timeline. Therefore, dynamic time warping (DTW) [26] was introduced to measure the similarity. Allowing several-for-one and several-for-several mappings between symbolic sequences, DTW could solve the problem of the time axis distortion in the calculation of similar distances between symbol sequences of different lengths. Therefore, the DTW distance could be used for both raw data and the dimension-reduction data. The principle of the DTW procedure is given as follows:  
Assuming that two symbol sequences were \(STR_{a}=\{a_{1},a_{2},\cdots,a_{i},\cdots,a_{n}\}\) and \(STR_{b}=\left\{b_{1},b_{2},\cdots,b_{j},\cdots b_{m}\right\}\), cumulative distances \(D(i,j)\) were constructed as:  
\[D(i,j)=d\big{(}a_{i},b_{j}\big{)}+\min\left\{D_{(i-1,j)},D_{(i,j-1)},D_{(i-1,j- 1)}\right\} \tag{7}\]  
where \(d\big{(}a_{i},b_{j}\big{)}\) is the base distance between two points, and the Euclidean distance was used in this paper. When calculating the DTW distance of \(STR_{a}\) and \(STR_{b}\), the distance matrix \(\mathbf{C}\) between the points of two sequences must be established. \[C=\left[ \begin{array}{cccc}d(a_{1},b_{n})&d(a_{2},b_{n})&\cdots&d(a_{m},b_{n} )\\ \vdots&\vdots&\cdots&\vdots\\ d(a_{1},b_{2})&d(a_{2},b_{2})&\cdots&d(a_{m},b_{2})\\ d(a_{1},b_{1})&d(a_{2},b_{1})&\cdots&d(a_{m},b_{1})\end{array} \right] \tag{8}\]  
Figure 5: Symbolization results of the proposed method. After establishing the matrix, the distance between \(STR_{a}\) and \(STR_{b}\) was transformed into the bending path \(W\) from (1,1) to (\(m\),\(n\)) in matrix \(\mathbf{C}\). If the bending path was \(W=(w_{1},w_{2},\cdots,w_{k},\cdots,w_{K})\), the element was \(w_{k}=(i,j)\), and the path length satisfied \(\max(n,m)\leq k\leq n+m-1\). The path was constrained as follows:  
(1) \(W\) started in matrix \(\mathbf{C}\) (1,1), and finally ended in matrix \(\mathbf{C}\) (\(m\),\(n\));  
(2) The path curve was continuous and monotonic. The DTW distance calculation between \(STR_{a}\) and \(STR_{b}\) was essentially the task of finding a bending path with the smallest distance in the distance matrix \(\mathbf{C}\). \[DTW(STR_{a},STR_{b})=\underset{W}{\text{argmin}}\left\{\sum_{(i,j)\in W}w_{k}\right\} \tag{9}\]  
In the extraction of the pseudo-periods of the satellite telemetry data, the DTW distance was used to calculate the distance between each subsequence \(STR_{i}\) and the standard pseudo-period sequence \(STR_{fT}\).