4.0

4.0 | 3 ratings Rate this file 154 downloads (last 30 days) File Size: 231.47 KB File ID: #11020

Extended DFT

by Vilnis Liepins

 

08 May 2006 (Updated 05 Nov 2009)

Code covered by BSD License  

Program EDFT produce high-resolution N-point DFT for N greater then the length of data vector.

Download Now | Watch this File

File Information
Description

EDFT (Extended Discrete Fourier Transform) algorithm produces N-point DFT of sequence X where N is greater than the length of input data. Unlike the Fast Fourier Transform (FFT), where unknown readings outside of X are zero-padded, the EDFT algorithm for calculation of the DFT using only available data and the extended frequency set (therefore, named 'Extended DFT'). EDFT function application is simple and similar to the FFT, besides EDFT have the following additional features:
1. EDFT can extrapolate input sequence X to length N. That is, if apply EDFT for N>length(X), get the results:
F=edft(X,N)=edft(Y)=fft(Y); Y=ifft(F),
where Y is X plus non-zero forward and backward extrapolation of X to length N and/or interpolation if unknown data inside of X have been replaced by NaN (Not-a-Number).
2. EDFT can increase frequency resolution up to 1/(N*T), where T is sampling period. It is well known, that zero-padding do not increase frequency resolution of DFT, therefore the resolution of FFT algorithm is limited by the length of sequence length(X)*T. Of course, there is no magic, just FFT resolution is equal to N for all frequencies, while EDFT is able to increase the resolution on some frequencies and decrease on others. The sum of resolutions along the frequency axis for both algorithms remain equal to N*length(X)*T.
3. EDFT can estimate amplitudes and phases of sinusoidal components in sequence X.
Like as FFT output fft(X,N)/length(X) is proportional to amplitudes of sinusoids in X, also adding a second output argument for EDFT return the amplitude spectrum S of sequence X:
[F,S]=edft(X,N).
4. Input sequence of EDFT may contain NaN. The proposed algorithm can interpolate and reconstruct of missing readings or even data segments (gaps) inside of sequence X. You just need to replace unknown readings by NaN and run edft(X) or edft(X,N).
5. EDFT can run with limit to maximum number of iterations (input argument I) or either in non-iterative (I=1) mode
[F,S]=edft(X,N,I) or
[F,S,Stopit]=edft(X,N,I,W),
where W is weight vector and consisting of specific weights for each frequency in F. W is proportional to the amplitude spectrum of the signal. So, a`priori knowledge about form of the input sequence amplitude spectrum S can be used to setup appropriate weight vector W, otherwise default (equal) weight W=ones(size(F)) will be applied. 'Stopit' is an informative (optional) output parameter. The first row of 'Stopit' showing the number of performed iteration, the second row indicate breaking of iteration reason (see EDFT help).
6. Is it possible to estimate DFT of nonuniformly (irregularly) sampled input sequence by proposed algorithm? Yes, it is. As result, the Nonuniform EDFT (NEDFT) program introduced for processing of input sequence X sampled at arbitrary time moments tk. NEDFT call line: [F,S]=nedft(X,tk,fn) will perform DFT of sequence X(tk) and return outputs F(fn) and S(fn). If frequencies fn are on different grid then used by FFT and EDFT algorithms, a simple Inverse NEDFT (INEDFT) program should be applied to reconstruct Y(tn), call line: Y=inedft(F,fn,tn).
7. Two-dimensional EDFT of array X can be calculated by applying function edft2.m, call line:
F=edft2(X,mrows,ncols).
See programs edft.m, nedft.m, inedft.m and edft2.m help for detailed info.
Launch also DEMO programs. Demoedft.m and Demonedft.m allows to verify the proposed algorithm's performance over iterations for the simulated test signal.
Read attached ExtendedDFT.pdf to get more comprehensive insight into suggested algorithm.

MATLAB release MATLAB 5.2 (R10)
Zip File Content  
Other Files DEMOEDFT.M,
DEMONEDFT.M,
EDFT.M,
EDFT2.M,
ExtendedDFT.pdf,
INEDFT.M,
license.txt,
NEDFT.M
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
11 May 2006 Michal Kvasnicka

DEMO does not show any changes during interation process!!!

16 May 2006 Michal Kvasnicka

DEMOEDTF still does not show any changes of every subplots during iteration process!!! Every subplots shows no differences between each iteration step.

20 May 2006 Michal Kvasnicka

Now EDFT works well. Thanks!!!

06 Apr 2007 zqm zqm

Changes
 
 
  
2007-03-14 Correct spelling errors
2007-02-21 Mirror modifications in desciption
2007-01-24 Programs for nonuniformly sampled sequence spectral analysis added: nedft.m, inedft.m, demonedft.m, description and code updated.
2006-09-03 Added EDFT_Reference_Article.pdf file

where is the 'EDFT_Reference_Article.pdf '?

28 Jun 2007 zqm zqm

Thank you for the improvement!

Please login to add a comment or rating.
Updates
09 May 2006

Additional 'division by zero' controls added to M-file.

10 May 2006

A smal bug fix to improve metrix and Demo plottings.

11 May 2006

Correct spelling errors

15 May 2006

Separate demoedft.m file created to demonstrate Extended DFT performance.

17 May 2006

Update demoedft.m file. Hopefully by now subplots are showing changes during iteration process for all Matlab versions.

18 May 2006

Changing plots colour in demoedft.m

25 May 2006

Relative threshold added to EDFT iterations Stopping criteria

09 Jun 2006

EDFT.m modified. Now input data may contain NaN indicating lost data or missing samples.
DEMOEDFT.m changed - demo where half of data replaced with NaN added.

09 Jun 2006

Minor modifications

05 Sep 2006

Added EDFT_Reference_Article.pdf file

24 Jan 2007

Programs for nonuniformly sampled sequence spectral analysis added: nedft.m, inedft.m, demonedft.m, description and code updated.

21 Feb 2007

Mirror modifications in desciption

14 Mar 2007

Correct spelling errors

08 May 2007

Improve performance of nedft.m and edft.m programs. Add missing pdf file.

09 May 2007

Mirror corrections for pdf file

09 May 2007

update was unsuccessful - repeating

24 May 2007

Small corrections in algorithm description.

24 May 2007

Clear unnecessary line in nedft.m

11 Jun 2007

A special case processing improved, contact info updated.

11 Jun 2007

mirror changes

13 Jun 2007

Replacing corrupted image in pdf file.

28 Jun 2007

Two-dimensional EDFT program edft2.m added. Code updated.

01 Mar 2008

Update of edft.m file, allowing to use all NaNs column&row in edft2.m input matrix.

30 Sep 2008

Documentation update

05 Nov 2009

Update ExtendedDFT.pdf file

Tag Activity for this File
Tag Applied By Date/Time
spectral analysis Vilnis Liepins 22 Oct 2008 08:24:43
fft Vilnis Liepins 22 Oct 2008 08:24:43
dft Vilnis Liepins 22 Oct 2008 08:24:43
high resolution Vilnis Liepins 22 Oct 2008 08:24:43
nonuniform Vilnis Liepins 22 Oct 2008 08:24:43
gapped data Vilnis Liepins 22 Oct 2008 08:24:43
extrapolation Vilnis Liepins 22 Oct 2008 08:24:43
signal processing Vilnis Liepins 05 Nov 2009 10:21:14
irregular Vilnis Liepins 05 Nov 2009 10:21:14
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com