Signal Sinusoidal RT Decimation

Bonjour,
Je souhaite stocker les valeurs d'un signal sinusoidal dans un bloc mémoire de taille fixe(1024).
Je lis les valeurs de la mémoire à une fréquence de 2MHz(utilisation d'un DAC 2MHz).
Je désire calculer mes valeurs de sinus, du coté temps réel.
Je souhaite créer un signal, dont la fréquence peut varier entre 250Hz et 0.1Hz.Comme je lis les données tout les 500ns du coté FPGA , Je dois échantilloner à cette même vitesse du coté RT, donc Fréquence FPGA est de 2MHz.
Dans ce cas, j'obtiendrai un nombre de points par période imporant, alors que je souhaite faire rentrer mes données dans un bloc mémoire pouvant accepter 1024 valeurs.
Il font donc faire une décimation.Je vous joins un schéma de ce que je désire faire.Sur celui-ci il manque les bloc Read/Write DMA.De plus j'envoie au DMA, une par une les valeurs de l'onde sinusoidal et l'index correspondant.
J'ai trouve sur le site NI, des exemple de DDS Waveform, mais ils ne gèrent pas les basses fréquences.
Je vous remercie par avance
PNI
Pièces jointes :
Sinus Decimation.jpg ‏47 KB

Bonjour,
On distingue généralement deux stratégies applicables à la génération analogique:
Un buffer sur lequel on vient boucler la génération, avec éventuellement possibilité de venir modifier la fréquence de mise à jour (régénération, pour faire le lien avec la terminologie DAQmx)
Un buffer que l'on vient calculer en permanence, de manière à pouvoir ajuster l'allure du signal avec un fréquence fixe de mise à jour des échantillons.
Pour une plage de fréquence relativement grande, il est délicat d'utiliser la première stratégie, qui requiert un buffer très grand pour que le signal soit mis à jour suffisamment souvent en basse fréquence, et requiert une fréquence de mise à jour d'autant plus élevée pour les hautes fréquences.
Il me paraîtrait plus cohérent de calculer régulièrement côté RT, les échantillons à venir générer pour les 1024 échantillons à venir. Un transfert par FIFO DMA serait tout à fait adapté.
Quel matériel utilisez-vous? CompactRIO? PXI RT et carte de la série R?
Cordialement,
.mrLeft{float:left} .mrInfo{border-left:solid 1px #989898;font-size:x-small;color:#989898}
Mathieu R.  
  CTD - Certified TestStand Developer / Développeur TestStand Certifié  
  CLAD - Certified LabVIEW Associate Developer  

Similar Messages

  • Je veux compter les impulsions et connaître le signe du déphasage de mes deux signaux carrés

    Je veux compter les impulsions
    de deux signaux analogiques plus ou moins carrés dont la fréquence des
    deux signaux varie de façon identique. Je dois également tenir compte du
    signe du déphasage afin de savoir si il faut additionner ou soustraire les
    impulsions (je l'appelle sens dans monVI).
    Lorsque je fais varier la fréquence de mes signaux le sens change alors qu'il ne devrait pas puisque le déphasage est le même.
    Enfin comme les signaux que je dois récupérer ne sont pas
    parfaitement carrés je simule deux signaux sinusoïdaux que je dois
    redresser (cette partie me semble correcte)
    Je joins deux VI identiquent mais peut-être que l'un et plus facile à lire que l'autre
    Auriez-vous une idée concenant ce changement de sens qui perturbe mon comptage lorsque je fais varier la fréquence ?
    Merci de votre aide
    Pièces jointes :
    VI comptage-sens-double seuil-simulation en séquence.vi ‏155 KB
    VI comptage-sens-double seuil-simulation.vi ‏149 KB

    Bonjour,
    Merci d'avoir posté votre question sur les forums de National Instruments.
    Afin de pouvoir vous aider au mieux, j'aurais quelques questions à vous poser, afin de mieux comprendre votre programme.
    Pourquoi ne pas utiliser directement des signaux carrés plutôt qu'un signal sinusoïdal ? Cela vous rapprocherait de vos conditions d'utilisation réelles.
    Etes vous sûr que votre signal est bien tel qu'il vous intéresse ? Pour ma part, quand j'utilise votre VI, je vois un signal sinusoidal décalé d'un certain offset, mais pas redressé.
    J'ai également pu observer que le signe de votre sens changeait effectivement quand on changeait de fréquence, mais il change également parfois pour une même et unique fréquence.
    Je m'interroge également sur l'utilisation que vous faites de votre signal. Dans votre première étape (0) de votre séquence, vous obtenez la valeur de votre signal dans un indicateur scalaire grâce à un VI de conversion des données dynamiques vers des données numériques double. Du fait de votre architecture (séquentielle ou utilisation de variables locales), votre indicateur scalaire, lorsque vous l'utilisez dans la seconde étape, ne contiendra que la dernière valeur de votre signal et non la totalité comme l'aurait fait un tableau.
    Vous n'effectuez donc votre comparaison que sur la base d'un seul point. Est ce vraiment le comportement que vous attendez ?
    En ce qui concerne la globalité de votre code, vous pourriez sans doute améliorer son fonctionnement en initialisant vos registres à décalage (ce qui évitera des problèmes de données inatendues).
    J'attends vos réponses afin de pouvoir vous aider sur ce sujet.
    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

  • Removing 50Hz interference signal

    Hello,
    I am using a digital multimeter to measure a transient potential. The problem is that I see 50Hz interference which has a larger amplitude than the useful signal I need to acquire.
    I was thinking over a digital filter to filter out this interference but this is not clear to me. Looking at signal processing palette, I know there are several filters, but I am afraid some filters can affect my interest signal.
    Is it possible to remove only this 50 Hz interference signal without loosing information from other bands of the spectrum?
    Thanks in advance,
    Marc

    Marc,
    Yes. No. Maybe. More information is needed to select an answer which has some validity for your application.
    First, It is always better to keep the interference from getting into your data rather than trying to filter it out later.  A differential amplifier before the multimeter might help. Check your grounding to make sure that a ground loop is not introducing the interference.
    How large is the interfering signal? How large are the largest and smallest desired signals? What spectral bands contain information important to your process? What is the sampling rate? Is the interfering signal sinusoidal or a complex waveform? How much interference can you tolerate?
    Lynn

  • How to convert a dynamic data type to array of strings

        I want to perform a serial communication between two
    computers that I´ll call them A and B. The computer A (transmitter)
    will send a signal (sinusoidal) to computer B (receiver). I´m using a
    VISA Serial Communications Set (VISA Configure Serial Port.vi, VISA
    Write.vi, VISA Read.vi and VISA Close.vi).  VISA Write accepts
    only string data type and VISA Read reads only string data type, but
    the signal that I generated (on transmitter) is dynamic data and I need
    to perform this conversion to run my program sucessfully. How can I
    perform this conversion?!

    Hi Rafael,
    You can configure the From DDT Express VI to convert your dynamic data to any number of different types.  By default, the Express VI will convert to a 1D array of numerics...however, you can configure it (either when you first drop it, or by double-clicking it) to convert to a 2D array of numerics...additionally, you can configure it to convert based on channel data being in columns or rows.  I have attached another screenshot that shows converting the dynamic data into a 2D numeric array. 
    I hope this helps.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman
    Attachments:
    FromDDT2D.jpg ‏164 KB

  • Insérer une nouvelle colonne dans un tableau sous labview

    Bonjour,
    Je travaille sur labview 8.0 et je fais l'acquisition d'un signal que j'aimerais lisser. Pour cela, je fais l'acquisition de 64 fenetres de signal que je staocke dans 64 fichiers excel différents pour l'instant. Mon probleme est que je n'arrive pas a réunir tous ces fichiers en un seul. En fait lorsque je lance mon vi, j'obtient 64fichiers a une colonne et j'en vouidrais un seul avec 64 colonnes. est ce que quelqu'un peut m'aider?
    ci joint un vi de test avec un signal sinusoidal.
    Attachments:
    essai avec sinus et declenchement sur 64 et numéro de fichier.vi ‏181 KB

    Bonjour,
    Vous trouverez ci-joint un exemple se basant sur votre application mais permettant d'écrire un fichier avec n colonnes (64 dans votre cas).
    Cordialement,
    Christophe S.
    FSE East of France І Certified LabVIEW Associate Developer І National Instruments France
    Attachments:
    essai avec sinus et declenchement_modifier.vi ‏230 KB

  • Afficher un graphe en fréquence

    Bonjour, 
    je souhaite faire une acquisition de donnée d'une clé tntt qui fonctionne comme un systeme sdr, afin de visualiser un spectre en fonction de la fréquence, jai utlise la methode TCP pour connecter la clé usb a labview, de ce programme :
    SDRLab 
    http://ha5kfu.sch.bme.hu/sdrlab
    mais je ne sais pas coment avoir un graph en fonction de la fréquence, j'ai amplitude en fonction du temps. Y a t il une methode pour cela ? s'il vous plait.
    je vous joint mon prgramme ci-dessous.
    Pièces jointes :
    sdr5.vi ‏45 KB

    Bonjour labsee,
    Regarde l'aide détaillé pour l'utilsation de la fonction graphe et de la fonction FFT (CTRL+H dans LV):
    "Le graphe accepte un cluster contenant une valeur x initiale, un delta x, et un tableau de données y."
    La sortie amplitude de ta fonction FFT contient le cluster suivant:
    Ton échelle est donc directement indéxé par les valeurs du f0 et du df, tu peut venir jouer sur les paramètres avancés de l'échelle en cliquant droit sur le graphe>>propriétés>>Echelles. Je t'ai joint un VI tout simple qui affiche la FFT d'un signal sinusoidal sur un graphe.
    En espérant que cela réponde à ta question.
    A+
    Louis
    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;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France
    Pièces jointes :
    Graph_en_freq.vi ‏21 KB

  • Vi incompilable

    Bonjour,
    J'ai fait un programme d'acquisition d'un signal sinusoidal de fréquence 50 Hz qui fonctionne très bien, mais depuis que j'ai ajouté des fonctions sur mon programme , Labview me dit qu'il ne peut pas compiler mon VI et ne m'explique pas pourquoi? J'ai vraiment besoin d'aide, de plus lorque que j'efface la partie du programme que j'ai ajouté le VI redevient compilable.
    Merci d'avance
    Je poste 2 VI, le VI non compilable est "Copie de fréquence industrielle".
    Pièces jointes :
    acquisition et courbe enveloppe.vi ‏113 KB
    acquisition et courbe enveloppe.vi ‏113 KB

    Je poste une copie d'écran de la partie du programme qui pose problème.
    Pièces jointes :
    Nouveau Microsoft Word Document (2).doc ‏88 KB

  • GBF en mode frequence list

    J'essai de générer un signal sinusoidal variant en fréquence.
    pour cela j'utilise l'exemple de national Instrument : NIFgen_sweep_generator.vi
    J'entre 1kHz pour la fréquence de départ et 1MHz pour la fréquence finale, pour les frequency steps j'entre 300 et pour la durée par step en seconde j'entre 1s.
    Donc l'execution de ce vi devrait me prendre au minimum 300s. Mais ca ne me prend que 600ms. je ne comprends pas le pb?
    Merci pour vos réponses
    Nathalie

    No. You have to enable that as well.  You used the registry but it is easier just to update your ADMX files and GPMC and use GPO.  There is a second setting to enable users to manually use F12.
    Anyone figure out yet how to force the alternate reality?  I thought there was a way to implement IE 11 and default to IE 8 Emulation Mode where you have 1000 sites that are IE 8 and pending update but only 3 sites that need IE 11.  I really don't
    want to have to identify 1000 websites, interview everyone, figure out what sites were IE7 but in IE 8 use compatibility mode when IE 8 emulation mode works for both.  I have the latest updates, the latest site configuration.  I've been looking at
    XML itself, for some type of tag to force IE 8 but by default you have to add the exclusion and it then shows up as IE 8 mode.  Is there no possible way to make it emulate IE 8 Mode and the exemption process be IE 11 when 98% of the websites internal
    have no lifecycle process?
    I think I've read every post and blog at this point.  I'm hoping anyone can provide an answer.
    Maybe I'm the only one but if you have 2000 websites and no developers update their code then you are forced to implement IE 11 across Citrix and Workstation then you own the problem.
    Has no one addressed this?  What do you do when 2000 sites use IE 8 and 4 use IE 11.  You must upgrade to IE 11 and add the 2000 sites manually?  Honestly?
    I cannot find anything stating to do this or set this in the sites.xml file to force IE 8 by default and create exemptions for IE 11.
    If you even try to google the iesitesxml.xsd file all you get is a bunch of virus warnings.
    I've read over 100 links, blogs, forums, and cannot understand how this has never come up.

  • FFT Power spectrum

    It appears that the project I'm working on will end up teaching me a lot about labview because the project is complicated.  Using labview, I am spinning two objects at two different speeds, which makes up the signal.  One object is being spun at 1200rpms and the other at 2400rpms.  This should yield a spike at 20Hz and one at 40Hz.  I have a spectrum analyzer which is giving me the results I expect, but I can't seem to get it with labview.  I tried using FFT and then taking the real portion of the signal and graphing it, which didn't work.  I then tried the power spectrum, which also didn't work.  I need some help/suggestions.  Any and all are appreciated. 
    Thanks,
    JB

    JB,
    To help you, we need some help. Specifically, some specifics about your application.
    How are you acquiring the signals from your spinning objects? What is your sampling rate? Are the signals sinusoidal, pulses from an encoder, something else?
    What did not work? Did you not get any spectrum, was the frequency wrong, was the amplitude wrong, was the resolution poor?
    If you post your VI with some typical data saved as default (because we do not have your spinning objects), someone will probably be able to help you.
    Lynn

  • USRP Frequency Translating FIR Filter

    Hi,
    I would like to use the USRP as a Software Defined Radio where I can sample a wide spectrum (like 20MHz) and then chose to demodulate a small part of the received spectrum. An example is to sample the whole FM radio band from 88MHz to 108MHz and then from these data FM demodulate 200kHz from a station on 103.9MHz or any other selected signal.
    With GNU radio I believe this can be performed by a function called Frequency Xlating FIR Filter which can transform the zero frequency of the IQ data, add a FIR filter and then decimate the data. With LabView I have tried several filters, decimations and transformations but I never end up getting a good output.
    Can anyone guide me in the right way on how I can do this?
    With regards,
    -Sigurd A.

    Hi,
    I forgot to update this post. I did not find any VI which did this but after some studying and trials I found something that seems to work OK for me. See attached picture.
    The clue was to multiply the IQ data with a sinus signal with frequency equal to the frequency shift, and with same sample rate and number of samples as the IQ signal.
    Then the signals can be decimated to the wanted bandwidth.
    With regards,
    Sigurd A.
    Attachments:
    image.jpg ‏176 KB

  • Récupérati​on d'un courant créé par un champ magnétique

    Hello i need some help to realise a program on labview. I will ask my question in two languages (French and english) Excuse me for my english, it's very bad.
    To explain precisely, i want to recover a signal from a coil.
    I send a current in this coil (the coil who surround a sample ) and i stop the current to study the answer create by the oscillation of the magnet field.
    To explain when i stop to send the current in my coil the nuclear magnetization precesses about the earth's field induces an alternatiting voltage in the same coil at a frequency of about 2kc./s. which i want to observed after suitable amplification.
    For it i use le NI 6009 and Labview 8.
    I want too recover this signal and after detect when the signal was almost equal to 0. At this time i want to send a burst to maintain my signal.
    So the green signal is the polarising signal. When i stop the green signal the field cames back and it creat the black signal. When the signal is equal to 0 (+-5%) i want to do a burst ( red signal) .
    To conclude i want to recover the envelop of the signal.
    So my questions are :
    How to detect when the signal is equal to 0 (+-5%) and send a burst ?
    How to create a burst with the same frequency of the black's signal ?
    How to recover the envelop of the black's signal (=blue's signal) .
    Thank you for helping me and excuse me for my english. I'll try to better, i promise.
    Et en français ça va être beaucoup plus facile. Donc j'aimerai visualiser un courant créé par le retour à la normale du champ magnetique. Pour expliquer plus précisement, je créé un champ magnétique perpendiculaire au champ terrestre dans une bobine qui entoure un echantillon. Quand je stop le courant de polarisation vert, le champ magnétique reviens à la normale dans le même sens que le champ magnétique réél. Si l'on observe le courant on obtient la courbe sinusidale décroissante que j'entretien avec un burst ou impulsion qui correspond à un signal sinusoidal de fréquance égale au signal noir..
    J'aimerai savoir comment detecter quand le signal est proche de la valeur 0 (+- 5%) et ainsi declencher le burst automatiquement ?
    Comment peut on créer un burst sinusoidal de la fréquence du courant noir ?
    Comment obtenir l'envelope du signal final noir (=signal bleu) ?
    Voila j'ai plein de question sans reponse et j'aimerai bien un peu d'aide. Merci par avance.
    Guillaume VINCENT
    IUT b GEii LYON FRANCE

    Bonjour,
    le module USB-6009 dispose d'un trigger numérique ou software. Vous ne pouvez donc pas utiliser une entrée analogique pour déclencher la génération d'un signal sur une voie spécifique.
    Vous devrez donc déclencher les données uniquement par soft après traitement des données acquises (lorsque les valeurs de mesures dépassent une valeur seuil). Vous aurez compris que l'application ne sera probablement pas réactive à la milliseconde près. Qu'elle est l'échelle de fréquence de votre système?
    Vous aurez à utiliser les fonctions de la palette "traitement du signal" ainsi que de la palette "mathématiques" pour effectuer des traitements sur vos signaux.
    Cordialement,
    Manuel R
    AE dans une autre vie

  • How to measure the phase of a sinusoidal signal?

    I need to measure the frequency and the phase of a sinusoidal signal. I tried to use the Advanced Single Tone Measurements.vi but the phase measured in each iteration (each second) keeps changing (the measured frequency is not in integral Hz, so the first point of the next iteration is at a location different from the location of the first point of the current iteration...I guess this is the reason). How can really measure the phase of a signal (not always changing with time)? When I change the phase of the input sinusoidal signal, the measured phase should be changed though.
    I'm using LabVIEW 7.1 and PCI-6110.
    Thank you very much!
    Marlon

    Marlon,
    Without DAQ hardware I cannot run your VI. DAQmx is not supported on my platform (Mac OS X), so I cannot examine your VI in detail.
    1. The AI VI will wait until it has the amount of data specified. So if you are collecting one second's worth of data at a time, it will wait one second before completing. The 50 ms Wait will run in parallel, so it has no effect on the timing in this case.
    2. Continuous AO is possible, depending on the hardware you have. However, I have no experience with implementing it. Since your frequency is such that you do not end the AO data segment at the end of a signal cycle, you need to be careful to avoid discontinuities in the signal sent to the AO.
    3. There is no data dependency between the AI and the AO. It is possible that the AO could run after the AI in any given iteration of the loop.
    4. Your phase reference should be the excitation signal. The best method of evaluating the response of the beam would be to use two sensors, one at the shaker and one at the tip. Then measure the phase shift of the signal at the tip with respect to the shaker signal. If two sensors cannot be used, either measure the voltage sent to the shaker or use the simulated signal that you send to the AO as the reference. In either case you would need to compensate for the response of the shaker.
    5. Consider the phase shift in the filter. The steady state phase shift is about 14 degrees. The initial transient lasts about 5 cycles of the input waveform.
    6. Your simulation sampling rate is 1000 samples/second. While this satisfies the Nyquist criterion for a 379 Hz signal, it does not give you much data to work with for the phase information. If the hardware will handle it, I would go to 10000 samples/second.
    Lynn

  • Decimating a Signal While Keeping The Same Signal Length?

    Hi, 
    I would like to know if it is actually possible to do the above. 
    I'm currently working on wavelet based multiresolution analysis using LabVIEW Student Edition, which unfortunately doesn't have all the toolkits and Express VIs available for me to use. Attached is a VI I have created (Daub4.vi), and screencaps showing the results of the decimation. 
    What I'm trying to do is to decompose the signal by 8 levels, each time dividing the sampling rate by 2, done using decimate 1d array. However, in terms of keeping the signal length the same, I'm not too sure if I should actually manipulate the dt value or simply just use the waveform graph scaling factor to do the job. Some advice would be welcome. 
    Also, another problem I have is pretty weird:
    I'm trying to extract a part of a very large ECG signal (1 second = 64 samples, sampling rate = 2048Hz, I have about 10 minutes of data), selecting from 40960 samples to 65536 samples. However, upon output, the waveform graph only shows up to 65535 samples instead of 65536. Is this supposed to be normal?
    Thanks,
    Derren
    Attachments:
    l1l2.png ‏53 KB
    l3l4.png ‏48 KB
    Daub4.vi ‏24 KB

    Derren,
    Exactly what do you mean by dividing the sample rate while keeping the signal length the same? Do you want the number of samples to be the same or the time duration of the total signal to be the same? Since you did not post the top level VI, I cannot tell what you are doing with the data.
    Also your last comment does not make sense.  "1 second = 64 samples, sampling rate = 2048Hz".  If you have 64 samples in one second, that is a sampling rate of 64 Hz, not 2048 Hz.  Neither rate produces 65536 samples in ten minutes. 60 s * 10 min * 64 Hz = 38400 samples. At 2048 Hz you get 1228800 samples. By today's standards those are not particularly large datasets.
    In LabVIEW arrays are indexed from zero so the last element in a 65536 element array has index 65535.
    Lynn

  • Sinusoidal signal

    I am getting a sinusoidal signal from a turbine flow meter.
    Is there a way to read the actual data of mass flow with labview in real
    time?

    Are you saying the the correct signal being produced by the flow meter is
    sinusoidal and how to translate this signal into flow?
    In order to answer this question, you have to know the method of modulation
    that corrosponds to the signal. AM, FM etc.
    What does the documentation of the sensor say?
    Stu
    gkonstan wrote in message
    news:970vtp$t4b$[email protected]..
    > I am getting a sinusoidal signal from a turbine flow meter.
    > Is there a way to read the actual data of mass flow with labview in real
    > time?
    >
    >

  • Add phase to the sinusoidal signal

    Hey everyone,
    I have issue. I don't knew how can i add phase to the sinusoidal signal? I have two sinusloids whith are of variable frequency (variab. freque. - i suppose that is not a problem for solve my problem). Tension and curant (my two sinusoids) i need delay each other. 
     If anyone can give me help, please. 
    Marek 

    I thougth you wanted to calculate the delay between the sinuses...
    If you want to add a delay, you can just acquire a little more samples and then remove a part of the signal at the beginning of an array/the end of the other.
    Is there a problem with your current acquisition? It seems not to be a sinus.
    Maybe it would be more convenient if you post your question in the french forum.
    Message Edité par Micael_ le 11/05/2010 09:20 AM
    Cordialement,
    Micaël DA SILVA

Maybe you are looking for