Erreur de calcul amplitude FFT à f = 0Hz

Avec l'objet sousMesuresSpectrales [subSpectralMeasurements.vi] de la librairie LabView, sous LabVIEW7.1\vi.llb\express\express analysis\SpectralBlock.llb, je constate un problème de calcul sur la FFT pour fréquence = 0 Hz en amplitude.
Dans mon application, j'ai exporté ce VI express pour n'utiliser que certaines de ses fonctionnalités, en autres propriétés : "Paramètres du signal" pour afficher sa FFT.
Normalement, à la fréquence = 0Hz, l'amplitude max et efficace doivent être identiques et correspondre à la composante continue i.e DC value. Ce résultat n'est pas observé. J'observe le rapport racine de 2 habituel pour une valeur pic ou RMS à f = 0Hz.

A présent , je réussis à mesurer mon accélération, obtenir le déplacement et ma vitesse ( pour tenir compte du gabari ) et je réalise un singnal sinusoidale de fréquence variable ! Dois-je utiliser la fonction PID pour mon asservissement ?
Je ne sais également pas comment tenir compte des points de cassures de mon "gabari" présent en pièce jointe auparavant ? Help

Similar Messages

  • FFT RMS or Peak?

    Hi,
    I've got a sine wave signal that oscillates about the zero axis in the negitave and positive. It is measuring wave height about the static water level in an water wave tank. I am calculating the FFT but the amplitude is lower than the wave height in the time domain. Does this mean that I'm calculating it wrong? I don't know wheather I should be using the FFT Peak or RMS? I assumed that the FFT amplitude should give me the same amplitude as the time domain.
    Any advice would be greatly appreciated.
    Thank you,
    Donners
    Solved!
    Go to Solution.

    Donners,
    It can get complicated but I suspect that what you are seeing is a result of the frequency of the waves not matching exactly the frequency bins of the FFT.  For example suppose that df = 1 Hz. Then each element of the FFT array represents the energy in a "bin" one hertz wide centered on integer frequencies.  For a wave with most of its energy at 7.3 Hz the FFT will likely have non-zero values for both the 7 and 8 Hz bins.  In real systems with noise and slight frequency variations it is not uncomon for the data to be spread over 10 or 20 bins. To get the fundamental amplitude of the signal you would need to combine the energy in all those bins.  Since the FFT produces a complex output, the phase component also needs to be considered. Non-sinusoidal waveshapes mean that some of the energy is in harmonics. A narrow square pulse can have a quite large amplitude yet still have no large spectral components.
    The short answer is that generally there is no easy way to get precise correlation between the peak amplitude in the time domain and the amplitude of the spectral components in the freqeuency domain.
    Lynn

  • FFT of an image

    Hello
    I have an image of size M X N (pixel).
    Fisrt of all i have read the image from the path location. Then I used Unflatten Pixmap VI to convert the image to array. Now i need to find the 2 D FFT. I have to do the FFT by fist computing the transforms of the rows in parallel and then the transforms of the columns of the result. For that i extracted the N Resolution value and gave it to ta for loop ( since there are N rows for the image.) Then I calculated the FFT for these rows. The resulting array is transposed to do the FFT for the columns. Is the VI i made  correct? Please see the attchement for the image.
    How can i get the 2D- FFT plot ?
    Thankss
    Nghtcwrlr
    ********************Kudos are alwayzz Welcome !! ******************
    Solved!
    Go to Solution.
    Attachments:
    Question Ni 1.JPG ‏23 KB

    Here is a simple program that performs frequency filtering of an image using the forward and reverse FFT transforms. I've saved a native 8.6 version and attempted to save an 8.0 version. I suspect the 8.0 version will not work properly because LabVIEW acted flakey when saving it out. The main VI is called "FFT madness RUN ME.vi"
    Message Edited by Root Canal on 01-12-2009 12:43 PM
    global variables make robots angry
    Attachments:
    fft madness eight point six.llb ‏249 KB
    fft madness eight point oh.llb ‏250 KB
    FFT madness duck.PNG ‏420 KB

  • FFT pour un signal analogique en temps réel

    Bonjour,
    Je souhaite calculer la FFT d'un signal sortant d'un générateur de fonctions?
    Comment je dois le faire sur Labview? J'arrive pas à trouver les bonnes fonctions qui transforment ce signal qui est en temps réel en un signal manipulable par la fonction FFT disponible. sur la palette de fonctions de Labview.
    Merci d'avance pour toute remarque, aide ou suggestion.

    Greetings Sir,
    You can find many examples of the correct use FFT functions inside the LabVIEW Example files. The FFT functions come in two version,the 'default' and the 'point by point'
    The links above show the wiring options of each of these functions.
    Be aware that these vi's do not come with the LabVIEW Base version, they are available in the LabVIEW Full and onwards.
    Kind Regards,
    Wouter
    Applications Engineering
    National Instruments Belgium

  • Fréquences de résonances à partir du graphe

    Bonsoir à tous;
    Je suis débutant en labview, en fait je travaille avec labview 6i sous windows 95. Mon problème est le suivant: je fais l'acquisition d'un signal acoustique avec une carte d'acquisition de NI et je calcule  la FFT  de ce signal  ensuite je la représente dans un graphe, alors à partir de cette représentation graphique j'aimerai bien remonter automatiquement à certaines fréquences et les afficher dans un tableau à une dimension qu'on appelle les fréquences de résonances. ces fréquences correspondent aux creux présents dans le graphe. en fait j'aimerai bien savoir si elle existe une formule dans le domaine fréquentielle pour convertir les lieux détectés en fréquences exactes comme la formule utilisée dans le domaine temporel:
    t=t0+dt*[lieux];
    dans ce programme j'ai utilisé la fonction detect piks and valleys, en fait cette fonction detecte l'amplitude et le lieux correspondant à chaque fréquence mais mon problème comment convertir le lieux detecté en fréquence exacte?
    voilà une impression d'ecran qui représente le signal acquis ainsi la représentation graphique de la FFT:
    Pièces jointes :
    impression.jpg ‏1407 KB

    Bonjour, ton graphique fréquentiel a sur l’axe des Y l’amplitude et en axe X la fréquence. L’axe des Y est un tableau 1D, et pour chaque valeur de ce tableau correspond une fréquence dans un tableau 1D de l’axe de X (de pas delta f, soit fi = fo + delta f * index). La fonction de recherche de pic te retourne les amplitudes des pics (valeur du tableau Y) et les index de ces mêmes valeurs dans le tableau. Si tu indexes le tableau des X tu trouveras la fréquence associées.
    Luc Desruelle | Voir mon profil | LabVIEW Code & blog
    Co-auteur livre LabVIEW : Programmation et applications
    CLA : Certified LabVIEW Architect / Certifié Architecte LabVIEW
    CLD : Certified LabVIEW Developer / Certifié Développeur LabVIEW

  • LVRT error treat_cpp Line 1938

    This weekend two PC's, that run for about 4 weeks my application (using NI-6034, and a lot of math calculations including FFTs, storing data to HDD), stopped nearly at the same time with the same message: "LVRT error treat_cpp Line 1938". OS Win2k, LVRT Version 6.1.
    Can somebody help me how and where to investigate what
    it can be?

    Usually, errors like this have are an issue with a shared resource. I don't have a definite solution because I have never seen this error, but you could try the followingt:
    Disable multithreading in LabVIEW. Go to Edit » Preferences » Performance and Disk (or Tools » Options » Performance and Disk , depending on your version of LabVIEW) and uncheck "Run with Multiple Threads". You have to restart LabVIEW after making this change.
    Make sure that your DLL is "Reentrant". Right-click on the Call Library Function and select "Configure" from the pop-up menu. There is a pulldown menu with two options: "Run in UI Thread" and "Reentrant". Select "Reentrant".
    If you did an upgrade, did you mass compile all your VIs after installing the update? You can read th
    e on-line help in LabVIEW to learn more about how to perform a mass compile (Tools » Advanced » Mass Compile).
    Have you changed the priority and/or execution system of your main VI or any of your subVIs? If so, change them back to the standard values and see if that solves the problem (File » VI Properties » Execution).
    Also, try running the application on another computer, just to see if the problem has to do with the computer hardware itself.

  • Analyseur de spectre

    Bonjour,
    je cherche a faire un analyseur de spectre (ADS) temps reel, a partir de buffer DMA sur bus PCIe, issue d'une carte proprietaire.
    Et sous linux.
    j'ai deja le driver avec la possibilité de faire du DMA.
    Peux t on realiser un ADS, temps reel, a partir d'un flux issu du PCIe, avec labwindow. faut il autre chose en materiel / logiciel.
    La FFT peux elle etre faites en TR sur le PC ou doit elle etre faites dans un FPGA (dispo sur carte)
    Cordialement

    Bonjour Bdrlp,
    La carte propriétaire que vous utilisez, est basée sur une architecture bus PCIe pour établir une communication avec le contrôleur de votre PC. Si vous utilisez directement ce bus pour transmettre les informations vers votre code de contrôle(LabWindows CVI) et ensuite les visualiser pour concevoir votre ADS , vous serez dépendant de la bande passante de votre bus PCIe. Autrement dit: bus dépendant et non temps réel.
    Par contre, si votre carte propriétaire intègre un FPGA, cela vous permettrai de traiter vos données à la volée grâce à la vitesse et la puissance d'exécution de votre FPGA (indépendant du bus PCIe pour réaliser les calculs de FFT à la volée).
    Cordialement,
    Rémi D.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Les rencontres techniques de NI - Mesures et acquisition de données : de la théorie à la mise en ...

  • Tektronix TDS 2024.

    Bonjour,
    J'utilise un oscilloscope Tektronix TDS 2024 et j'ai une erreur avec le vi scale Waveform array.vi inclus dans le driver (voir PJ 1).
    D'après la PJ 1, l'erreur porte sur amplitude et niveau 1 voie.vi.
    En substituant ce vi par son remplaçant Amplitude and levels 1 chang.vi (PJ 1a) j'ai le message d'erreur suivant "L'erreur -20315 s'est produite à :  "NI_MAPro.lvlib:Amplitude and Levels 1 chan.vi:1" when called from "TDS 2024..vi" Raisons possibles : Analysis:  Le paramètre dt de la waveform est inférieur ou égal à 0".
    Le vi qui le précède (TKTDS1K2K Scale Waveform Array.vi) à également un message d'erreur : "Balayer une chaîne (arg 1) dans TKTDS1K2K Scale Waveform Array.vi" (voir PJ 2).
    Par contre, le vi encore précédent TKTDS1K2K Read Waveform to Array.vi fonctionne correctement.
    Les liens entre ces deux derniers vi semblent corrects.
    Si quelqu'un à une idée...
    Merci.
    Pierre
    Résolu !
    Accéder à la solution.
    Pièces jointes :
    1.PNG ‏40 KB
    1a.PNG ‏1114 KB
    2.PNG ‏41 KB

    Bonjour,
    La première erreur concerne le VI "amplitude et niveaux" (PJ Err_1); et lorsque je clique sur continuer j'obtiens une seconde erreur.
    Le VI "Equivalant DETECT-AMPLI_2" fonctionne (la détection recherchée est bien obtenue), mais il me semble suffisamment éloigné de l'exemple donné par Tektronix pour avoir un doute sur les valeurs obtenues.
    J'ai donc essayé de retrouver la fonction souhaitée avec un VI plus 'académique"...
    Merci.
    Cordialement.
    Pierre
    Pièces jointes :
    Equivalant DETECT-AMPLI_2.vi ‏36 KB
    Err_1.PNG ‏89 KB
    Err_2.PNG ‏93 KB

  • Moyenne glissante

    Bonjour,
    Je fais l'acquisition d'un signal et calcule la fft. Celle-ci étant bruité, je voudrais faire un moyennage (moyenne glissante).
    Je n'ai pas trouvé de fonction dédié mais j'ai réussi à bidouiller un sous-vi (voir fichier joint), mais ne trouve pas ça élégant du tout, encore plus si on veut faire cette moyenne glissante sur 100 points par exemple.
    Pour info, ce sous-vi est dans une boucle qui fait l'acquisition du signal, le calcul du spectre, et son affichage.
    Y'a t'il une méthode plus propre que celle que j'utilise ?
    Merci d'avance.
    Pièces jointes :
    average.JPG ‏79 KB

    Bonjour Cyco,
    La fonction "Moyenne Point par Point" (Mean PtByPt.vi) de LabVIEW est une moyenne glissante.
    Elle se trouve dans la palette "Signal Processing" -> "Point By Point" -> "Prob & Stat"
    Cordialement,
    Yohann L.

  • What is the difference between power spectrum and PSD?

    Hi all,
    I input a time domain signal to the FFT power spectrum VI and FFT PSD VI seperately, and got two  outputs in frequency domain with similar shapes but different magnitudes.
    I refer to some signal and system textbook, and find PSD(w)=1/pi*Power Specrum or equivalently PSD(f)=2* Power Specrum.But as I observed from the LabVIEW outputs, this relation is not correct. I input a 1KHz sin wave with amplitude=1, Fs=512KHz, #s=2048 , the PS peak is 0.5 and the PSD peak is around 0.013.
    So I wondered what's the real formula LabVIEW is using to calculate PSD?
    Sunny 

    PSD is related to spectrum resolution, thus related to sample rate.
    df= Sample rate/ #samples
    I think they follow this relationship:
    Amplitude FFT power spectrum = Amplitude PSD * df * 1.5

  • Utiliser la fonction Refft ou fftex?

    Bonjour,
    Voilà le questionnement:
    Je mesure une signal et j'obtiens alors un tableau de valeur correspondant à 1 période du signal.
    Je souhaite enfait comparer ce signal avec un signal de référence et donc utiliser leur transformée de fourier. Quelle est la fonction la plus adaptée, refft ou fftex?
    Autrement, si j'utilise la fonction ReFFT je voudrais savoir si je peux écrire cela :
    TF=ReFFT(mon_signal, nbre_point, partie_im);
    ce qui impliquerait que TF soit un tableau lui-aussi avec par exemple : TF[2][5] pour avoir le 5 eme point du tableau de la partie imaginaire. Est-ce vrai?
    Vu que dans l'idée j'aimerai faire : diff=TF_mon_signal - TF_signal_ref;
    De plus, si c'est le cas, comment définir la variable TF ( type TF; mais quel type?)
    Le but de tout ça étant d'éviter le plus possible l'utilisation de boucles for pour calculer la différence entre les fft.
    Merci ,
    _trent_
    Résolu !
    Accéder à la solution.

    Bonjour,
    Merci d'avoir posté votre question sur les forums de National Instruments.
    A l'heure actuelle, la fonction ReFFT est classée comme obsolette.
    National Instruments ne vous conseille pas de l'utiliser pour vos applications.
    Notre recommandation est d'utiliser plutôt la fonction FFTEx pour réaliser votre programme.
    Vous pouvez d'ailleurs utiliser la fonction CreateFFTTable en conjonction avec FFTEx pour utiliser plusieurs fois votre calcul de FFT.
    J'espère que ces informations vous aideront dans votre développement.
    Bien cordialement,
    Guillaume H.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> NIDays 2011, le mardi 8 février au CNIT de Paris La Défense

  • What are the mel frequency cepstral coefficients

    Hi everybody,
    I need to know strongly what are cepstral coeeficients? I know they are calculated in FFT but I cant understand which properties of the wav audio file they are. For example there are 13 cepstral coefficients. What is the first one? Is it frequency of the speech? What is the second one? Is it the timpre of the speech??? My questions continue for 13 cepstral coefficients:)
    Thank you.

    Ok, I get the picture. The reason why I asked this question came up when I bought a new set of monitors (the Edirol MA-15DBK). I found out that after changing speakers (I had a set of Philips SPC-3208) the new ones were set to 0% boost/cut for bass/treble, but the sound came out quite bassy in an almost irritating level. So, I thought that maybe my card's bass levels were somewhat boosted. I guess now some lower frequencies are revealed, so I have to take care of my room acoustics. However the reviews for the Edirols gave low bass levels, so this gets more complicated. I am still in a 30-days trial, so maybe I will have a look at the Gigaworks T40 series II and I'll see what happens then...

  • How is calculated the amplitude in the FFT function?

    Hello,
    I have a time signal, for example an 1KHz tone. I use the FFT complex function to calculate its Fourier Transform, and I want to Know, which is the relation beetween the amplitude of this FFT and my time signal.
    I have an example of a sine of 1KHz with an amplitude of 1V. When I calculate the FFT the result is one delta at the correspondient frecuency, but with an amplitude of 12149. My signal has 65536 samples.
    Could you help me please?

    With the complex FFT, I do believe you have to normalize the by half the size of your sample set. This should give you back the original magnitude of your signal. Take a look at this screenshot.
    Attachments:
    fft_magnitude.jpg ‏65 KB

  • Calculating FFT using the FFTAverageType variable in DIadem

    Hi,
    I have some doubts about how should I use the averagingType variable. I want to define this variable as "Arithmetic" and get the combined FFT of two trials of the same process, i.e I have two signals which represent the same process.
    What I do is just calculate the FFT of each signal separately. Then I calculate the amplitude of each FFT signal and finally i combine these two signals by doing the mean for each amplitude. I.E if i have signal1FFT = (1 , 2 ......23 ) and signal2FFT = (2,4, ...43 ) the resulting signal should be ( 3/2 , 6/2 ...... 66/2 )
    Am I correct about what this averaging type variable does? When i try to do the same in other mathematic programs I get different results but I don't know exactly what I am doing wrong,
    Thank you so much for the help!

    There are several ways to approach averaging in the FFT environment.
    FFTAverageType is should be "Arithmetic" which means that all FFTs are weighted equal.
    The Exponential averaging is kind of a running average for special calculations which are typically done during a running measurement.
    Much more important is the parameter in "Calculate average from:" (Amplitude or Autospectrum)
    Amplitude is giving a linear result and Autospectrum is giving the result based on squared values. The squared result is the correct result from an energetic point of view.
    Example:
    If you have a sine with a peak of 2 for one second and a peak of 4 for another second, you might want to get and averaged peak of 3.This might be wrong.
    The RMS value of a sine with a peak of 3 would be 2.121.
    The RMS which is representing the energy in a signal is the root of the average of the squared values. The RMS of a signal with half the time 2 and half the time 4 is 2.236. This means, that a sine with the peak of 3.162 for two seconds has the same RMS as the signal with a peak of 2 and 4 for one second each.
    If you average FFTs in DIAdem you need to decide between the linear average (based on the peak Amplitude) and the energetic correct squared average (based on the Autospectrum). Right or wrong depends on your circumstances.
    Usually, other mathematic programs are giving you the choice to decide or they might just use one or the other method.

  • Calculating BPM using either Peak Detection point by point or FFT

    Hi Guys
    Im new to Labview and have absolutely no idea on programming and stuff. Im doing a project on Heart Rate monitor.
    I'm using labview to read the analog input to an Arduino Mini. In my attached VI im using Peak Detection Point by point to calculate the BPM but it doesnt seem to work. I took references from several VIs to arrive at my VI. 
    My instructor told me I could try using FFT to calculate the BPM as well but Im not sure how to carry it out in Labview.
    Hope you guys can help me with this.
    Thanks alot!
    Attachments:
    heart signal.jpg ‏43 KB
    Heart Monitor.vi ‏24 KB

    Ok, we have some problems here.
    1.  The Data Bits property is the number bits for a single character that is being transmitted.  You should not use that.  Since you are using an Arduino, it should be sending the termination character.  So just tell the VISA Read to read maximum number of bytes you expect from a single message or just some large number (like 25).  The VISA Read will stop reading the port when it encounters the termination character.
    2. The String Subset is not doing anything.  Just remove it.
    3.  You should move your  Wait to be outside of the case structure.  As is currently written, if you are not taking readings you will use up all of your CPU.
    4.  You should have labels for all of your controls and indicators.
    5.  Your time calculation is completely wrong.  You want to subtract the time of the previous peak from the current peak.  I recommend you use a Feedback Node to do this.
    Here's a slightly cleaned up version of your code.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Heart Monitor_BD.png ‏42 KB

Maybe you are looking for