# A Deep Learning Framework for Signal Detection and Modulation Classification
## 2 Communication Signal Description and Dataset Generation
### Signal Time-Frequency Description
#### 2.2.1 MFSK Signal Time-frequency Description  
The STFT of MFSK signal can be expressed as  
\[STFT_{s_{PSK}}(t,w)=\int_{-\infty}^{+\infty}[s_{PSK}(\tau)\tau^{\prime}(\tau- t)]e^{-j\mu\tau}d\tau=\int_{-\infty}^{+\infty}\left[\sum_{k=-\infty}^{+\infty} Ag(\tau-kT_{b})e^{i(w_{k}+\phi_{k})}\gamma^{\prime}(\tau-t)\right]e^{-j\mu\tau}d\tau \tag{7}\]  
where \(\gamma(t)\) is the window function, whose duration is \(T\). When \(\gamma(t)\) is in a symbol duration, Equation (7) can be simplified as  
\[\begin{array}{c}STFT_{s_{PSK}}(t,w)=\quad\int_{-T/2}^{T/2}Ae^{i(w_{k}(\tau+ t)+\phi_{k})}e^{-j\mu(\tau+t)}d\tau=ATe^{-j\mu\tau}e^{i(w_{k}t+\phi_{k})}Sa( \frac{w_{-}w_{k}}{2}T),\\ kT_{b}+T/2<t<(k+1)T_{b}-T/2,k=0,1,2,\ldots\end{array} \tag{8}\]where \(Sa(w)=\sin(w)/w\). When \(\gamma(t)\) spans two symbols, Equation (7) can be simplified as  
\[\begin{array}{ll}STFT_{s_{FSK}}(t,w)&=\int_{-T/2}^{d}Ae^{i((w_{1}+t)+\phi_{k})} e^{-jw(\tau+t)}d\tau+\int_{d}^{T/2}Ae^{i((w_{k+1}(\tau+t)+\phi_{k+1})}e^{-jw( \tau+t)}d\tau=\\ &=Ae^{j((w_{k}-w)t+\phi_{k})}\int_{-T/2}^{d}e^{-j(w-w_{k})t}d\tau+Ae^{j((w_{k+1 }-w)t+\phi_{k+1})}\int_{d}^{T/2}e^{-j(w-w_{k+1})\tau}d\tau=\\ &=A\frac{T+2d}{2}e^{j((w_{k}-w)t+\phi_{k})}e^{i((w_{k}-w_{k})(T-2d)}Sa(\frac{(w -w_{k})(T+2d)}{4})+\\ &\qquad\qquad+A\frac{T-2d}{2}e^{j((w_{k+1}-w)t+\phi_{k+1})}e^{i(w_{k}-w_{k+1}) (T+2d)}Sa(\frac{(w-w_{k+1})(T-2d)}{4}),\\ (k+1)T_{b}&-T/2<t<(k+1)T_{b}+T/2,d=(k+1)T_{b}-t,k=0,1,2,\ldots\end{array} \tag{9}\]  
where \(w_{k+1}\) is the carrier angular frequency of the k+1-th symbol. If \(w_{k+1}=w_{k}\), it indicates that the carrier angular frequency does not jump, so Equation (8) is same as Equation (9). We take the modulus square of Equation (8). The result can be expressed as  
\[\begin{array}{ll}SPEC_{s_{FSK}}(t,w)=\left|STFT_{s_{FSK}}(t,w)\right|^{2}=A^ {2}T^{2}Sa^{2}(\frac{w-w_{k}}{2}T),\\ kT_{b}+T/2<t<(k+1)T_{b}-T/2,k=0,1,2,\ldots\end{array} \tag{10}\]  
And for Equation (9), it can be expressed as:  
\[\begin{array}{ll}SPEC_{s_{FSK}}(t,w_{k})\approx\frac{A^{2}(T+2d)^{2}}{4} \leq A^{2}T^{2},-T/2<d<T/2,\\ (k+1)T_{b}-T/2<t<(k+1)T_{b}+T/2,k=0,1,2,\ldots\end{array} \tag{11}\]  
Obviously, the value of \(SPEC_{s_{FSK}}(t,w_{k})\) will increase as the increase of jumping time \(d\). The energy decreases gradually as \(\gamma(t)\) slips away from the symbol. So when \(d=T/2\), the window is completely within one symbol, and the maximum value is obtained.  
\[\begin{array}{ll}SPEC_{s_{FSK}}(t,w_{k})_{\max}=A^{2}T^{2},\\ (k+1)T_{b}-T/2<t<(k+1)T_{b}+T/2,k=0,1,2,\ldots\end{array} \tag{12}\]  
When \(d=-T/2\), the window completely spans to next symbol, and the minimum value is obtained  
\[\begin{array}{ll}SPEC_{s_{FSK}}(t,w_{k})_{\min}=0,\\ (k+1)T_{b}-T/2<t<(k+1)T_{b}+T/2,k=0,1,2,\ldots\end{array} \tag{13}\]  
From our analysis, we can easily get the characteristics of FSK modulation: (1) There will be sharp brightness changes in the time-frequency image at the frequency change moment. (2) The signal modulation number \(M\) and frequency spacing are important parameters for the MFSK time-frequency characteristics, which determine the value of \(w_{k}\).