FFT Question

I am using complex FFT and complex IFFT. Does anyone know
what the exact scaling is? ie I think they do not have a divide
by N (samples) within them. I initially need periodogram from a time
series
and so am taking the FFT (can be real) and doing a
magnitude squared (complex)/(2N) on the output. Does this look right
What about the inverse complex FFT?
James

James,
The Complex FFT.vi and Inverse Complex FFT.vi do not have a divide by N samples built in. You can take an array size to get N - number of samples.
As for the rest of your question, could you please provide me with more detail about what you are trying to do? I am not sure, but I believe that if you are trying to obtain the Amplitude of your sample by performing a magnitude squared operation, you might be able to use the built in functionality of the "Amplitude and Phase Spectrum.vi" to find the Amp Spectrum Mag (Vrms) which is the single-sided, amplitude spectrum magnitude. You can look at the detailed help on this function by right clicking on it in the block diagram and going to "help".
If that is not what you are looking for, could you please give me
more information about what you are trying to do? Thanks and have a great day.
-Dan Hoar
Applications Engineering
National Instruments

Similar Messages

  • MyRIO FPGA FFT Express VI timing analysis for multiple input mode - trying to perform fft's on a 3-axis accelerometer

    Hi Everyone!
    Project Background:
    I've been working with the myRIO FPGA in an attempt to generate an application capable of sampling a tri-axis accelerometer and performing an fft on each axis. I've successfully developed an application for a single axis, but attempting to duplicate the code to sample the second and third axes in parallel results in an estimated 150% resource utilization for the tiny FPGA's LUT's. Additionally, I'm looking to avoid sequentially processing each accelerometer input using triggers and a single fft block because that reduces my fft update frequency significantly (e.g. I can't calculate another fft for input 1 until I calculate an fft for inputs 2 and 3).
    After reading up on the fft vi, I'm thinking that I can use the M-interval input indexes / Continuous output indexes Input/Output Index Pattern mode. My thought is that I can edit the vi to remove any math that "recombines" these three vectors into a single fft, resulting in 3 separate fft's. I'm also hoping that this process requires less time than using the sequential method described above. 
    The Questions:
    1. Has anyone done an fft on three inputs using the myRIO at sampling rates > 20kHz and fft sizes of 1024 or larger? If so, I may just be lacking some proper resource management.
    2. Does anyone know where to find timing information on the M-interval input indexes / Continuous output indexes Input/Output Index Pattern mode? The manual only provides timing diagrams for singel channel / single input modes. I don't want to waste my time modifying the vi if it will still take 3x as long (assuming modifying the vi is even a possibility).
    Further Information:
    I already have an application written that samples the accelerometers at >20kHz and then performs the fft on the main processor, but now I'm looking to see if it is possible to perform all signal processing on the FPGA side. The processor performs decently enough, but the timing is not as consistent as I would like it to be. Lastly, I am aware that the myRIO itself has a built in accelerometer, but I need to mount the accelerometer in an environment where the myRIO would probably be damaged and definitely cannot fit.
    Any thoughts are much appreciated! The excessive FPGA compile times for this thing make the old guess and check method less appealing.
    -Chris 

    Hi Chris,
    Thanks for posting and the detailed background on the project! To answer some of your questions:
    1. The FFT Express VI does use a significant amount of space. The FPGA on the myRIO is somewhat limited space-wise. Your best option may to implement the FFT for 1 channel on the FPGA and the other two on the RT side.
    2. I converted the FFT Express VI to a subVI and I am not sure if you can trim too much code from it. The subVI is also very complex so re-working it would be a significant amount of work. I could not find much documentation on M-interval input indexes / Continuous output indexes Input/Output Index Pattern mode timing. 
    I hope that this helps!
    Thanks,
    Frank
    Application Engineer
    National Instruments

  • How do I perform an FFT or ReFFT in VB6 using measurement studio

    I am trying to make a filter by taking a 1D array of voltages and doing a ReFFT() and padding the high frequencies in the array with a value of zero and then going back to time domain with ReInvFFT().  Here is my code which does not seem to be filtering any high frequency content.
    lngReturn = frmMain.CWAI1.AcquireData(varData, varBinaryCodes)
    frmMain.CWDSP1.ReFFT varData, realdata, imgdata
    For i = (UBound(realdata) / 100) To UBound(realdata)
        realdata(i) = 0
        imgdata(i) = 0
    Next
    frmMain.CWDSP1.ReInvFFT realdata, imgdata, varData
    After the function is done varData has a 1D array of filtered real voltage values.  It does not seem to be filtering and I get back exactly what I pass in.  I know it must be something simple that I am missing perhaps the variable cannot be used to pass in and then  back out the values??
    Please shed some light as there are NO examples of this use of FFT.
    Thanks

    Arthur,
    Thank you for your reply.  But at this point, one of my points of confusion is what software I have available to me.  I wish I had a useful central help desk to call up and just say, "Hey, load me up with all of the professional version(s) of Visual
    Studio.  But I do not know what we have license to.  And I kind of need to know what the options are, so that I can ask a specific question of our vast buracracy.
    For now, I have downloaded only free versions of Visual Studio client software.  Since my company does have servers running Microsoft SQL Server, I am going to assume that we have proper licensing for those servers.  But does that server license
    allow me to get any professional versions of the PC client software for the various Visual Studio(s) 2012?
    And if I get a professional version of Visual Studio 2012, does that do away with the three different flavors that I have right now?  I have 2012 versions of SQL Server Management Studio, Visual Studio Express, and Visual Studio Shell (Integrated).
    Your feedback is much appreciated.
    Thanks!

  • Problem with normalized frequency on fft

    Greetings
    I have a problem when working with vi fft Spectral measurements, when acquiring an analog signal , the frequency of this switch to a digital frequency affected by the sampling rate, and hence the frequency axis ( of a waveform graph) gives incorrect, how can  I multiply the digital frequency by the sampling frequency to obtain the original analog frequency?
    how can I save as a text file in 2 columns (frequency and magnitude in db)? I tried to write with 'WRITE measurement FILE' but  shows a header file and the columns are time and value, there is another way to store this data?
    thanks

    greetings and thanks for answering
    attached the vi I'm using, the questions are 2
    1. How can I multiply the frequency of the signal by the sample rate to get the right analog frequency for  example (if the sample rate is 1000 for a frequency of 60 Hz , i got  0.06 Hz observed  on the waveform graph)
    2. How can I get a flat file without a statement at the top with 2 columns frequency and magnitude db
    thanks
    Im using labview 7.1
    Attachments:
    channel.vi ‏211 KB

  • NI-4552 w/2 FFTs and 2 Analog channels?

    I am trying to use the DSA library with VB6 to capture two FFTs (channels 0 and 1) while still capturing raw audio on channels 2 and 3. Is this possible? If so, can someone clarify the steps to do this, or point me toward one of the examples that shows something like this? Thank you for any input.

    It is possible for NIDSA to return 2 FFT's (ACH0 and ACH1) and 2 Time domain data (ACH2 and ACH3).
    I would first like to make sure you are using NIDSA 1.2 - Could you please confirm you're using this version of NIDSA ?
    The reason for this question is that we've been adding new examples for VB users as well as a Software user manual that should help you getting started with your 4552
    http://digital.ni.com/manuals.nsf/websearch/032430F78301D4A986256AC7004DFC52?OpenDocument&node=132100_US
    Anyway, the steps to achieve what you're looking for :
    - Initialize NIDSA
    - Configure Mode as FFT_4_Channels
    - Configure HW parameters (range, trigger, etc...)
    - Route ACH"i" to analyzer"i" [i=0 to 3]
    - Configure baseband FFT settings (span, averaging
    mode) [Note : sampling frequency will be calculated from the span you define)
    - Check if new measurement is available (in a loop)
    - If new measurement is ready, Read Base_FFT0, Read Base_FFT1, Time2 and Time3
    You have additional functions to set units and get useful information such as sampling frequency.
    There is also a "Capture" mode you could use in order to save time records to file.
    I attach an example in C that describes the basic steps to use NIDSA.
    It's been developped using LabWindows/CVI and it should be quite easy to port it to VB and adapt it to your needs.
    I hope this will help !
    Gerald Albertini
    Attachments:
    4552_4_Chan.c ‏15 KB

  • Freq Data from FFT

    I am trying to extract the Frequency data from my FFT like I extract the Magnitude data, as a 1-D array, in order to easily write it to an excel file.
    As shown, I can get the delta-freq value, and I could make a for loop that calculates the values with the dF value, but I would much rather just extract the whole array like I do with 'magnitude'.  Is there an option for this, or should I just write the loop and calculate the values?
    Solved!
    Go to Solution.

    Build yourself an array of frequencies, such as this:
    (Just realised the indicator label is Time Array - as I usualy do this for waveforms!)
    You can also pass the magnitude array into the for loop with an autoindexing input, whilst omitting the array size primitive wired to the iteration count.
    Edit - to answer your question, no, there's no other easy method I'm aware of.
    CLD

  • What are the fft based algorithms DIAdem is using?

    Greetings!  I am relatively new to DIAdem and am trying to find some basic information about how DIAdem is performing some calculations, specifically the FFT based functions.  The DIAdem help does not cover in depth what I would like to know and I cannot find anything on NI's website or these boards (yet) that does.  I did find one post that discussed the algorithms used in DIAdem Crash Analysis (originating from the NHTSA?) that gave a very good discussion, but this is specific to Crash.  Is there a similar paper for the algorithms within DIAdem?  Yes, I have run the same data through both DIAdem and an app we currently use and the results are very close, but this anecdotal evidence is not enough to satisfy the folks I work for.  Can someone point me in the correct direction?  Thanks!

    Hi,
    DIAdem is using several different FFT algorithms, depending on the version of DIAdem and the mathematical function. The basic FFT, witch is calculating the real/imaginary part out of the time signal, is well defined. Each algorithm gives almost the same result. There are only very small differences on the last bits of the float values. The basic FFT algorithm is usually not very large. It is easy to use different functions or libraries depending on the needs. The results have to be the same in all cases.
    DIAdem 10.2 is using a new algorithm which is able to do FFT calculations with any number of values, not just the power of two. This algorithm is also used in other NI-products like LabVIEW. A large afford is going into the quality and speed of this algorithm because not only the simple FFT but also a number of additional functions like the sound and vibration toolkit for LabVIEW is depending on this.
    The difficult part, when it comes to comparison between DIAdem and other FFT calculations, is always the large number of options. You need to know the number of values, sampling frequency, window function, window correction and the averaging. You can calculate peak, rms or power spectrum and so on. Depending on the options, you can get very different but still correct results.
    Crash is much more a question of standards. Starting with sampling frequencies and ending with precise defined algorithms to get a result like the HIC-value witch has to be reproducible and comparable between cars from different vendors all over the world.
    As soon as you start to do real world FFT calculations there are so many options and possible ways do get the results you need, that it is impossible to discuss all of them in a documentation of a Software like DIAdem. You could write a series of books about this.
    If you have specific questions about the FFT results, you can give it a try and ask on this forum.
    Ulrich Bierwisch

  • IMAQ FFT destination image, help!

    Hello,
    I am new to using LabVIEW so please bear with me!
    I am reading/working my way through the IMAQ user manual for LabVIEW and I am trying to get IMAQ FFT working.  But I have trouble finding the VI that the destination image of IMAQ FFT VI should be connected to. At the second it gives me an error when I try and run the program.
    At the second I am really struggling to find the correct VI
    Also I am little unclear what the destination image is for, does the image need to be saved?
    Many thanks,
    Jack

    Hi,
    For IMAQ FFT Destination Image should be connected and must be complex:
    Andrey.
    PS
    Forum for Vision-related questions here
    Message Edited by Andrey Dmitriev on 01-28-2009 12:52 PM
    Attachments:
    FFT Sample.png ‏24 KB
    FFT Sample.vi ‏41 KB

  • Audio Programming Questions...

    Hi everyone,
    I am very new with audio programming with Java and I have a couple of questions...
    (1) How can I specify a Line from which I can capture audio signal. I want to capture signal from a MICROPHONE and then process the signal (with a FFT function). I tried to use Port (instead of DataLine) and I managed to get the specific port (Port.MICROPHONE) but it seems that port has no function to read from the line. Therefore I assumed that the only way to capture and process audio signal is through DataLine. However I cannot specify the line. How can I do that???
    (2) Is it possible to capture and process audio signal through Port??? I mean can I read bytes from a audio stream and write it to a TargetDataLine???

    Hello!
    There is a Java Sound mailing list. You would get more response from those subscribers. You can join it from here: http://java.sun.com/products/java-media/sound/list.html
    Hope that is helpful.
    Regards,
    Steev.

  • FPGA FFT and filtering

    Hi, I have an application in which I need to collect a lot of (50+) narrowband spectral components from an analog input datastream. I am using a PXIe-7965R FlexRIO FPGA board and an NI-5732 digitizer adapter module. There are a couple of ways I could implement this, but I'm not sure which would be more efficient or plausible. The input datastream would be a 1D array of either 16kS or 32kS from the digitizer, and I would need to filter very specific frequency components out and sum them. Here are the options I was considering:
    1. Take a Fourier transform of the data set, then generate a binary mask to multiply with the Fourier transformed result, effectively giving only the desired frequency components. The product array could then be summed for the final result. The main problem with this method is that I have not been able to find an FFT IP for LV FPGA that supports 1D input arrays longer than 8 kS. Does one exist? Additionally, there is the question of whether a longer FFT could fit on the FPGA.
    2. Create a lot of time domain narrowband filters (Butterworth?) and sum the results of all of the filters. I am not sure if this would be less resources than the FFT or not. It would certainly be more cumbersome, considering I would have to implement 50+ filters on the input sequence.
    I'm very new to LV FPGA and FPGAs in general, so I'd appreciate any comments or suggestions anyone may have for my application.
    Thanks,
    Ryan

    Ryan,
    I do not have any experience with FPGA so I am not addressing those aspects of your questions.
    Have you verified that your numbers make sense?  When I read your question my gut reaction was, "Can this even work?" "Is there enough data in 16 K or 32 K samples to extract that inforamtion?"  What is the range of frequencies in the datastream?  What is the sample rate?  What is the required resolution?  Can two or more components ever be closer together than the specified resolution? (Even if you do not care about resolving them in this case, which you cannot, overlapping signals might complicate the analysis). Are the frequencies of the components known? If so, are the frequencies rational fractions of the sample rate?  Do any of the components vary in amplitude or frequency during one sample set?
    I think that an FFT-based system will be the way to go. Multiple filters with narrow enough bandwidths would be a real mess, hard to get working well, and not versatile.
    Lynn

  • FFT Amplitude into Sound Pressure Level (SPL)

    Hi everyone,
    I have a problem with my program. Basically, i have a chirp signal to be outputted into my DAQ and being fed to my speaker.
    The microphone will sense anything coming out from the speaker, and acquire it using my DAQ.
    I want to display a frequency response vs. SPL.
    My method is that, I'm using FFT on the received Chirp Signal from the microphone and display its frequency response.
    My questions are?
    1. Is by doing mere FFT will give me an output of SPL vs Frequency?
    2. If not, how do I convert this value of the amplitude of the FFT to SPL db?
    3. Why is the output amplitude of my FFT is negative?

    The FFT is a mathematical tool that outputs complex values that contains frequency and  phase information. If you want to obtain the amplitude of your signal as a function of frequency, it is easier to use the "Power and Phase Spectrum" vi in the -> Signal processing -> Spectral palette.
    Marc Dubois
    HaroTek LLC
    www.harotek.com

  • How to use "IMAQ ComplexPlaneToImage"? (Display after "IMAQ FFT")

    Hello,I use two ways to display a image after "IMAQ FFT":
    (1). Input a image->IMAQ FFT->Windraw(display);
    (2). Input a image->IMAQ FFT->IMAQ ComplexPlaneToImage(extracting magnitude) ->Winddraw(display).
    The two results are much different.
    I want to know what the two displayed images(especially in the second way) mean and where
    "IMAQ ComplexPlaneToImage" usually used.
    Thanks for your help!

    Hi Dan
    I am having some questions regarding the FFT Phase of the FFT with IMAQ ComplexPlaneToImage.
    From the posting below you mention that the phase is:
    Phase = Real/Magnitude.
    I am using the function ComplexPlaneToArray to see the value I am getting from ComplexPlaneToImage.
    Usually the phase is the inverse tangent  (Imaginary/Real). If we are using the Real and magnitude it will be the inverse cos(Real/Magnitude)
    I tried the above senario to verify the phase value we are getting from ComplexPlaneToArray.
    However, I get not get the value you are displaying in the phase  (ComplexPlaneToArray).
    How can I verify  ComplexPaneToArray ( phase) with the various
    ComplexPaneToArray(real)
    ComplexPaneToArray(magnitude)
    ComplexPlaneToArray(imaginary)
    I attached a phase fft.vi as an example of my issue.
    Regards,
    Corinne
    Attachments:
    phase fft.vi ‏153 KB

  • I'm trying to do a FFT using I and Q Data, I need help.

    I’m collecting data on an Agilent 89600 VSA, and storing it
    to a file, it stores the data in I and Q format (real and imaginary) in 2 columns.  Can read the data then using “Re/Im to
    complex” (math function) I go to the “FFT.vi”. 
    After that is done how do I get it scaled and display it on a graph?  Everything I have tried has not worked.  If anyone can help please do.
    LabVIEW 7.1, Windows XP
    Thank you
    Bob

    Hi, Bob.
    This KnowledgeBase discusses how to display complex numbers in a graph. Let me know if this doesn't answer your question.
    Have a nice afternoon!
    Sarah K.
    Search PME
    National Instruments

  • Frequency Response VS FFT for measring frequency response of a audio ouput signal.

    We have purchased the Sound and Vibration Toolkit and I have some questions.
    From the frequency response example I looked at you measure the input then the ouput and the Vi gives you the difference.
    I want to measure the audio frequency response a radio. 
    So all I have is the output I dont have the audio input  to use as a reference. 
    How would I measure frequency response with the frequency rasponse VI with only the output audio signal?
    I was also looking at the FFT example to measure the audio signal frequency response.
    But from what I can tell so far this only does 1 channel I want to do both channles at the same time.
    Is there a way to do FFT on 2 channels at once and have them output on the same graph?
    Thanks for any help you can provide.

    Hi,
    I was looking through the examples and If you look at the SVXMPL_Multichannel FFT (simulated) examples, this shows how to take an FFT with multiple signals. You just pass in an array of the waveforms.  If you need to put your signals together you can use the merge signals VI, which is located in the Express»SignalManipulation Pallette.  Let me know if you need any further help with this issue.
    Have a great day,
    Michael D
    Applications Engineering
    National Instruments

  • FFT and sound formation

    Two questions.
    1) Does java have any FFT algorithm? or anything close? if not, I'll just try to make one (emphesis on try).
    2) If I have the frequency and amplitude of a wave, is there a way that java can convert my freqency and amplitude data into an actual playable sound file?
    Thanks for any help.

    wow... i didnt find any FFT materials... BUT... i found a cool java sound synthesis package. check it out at http://www.softsynth.com/jsyn/tutorial/index.html
    ITS GREAT!

Maybe you are looking for