Fft and ifft mismatch

Hello ,
I have designed a simple sequence to check the ifft and fft of an array . Initially i create a set of data that is fed into the ifft block , the output that i get out of the ifft block , i feed it into a fft block . it is only fair that i expect the output from the fft block to be the same as the input to the ifft block. But , that is not how it turns out . Can anybody give me a explanation why this is the case . and i am using this with a DSP board (speedy 33) .
Mano .
Attachments:
testforfft.vi ‏17 KB

I do not have the Speedy33.
All digitized FFT functions and their inverses work on arrays of numbers. The dynamic signal or waveform datatypes are composite datatypes which contain arrays of data plus additional data related to the timing of the signal. Most of the analysis functions are polymorphic, meaning that they will accept arrays or waveforms and perhaps dynamic datatypes. The "Sampling Frequency" is the inverse of the time between samples. But, the FFT functions really do not know or care what the frequency or time is. In fact it is often calculated externally.
In your data you can have the "signal" (the array of data) switch from +1 to -1 from one sample to the next. So the highest frequency in this data is 1 cycle per 2 samples. The Nyquist criterion specifies that the sampling frequency must be GREATER than twice the highest frequency in the data to be able to correctly reproduce the signal. Your sampling frequency is equal to twice the highest frequency in the data and thus it violates the Nyquist criterion.
I modified your VI slightly. I put a diagram disable structure over the Speedy33 subVIs and put a standard FFT in the Enabled case. I also added the interleave function which has the effect here of repeating every element twice which essentially cuts the highest frequency in the data to 1/4 the sampling frequency. I also added graphs so that the signals could be visualized. Notice that the input and FFT plots are usually similar but not identical.
Lynn
Attachments:
testforfft(2).vi ‏37 KB

