Crunching FFTs with Microsoft&

Crunching FFTs with Microsoft&,第1张

Abstract: This applicaTIon note demonstrates how to quickly verify the dynamic performance of any ADC without requiring expensive data-processing software. Although Microsoft Excel limits the number of data points to 4k, this applicaTIon note shows the successful use of Excel for FFT processing and displaying the results in a typical FFT spectrum.

IntroducTIonFast Fourier Transforms (FFTs) are a powerful tool for evaluaTIng the dynamic performance of analog-to-digital converters (ADCs). Numerous programs are available to process ("crunch") the output code of an ADC into its FFT components. Many of these programs are custom applications written by a C programmer. While these custom programs are handy, the C source code is not always available. Other FFT crunching programs use MATLAB®. MATLAB is very popular in the industry, however, MATLAB is not as ubiquitous as Microsoft Excel and in 2004 Mathworks was charging approximately US$3000 for its basic MATLAB software along with the signal processing toolbox and annual licensing agreement. This application note introduces an Excel spreadsheet that crunches the output code of an ADC into its FFT components.

The "Crunching_FFTs.xls" spreadsheet has been automated using macros for ease-of-use. It provides a formatted single-tone FFT plot from the user's data. The user is simply required to enter three variables and the ADC data record.

Using Excel to crunch FFTs has its benefits. Excel records all the intermediate steps from raw ADC data to a FFT plot, which the user can then explore by analyzing the equation for each spreadsheet cell. For simplicity, however, the default setting of the Crunching_FFTs.xls spreadsheet hides the intermediate detailed calculations. If you wish to analyze the details of the FFT calculation, simply click on the "Show_Detailed_Calculations" bubble.

The major drawback of using Microsoft Excel to perform Fourier analysis: ADC data record is limited to 4096 data points¹. Another shortcoming of the Crunching FFTs.xls spreadsheet is that it requires coherent sampling. See Maxim's application note (Coherent Sampling Calculator (CSC)) for more information². Step-by-step instructions for using "Crunching_FFTs.xls"
  1. Starting with cell A2, replace the existing ADC data record in column A with a new ADC data record. The number of data points in the ADC data record must be a power of 2 (128, 256, 512, 1024, 2048...).
  2. Enter the three required input variables into cells B2, C2, D2. Remember that you must adhere to coherent sampling.
    fSAMPLE is the sampling frequency of the ADC under test.
    NRECORD is the number of data points used to create your FFTs. This value must be a power of 2.
  3. Click on the macro button titled "Click Here After Changing fSAMPLE."
  4. Click on the macro button titled "Click Here After Changing NRECORD."
  5. Click on the macro button titled "Click Here to Crunch FFT³."
  6. Enjoy using your Single-Tone FFT Plot.
Theoretical examplesThe "Example_Data_Records.xls" spreadsheet is provided as a fun, simple way to practice using the Crunching_FFTs.xls spreadsheet. These example data records were created from a software model of an ADC. This software model only accounts for quantization error and thermal noise, therefore harmonics are not present in the FFTs for these data records. MAX1420 exampleThe "Crunching FFTs_MAX1420_fs60_fin2p1_4096.xls" spreadsheet shows the FFT for data taken from the 12-bit MAX1420EVKIT with a 60.0489984MHz sampling frequency and a 2.125758MHz input tone at -0.5dBFS. Unlike the data discussed in the "Theoretical examples" section above, the MAX1420 FFT shows harmonics due to device nonlinearities. The second harmonic can be seen at 4.0251516MHz and the third harmonic at 6.377274MHz. See Figure 1.

Crunching FFTs with Microsoft&,Figure 1.  12-Bit MAX1420 FFT created with the Crunching_FFTs.xls spreadsheet.,第2张
Figure 1. 12-Bit MAX1420 FFT created with the Crunching_FFTs.xls spreadsheet. MAX12553 exampleThe "Crunching_FFTs_MAX12553_fs65_fin30_4096.xls" spreadsheet shows the FFT for data taken from the 14-bit MAX12553 device while mounted on the MAX12555EVKIT with a 65.00352MHz sampling frequency and a 30.01017MHz input tone at -0.6dBFS. See Figure 2. Comparing Figure 1 to Figure 2, one can easily see that the 14-bit device (Figure 2) results is a lower noise floor than the 12-bit device (Figure 1).

Crunching FFTs with Microsoft&,Figure 2.  14-Bit MAX12553 FFT created with the Crunching_FFTs.xls spreadsheet. ,第3张
Figure 2. 14-Bit MAX12553 FFT created with the Crunching_FFTs.xls spreadsheet. Notes¹ A 4096 data-point ADC record is acceptable to verify the accuracy of an ADC. MAXIM, however, typically uses MATLAB software and longer ADC data records to characterize an ADC's dynamic parameters such as SNR, SINAD, THD, and SFDR. Longer ADC data records produce more consistent results from FFT plot to FFT plot.

² It is certainly possible to add additional functionality to the Crunching FFTs.xls spreadsheet that would allow window sampling. See Maxim's Coherent Sampling vs. Window Sampling application note for more information. If a reader succeeds in adding window sampling functionality, this author would certainly be interested to see the results.

Download the "The "Crunching_FFTs.xls" spreadsheet. IMPORTANT NOTE: If you get a run-time error '1004' that says 'ATPVBAEN.XLA' could not be found, you must install the Analysis ToolPak - VBA. The macro linked to the "Click Here to Crunch FFT" button requires the "Analysis ToolPak - VBA" to run successfully. This ToolPak is free and part of your Excel software. To install the TookPak from Microsoft Excel, pull down the "Tools" menu and select "Add-Ins." From the Add-Ins window, check Analysis ToolPak - VBA. You may need your Microsoft Office installation CD to add this ToolPak. Once the TookPak is added, click the macro button titled Click Here to Crunch FFT.

MATLAB is a registered trademark of The MathWorks, Inc.
Microsoft is a registered trademark of Microsoft Corp.

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/dianzi/2547337.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-08-05
下一篇 2022-08-05

发表评论

登录后才能评论

评论列表(0条)

保存