Phase measurement with FFT for DMM Keithley 7510
First off, you should realize that the FFT is just an efficient implementation of the DFT.  Power of two sizes are the easiest for it, but modern implementations have slick tricks to do other sizes.  Leave that up to the library.  The results will be the same.

If your peaks are sufficiently well spaced (two or three bins apart) the following article will show you how to efficiently calculate the phase and amplitude when a peak falls between bins.


Phase and Amplitude Calculation for a Pure Real Tone in a DFT: Method 1


For a single pure tone, the results are exact providing you know the exact frequency.  You can find several other articles of mine that will show you how to get a very good frequency estimate, exact in the single noiseless pure tone case.

You will have to read the referenced articles (also mine) to understand how it really works.

Ced



If your signal is a repeating waveform, the best approach is to define your frame on a whole multiple of cycles.  When you do this, each harmonic will fall in its own bin and there will be spacing (depending on the waveform count) from the nearest bins.  When a signal is not a whole number of cycles, that's when the peak falls inbetween the bins and the values get distributed in the nearby bins.  This is called leakage and it causes interference.  The equations I referenced do a pretty good job of ignoring this interference, but to get as good of a reading as you would by framing a whole number of cycles, you need to remove the effects of nearby estimates (subtract them out of the DFT using my bin value formulas) before measuring a peak.

Also, you should be aware that if you are measuring something like a piano, not all the overtones are harmonic.  This prevents you from centering all the bins simulaneously.  See:

https://www.dsprelated.com/thread/7902/the-spectral-complexity-of-a-single-musical-note

The easiest way to really understand a DFT is to realize that each bin index (zero based, not MATLAB one based) corresponds to a tone which has the same number of cycles per frame as the the index number.  Thus if you frame five cycles of your periodic signal, ideally, you expect values in bins 0, 5, 10, 15, etc.  and all the inbetween bins will be zero.  This is independent of the sample count within the frame.  What a higher sample count buys you is more bins at higher frequencies,i,e, you are moving the Nyquist limit up.