Similar Messages

  • FFT and Overall Values Differ btwn VI and DIAdem

    Hi all,
    I have an application that displays live vibration readings including the spectrum and overall vibration level.  All my report generation is done in DIAdem scripts, so it's critical that any values calculated and displayed on the LabVIEW side match the values calculated and reported in DIAdem.  The attached VI and Script, when fed the input from the attached TDMS file, give me significantly different values for the magnitude of the FFT and overall RMS value.  Can anyone spot what I'm doing wrong?
    Thanks,
    Scott
    CLAD
    Solved!
    Go to Solution.
    Attachments:
    FFT and RMS Script.VBS ‏5 KB
    FFT and RMS VI.vi ‏39 KB
    VibrationSample.tdms ‏103 KB

    Hello,
    Here is a great reponse from R&D. I felt it would be better to place this on the web then keep it limited to your service request.
    The difference has to do with the Window-correction. The results are identical if you select rectangluar (or no) window.
    Usually a Window is taking a part of the singnal away, so in the first place, the result has a different shape and is smaller compared to result with rectangular window. This can be corrected with a specific factor for each window.
    There are two possible corrections. Random and periodic.
    - Periodic is used if you have pure sine-wave like signals and you want to measure the peak value. A typical use case is the flattop-window which is designed for this type of calculations.   The periodic correction is too large if you want to add the values to calculate the total RMS of the signal or of a the summation of a certain frequency band.
    - Random is correcting the signal back to the correct overall RMS value and should be used in all other cases.
    The periodic correction for the Hanning window is a factor of two. The random correction is about 1.633. DIAdem will give the same result as LabVIEW if you use the following correction type:
    FFTWndCorrectTyp = "periodic"
    In the world of FFT-analysis, the different corrections are very often not obvious and hidden to the user. Unfortunately this is also the case in LabVIEW. You can find a good example of an explanation here:
    http://blog.prosig.com/2009/09/01/amplitude-and-energy-correction-a-brief-summary/
    There are different factors for the different window functions. If you go deeper into the FFT-VI you will find the "Scaled Window VI". This has an output "window constants". With this, it is possible to get the correction values for the window functions.
    I also think, that periodic is wrong in most cases when Hanning is used, because Hanning is best for the summation of RMS values in frequency bands and the results are wrong without a random correction.
    Hope that helps.
    Jacob R. | Applications Engineer | National Instruments

  • 50 Hz noise ECG filtering using FFT and its inverse in LabVIEW

    I have to write a LabVIEW Program to put the 50 HZ noise in the ECG spectrum using the FFT and then with the Inverse of the FFT I must take it out,but without using any filter.so if anybody can help me with that, I will be thankful.

    I have a normal EGG signal,and its Spectrum. Then I add the 50 Hz noise.In the Spectrum I will get this long peak at the x-axis at 50Hz.So,what I'm trying to do with LabVIEW, is to get out this noise without using a filter,but with the FFT and of course with its inverse to reconstruct the signal.
    (the EGG signal is created at first with a simulator and not with human body, the signal is going through the "line-in" of the soundcard in the computer)
    I hope you understand a little bit what I mean, I will attach what I did in the program till now,maybe you can understand it better.
    Thank youMessage Edited by b_rani on 05-18-2005 01:46 PM
    Attachments:
    Soundin1_030505.vi ‏80 KB

  • Import fails with: ... cannot be overwritten as the id and name mismatch.

    We have a test and a production environment with portal 9.0.2.2.14A.
    We Use the exp/imp utilities to publish our portal.
    In the test env we dropped and re-created a corrupted dynamic page.
    When importing this component in the prod env we have the following message:
    Checking for type = DYNAMIC Name = MENU_PAGINE Id = 4867642631 ...
    MENU_PAGINE cannot be overwritten as the id and name mismatch.
    Import of MENU_PAGINE will fail.
    We cannot drop this component because we don't find it with the Navigator (I think that the previous import didn't create it correctly because of the corruption in the test env).
    Can anyone help me?

    Any component created wil have information gets stored in the tables wwv_modules$,wwv_module_details$,wwapp_application$
    Try to find the module_id of the dynamic page created, and delete it from all the 3 tables.

  • Applying of FFT and Octaves analysis to an analog input

    Is it posible to aply, in real time, with LabVIEW 5.0 an FFT and Octaves analysis to an analog input obtained with a Labpc 1200? If yes could you please give me a hinch? Thank you very much.

    There is basic FFT analysis built into the libraries that ship with LabVIEW Full Development System (FDS). However I would recommend considering the Sound & Vibration toolkit as an add on for LabVIEW. This contains more complete FFT analysis solutions (including averaged FFT analysers) and has a complete range of octave analysis (full and fractional analysis).
    The examples are very good and even if you haven't had much experience of using traditional boxed FFT/octave analysers you will quickly be in a position to have a good working application up and running.
    This brings me onto the question of the board that you are using. Depending on the type of signals that you are working with, you may find that there are a number of limitations to using the Lab-PC-1200.
    1. The board has only 12-bit ADCs which therefore gives a maximum dynamic range of approx 72dB. A 16-bit board would offer a wider dynamic range of 96dB while some of the dedicate signal/audio analyser boards on offer from NI have 24-bit ADCs and a dynamic range of 120dB.
    2. If you are analysing more than one channel and are looking at phase measurements (i.e. stereo if it is audio you are acquiring) you will be limited by the architecture of the Lab-PC-1200. This board uses a multiplexer to switch from one channel to another. This will automatically insert a phase error into the measurements that you take. An example of where this might be a problem would be if you were analysing the response from two audio speakers, or trying to analyse the performace of an object to vibration using multiple accelerometers. Dedicated boards on offer from NI (NI 44xx range) have simultaneous sampling inputs and these get around these phase problems.
    The analysis that you perform with such a board all takes places on the host computer i.e. your Windows PC. As such you comment "is it possible to apply, in real time..." will depend entirely on the specification of your PC. NI does offer a few boards that will allow FFT and octave analysis to be performed on the actual DAQ board itself (NI 45xx range of dynamic signal analysers).
    So in summary, consider the Sound & Vibration toolkit and also consider the limitations of the Lab-PC-1200. It may not be the best choose - but if you are stuck with the board, you can still develop a suitable LabVIEW application and if possible upgrade the hardware sometime in the future (the code should not need to change if you change the board).
    Jeremy

  • Calculate frequency response using FFT and inverse FFT

    Hi,
    Attached is the program using FFT and inverse FFT to filter a time domain signal. The frequency response of the LPF can be obtained by using the chirp signal from 0 to 5kHz. However, I don't know why the signal obtained from a sine wave input is so strange. The amplitude is wrong and has a envelope outside. Please help to point out what's wrong with that.
    Bill
    Attachments:
    fft filter.vi ‏87 KB

    If you check the help text for sine wave.vi you'll see that it generates the sine wave based on the following formula:
    yi = a*sin(phase[i])
    for i = 0, 1, 2, …, n – 1 and where
    a is amplitude,
    phase[i] = initial_phase + f*360*i
    This means that when you input a=1, f=0,1 and initial_phase=0 you will get a sine wave that is based on samples at every n*36 degrees; i.e. at 0, 36, 72 etc...due to this sample rate you never see the full amplitude (+/- 90 degrees), the wave is clipped at the top. If you input an initial phase of 64 degrees you will get the full amplitude, but the wave is still deformed due to digitalization...
    The lower the frequency you put in, the closer the digitalized representation will be to the true sine.
    Use the Waveform Generator VIs from the analyze palette if you want to have more control over the wave generation (sample rates etc.). (Not available if you have the base package.)
    MTO

  • MF8580 prints two pages, then gives paper size and settings mismatch error. Help!

    Hello, I have been dealing with this problem for weeks now. When i called support, they told me it was my computer, that it was "running slow" and that i need to pay for their service - that fixing errors in my registry would fix the problem. However, i have my own registry cleaner and that isnt the problem. Every time i print something, the printer will print the first two pages, and then beep, giving me the error "paper size and settings mismatch Drawer 1" - I have everything set to letter - in the driver, on the printer, etc. I do nto understand why it prints two pages and then tells me there is a mismatch. If i open and close the drawer, it will print the second page again and then the third page, and give me the same error again. rinse and repeat. This also happens when multiple documents are spooled. I send three - one page documents, it will print the first and second, give me the error, i open and close the paper drawer 1, then it prints document two and three - then gives me the same error - i open and reclose and it prints the thrid document... I am just baffeled.  

    Hi!
    To ensure the most accurate information is provided, we will need to know the version of Windows or Mac in use. Also, we wanted to mention that it sounds like the number you reached was not an official Canon support number, as we do not charge for support.  If this is a time-sensitive matter, our US-based technical support team is standing by, ready to help 24/7 via Email at http://bit.ly/EmailCanon or by phone at 1-800-OK-CANON (1-800-652-2666) weekdays between 10 AM and 10 PM ET (7 AM to 7 PM PT).
    Thanks and have a great day!

  • GR and IR mismatch report

    Hello Team,
    Please let us know any standard report for we can run to view GRIR mismatch but the IR and GR quantity is already equal and the IR and GR price has mismatch.
    Regards
    SANGEETHA

    Hi,
    it is not solution, what i am sating GR QTY 10  amount value 1000 rs and IR Qty 10 but amount value is 950. Theeir is differenece between GR amount value and IR amount value.
    Is their any standard report to check list of po's difference between GR and IR quanity match and amount value is not match.
    Regards
    Sangeetha

  • 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

  • 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 and discrete values

    Hi
    Is there an example that shows me how I ccan get the frequency of discrete data points?
    I already tried the LV6.1 example vi's but the frequency is not the right one. (I can evaluate the frequency which should be at about 200Hz. The data amount is about 2100 points).

    I've attached a VI that extracts the 2nd column from your data, patches in dt (important and missing from your data set) to form a LV Waveform, and computes the Power Spectrum. You will have to enter a different value for dt which is the reciprocal of the sample rate of your data. This will affect the frequency axis of the FFT Power Spectrum, and we can go from there to compute significant components.
    The first column from the data set looked like index values, not real time values so I didn't use them.
    Attachments:
    ComputeFrequencySpectrum.vi ‏55 KB

  • 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!

  • Fft and automatic filter

    Hi.
    I have a couple of data from a measure and want to do an automatic filter.
    The way how I want to proceed is the following one:
    I want to make an FFT on the data, and then make a frequency detector.
    The unwanted frequency are 50Hz and 100Hz.
    IF (and only if) the 50Hz and/or 100Hz are detected on the FFT (automatic detector), then, I will filter the data with 2 band-cut filter (one with 50Hz central frequency, and one with 100Hz), then re-made an other FFT to make sure the frequency I have removed from the datas are there any more.
    How can I do that?
    Is the way I want to to it succesfull? If not, why?

    Thank you johnsold.
    I have test your vi (and try to understand how it works).
    Please correct me if I'm wrong : You change the value of the data scaned if the signal data is over the threshold.
    Question : what is the command that fix the value of the threshold?
    Other question : my array is a 2D array. how can I do the same thing with it? (with a for loop, and indexation I suppose)
    The last question is : I have puted a reverse FFT to see the signal filtred, on the graph, the first values seems to be higher than the initial array. why? is it a mathematical error? (no problem with it, I just cut those first values out, but I want to understand why...)
    If I understand well, I jsut have to put the same thing in serial to have two frequency filters.
    Other question : Why you dont use a filter bloc made in labview?
    The way i was thinking the vi is as follow :
    I test the signal with a FFT, do the over threshold detection. If one (or two) peak(s) over the threshlod is detected, the you filter the signal with a simple filter.
    What do you think about this method? Is it a good way to construct my application? If not : why?
    Please find an example of the way I was thinking the vi (doesn't work correctly, but the idea is there)...
    Attachments:
    FFT-Filter.vi ‏201 KB

  • Place command and profile mismatches

    I'm curious why the Place command in Photoshop doesn't warn me about profile mismatches.
    For instance, if I have an sRGB document and Place a CMYK file, there is no warning - regardless of my settings in Edit > Color Settings.
    Does anyone know how this is handled?

    Hi csuebele,
    The only requirement is that the final result is 1500 x 1000 px.  The black is used to fill in the sides/tops as necessary.  Since this is to be automated, I need each new file to have a unique name of course (otherwise succeeding files will overwrite their predecessor).
    For example, say I have a file called image001.tif that is cropped to 2400w x 3000h px. I need this to fit a container that's 1500 x 1000 px, with black filling this out.
    Manually I would
    1. Open a black TIFF that's already 1500x1000.
    2. Place the 2400x3000 px image in the black tiff.
    3.  PS then resizes and centers the image to fit, while preserving the aspect ratio. 
    4. Thus the image is now sized to be 800w x 1000h px , with black filling the sides equally; i.e. 750 px of black on either side.
    5. I then save that "new" version of the black file for the web, and then close w/o saving.
    6. End result is a 1500x1000 file called image001.JPG.
    Please see attached for 2 examples:
    Example of a portrait image:
    Example of a landscape image:

  • WAE and WCCP mismatch

    Hello,
    I seem to be having a lot of trouble with a very simple implementation. I have 2 routers and a data centre WAE via WCCP. These devices are on the same L2/L3 segment (x.x.x.0/24). The WAN interfaces on the routers are in different networks. The remote WAE is inline. I configured ip wccp 61 redirect in on the LAN interface of each router and ip wccp 62 redirect in on the WAN interface of each router.  I get the alarm "WCCP router x.x.x.1(LAN) unusable for service id:61 reason redirection mismatch with router" and "WCCP router x.x.x.1(LAN) unusable for service id:62 reason redirection mismatch with router". For the WAN interfaces I get the alarm they are unreachable for the service ID.
    Snadard router config
    ip wccp version 2
    ip wccp 61
    ip wccp 62
    int gi0/0
    description LAN
    ip address x.x.x.1
    ip wccp 61 redirect in
    int gi0/1
    description WAN
    ip address y.y.y.1
    ip wccp 62 redirect in
    Should I only be trapping inbound traffic on the LAN interface ?
    The other thing I noticed was these messages from the PIX on the same L2/L3 segment
    Dec 20 2011 05:49:52: %PIX-2-106006: Deny inbound UDP from WADMZJA02/2048 to IROUTER1/2048 on interface outside
    Dec 20 2011 05:49:52: %PIX-2-106006: Deny inbound UDP from WADMZJA02/2048 to IROUTER2/2048 on interface outside
    Dec 20 2011 05:49:52: %PIX-2-106006: Deny inbound UDP from WADMZJA02/2048 to IROUTER1/2048 on interface outside
    Dec 20 2011 05:49:52: %PIX-2-106006: Deny inbound UDP from WADMZJA02/2048 to IROUTER2/2048 on interface outside
    Access list
    access-list outside_access_in extended permit udp host WADMZJA02 host IROUTER1 log notifications
    access-list outside_access_in extended permit udp host WADMZJA02 host IROUTER2 log notifications
    access-list outside_access_in extended permit udp host IROUTER1 host WADMZJA02 log notifications
    access-list outside_access_in extended permit udp host IROUTER2 host WADMZJA02 log notifications
    Best regards
    Stephen
    WAE config
    sh run
    2011 Dec 20 07:06:27 WADMZJA02 -admin-shell: %WAAS-PARSER-6-350232: CLI_LOG log_cli_command: sh run 
    ! waas-universal-k9 version 4.3.1 (build b6 Nov 13 2010)
    device mode application-accelerator
    hostname WADMZJA02
    clock timezone Europe/Brussels 1 0
    ip domain-name fibe.fortis
    primary-interface GigabitEthernet 1/0
    interface GigabitEthernet 1/0
    ip address x.x.x.248 255.255.255.0
    exit
    interface GigabitEthernet 2/0
    shutdown
    exit
    ip default-gateway x.x.x.4   <== firewall
    no auto-register enable
    ! ip path-mtu-discovery is disabled in WAAS by default
    !  <== traffic to be rerouted outbound ==>
    ip route a.a.a.0 255.255.255.0 x.x.x.1     <== Outbound HSRP
    ip access-list extended HK
    permit ip any 0.0.0.0 255.255.255.0
    exit
    logging console enable
    logging console priority debug
    interception access-list HKWAAS
    wccp router-list 1 z.z.z.202 y.y.y.122 x.x.x.1 x.x.x.2 x.x.x.3
    wccp tcp-promiscuous router-list-num 1 hash-source-ip hash-destination-ip l2-redirect l2-return
    wccp version 2
    egress-method negotiated-return intercept-method wccp
    ip icmp rate-limit unreachable df 0
    directed-mode enable
    transaction-logs flow enable
    --More--
    ! [K
    inetd enable rcp
    sshd allow-non-admin-users
    sshd enable
    tfo tcp optimized-send-buffer 2048
    tfo tcp optimized-receive-buffer 2048
    accelerator http metadatacache enable
    accelerator http metadatacache https enable
    accelerator http dre-hints enable
    central-manager address x.x.x.247
    cms enable
    ! End of WAAS configuration

    Hi Stephen,
    The "Redirection mismatch" messages indicate that the redirection or return method configured on the WAE is not compatible with the router. Probably, the routers you are using don't support L2 redirection
    Moving forward, I would recommend you to change the line "wccp tcp-promiscuous router-list-num 1 hash-source-ip hash-destination-ip l2-redirect l2-return" for "wccp tcp-promiscuous router-list-num 1". This will negotiate hash assignment, as well as GRE redirection and return, which are the parameters supported by most platforms.
    As for the firewall messages, it seems that some WCCP negotiation packets (UDP port 2048) are being dropped. Unfortunately, my firewall knowledge is very limited, so I cannot really help you with that part.
    Regards
    Daniel

Maybe you are looking for

  • Connecting to disk remotely

    After reading the manual I could not find anything on connecting to my hard drive from other locations. I talked with support they said it could be done but it is not supported. Under the disk tab I have WAN shared checked but don't know what to do a

  • ORA-07445 during Partition Split in Oracle 10g

    Hi I'm getting the following trace file generated when I try and split a partition with 4 or more partition keys. The environment is 10g enterprise edition on Redhat Enterprise Server 3. ORA-07445: exception encountered: core dump [msqopnws()+37] [SI

  • Terrible battery after 2 years

    I've had my macbook pro for about 2 years, and for the past few months the battery has been completely useless. It gives me approximately 10 minutes of life before shutting down when not plugged in. Even when it is plugged in, it often will go into s

  • How to call Outbound interface using report programs

    Hi experts,     i want to call outbound i/f prog using 2 report programs...one report prg passing 2 parameters to outbond i/f prg & another report prg simply calling the outbond i/f prg... either report1 or report2 call this outbond i/f prg. for inst

  • Processing in another plant.

    Dear All, I have two plants (Plan A & Plant B) From one plant (Plant A) I sending few material to processing in another plant (Plant B). It come back after processing/assembling as single component from plant B to plant A. How I  should map this requ