topic Re: fft on FPGA in LabVIEW
https://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3743452#M1053738
<P>Hi,</P>
<P> </P>
<P>Yes I want to find the frequency at which the maximum occurs , by observing the magnitude spectra plot on the FPGA(not on the cRIO/PC). Is there any reference VI for the same?</P>
<P> </P>
<P>Thank you.</P>
<P> </P>
<P> </P>Fri, 19 Jan 2018 04:17:36 GMTHarss2018-01-19T04:17:36Zfft on FPGA
https://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3742961#M1053578
<P>Hi,</P>
<P>I am curretly calculating the FFT on the FPGA using the FFT Express VI . After computing the FFT I want to determine the frequency of the signal using the Magnitude spectrum plot, all the processing has to be done on the FPGA without sending the data to the PC . Any ideas how to go about implementing this. I checked several example codes for FFT but all of them seem to be using the DMA FIFO for analyzing data on the PC . However, for my application the entire processing needs to be carried out on the FPGA. Any help on this would be really appreciated .</P>
<P> </P>
<P>Thank you.</P>
<P> </P>
<P>Regards</P>Thu, 18 Jan 2018 07:09:23 GMThttps://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3742961#M1053578Harss2018-01-18T07:09:23ZRe: fft on FPGA
https://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3743119#M1053618
<P>You say you want to compute "the frequency of the signal" after you do the FFT. Do you understand Frequency-Domain analysis? Do you know that the magnitude of the FFT signal is the amplitude of that frequency component of the signal? So unless you are dealing with a pure sinusoid that has been sampled at an appropriate (higher) sampling frequency, there won't be a single "frequency" in the FFT. However, surely the FPGA could find the magnitudes of the frequency components and compute, say, the frequency at which the <U>maximum</U> appears (or some other computation you'd like to make) ...</P>
<P> </P>
<P>Bob Schor</P>Thu, 18 Jan 2018 14:03:45 GMThttps://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3743119#M1053618Bob_Schor2018-01-18T14:03:45ZRe: fft on FPGA
https://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3743452#M1053738
<P>Hi,</P>
<P> </P>
<P>Yes I want to find the frequency at which the maximum occurs , by observing the magnitude spectra plot on the FPGA(not on the cRIO/PC). Is there any reference VI for the same?</P>
<P> </P>
<P>Thank you.</P>
<P> </P>
<P> </P>Fri, 19 Jan 2018 04:17:36 GMThttps://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3743452#M1053738Harss2018-01-19T04:17:36ZRe: fft on FPGA
https://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3744384#M1054047
<P>Am I not correct that cRIOs do not have a display? I'm even more certain that the FPGA subset does not have an associated display ... However, you should be able to "do math" on an FPGA and, say, "find the maximum" ...</P>
<P> </P>
<P>Bob Schor</P>Mon, 22 Jan 2018 16:24:02 GMThttps://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3744384#M1054047Bob_Schor2018-01-22T16:24:02ZRe: fft on FPGA
https://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3744575#M1054092
<BLOCKQUOTE><HR /><LI-USER uid="95728"></LI-USER> wrote:<BR />
<P>Am I not correct that cRIOs do not have a display? I'm even more certain that the FPGA subset does not have an associated display ... However, you should be able to "do math" on an FPGA and, say, "find the maximum" ...</P>
<HR /></BLOCKQUOTE>
<P>Newer cRIOs running the embedded Linux RT do have a display. But an FPGA does not have a display, it is essentially a programmable IC, it has no operating system and no display. You could potentially drive one through several communications but you probably don't want that. If you have a cRIO with a display then this should be pretty easy. If you have an embedded target without a display it will not be easy to drive a display. What hardware do you have? What method of displaying it do you intend on using?</P>Mon, 22 Jan 2018 21:36:10 GMThttps://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3744575#M1054092Hooovahh2018-01-22T21:36:10ZRe: fft on FPGA
https://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3744696#M1054129
<P>Depending on your configuration a spectrum will contain a fixed number of samples which are streamed out. For arguments sake lets say it is 128.</P>
<P> </P>
<P>So to pick out the maximum value you can have some sort of pt by pt maximum detection that resets every 128 samples. At the end of each 128 it can put the maximum index somewhere depending on what needs it.</P>
<P>To convert the index to frequency you then need to know the sampling rate and size but if it is being used on the FPGA directly you may be able to avoid this step anyway.</P>
<P> </P>
<P>The FFT block is not straightforward to use and uses a lot of space. So beware, there is a reason there aren't a lot of examples, it often complicates things a lot more than doing it on the host. It should provide you with valid flags to know when to reset the maximum tracker (don't have LV in front of me at the minute).</P>Tue, 23 Jan 2018 07:51:58 GMThttps://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3744696#M1054129James_McN2018-01-23T07:51:58ZRe: fft on FPGA
https://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3765764#M1060828
<P>Hi,</P>
<P> </P>
<P>Thanks a lot for the prompt responses. I apologize for the delay in response as was working on something else. Will definitely check and get back on this.</P>
<P> </P>
<P>Thanks</P>
<P> </P>
<P>Regards</P>Mon, 12 Mar 2018 04:06:06 GMThttps://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3765764#M1060828Harss2018-03-12T04:06:06ZRe: fft on FPGA
https://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3765822#M1060840
<P>You have to be aware that the index of the maximum magnitude will not give you a very accurate value for your frequency measurement. If your measurement time is T0, the frequency result uncertainty will be +/- 0.5/T0. This may or may not be good enough for your application.</P>
<P> </P>
<P>Also if your signal is relatively clean (looks 'more or less' like a sine tone) you can probably achieve the same accuracy by simply counting the number of zero-crossing during the T0 measurement time. This is a lot 'cheaper' than an using an FFT. Another advantage is that it is easy (and free) to increase the measurement time (T0), something that is very demanding (if at all possible) when you use and FFT. </P>
<P> </P>
<P>Alternatively if your signal is clean you can also improve the result resolution by performing interpolation around the zero crossing, However your signal has to be 'clean' in the sense that no other tones or noise significantly affect the location of the zero crossing. You can improve your signal quality with for example appropriate pre-filtering.</P>
<P> </P>
<P>The best method to choose therefore depends on the type of signal you are dealing with. Questions to consider include:</P>
<P>- Do you know the frequency of interest with a specific uncertainty (like 12345.678 Hz +/- 1000 Hz)?</P>
<P>- What result accuracy do you need?</P>
<P>- Can you freely choose the measurement time T0?</P>
<P>- Does your signal have unwanted zero crossing caused by other tones or noise? If so can this issue be removed (or at least reduced) using appropriate filtering?</P>
<P> </P>
<P>Then there are other method you can use to improve your measurement accuracy like frequency domain interpolation, but let's hear what your requirements are before moving in that direction.</P>Mon, 12 Mar 2018 08:58:20 GMThttps://forums.ni.com/t5/LabVIEW/fft-on-FPGA/m-p/3765822#M1060840LocalDSP2018-03-12T08:58:20Z