How to measure SNR of an EMG Signal?

hi
i want to measure SNR (Signal to Noise Ratio) of an EMG signal. I have attached a VI. Please have a look in the front panel. Among the three XY-graph, one is EMG, 2nd one is ECG and last one is EMG+ECG. I want to measure SNR for the signal EMG+ECG. Here ECG should be considered as noise. How to do so? I didn't find any convenient way for this. Please help me out.
Thanks at advance-
Taslim
Attachments:
SNR-1.vi ‏140 KB

Taslim,
Typically signal to noise ratio is defined on simple signals such as sine waves. Even if you have a "clean" version of the ECG signal, you cannot simply subtract or divide it because it will have a a slight phase shift and probably a small difference in the waveform due to the separation of the ECG electrodes from the EMG electrodes.
The SINAD VI in the Signal Processing >> Waveform Measurements palette uses FFT methods to identify the fundamental frequency and to isolate that "signal" from other components in the total signal.  
With a signal which looks much like noise (the EMG) you must define exactly what you mean by signal to noise ratio and how it could be measured.
You might be able to take the RMS of the composite signal and compare that to the RMS of a clean ECG, but you would need to normalize the amplitudes in some way to make the result reproducible and meaningful.
Lynn

Similar Messages

  • How to measure/estimate Bias of the signal

    Dear Sir
    I am performing the FFT of the signal which collect in real time from the hall effect current tranceducer SCT-013-005. I need to measure/estimate bias of this signal. Can you please guide me how can I do that. (Attached is my vi which is developed in LabVIEW 2012)
    I shall be thankful to you for your attention and consideration.
    Kind Regards
    Urfee
    Solved!
    Go to Solution.
    Attachments:
    How to measure Biase of the signal.vi ‏930 KB

    Hi tronoh,
    what about using the "Basic Averaged DC&RMS" function on your periodic signal?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to measure the SNR?

    Hi, everyone , I want to measure the noise power and signal noise ratio by usrp. How can I do this accurately ? for example, when this is no signal , I acquire the samples from usrp , and sum the  square of the sample then  average , whether is the way to get the noise power?  and  how can I measure the SNR? Is there any example about this ? thanks  

    Hey HustLiliAn,
    Here are 2 other forum posts that had good responses about SNR and VIs that can be used to take the measurement:
    http://forums.ni.com/t5/LabVIEW/Signal-to-Noise-Ratio-SNR-measurement/td-p/99326
    http://forums.ni.com/t5/LabVIEW/how-to-calculate-signal-to-noise-ratio-from-the-graph/td-p/813558
    If you are looking at the average power, SNR is just Psignal/Pnoise.  If you are looking at the amplitude of your signal, then you need to look at the RMS amplitude.  In that case you would use the formula (Asignal/Anoise)^2.  
    Sarah Y
    SDR Product Manager
    National Instruments | Ettus Research

  • 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

  • How to measure the baseline of a noisy, pulsed signal

    Hi
    I am measuring the torque exerted by a large motor on a shaft using a load cell and lever arm. The shaft runs at approx 150 rpm. I have attached a drawing that shows the output I get. This is a test rig.
    I have written some code that measures the maximum peak out of a group of approx 5 peaks and writes this to a shift register. This gives me an idea of the maximum torque "spike".
    I also wish to measure the baseline torque (due to the bearings in the machine). Even when highly filtered (my noise filter is set to 49Hz) the signal exhibits this noise which is probably due to vibration in the system. The signal is zeroed when the motor is not running.
    Does anyone have an ideas on how to measure the "baseline" torque? The large spike in torque prevents me from doing a running average. Can anyone think of a way of averaging just the noisy part of the signal to get an average value? I aim to to subtract the average baseline torque from the peak value to get an idea of the torque due to the event which causes
    the spike.
    Any help would be greatly appreciated.
    Many thanks.
    Attachments:
    drawing of torque signal.gif ‏26 KB

    Thanks for the reply. I understand what you are saying. However, I might have to modify my method for measuring the peaks if I choose to implement your idea. I have taken a screenshot of my "peak finder" code and attached it.
    Bascially, the reset terminal is wired to a timer which outputs a pulse every few seconds. This resets the vi (a standard NI one I think) and sets the peak magnitude back to zero. This way, I am windowing the signal and measuring the maximum peak in every window. This is what I need to do.
    So I could use a logical filter to feed data to the running average only if;
    the amplitude of the signal is less than a certain threshold
    and if the current value has similar low peaks either side of it
    How would you construct the code to delay the evaluation so that the values in front and behind of the current data point can be analysed?
    thanks again
    Attachments:
    peak_find_screenshot.jpg ‏45 KB

  • How to use labview to control a robotic arm by EMG signal

    Hello,
    I am working on simulation of an active Exoskeleton (wearable robot) for the upper limb using LabVIEW for my senior project. I need to use the EMG signal as an input to move the elbow joint (flexing and extending). I downloaded labview biomedical toolkit to take a ready simulated EMG signal but have a weak experience in LabVIEW.
    The design criterial I am planning to use is to establish a threshold for the EMG signal using a comparator (above 0 for example) and set a counter for everytime the signal passes the threshold as(+1) in every count. Then, specify a degree value for the counter (for example when the counter reaches 10000) and feed this value of the counter to a simple simulated structure for the joint (simple angle of 2 lines) or a meter to represent the movement.. e.g. every 10000 count = 1 degree of movement. Zero crossing can also be used instead of the comparator and the signal will be filtered and that is easy to do. However, my problem is in converting this logic into LabVIEW. I don’t know how to set a counter for the signal and make every number of counts refer to a specific degree of movement and I also don’t know how to form the simulated joint structure in LabVIEW or even how to transfer this into a simple meter device in LabVIEW.
    I have only one month to do this project so any help or ideas you provide are highly appreciated
    Thank you ,

    CarlFHellwig 
    Thank you for providing this example I just implement  it in the software to check the counter results.
    In fact, the design criteria I desided to use latly is to use is to establish a threshold for the EMG signal using a comparator and correlate the EMG signal with the angles of movement of a simple simulated structure "motor" for a single joint (simple angle of 2 lines) eg. 30,60,90,120,150 degrees for flexing and extending. Zero crossing can also be used instead of the comparator and the signal will be filtered and that is easy to do. 
    In other words, the idea is to drive a motor for different angles based on the input EMG signals. I am now stuck with developing the algorithm of how the angles are related to the RMS value of the signal while flexing and extending and how to convert this RMS into angular velocity and angular position to form the simulation. 
    I will be grateful if someone guided me to a person did a similar project to discuss some issues. 
     

  • Can you tell me how to measure audio signal frequency in measurement studio with visual basic 6.0?

    I'd like to measure two differential input signal(I.e. A+ and A-),below is two test projects,
    1.connect A+/A- to PCI 6052E card's ACH0/ACH8 ,and refer to GND for testing
    2.connect respectively A+/A- to PCI 6052E card's ACH0/ACH8 for testing
    Could you tell me the details of the second project?and give me a illustration in measurement studio with visual basic 6. 0 about the second?
    In addition,I would like to measure the audio signal frequency,could you give me a illustration in measurement studio with visual basic 6.0?
    Wait for your reply!

    Dear kelven,
    Thank you for contacting National Instruments.
    To address your question, there are Analog Input shipping examples that demonstrate how to measure an analog input differentially, as you specify in (2).
    As for measuring the audio signal frequency, you may want to check out the following KnowledgeBase. The link is:
    http://digital.ni.com/public.nsf/websearch/4b08380530d72d3b86256340004c3005
    Let me know if you have any further questions or if this does not resolve your issue.
    Thanks again and have a great day!
    Chad AE
    Applications Engineer - National Instruments

  • How to measure a current signal with NI 6211?

    How to measure a current signal with NI 6211?

    Hi Clecio,
    This is a charge accelerometer. It is different from the IEPE accelerometers that outputs a voltage signal.
    You need a charge amplifier. Then according to the charge amplifier output we can select an appropriate module to measure the signal.
    It is not possible to measure charge accelerometers with NI 9234 directly.
    Best Regards,
    Rodrigo Schneiater
    Application Engineering
    National Instruments Brazil
    If this information was useful, please click in the 'KUDOS!' beside.

  • How can i measure SNR(S/N)value using FSP Spectrum analyser

    hi ,
     I want to measure S/N value using spectrum analyser.i already installed rsspecan instrument driver.I also configured span,center frequency ,RBW,VBW etc but i am not able to get measured S/N value.I have attached my vi here with.how could i measure SNR Ratio??can you please help me!
    thanks.
    Tadhika
    Attachments:
    Unbenannt 1.vi ‏77 KB

    Hi, first of all I'd recommend to contact the R&S customer support center to be shure the measure the correct value. Did you really measure the actual noise, or do you measure the noise which is "only" displayed?
    But anyway, did you have had a look at this example: http://www2.rohde-schwarz.com/file/rsspecan_lv8_noise_marker_example.zip
    There is the setup of one noise marker shown. With your already existing marker value this should do the trick, also in case of two noise markers; just use the rsspecan Configure Marker Noise Measurement.vi again with input parameter <YourMarker+1> of the "Marker" input of the VI.
    Hope that helps?
    juergen

  • How to measure the pulse duration of a TTL signal using AI?

    Hi there.
    I would like to know how to measure the pulse duration of a TTL signal using an Analog input.
    These TTL signals comes from an ultrasonic sensor's output. The pulse width of the signal is
    proportional to the distance of the object the sensor detected.
    I have tried using the example "Measure Pulse Width.vi" which uses a counter to measure the
    pulse duration instead. It provides me with correct results.
    However, i will like to know how can i do it using the AI instead.
    I tried it by using the example "Acq&Graph Voltage-Int Clk.vi" which i modified by including a
    timing and transistion measurement vi. Pulse duration was selected as the output. A graph indicator was also added at the output of the pulse duration to monitor the incoming TTL signals.
    However, everytime the TTL signals was detected on the graph indicator, the numeric indicator always produce a "zero" reading.
    I have attached my vi for your reference.
    Can anybody advice me what i have done wrongly?
    Regard.
    Attachments:
    Acq&Graph Voltage-Int Clkv1.vi ‏190 KB

    Hi Paul,
    Today i tried using 2 different methods to read the pulse duration of my sensor signal.
    Both methods use "Acq&Graph Voltage-IntClk" vi as a guide.
    Method1:
    Add a filter vi(lowpass/bandpass) and a timing and transition measurements vi.
    Pulse duration is selected as the output. With some numeric conversion, a centimeter
    reading indicator was created. However, the reading always remains as "zero"
    Method2:
    Add a Mask and Limit Testing vi and a timing and transition measurements vi.
    By adjusting my upper and lower limits, i manage to "filter" a single pulse out from the actual signal.
    However, like the earlier case, the cm reading still remains at "zero"
    I have attached both the methods resulted waveforms for your reference.
    Are there anything that you can advice on?
    Regard.
    Attachments:
    Results_Waveforms.doc ‏141 KB

  • EMG Signal Analysis

    http://sine.ni.com/apps/utf8/niae_asc.main
    I have a query regarding amplification , filtering of the EMG signal directly connected to PCI 6221 DAQ without any external signal processing tool. Also EMG ranges upto 15 mv and usable upto 300 Hz. More you can refer the above link

    Hi kapillohia,
    To address your question on acquiring an EMG signal, there are a few things we need to take into consideration.
    On the hardware side, I understand you have a PCI-6221. As John mentioned before, you will be able to feed the signal straight into an analog channel and see data. However, the resolution will be better if you did some signal conditioning and amplified the signal before connecting to the DAQ card. For more information on this process, you can look around this article.
    In LabVIEW, you will use the DAQmx application programming interface (API) to communicate with the hardware to get your data. John walked you through on how to use the DAQ Assistant which is the DAQmx express function. There are many more examples in the LabVIEW Example Finder which can be accessed from the Help menu. In there, you can find relevant examples browsing by task under Hardware Input and Output » DAQmx » Functions » Analog Measurements » Voltage.
    Feel free to look at a this other link to get an idea of how a similar application may be developed. Let me know if you have any specific questions.
    Regards,
    Kent
    Applications Engineer
    Digital Multimeter Home

  • How to measure and log frequency with fieldpoint CTR

    Hi,
    I am developing a data acquistion and control system for an engine dynamometer using the fieldpoint modules and Labview.  One of the most important signals is the engine speed, measured in RPM.  The RPM signal is a 0-12V pulse where one pulse equals one revolution of the engine.  As well as being an important piece of data for later analysis, engine RPM will also be in the input into a PID controller, so the signal must be both accurate and have a high measurement frequency. 
    Currently I am using the FP-CTR500 modules to measure the frequency of the signal.  I am already aware of the included frequency measurement VI example, as well as the one posted before for low frequency measurements, and I have gotten both to work with my setup.  I would be using the low frequency VI becuase the max frequency measurement would be in the 200Hz range. 
    The first problem I am having is with the structure of the VI and how the data is output.  The case structure in the VI activates when the counter is read and resets the counter, then switches to the next case.  I would like the RPM number to output out of the case structure into a write_to_file VI and PID controller input.  The problem is that when the case switches, the counter is reset to 0, which will be recorded in the written file. 
    This is some example output data (RPM):
    1232
    0
    2321
    0
    2400
    0
    2521
    0
    The data is being written correctly, but of course I can't have 0 readings when the case structure changes.  This would be especially problematic when input into a controller VI. 
    The next problem I am having is with sampling rate.  If I were to use the low frequency measurement VI, the sampling rate of RPM would be variable based upon the the speed of the signal.  Or, the original frequency measurement VI has an adjustable sampling rate.  Of course, in my system there are a number of other signals that need to be recorded at the same time.  I have found that as I am collecting data, the "write to file frequency" is entirely dependent on the read frequency of the frequency measurement.  Therefore, if I had set the read frequency VI to read at 1 Hz, data will be recorded only every 2Hz.  Ideally I would like an overall measurement frequency of all channels (mix of analog and digital) to read between 20-50Hz, but if I am limited by the frequency measurement. 
    Any ideas on how to solve this problem, either through Fieldpoint or Labview?
    I can post my VI if this help.
    Thanks,
    Huang

    Thanks for your reply. 
    I should probably describe my current setup before I go into anymore details with the problem.  As for my specific setup, I am using an FP-1000 connected with an AIO600, AI110, CTR500, and TC120 all running through the RS232 line to a desktop running labview 8.  The actual counter module is reading a tachometer signal output from a separate engine controller.  THe output is a 0-12V ON 50% duty cycle signal.  As for data logging, i am simply using a "write to measurement file"  Express VI.  I have a while structure which holds all of the express VIs which access the fieldpoint IO, and these are all routed to the "write to" VI. 
    As for the specifics of the data logging problem, as I said, when I set the count frequency of the "Fieldpoint Frequency Measurement" VI to 1Hz, (which means the VI calls the case structure at 2Hz), the "write to measurment file" VI is called at the same rate (2Hz).  Which means that the overall logging rate of the VI is only 2Hz.  Is there someway to decouple this? 
    I was able to solve the problem of calling the frequency variable from the case structure by using a local variable which is called outside the case structure. 
    And now I have been having a lot of problems with reading the actual frequency from my engine controller.  THe actual signal will only range from 0 to around 200Hz.  I noticed, by comparing the actual signal to what was being read in my labview program, that after around 80Hz the signal increases by around 1.5times more than the actual signal.  ie.  Actual signal = 100hz, Read Signal = 150Hz.  After trying to figure out what was the problem, I decided to change the Noise Filter settings to 200Hz.  It actually worked for all the frequency ranges up to around 150Hz but after that the filter attenuates the signal to the point where the actual signal is 160Hz, but is being read at 100Hz.  My question is if there is a way to change the actual filter setting outside of the 2 given setpoints (200hz and 40khz) or if you have any other suggestions on how to fix this problem?  I was thinking of creating a noise filter input in MAX so that i could play with the values in Labview, but am i only limited to those two filters? 
    Thanks again for your help,
    Huang

  • How to measure the time a pulse is high for?

    I am using Pulse measure.vi to measure the output of a comparator. My comparator output feeds to an LED. The duty cycle is 50% so the LED just flashes on and off. I want to measure the time the output is high ('ON time') and I have been getting this by just multiplying the pulse width measure by the no. of pulses but I want to modify it to measure the 'ON time' of random signals with different duty cycles...
    The aim is that I am taking in a signal and need the LED to turn on when the signal 'ON time' reaches a certain specified time.
    But before I continue with the LED I am wondering how to add up the time the signal is high for?

    Hi PinkLady4218,
    You should be able to use one of the shipping examples to do what you need, please open LabVIEW and go to Help >> Find Examples.
    From the Example Finder please go to Hardware Input and Output >> DAQmx >> Counter Measurements >> Period or Pulse Width >> Meas Buffered Semi-Period-Continuous.vi
    You will then need to deinterleave the output array as it will show high time then low time then high time then ...
    You will need to confirm the order these values appear and then you can use a function from the arrays palette and use the function "Decimate 1D Array"
    Regards
    JamesC
    NIUK and Ireland
    It only takes a second to rate an answer

  • I need to measure the frequency of a signal on Pin 39 (PFI 15) of a PXIe-6361 module.

    I need to measure the frequency of a signal on pin 39 (PFI 15) of a PXIe-6361 module.  All of the digital I/O pins are already assigned and in use.  The signal frequency range is 50KHz to 500KHz.  I have tried all of the sample programs for DAQmx Counter/Timer frequency measurement.  If I modify them to use my hardware, I get run-time errors with conflicts with resources already assigned.

    Hi Julia,
    Thanks for the response.  As I stated before, I have tried all of the examples available that apply.  There are only three and one of those uses two counters.  The two I have tried are:
      Examples/Hardware Input and Output/Counter Measurements/Digital Frequency/
          DigFreq-Buff-Cont-ExtClk-ArmStart.prj     and
          DigFreq-LowFreq1Ctr.prj
    These examples default to using what appears to be traditional DAQ hardware (Dev1/ctr0 and /Dev1/PFI0).  I changed the counter to mine (/PXI1Slot3/ctr3) and directed my signal source (PFI15 on pin 39) to the counter.  No matter what I tried would not run.  They would always compile but gave run-time errors ranging from resources already in use to “external trigger required”.  I have no external trigger source and, if I did, there is no indication of how to assign it to the counter.  NI has a very good X Series Users Manual that tells all of the great things you can do with the hardware, but there is NO CLUE how to do any of those things!!!!  I know that some NI DAQmx functions use hardware resources that they never tell you about.  I discovered that when trying to produce a single output pulse from a timer using counter #0.  (Which, by the way, no one at NI could tell me how to do it.)
    Measuring frequency should be very simple.  The unknown signal is routed through a precise gate to a counter, and then the counter is read.  NI DAQmx uses the opposite approach of using my signal as the gate and counting their internal source.  However, the examples would not let me use the internal reference sources.
    To answer your other questions, I am not performing any other measurements at the same time and the counter is not being used for anything else, period.
    Any help would be greatly appreciated.  Thanks again.
    Wayne K.

  • How to measure current

    Hi:
    We have a DAQmx (6024E) and we want to measure the current from a
    flowmeter. When I tried to use the example program of LabView, I found
    that the measured current is much different from the current we got from a voltagemeter directly.
    Please help me to figure out HOW TO MEASURE CURRENT with NIDAQmx and LabView. Thanks
    Message Edited by kuroshio on 07-11-2005 10:49 AM
    Message Edited by kuroshio on 07-11-2005 10:55 AM

    Hello kuroshio,
    Current measurements are really just a voltage measurement with V=I*R applied.  Have you tried first measuring a voltage and comparing that to the voltage from your voltmeter?  You could measure the voltage a couple of ways.  I would suggest first using the Measurement & Automation Explorer (MAX) test panels.  Make sure your signal is connected to the correct pins and choose differential as the terminal configuration.  Once you have a correct voltage measurement, then you can use a LabVIEW example from the example finder (Help>>Find Examples) to get started with a current measurement.  In the example finder, you can navigate to Hardware Input and Output>>DAQmx>>Analog Measurements>>Current.  There are a couple examples there for current measurements.  You will have to enter the value of the resistor you are measuring the current through.  Be sure to re-post if you still have problems
    -Alan A.

