# A Class of Algorithms for Continuous Wavelet Transform Based on the Circulant Matrix
## 3 A Class of Algorithms for Continuous Wavelet Transform
### Frequency-Domain Algorithm for CWT  
The algorithm can be further optimized by taking advantage of the analytic expression of \(\hat{\psi}(\omega)\), the Fourier transform of the mother wavelet \(\psi(t)\). In fact, the wavelet transform defined in (21) can also be written as a frequency integration by applying the Fourier Parseval formula [23]. \[W_{f}(a,b){=}\frac{1}{2\pi}\int_{-\infty}^{+\infty}\hat{f}(\omega)\hat{\psi}(a \omega)e^{i\hbar\omega}\mathrm{d}\omega \tag{27}\]  
Assume the sampled signal is \(\{f[n]\}_{n=0}^{N-1}\). Discretizing (27) and considering the periodic property of discrete Fourier transform yields  
\[W_{f}^{2}[n] = \frac{1}{M}\sum_{k=-\frac{M}{2}+1}^{M}\hat{f}(\frac{2\pi}{M}k) \hat{\psi}(\frac{2\pi}{M}ka)e^{i\frac{2\pi}{M}kn} \tag{28}\] \[= \frac{1}{M}\sum_{k=0}^{M-1}\hat{f}(\frac{2\pi}{M}k)\hat{\psi}( \frac{2\pi}{M}ka)e^{i\frac{2\pi}{M}kn},\] \[\text{where}\quad n=0,1,\cdots,M-1.\]  
It is seen by comparing (28) and (18) that (28) represents a circular convolution. By considering Equivalent Condition of Linear Convolution and Circular Convolution, It is reasonable to let  
\[M=2 aT+N. \tag{29}\]  
In this case, the values of \(\{\hat{f}(\frac{2\pi}{M}k)\}_{k=0}^{M-1}\) can be computed as the discrete Fourier transform of \(\hat{f}=[f_{0},f_{1},\ldots,f_{N-1},\underbrace{M^{-N}}_{0,\cdots,0}]^{\mathrm{ T}}\). As for the computation of \(\{\tilde{\tilde{\psi}}(\frac{2\pi}{M}ka)\}_{k=0}^{M-1}\), we can make use of the analytic expression of \(\tilde{\psi}(\omega)\). For example, the Morlet wavelet is defined as [24]  
\[\psi(t):\stackrel{{\mathrm{def}}}{{=}}\sqrt{\frac{2}{\pi\sigma^{ 2}}}e^{-\frac{t^{2}}{2\sigma^{2}}}e^{i\eta t}, \tag{30}\]  
then  
\[\tilde{\tilde{\psi}}(\omega)=\hat{\psi}(\omega)=2e^{-\frac{\sigma^{2}(\omega- \omega)^{2}}{2}}, \tag{31}\]  
where \(\sigma^{2}\) is shape parameter, and \(\eta\) is center frequency. Furthermore, the Morlet wavelet is approximately analytic and therefore \(\tilde{\tilde{\psi}}(\frac{2\pi}{M}ka)\approx 0\) for \(k<0\). So  
\[\tilde{\psi}(\frac{2\pi}{M}ka)\approx 0,\qquad\text{for}\quad k>\frac{M}{2}, \tag{32}\]  
by the periodic property of discrete Fourier transform. Equation (32) will be used to design algorithm of CWT (see the 4 th-6 th steps of Algorithms 3). Definition 8: Equivalent Condition of Time-domain and Frequency-domain Algorithms of CWT: \(M=2 aT+N\) in Equation (29) is called Equivalent Condition of Time-domain and Frequency-domain Algorithms of CWT. Remark 1: _In freezeur such as Wavelab, the parameter \(M\) in Equation (29) takes value \(N\), where \(N\) is the length of signal. In this case, \(\{\hat{f}(\frac{2\pi}{M}k)\}_{k=0}^{M-1}\) can be obtained as the discrete Fourier transform of the data. Furthermore, the length of the result of_ **ifft** _is just \(N\). However, the method will produce artificial periodicity, which is called edge effect by [PERSON] [18], in the wavelet coefficients if signal is not periodic. In order to limitthe edge effect, in [18], the data is padded with sufficient zeros before doing the CWT, then the first \(N\) coefficients of the corresponding convolution are just the coefficients of the CWT. Nevertheless, the reason for this is not answered in previous papers in the author's knowledge. Put another way. Why the last step of Algorithm 3 is dissimilar from the last step of Algorithm 2? The answer will be given in the following Theorem 4. **Lemma 1**: _The filter used in Equation (27) is_  
\[\tilde{\psi}_{a}(t)=\frac{1}{a}\tilde{\psi}(\frac{-t}{a}). \tag{33}\]  
Proof. : We refer the reader to [23] for details. **Theorem 4**: _The wavelet coefficients of the CWT of \(\{f[n]\}_{n=0}^{N-1}\) is the first \(N\) coefficients of (28). While the length of the total coefficients of (28) is \(M\)._  
Proof. : The filter used in Theorem 3 is \(\tilde{\psi}_{a}\) defined in (23); therefore, \(\tilde{\tilde{\psi}}_{a}(t-aT)=\tilde{\psi}_{a}(t)\). Define \(L\tilde{\tilde{\psi}}_{a}=f\star\tilde{\psi}_{a}\), then \(L\tilde{\tilde{\psi}}_{a}=f\star\tilde{\psi}_{a}\).