## 3 Hybrid Modeling: Integrating Physics Preprocessing with Data-Driven Model
### CPS Modeling Based on PE  
Multi-sensor data fusion, as shown in Figure 2, can merge data to make them more informative. The data collected by CPSs are multi-source and heterogeneous. Normalization is therefore necessary in order to eliminate the limitations of data units and make them dimensionless, which is convenient for the comparison and weighting of different units or scales. Meanwhile, data normalization can accelerate the convergence of DL models [38]. As shown in Figure 2, the data distribution range of sensor 1 and sensor 2 is made more consistent through the use of data normalization. The normalization method is expressed as:  
\[X^{*}=\frac{X-Min}{Max-Min} \tag{2}\]  
where \(X\) represents the input sample, \(Max\) is the maximum value of the sample data, \(Min\) is the minimum value of the sample data, and \(X^{*}\) is the normalized output.  
In order to extract the meaningful state features from the data and reduce the difficulty of DL training, it is necessary to perform signal processing, which is realized by the PE modeling of the raw data. This processing method can enable us to meet the requirements of 2D convolutional neural networks (CNNs) for two-dimensional matrix inputs. Short-time Fourier transform (STFT) and wavelet packet decomposition (WPD) are able to extract the time-frequency characteristics of data. In addition, this paper also evaluates the accuracy of data matrix transformation (DMT) without signal processing.  
STFT: As shown in Figure 3a, through the spectrum function of MATLAB, a section of the time sequence signal can be directly transformed into a time-frequency heat map through STFT. The horizontal axis represents time and the vertical axis represents frequency, while different colors represent different values. The theory of STFT is to multiply the  
Figure 2: A detailed flow chart of CPS hybrid modeling.  
original signal by the window function and carry out the segment-by-segment Fourier transform of the original signal by moving the window function. The window functions commonly used by STFT include rectangular, Hanning, and Gaussian. The equation of STFT is expressed as:  
\[\text{STFT}(t,\omega)=\int_{-\infty}^{+\infty}f(\tau)h(\tau-t)e^{-j\omega t}d\tau \tag{3}\]  
where \(t\) and \(\tau\) denote the time, \(\omega\) denotes the frequency, \(f(t)\) is the time-domain data, \(h(\tau-t)\) is a window function whose center is at time \(t\), and \(\text{STFT}(t,\omega)\) is the time-frequency matrix after STFT. Supposing that the length of a signal sample is 1024, through a Hanning window STFT with the length of 64, the output data are a 33 \(\times\) 33 time-frequency matrix.  
WPD: As illustrated by Figure 3b, WPD can decompose each vibration signal sample into a sub-band containing a series of wavelet coefficients through the wpdec function of MATLAB. WPD's heat map horizontal axis represents time, the vertical axis represents different sub-bands, and different colors represent different values. WPD is a widely used time-frequency analysis method. The equation of WPD is expressed as:  
\[\left\{\begin{aligned} C_{j+1,2n}(k)&=\sum_{l\in Z }h_{l-2k}C_{j,n}(l)\\ C_{j+1,2n+1}(k)&=\sum_{l\in Z}g_{l-2k}C_{j,n}(l) \end{aligned}\right. \tag{4}\]  
where \(j\) and \(n\) represent the number of WPD layers and sub-bands, respectively; \(C_{j,n}\) denotes the wavelet coefficient sequence of the \(nth\) node in the \(jth\) layer; \(C_{0,0}\) is the original signal; and \(h\) and \(g\) denote the high-pass filter and low-pass filter, respectively. The equation between \(h\) and \(g\) is given as:  
\[g(k)=(-1)^{k}h(k) \tag{5}\]  
In this paper, DB25 is used as the wavelet basis function and a signal length of 1024 is transformed into a 64 \(\times\) 64 wavelet coefficient matrix through 6-level WPD. A brief illustration of WPD is shown in Figure 4. The wavelet coefficients of different subbands can be obtained by multi-level WPD.  
Figure 3: Signal preprocessing based on PE. (**a**) STFT. (**b**) WPD. (**c**) DMT.