The adaptive Fourier decomposition (AFD) is a generalization of the Fourier decomposition. It represents the given signal to a summation of mono-components that only possess non-negative analytic phase derivatives. In addition, with a matching pursuit strategy, the AFD offers fast energy decomposition via the basis adaptive to the intrinsic components of the given signal. Accordingly, the AFD has been successfully applied to the signal compression, separation, denoising and system identification.
This toolbox offers the MATLAB functions and Python functions for the core AFD and the inverse AFD. Users could input your own signals to functions directly to try the AFD method, observing the decomposition components of the AFD and developing your own applications.
For both MATLAB and Python versions, there are two kinds of implementations in this toolbox. One is the conventional AFD. The computation of the conventional AFD follows equations in "Algorithm of Adaptive Fourier Decomposition". Another one is the FFT based AFD. The objective function computation is optimized. The FFT based AFD is suggested due to its fast computation speed.
For the python version, you can find an online demo in zewang.site/AFD. This online demo shows the decomposition process of the FFT based AFD step by step. In the server side, all functions related to the AFD are from this toolbox.
For the MATLAB version, there is a GUI to show the decomposition process of the AFD as shown below:
For MATLAB users, you only need to
- Download this toolbox
- Add the "Matlab" folder to your MATLAB searching path. For example, if your MATLAB folder path is
D:\Github\Toolbox-for-Adaptive-Fourier-Decomposition\Matlab
, you can use the following command in MATLAB:addpath('D:\Github\Toolbox-for-Adaptive-Fourier-Decomposition\Matlab')
For Python users, the following packages are required:
After you have successfully downloaded and installed the above required packages, you only need to
- Download this toolbox
- Copy the
AFD.py
file in the Python folder to the Python searching path, like your own program root path. - In your own python program, you have to import functions in
AFD.py
. For example, you can usefrom AFD import *
.
For MATLAB users, in Matlab/Example
folder, you can run AFD_Example.m
to try the AFD.
For Python users, in Python
folder, you can directly run AFD.py
to try the AFD.
-
Conventional AFD:
conv_AFD
(MATLAB and Python Versions)This function computes a_n and coefficients of decomposition components <e_{a_n},G_n> of the AFD following equations in "Algorithm of Adaptive Fourier Decomposition".
-
FFT based AFD:
FFT_AFD
(MATLAB and Python Versions)This function computes a_n and coefficients of decomposition components <e_{a_n},G_n> of the AFD using the FFT for the computation of objective function values.
-
Inverse AFD:
inverse_AFD
(MATLAB and Python Versions)This function computes the recovery signal using a_n and coefficients of decomposition components <e_{a_n},G_n> obtained from
conv_AFD
andFFT_AFD
. -
Components of the AFD:
comp_AFD
(MATLAB Version) andcomponent_AFD
(Python Version)This function computes evaluators e_{a_n}, basis B_n and decomposition components F_n
-
GUI of the AFD:
GUI_AFD
(MATLAB Version)Use the GUI to show the decomposition process of the AFD.
- T. Qian, "Intrinsic mono-component decomposition of functions: an advance of Fourier theory," Math. Methods Appl. Sci., vol. 33, no. 7, pp. 880–891, 2010.
- T. Qian, L. Zhang, and Z. Li, “Algorithm of adaptive Fourier decomposition,” IEEE Trans. Signal Process., vol. 59, no. 12, pp. 5899–5906, 2011.
- T. Qian and Y. Wang, “Remarks on adaptive Fourier decomposition,” Int. J. Wavelets, Multiresolution Inf. Process., vol. 11, no. 1, p. 1350007, 2013.
- T. Qian, "Cyclic AFD algorithm for the best rational approximation," Math. Methods Appl. Sci., vol. 37, no. 6, pp. 846–859, 2014.
- T. Qian, “Adaptive Fourier decompositions and rational approximations — part I: Theory,” Int. J. Wavelets, Multiresolution Inf. Process., vol. 12, no. 5, p. 1461008, 2014.
- L. Zhang, W. Hong, W. Mai, and T. Qian, “Adaptive Fourier decomposition and rational approximation — part II: Software system design and development,” Int. J. Wavelets, Multiresolution Inf. Process., vol. 12, no. 5, p. 1461009, 2014.
- T. Qian, H. Li, and M. Stessin, “Comparison of adaptive mono-component decompositions,” Nonlinear Anal. Real World Appl., vol. 14, no. 2, pp. 1055–1074, 2013.
- Y. Gao, M. Ku, T. Qian, and J. Wang, “FFT formulations of adaptive Fourier decomposition,” J. Comput. Appl. Math., Apr. 2017.
- Z. Wang, F. Wan, C. M. Wong, and T. Qian, "Fast basis search for adaptive Fourier decomposition," EURASIP J. Adv. Sig. Pr., vol. 74, no. 1, 2018.
- C. Tan, L. Zhang, H. Wu,"A Novel Blaschke Unwinding Adaptive Fourier Decomposition based Signal Compression Algorithm with Application on ECG Signals," IEEE J. Biomed. Heal. Informatics, Mar. 2018.
- Z. Wang, C. M. Wong, F. Wan, "Adaptive Fourier decomposition based R-peak detection for noisy ECG Signals," in 39th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), 2017, pp. 3501-3504.
- Q. Chen, T. Qian, Y. Li, W. Mai, X. Zhang, "Adaptive Fourier tester for statistical estimation," Math. Method. Appl. Sci., vol. 39, no. 12, pp. 3478–3495, 2016.
- Z. Wang, F. Wan, C. M. Wong, and L. Zhang, “Adaptive Fourier decomposition based ECG denoising,” Comput. Biol. Med., vol. 77, pp. 195–205, 2016.
- Z. Wang, C. M. Wong, J. N. da Cruz, F. Wan, P.-I. Mak, P. U. Mak, and M. I. Vai, “Muscle and electrode motion artifacts reduction in ECG using adaptive Fourier decomposition,” in 2014 IEEE International Conference on Systems, Man, and Cybernetics (SMC), 2014, pp. 1456–1461.
- Z. Wang, J. Nuno da Cruz, and F. Wan, “Adaptive Fourier decomposition approach for lung-heart sound separation,” in 2015 IEEE International Conference on Computational Intelligence and Virtual Environments for Measurement Systems and Applications (CIVEMSA), 2015, pp. 1–5.
- J. Ma, T. Zhang, and M. Dong, “A novel ECG data compression method using adaptive Fourier decomposition with security guarantee in e-health applications,” IEEE J. Biomed. Heal. Informatics, vol. 19, no. 3, pp. 986–994, 2015.
- W. Mi and T. Qian, “Frequency-domain identification: An algorithm based on an adaptive rational orthogonal system,” Automatica, vol. 48, no. 6, pp. 1154–1162, 2012.
- L. Zhang, “Adaptive Fourier decomposition based signal instantaneous frequency computation approach,” Int. J. Math. Comput. Phys. Electr. Comput. Eng., vol. 6, no. 8, pp. 1117–1122, 2012.