blob: 63e11d8e4c3f8d388069a431629ebcb87e89dac1 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>CMSIS DSP Software Library: Frequency Bin Example</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.2 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<h1>Frequency Bin Example<br/>
<small>
[<a class="el" href="group__group_examples.html">Examples</a>]</small>
</h1> </div>
</div>
<div class="contents">
<table class="memberdecls">
</table>
<dl class="user"><dt><b>Description</b></dt><dd></dd></dl>
<dl class="user"><dt><b></b></dt><dd>Demonstrates the calculation of the maximum energy bin in the frequency domain of the input signal with the use of Complex FFT, Complex Magnitude, and Maximum functions.</dd></dl>
<dl class="user"><dt><b>Algorithm:</b></dt><dd></dd></dl>
<dl class="user"><dt><b></b></dt><dd>The input test signal contains a 10 kHz signal with uniformly distributed white noise. Calculating the FFT of the input signal will give us the maximum energy of the bin corresponding to the input frequency of 10 kHz.</dd></dl>
<dl class="user"><dt><b>Block Diagram:</b></dt><dd><div align="center">
<img src="FFTBin.gif" alt="FFTBin.gif"/>
<p><strong>Block Diagram</strong></p></div>
</dd></dl>
<dl class="user"><dt><b></b></dt><dd>The figure below shows the time domain signal of 10 kHz signal with uniformly distributed white noise, and the next figure shows the input in the frequency domain. The bin with maximum energy corresponds to 10 kHz signal. </dd></dl>
<dl class="user"><dt><b></b></dt><dd><div align="center">
<img src="FFTBinInput.gif" alt="FFTBinInput.gif"/>
<p><strong>Input signal in Time domain</strong></p></div>
<div align="center">
<img src="FFTBinOutput.gif" alt="FFTBinOutput.gif"/>
<p><strong>Input signal in Frequency domain</strong></p></div>
</dd></dl>
<dl class="user"><dt><b>Variables Description:</b></dt><dd></dd></dl>
<dl class="user"><dt><b></b></dt><dd><ul>
<li><code>testInput_f32_10khz</code> points to the input data </li>
<li><code>testOutput</code> points to the output data </li>
<li><code>fftSize</code> length of FFT </li>
<li><code>ifftFlag</code> flag for the selection of CFFT/CIFFT </li>
<li><code>doBitReverse</code> Flag for selection of normal order or bit reversed order </li>
<li><code>refIndex</code> reference index value at which maximum energy of bin ocuurs </li>
<li><code>testIndex</code> calculated index value at which maximum energy of bin ocuurs</li>
</ul>
</dd></dl>
<dl class="user"><dt><b>CMSIS DSP Software Library Functions Used:</b></dt><dd></dd></dl>
<dl class="user"><dt><b></b></dt><dd><ul>
<li><a class="el" href="group___c_f_f_t___c_i_f_f_t.html#gaf336459f684f0b17bfae539ef1b1b78a" title="Initialization function for the floating-point CFFT/CIFFT.">arm_cfft_radix4_init_f32()</a></li>
<li><a class="el" href="group___c_f_f_t___c_i_f_f_t.html#ga521f670cd9c571bc61aff9bec89f4c26" title="Processing function for the floating-point CFFT/CIFFT.">arm_cfft_radix4_f32()</a></li>
<li><a class="el" href="group__cmplx__mag.html#gae45024c497392cde2ae358a76d435213" title="Floating-point complex magnitude.">arm_cmplx_mag_f32()</a></li>
<li><a class="el" href="group___max.html#ga5b89d1b04575aeec494f678695fb87d8" title="Maximum value of a floating-point vector.">arm_max_f32()</a></li>
</ul>
</dd></dl>
<p><b> Refer </b> <a class="el" href="arm_fft_bin_example_f32_8c-example.html">arm_fft_bin_example_f32.c</a> </p>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Jul 15 2011 13:16:21 for CMSIS DSP Software Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>