Fourier transform of rectangle function

  We know that the fourier transform of a rectangle function is  a sinc function.Now I want to use Labview to simulate
this process.How to do it? I input a rectangle function to FFT vi ,but the result is not a sinc function,why?

With the FFT you are attempting to approximate the FT of a continuous function using discrete sampling for a finite time.  The approximation is "perfect" when the continuous function is bandwidth limited.  The Rectangle function is not, you require an infinite number of terms in its Fourier series approximation.
A simple way to imagine the relationship between the finite sample on which you are going to perform the FFT and the continuous function you are approximating is to periodically extend the finite sample in positive and negative time.  When you put in a simple rectangle pulse into the FFT you are seeing the approximation to the FT of a square wave with some duty factor, not of a single pulse.  This probably explains most of the confusion.
The details of the relationship between the FT of a continuous function and the approximation via a discrete FT is detailed and subtle and you should probably study a signal processing or mathematics textbook.

Similar Messages

  • Fourier Transform of an Exponentia​l Function

    ok. this is something which i had tried earlier. I'm supposed to do a fourier transform of this signal.... exp(-alpha*t) where alpha is greater or less than 0.. the upper limit is inf and lower limit is 0. the waveform i got is a straight line, and there's this error -20003 i.e number of samples > 0.
    I thought I had already defined the number of samples? Is that anything which I had missed out? Please see attached.
    Attachments:
    FT for real decaying exponential (eg 3-24) test v02.vi ‏25 KB

    I cannot find your function exp(-alpha*t) anywhere in your VI. -- Where should I define this?
    On the block diagram!
    Where do you enter alpha? -- As above.
    Maybe you want to add another control to the front panel.
    Quote: "... where alpha is greater or less than 0...". Is that the same as "where alpha is not equal 0"? - Nope. Sorry poor definition there. The equation applies only when alpha is Smaller or equals to 0
    Are you sure? So why would the function have negative alpha in the formula? A more reasonable assumption would be that alpha is positive and thus "-alpha" negative.
    I assume that "t" is probably related to the array index. However, you are taking the plain exponential of each array value instead. Why?  To reflect the original waveform into the waveform chart.
     You talk about an exponential function, but you actually generate a sine function, which is not even mentioned in the problem description. Could it be you want a sine function with an exponentially decaying amplitude?
    Why do you integrate? As the question goes, I need to find a decaying exponential over time. That's why I integrate the function.
    Integrating a function does not generate a decaying exponential. Makes no sense!
    What is the purpose if the derivative without signal input? Don't get your question
    In the lower right of your diagram you have a second graph terminal connected to the output f the derivative function. There is no input wired to that function.
    Why don't you put indicators on the error outputs? Alright, will do that.
    What's up with the blue diagram constants. Make them orange to avoid coercions. - May I know how I can do this?
    Easiest would be to just delete the constant, then right-click in the desired function input and select "create constant". Now you have the correct representation, guaranteed.
    If you later want to change it, right-click the diagram constant and change the representation.
    LabVIEW Champion . Do more with less code and in less time .

  • Why not use Fourier transforms for filtering?

    Are there any resources for constructing filters using discrete Fourier transforms (DFTs)? Or is it as easy as it seems. For example, for lowpass filtering I obtain the DFT of my signal, zero out components above the selected cutoff frequency and then transform back to get my signal minus the high frequency (noise) components. It seems to behave correctly for the signal I've applied it to, but am I missing something. Upsides would appear to be (1) no time delay between the input and output and (2) the filter is sharp with no transition band. Downside is that this method is slower than using impulse filters, but are there other upsides, downsides, or considerations I'm missing?

    The technique of filtering using frequency domain truncation and IFFT is used in specific areas where computation time is essential (to avoid the time domain convolution with a long impulse response), like image processing. However the technique also has some downsides you should be aware of.
    The frequency domain filtering performed on a data record is totally equivalent to a circular convolution made on your time signal with the impulse response of your ideal low-pass filter (typically a sin(x)/x function). The fact what we are doing a circular convolution will result in unwanted artifacts and you'll see some "parts" of the beginning of your signal at the end of the filtered signal and vice-versa.
    Try for example to create a short signal (like a sharp pul
    se) and extend it with zeros. After filtering you will see a sort of "pre-shoot" of your original signal at the very end of your signal. If you then rotate your time signal you'll discover that the signal is actually continuous (in a circular way).
    You can reduce the problem by, for example, adding "some" zeros at the beginning and at the end of your signal (zero-pad) before your filtering operation (before the FFT) and then remove these additional samples again from you filtered signal (after the IFFT).

  • Fourier Transform and the DAQ Assistant

    Hi,
    I'm trying to take the fourier transform of a analog voltage measurement in Labview 8.6 and I'm having a problem with the data.
    The measurement is an anaolog input voltage signal taken using the USB-6211 box.  I am acquiring the signal on ports 15 and 16 (differential) with the DAQ Assistant at a rate of 5KHz, 200 samples.  The setup works perfect thankfully, and a very nice waveform plot is generated on the VI.  I would now like to add a fourier transform of this plot to do some frequency analysis.
    I found the FFT function, but when I tried to add the DAQ output to it, I got an error about dynamic data.  It takes me to a screen which I don't understand about dynamic data conversion, and I'm not sure what to do from this point.  My FFT graph is basically just a flat white line, which is wrong.
    How can I just take the basic fourier transform of a waveform in this setup?

    Hi
    Your thinking is not bad. You have only some scaling problems. You may toy with the vi I am sending. Change the log/linear control and see the result.
    You will find all information you need here http://zone.ni.com/devzone/cda/tut/p/id/4541 and http://zone.ni.com/devzone/cda/tut/p/id/4541. The dt value is the reciprocal of the sample frequency(1/x) The unit is second, and it will give you the time interval between two samples.
    Also note how I use the "Dynamic To Waveform Array.vi" to convert the dynamic data. This VI is not documented by NI, but you find it here ...vi.lib\express\express shared\transition.llb\Dynamic To Waveform Array.vi
    Good luck
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    Spectrum Analyzer.vi ‏32 KB

  • After fourier transform

    Hi all, A simple question do ask. I have this input signal which is being generated by Signal Generator by Duration.vi. I got another output signal generated after applying the Fourier transform to the signal above.
    I believe the signal generated by the first vi is to be a signal in the time domain, and the signal after applying the fourier transform, I get a waveform in the frequency domain. Is there any way where I can view the waveform under the same waveform graph?
    Thanks a lot in advance,
    Gareth

    Hello Gareth,
    Have you taken a look at this thread yet? It is about showing two waveforms on the same waveform graph. Briefly, you will need to use the Build Array function to combine the two data signals together (e.g. if you are using ExpressVIs, combine the two Dynamic Data Type outputs) using the Build Array function, and feed it into the graph. Some properties of the waveform graph needs to be modified to show separate axes for each signal.
    While this is technically possible, it might not be a very feasible idea as the x-axis will be common to both waveforms. Thus, you might not be able to view both waveforms clearly at one go. I have attached an example in this post. "Bothsignals.jpg" show both the time domain and FFT signals together in the same graph. However, if we zoom into the green area, we can see the actual time domain signal ("timedomain.jpg"). The time duration is about 100ms. But for the FFT, the x-axis should represent frequency (Hz), and is centered at 50Hz, which is much bigger than 100milli.
    Thus, I think it might be a better idea to separate the two. But this is a personal view.
    Best regards,
    Victor
    AE, NI ASEAN
    Attachments:
    bothsignals.jpg ‏148 KB
    timedomain.jpg ‏163 KB

  • How to create fourier transform properties using labview

    Hi everyone
    i am a new user to Labview and i only have 2 weeks left to complete an assignment.
    This assignment involves the implementation of the various types of fourier transform properties using Labview. These properties include linearity, time shifting, frequency shifting, time scaling,
    I do not really know how to implement them using Labview
    PLS HELP!!!
    Thanks

    i am refering to the fourier transform properties listed below:
    A) time shifting
    x(t-a) ------- >  exp (-jwa) X(w) 
    For the time shifting property above, i have problem creating the exponential term using labview
    B) time scaling
    x(at)-----------> 1/a X (w/a)
    C) Time convolution
    Y(w) = F[h(t) * x(t)] = H(w)X(w)
    where * stands for the convolution operation and F stands for fourier transform
    Please provide diagrams if possible. Thank you
    PLEASE HELP!!!!!!!!  THANKS!!!!!!!

  • Passing data from Microphone to FFT (Fast Fourier Transform) Class

    I am quite new to Java and trying to find a way to use microphone and pass the data from microphone to a FFT Class and get the result back as one number (which will be the frequency). Because I am quite new, I am in need of some advice and description to solve this problem.
    I will be glad if anybody experienced on this issue can help me.
    Regards.

    You need to read a good bit about signal analysis before you tackle this.
    The FFT is an algorithm for the implementation of the Discret Fourier Transform (DFT). If you just perform an FFT of your data how are you then going to extract the frequency. For example, if you take the DFT of 1024 samples you will generate 1024 complex values with the to 512 pairs being complex conjugates of the bottom 512 pairs.
    If you just choose the frequency with the largest magnitude then you will suffer from 'windowing' effects. You will need first to apply a 'window 'to your data so as to minimize the effects of only being able to use a limited length of data.
    OK, so you have applied a window, performed the DFTand found the sample with the largest magnitude then how do you relate this frequency index to the real frequency?
    If you Google for Java FFT I know you will be able to find an FFT implementation but that is just the start. You need to understand the DFT and how to use it and what it's limitations are and how to relate the results to the real world. You almost certainly cannot get that information from a Java forum. Java forums are for dealing with specific Java problems.
    So! Go study some signal analysis before you start using the FFT on your microphone data.
    A few words of warning. If you download an FFT implementation, make sure you test it extensively before you use it on your real data. I have tested about 10 and there are some rubbish implementations out there.

  • Real Fourier Transformation: confusing phase spectrum

    When setting sample rate and block size both to 1024, the Real Fourier Transformation of a sin-wave with Frequency=1 and PhaseAngel=0 calculates the phase spectrum as displayed in the left part of the image.
    Setting sample rate and block size both to 512, results in the phase spectrum as displayed in the right part of the image.
    There are a few things I don't understand:
    *) Why is the phase of frequency 1 equals -90, when I set the phase angel of the input signal to 0?
    My explanation is that the phases are calculated relative to a cos-signal. Is that true?
    *) Why does the phase spectrum contain more than one value, when the input signal just contains one single frequency?
    *) Why do the phase spectra (is this the plural of "spectrum"?) look different for different sample rates / block sizes?
    Maybe someone is able to answer these questions
    Thanks!
    Roman

    This is not my area of expertise, so, I went to one of the experts, and he gave me this. I hope that it helps.
    *) Why is the phase of frequency 1 equals -90, when I set the phase angel
    of the input signal to 0?
    My explanation is that the phases are calculated relative to a cos-signal.
    Is that true?
    The important information of the
    phase spectrum is how the different sine waves forming a signal are shifted
    in relation to each other.
    In a typical signal analysis you
    cannot force your analysis interval to be in phase with a specific sine
    wave,  so the offset of the phase spectrum
    is arbitrary.
    If you try to analyse the composite
    signal of several sine waves with different frequencies, you will see that 
    they all have the same offset. 
    I would also have expected an
    phase offset of 0 in this ananlysis, but it does not make a difference.
    *) Why does the phase spectrum contain more than one value, when the input
    signal just contains one single frequency
    At all other frequencies the amplitude
    value (and also the complex frequency value) should be 0. But 0 does not
    have a defined phase.  
    The values come from rounding
    errors and it cannot be determined by software whether there is a meaningful
    information.
    Typically you should only take
    those phase values into account where the corresponding amplitude value
    is larger than 0. 
    The software cannot determine
    whether this is inherent to the signal ar an artifact of the rounding errors.
    *) Why do the phase spectra (is this the plural of "spectrum"?)
    look different for different sample rates / block sizes?
    Same reason as above, different
    settings yield different rounding errors.
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

  • Calculating magnitude of fourier transform

    Hi all,
    I'm currently working on a section of code where I've got to input a JPG, perform Discrete Fourier Transform on it and calculate the magnitude. I'm hoping to return the DFT as a float array
    My questions are:
    When the image is put in, the number of bands is set at 6. Does this represent R,G,B for real and R,G,B for complex?
    When I try and calculate the magnitude, I ideally want an array of floats returned to represent the magnitude of each vector, but I get 3 bands returned. Can I combine these into one band?
    Here's my code listing
    //add image to parameter block
    ParameterBlock pb=new ParameterBlock();
    pb.addSource('my buffered image goes here');
    pb.add(DFTDescriptor.SCALING_NONE);
    pb.add(DFTDescriptor.REAL_TO_COMPLEX);
    //Create the DFT operation.
    PlanarImage dft = (PlanarImage)JAI.create("dft", pb, null);
    System.out.println("Num bands="+dft.getNumBands());
    // Get the DFT image information.
    //Create the ParameterBlock specifying the source image.
    pb = new ParameterBlock();
    pb.addSource(dft);
    // Calculate the magnitude.
    PlanarImage magnitude = JAI.create("magnitude", pb, null);
    // Retrieve the DFT data.
    Raster dftData = magnitude.getData();
    //at line below i get 3 bands returned...can i combine these
    System.out.println("Num bands="+magnitude.getNumBands());
    Thanks for your help!!!!

    Would you like to create a greyscale image?

  • 2D Fourier Transform of an image to remove grating

    I'm trying to remove a grating that has been added to my image:
    My plan is to perform a 2D Fourier transform of the image. The grating will come up as a block signal, so that's an infinite series of frequency, growing weaker as it goes to higher and higher components. So I want to block those frequences whilst at the same time preserving my image as much as possible (I know this is kinda contradictory).
    Unfortunately, I am failing at the first step: transforming it to the Fourier domain. This is my code:
    When I try to run it I get this error.
    Anyone have any ideas to fix this?
    Attachments:
    Fouriertransform.vi ‏12 KB

    Hi Choisai,
    I found a Knowledge Base that possibly will help you, check the following link: http://digital.ni.com/public.nsf/allkb/12039EFD213​AD08086257B6E0030FDC6?OpenDocument
    One more thing.. I do not see anywhere assigned path to get the image, which in future will throw an error for sure.
    Best,
    Bozhidar

  • How to simulate discrete fourier transform using CMOS on multisim11.0

    Please tell me how to simulate discrete fourier transform(DFT) using CMOS implementation in Multisim 11.0..

    vlsi,
    If I am reading your question correctly, I think this is more of an issue of IC design rather than how to use Multisim (the circuit you describe is likely very complex and would involve many CMOS/transistor components).   If you have an existing or partial circuit already ready to start with, the group could better assist with how to implement or use in Multisim for simulation.   Although it is possible to model a comlex digital parts with CMOS equivalent logic and gates, most of the more complex digital parts in Multisim are modeled in XSPICE, which allows the behavior to be described by a truth table and timing descriptions and the pins are modeled in SPICE.
    However if you want to use a predefined DFT algorithm inline within a circuit simulation, you can likely use with a custom LabVIEW VI, we have several Fourier Transfer algorithms in which you could process a signal coming from a circuit simulation in which the transform and simulation could be run together.
    http://zone.ni.com/reference/en-XX/help/371361B-01/lvanlsconcepts/discrete_fourier_transform/
    There is an example of how this can be done with an FFT (which is a type of DFT)
    https://decibel.ni.com/content/docs/DOC-7438
    Another idea is to use our co-simulation technology in Multisim v12 together with the LabVIEW Control Design tools.   The LabVIEW Control Design package has several discrete signal processing algorithms built in and you could use them together for very precise mixed signal co-simulation between an electrical simulation and a discrete processing algorithm.
    http://www.ni.com/white-paper/13663/en
    Regards,
    Pat N

  • Short time fourier transform (STFT) frequency axis

    Could someone please explain the frequency axis output of the short-time fourier transform spectrogram? The help menu indicates that the number of output columns will be equal to (# of input samples)/2. I would expect that the number of output frequency bins would be equal to half the size of the fft and that the bin width would be determined by the sample rate.

    STFT is implemented using the windowed Fourier transform. Before applying the Fourier transform, the windowed signal can be zero-padded to get the same length as the input signal. So in this case, the FFT length is equal to the signal length. Such zero padding can get a smooth spectrogram for the detailed visual investigation of frequency contents.
    NISH DSP
    Medical ultrasound and signal processing

  • Ramanujan Fourier Transform

    I want to implement Ramanujan Fourier transform in Labview. Does anyone in this forum has already implement it? Can anyone give some pointers. Thanks
    RY

    Hi RYADAV,
    Unfortunately there isn't pre-developed code for Ramanujan Fourier transform. However, you can create your own with formula node following the definitions in
    H. G. Gadiyar and R. Padma, Ramanujan-Fourier Series, the Wiener-Khintchine Formula and the Distribution of Prime Pairs, Physica A 269, 503- 510 (1999).
    If you come across any problem using formula node, please post your code on the forum
    Yupeng J.

  • RE:  Fast Fourier Transform

    Hi All
    Does anyone know of any java classes that perform Fast Fourier/Discrete Fourier Transforms correctly? Most of the ones I've used from google produce inconsistent results.
    Thanks in advance.

    Already done that with a few and am getting differing results. But I'll go through them again I might of missed something.
    Thanks for the suggestion though

  • RE:  Discrete Fourier Transform

    Hi All
    I'm carrying out some image processing work and whaat I have done is computed the frequency of colours within a set image. Now I'd like to compute the discrete fourier transform of this distribution. Are ther any libraries within java or known to anyone that can handle this? Bear in mind that the distribution is within a 3D domain (Red, Green and Blue component).
    Thanks in advance for the help.

    isn't it possible to split up the problem in a green problem, a red problem and a blue problem? I think that that might ease your problem at least a bit. Then you only have a 2D Fourier problem.

Maybe you are looking for

  • Sender Communication Channel Error

    Hi all, iam working on JDBC scenario.For this iam using party and business service. iam getting following error at jdbc sender communication channel. Error occurred while sending message: com.sap.aii.af.ra.ms.api.ConfigException: SLDAccess set to tru

  • Index of Files - DateModified

    I am using this: http://www.java2s.com/Code/Java/JSP/IndexofFiles.htm to create a list of files in a directory. This works great. What I would like is to be able to sort the list by LastModifiedDate. And, separate that list, showing files that were l

  • I have os x 10.5.8 and need to upgrade to 10.6 Any suggestions?

    Hello my husband needs snow leopard not mountain lion but I can not find a way to download this software for my mac that has os x 10.5.8 any suggestions? Thank you in advance.

  • MfE 2.7 won't save profile

    Help requrired please. Any one know a solution to solve a new Nokia E66 MfE issue? Enter in settings and choose to save, we get this message: Mandatory settings missing. Exit without saving new profile. Issue is mail for exchange will not save profil

  • How can I use JNI in JDeveloper???

    hi I have a native mathod,it can work very well use JCreator or JDK's Java command. But it can't work in Jdeveloper with the errors : java.lang.UnsatisfiedLinkError: no JniConvert in java.library.path void java.lang.ClassLoader.loadLibrary(java.lang.