Maybe you are looking for

  • Error-Receiver File Adapter using Variable substitution when file is empty

    XI Experts, We are on PI 7.0, SP14. We are using variable subtitution to get the filename from source message. This works fine as long as we have data in the payload for filename element. But we have a scenario where we don't have to create file when

  • OEHR Sample Objects incorrect installation

    Hi, i'm very new in this Apex world, i'm trying to follow the 2 Day + Application Express Developer's Guide (http://www.oracle.com/technology/products/database/application_express/pdf/apex_datasheet_20.pdf) , one of the steps is download and install

  • Ipod mini skips songs

    I have a 4g mini that started rapidly skipping song as soon as itunes updated to v6. I hoped v7 would fix it but not luck. I've tried restoring and it works for a little while but after about a week it starts again. It usually happens with purchased

  • BPS Hierarchy - variable exit

    Requirement is to restrict the countries based on the selected Geography, I have created a hierarchy on country and trying to write a hierarchy user exit on country variable . UPF_VARIABLE_USER_EXIT_HIER is the one I am using, Can somebody explain ho

  • Upload all the files in a directory

    Hi, I have searched in forum for a solution to my problem (Upload all the files contained in a certain directory) but all I've found is solutions to upload a single file using the bean JspSmartUpload. I had myself used this bean to uploads files to a