Abstract
The least-squares wavelet analysis (LSWA) is a robust method of analyzing any type of time/data series without the need for editing and preprocessing of the original series. The LSWA can rigorously analyze any non-stationary and equally/unequally spaced series with an associated covariance matrix that may have trends and/or datum shifts. The least-squares cross-wavelet analysis complements the LSWA in the study of the coherency and phase differences of two series of any type. A MATLAB software package including a graphical user interface is developed for these methods to aid researchers in analyzing pairs of series. The package also includes the least-squares spectral analysis, the antileakage least-squares spectral analysis, and the least-squares cross-spectral analysis to further help researchers study the components of interest in a series. We demonstrate the steps that users need to take for a successful analysis using three examples: two synthetic time series, and a Global Positioning System time series.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Data availability
The MATLAB software package (open-access) is available at https://www.ghader.org, on GitHub at https://github.com/Ghaderpour/LSWAVE-SignalProcessing, and at the GPS Toolbox website at https://www.ngs.noaa.gov/gps-toolbox.
References
Craymer MR (1998) The least-squares spectrum, its inverse transform and autocorrelation function: Theory and some application in geodesy. PhD dissertation, University of Toronto
Daubechies I (1990) The wavelet transform, time-frequency localization and signal analysis. IEEE T Inf Theory 36(5):961–1005
De Wolf ED, Madden LV, Lipps PE (2003) Risk assessment models for wheat fusarium head blight epidemics based on within-season weather data. Phytopathology 93(4):428–435
Foster G (1996) Wavelet for period analysis of unevenly sampled time series. Astron J 112(4):1709–1729
Ghaderpour E (2018) Least-squares wavelet analysis and its applications in geodesy and geophysics. PhD dissertation, York University
Ghaderpour E, Pagiatakis SD (2017) Least-squares wavelet analysis of unequally spaced and non-stationary time series and its applications. Math Geosci 49(7):819–844
Ghaderpour E, Ince ES, Pagiatakis SD (2018a) Least-squares cross-wavelet analysis and its applications in geophysical time series. J Geod 92(10):1223–1236
Ghaderpour E, Liao W, Lamoureux MP (2018b) Antileakage least-squares spectral analysis for seismic data regularization and random noise attenuation. Geophysics 83(3):V157–V170
Huang NE, Wu Z (2008) A review on Hilbert-Huang transform: method and its applications to geophysical studies. Rev Geophys 46(2):1–23
Ku HH (1966) Notes on the use of propagation of error formulas. J Res NBS C Eng Inst 70C(4):263–273
Niedermeyer E, da Silva FL (2005) Electroencephalography: Basic Principles, Clinical Applications, and Related Fields. Lippincott Williams and Wilkins
Pagiatakis S (1999) Stochastic significance of peaks in the least-squares spectrum. J Geod 73(2):67–78
Pagiatakis SD, Yin H, El-Gelil MA (2007) Least-squares self-coherency analysis of superconducting gravimeter records in search for the Slichter triplet. Phys Earth Planet In 160(2):108–123
Puryear CI, Portniaguine ON, Cobos CM, Castagna JP (2012) Constrained least-squares spectral analysis: Application to seismic data. Geophysics 77(5):143–167
Rodionov SN (2004) A sequential algorithm for testing climate regime shifts. Geophys Res Lett 31(9):L09204
Torrence C, Compo GP (1998) A practical guide to wavelet analysis. B Am Meteorol Soc 79(1):61–78
Tsay RS (2010) Analysis of financial time series, 3rd Edition. Wiley
Vanìček P (1969) Approximate spectral analysis by least-squares fit. Astrophys Space Sci 4:387–391
Vassallo M, Özbek A, Özdemir AK, Eggenberger K (2010) Crossline wavefield reconstruction from multicomponent streamer data: Part 1-multichannel interpolation by matching pursuit (MIMAP) using pressure and its crossline gradient. Geophysics 75(6):WB53–WB67
von Storch H, Zwiers FW (2001) Statistical analysis in climate research. Cambridge University Press
Wells DE, Krakiwsky EJ (1971) The method of least-squares. Department of Surveying Engineering, University of New Brunswick, Canada
Xu S, Zhang Y, Pham D, Lambare G (2005) Antileakage Fourier transform for seismic data regularization. Geophysics 70(4):V87–V95
Acknowledgements
This research has been financially supported by the Natural Sciences and Engineering Research Council of Canada (NSERC) and partially by the Carbon Management Canada (CMC) National Centre of Excellence (Canada).
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
The GPS Tool Box is a column dedicated to highlighting algorithms and source code utilized by GPS engineers and scientists. If you have an interesting program or software package you would like to share with our readers, please pass it along; e-mail it to us at gpstoolbox@ngs.noaa.gov. To comment on any of the source code discussed here, or to download source code, visit our website at http://www.ngs.noaa.gov/gps-toolbox. This column is edited by Stephen Hilla, National Geodetic Survey, NOAA, Silver Spring, Maryland, and Mike Craymer, Geodetic Survey Division, Natural Resources Canada, Ottawa, Ontario, Canada.
Appendix A: Error estimation of the least-squares coefficients
Appendix A: Error estimation of the least-squares coefficients
We show how one may calculate the unbiased covariance matrix of simultaneously estimated coefficients in the LSSA or ALLSSA. Then we show how the GUI calculates the amplitudes and phases of sine waves with their errors.
Let \({\mathbf{f}}~=~\left[ {f\left( t \right)} \right]\) be a time series of size \(n\) with associated covariance matrix \({{\mathbf{C}}_{\mathbf{f}}}\) and \({\mathbf{P}}~=~{\mathbf{C}}_{{\mathbf{f}}}^{{ - 1}}\). Assume that \({\mathbf{f}}\) has d significant datum shifts, and so column vectors \({\mathbf{\Phi} _1}~=\left[ {\mathbf{1}_1} \right]\), \({\mathbf{\Phi} _2}~=\left[ {\mathbf{1}_2} \right]\), …, \({\mathbf{\Phi} _d}~=\left[ {\mathbf{1}_d} \right]\), of size n whose elements are zeros and ones will estimate the total shifts of data. The elements of each vector are ones if their locations align with a datum shift segment and zeros elsewhere. Assume that \({{\mathbf{\Phi }}_{d+1}}~=[{\mathbf{t}}]\), \({{\mathbf{\Phi }}_{d+2}}~=[{{\mathbf{t}}^2}]\), and \({{\mathbf{\Phi }}_{d+3}}~=[{{\mathbf{t}}^3}]\) to estimate a consistent trend for all datum shifts.
Let \({{\mathbf{\Phi }}_{d+4}}~=~~{\text{cos}}\left( {2\pi {\omega _1}{\mathbf{t}}} \right)\), \({{\mathbf{\Phi }}_{d+5}}~=~~{\text{sin}}\left( {2\pi {\omega _1}{\mathbf{t}}} \right)\), ..., \({{\mathbf{\Phi }}_{q - 1}}~=~~{\text{cos}}\left( {2\pi {\omega _k}{\mathbf{t}}} \right)\), and \({{\mathbf{\Phi }}_q}~=~~{\text{sin}}\left( {2\pi {\omega _k}{\mathbf{t}}} \right)\) be the constituents of known forms whose frequencies (\({\omega _k}\)’s) are either entered by users in the LSSA or estimated by the ALLSSA. Therefore, \(\underline {{\mathbf{\Phi }}} =\left[ {{{\mathbf{\Phi }}_1},~ \ldots ,{{\mathbf{\Phi }}_d}, \ldots ,{{\mathbf{\Phi }}_q}} \right]\) is the \(n~ \times ~q\) matrix of the constituents of known forms. In the LSSA or ALLSSA, the coefficients of constituents of known forms are estimated as follows:
that is a column vector of size \(q\). Therefore, the residual series is \({\mathbf{\hat {g}}}=~{\mathbf{f}}~ - ~\underline {{\mathbf{\Phi }}} ~\underline {{{\mathbf{\hat {c}}}}}\). From the covariance law, the covariance matrix of \(\underline {{{\mathbf{\hat {c}}}}}\) is estimated as
where \(\hat {\sigma }_{0}^{2}=\left( {{{{\mathbf{\hat {g}}}}^{\text{T}}}{\mathbf{P}}~{\mathbf{\hat {g}}}} \right)/\left( {n - q} \right)\) is unbiased estimator (Wells and Krakiwsky 1971, Chap. 7).
Now from (3), suppose that \({\hat {c}_1}\) and \({\hat {c}_2}\) are the estimated coefficients of \({\text{cos}}\left( {2\pi {\omega _1}{\mathbf{t}}} \right)\) and \({\text{sin}}\left( {2\pi {\omega _1}{\mathbf{t}}} \right)\) whose variances \(\hat {\sigma }_{1}^{2}\) and \(\hat {\sigma }_{2}^{2}\) and covariance \({\hat {\sigma }_{12}}\) are obtained from the elements of \({{\mathbf{C}}_{\underline {{{\mathbf{\hat {c}}}}} }}\) in (4), respectively. To find the estimated amplitude \(\hat {a}\) and phase \(\hat {\theta }\), we use the following equations:
Thus, we have \({\hat {c}_1}~=~\hat {a}~\sin \left( {\hat {\theta }} \right)\) and \({\hat {c}_2}~=~\hat {a}~\cos \left( {\hat {\theta }} \right)\), so \(\hat {a}=\sqrt {\hat {c}_{1}^{2}+\hat {c}_{2}^{2}} ~\), \(\hat {\theta }=2{\tan ^{ - 1}}\left( {\hat {a} - ~{{\hat {c}}_2}} \right)/{\hat {c}_1}\), where \(- \pi ~<~\hat {\theta }~<~\pi\). If \(F~=~F\left( {X,Y} \right)\) is a function of variables \(X\) and \(Y\), then the uncertainty or error in \(F\) may be obtained after approximation to a first-order Taylor series:
where \(\partial F/\partial X\) is the partial derivative of \(F\) with respect to \(X\), \(\hat {\sigma }_{X}^{2}\) is the variance of \(X\), and \({\hat {\sigma }_{XY}}\) is the covariance between X and Y (Ku 1966). Using (7), we obtain
that are the errors of \(\hat {a}\) and \(\hat {\theta }\), respectively.
Rights and permissions
About this article
Cite this article
Ghaderpour, E., Pagiatakis, S.D. LSWAVE: a MATLAB software for the least-squares wavelet and cross-wavelet analyses. GPS Solut 23, 50 (2019). https://doi.org/10.1007/s10291-019-0841-3
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10291-019-0841-3