Calculate SNR from Power spectrum (Urgent)

Hi. I have used simple blocks like PSK modulator,white noise,phase noise,tone interference, up and down converter and demodulator in a chain to simulate a noisy channel and also perform modulation in  LabVIEW. I would like to know is it possible to calculate SNR from the power spectrum live for this channel? Is there any function avaiable in Modulation toolkit to calculate SNR from Power spectrum?
Thanks
Solved!
Go to Solution.

Hello en99,
The Spectral Measurements Toolkit provides VIs to calculate the 'Power in Band'.  By taking the ration of this VI and the apparent noise level, I believe you should be able to calculate the SNR.
The screenshot shows where this VI can be found:
George T.
Applications Engineering Specialist
National Instruments UK and Ireland

Similar Messages

  • Signal-to-Noise ratio from Power Spectrum?

    Hi,
    I have a feeling this is a basic issue but for some reason I'm not getting it.  I hope this forum can help.
    I have a Power Spectrum (freq on the x-axis and power on the y-axis) and I am trying to determine the signal to noist ratio of the rf signal live.
    I am using LV 8.5 and have the spectrum toolkit and am using an RFSA in a PXI chassis.
    Any suggestions?
    Thanks
    - rf curious

    Hi Rf Curious,
    This questions does not have a simple
    answer but let me share my thoughts and you can decide what it makes
    most sense for your application. For signal to noise ratio (SNR) you
    should have ideally the power of the signal and divide it by the power
    of the noise. The problem here is that you are looking at both at the
    same time (rf live signal). Depending of what type of signal is it, you
    can recreate it and substract it from the spectrum (you will need to
    recreate the phase and magnitude and delete it from the phase and
    magnitude of the spectrum). This is normally done with simple signals
    such as a tone.
    If you don't have access to the magnitude and
    phase of the data, and you only see the spectrum, then you will have to
    do things different. You can probably measure the power of the signal
    by measuring the power of the band where the signal is located. Then,
    you can terminate your input and measure the power of the noise of the
    instrument (with same attenuation and RBW settings) and have a rough
    estimate. This method should have better results when S >> N. You
    can also take the adjacent channel (or further) noise reference.
    Finally,
    if your signal has a pretty flat spectrum, then you can only take the
    difference between the noise and the signal since they both have the
    same RBW.
    If by now, you have found other methods, feel free to post your ideas here for any other person that come across this problem.
    Regards,
    Gerardo O.
    RF Systems Engineering
    National Instruments

  • Save Power Spectrum from ni5660

    I am using ni5660 to capture the power pectrum using "ni5660 Power in Band" example.
    Is it possible to save the power spectrum for later use?  In which format can it be saved?  Is there a VI that will do it for me?
    When I mean the spectrun data I mean the output of "ni5660 Read Averaged Power Spectrum".
    Thanks.

    Hi,
    Using any of the File I/O VIs within LabVIEW should work fine for this.  I have attached an example of how this could be implemented by writing to a binary file.  When streaming data in the way you intend to with this example, the binary file format is recommended because it is more efficient in terms of space than other file formats.  In addition to the modified example I have also attached a sample VI that shows how you can read back the data written to the file and confirm that the spectrum actually was saved.  Let me know if you have any questions.
    Regards,
    Andrew W
    National Instruments
    Attachments:
    ni5660 Power In Band w Binary Write.vi ‏57 KB
    Read Binary.vi ‏243 KB

  • Optimizing Power Spectrum Performance

    I'm continuously acquiring data from two channels on a PXIe-5122 at a rate of 50 MS/s (100 MS/s total). I would like to compute the power spectral density of each channel while acquiring the data. I'm currently using the FFT Power Spectrum and PSD VI.  I benchmarked the performance of the FFT Power Spectrum and PSD VI on its own and was processing at a rate of about 3 MS/s per channel.
    Is there a more efficient VI should I should be using to calculate the PSD?
    Is calculating the PSD at these rates even feasible?  If not, any suggestions for alternatives?  (Would an LV FPGA be an option?)
    Thanks!
    geoff
    Geoffrey Schmit
    Fermi National Accelerator Laborary

    Hello Geoff,
    This is Andrew Brown, an Applications Engineer from National Instruments. The FFT Power Spectrum and PSD VI you mentioned is the recommended method of determining the PSD of data channels. Calculating the PSD given your sampling rates (100 MS/s) would definitely be much faster using the LabVIEW process. However, I was unable to find a specific benchmark.
    Some additional resources on using LabVIEW FPGA are located at NI LabVIEW FPGA and in the LabVIEW FPGA Help for FFT. Please let me know if you have related questions on this issue. Thanks, and have a great day!
    Regards,
    Andrew Brown 
    Applications Engineer
    National Instruments

  • Windowing and Power Spectrum

    Hi,
    I have a simple .vi that is attempting to calculate the total PSD over a 500Hz bandwidth.  My question pertains to the Windowing function and
    what affect it has on the power calculation.  I have much on windowing etc. in the NI's help but cannot seem to arrive at the value I am simulating to.  I have including my .VI and the associated input file.  (this file represents Pulse Densisty Modulated data output from an ADC)
    thanks for any help
    Attachments:
    PSD of PDM.zip ‏127 KB

    You may want to try "FFT Power Spectrum and PSD.vi". it takes care of the compensation for the window effect automatically.
    Be careful that "Amplitude" compensation is used for Power Spectrum, and "Energy" compensation for PSD. The difference is a scaling factor of 1.5 for Hanning window.
    Attachments:
    psd.vi ‏20 KB

  • Cross power spectrum

    hi
    I'm trying to obtain cross power spectrum of two time domain data (signal conditioned accelerometer o/p's) using 'cross power spectrum.vi'. The vi o/p one being the 'cross power xy spectrum mag' & the other being the 'cross power xy spectrum phase'. I need to plot the frequency with 'cross power xy spectrum phase' or in other words, I need the corresponding frequency value for the calculated 'cross power xy spectrum phase'. This is required for the calculation of phase delay (phase diff / corresponding frequency) and inturn calculate phase velocity
    Regards
    Ajit

    Hi EISmitho
    thanks for the suggestion, accordingly I've incorporated the vi you had suggested. The result obtained from the changes made above contained the frequency values also. But I was bit secpticle about the result as the tabulated frequency was just like a serial no. (1,2,3,...)Is it just a coincidence or have I gone wrong anywhere??Would u pls go through it once and respond to me.
    thaks for the help
    regards
    Ajit
    Attachments:
    crs.zip ‏97 KB

  • Why do I get SVFA Power Spectrum error?

    Hello,
    I'm having trouble with acquiring sound data from a microphone using the PCI-4474 and the DAQ Assistant and analyzing with the Sound & Vibration toolkit in LabVIEW 8.5.1. Every so often, I'm getting the following error from the Power Spectrum Express VI:
    Error -1931 occurred at SVFA Power Spectrum (1 Ch).vi:4
    Possible reason(s):
    Sound & Vibration:  The number of samples should be greater than 0.
    One time I also got error -200284 at the DAQ Assistant VI. I know that normally means a timeout issue, but it shouldn't be timing out because I'm acquiring 299 samples @ 60 kS/s, and the timeout is set to 11 seconds. I don't think it's a trigger issue either because the problem only happens occasionally, at somewhat random times, and I'm not using an external trigger.
    What really stumps me is that I don't get this error every time, and if I click Continue on the error dialogs, it seems to return to normal, at least for a while.
    Any suggestions would be greatly appreciated.
    Thanks!
    David

    Hi PBear,
    Thanks for replying. I probably should have explained better. The reason I was trying to take a sample of data smaller than 0.8 ms is because of the method I was using to calculate the exact duration of the beep. For each set of samples, I used the SVL AC & DC Level VI to calculate the signal level, then if it was above a threshold I captured a time stamp. During each subsequent iteration of the while loop, I would keep thresholding the signal and capturing a time stamp until the signal fell below the threshold, at which point I would collect a final time stamp and subtract the first time stamp from it to get the duration. This method works, but it's only accurate to the duration of the samples collected (maybe not even that). I'm sure there's a better method but that was the only way I could think of at the time. Anyway, that's what I meant by time resolution -- resolving the duration of the beep. I didn't mean the actual time resolution of signal acquisition; I know that depends only on the sampling rate.
    Hopefully now I've explained it more clearly and you can see my dilemma. You're right, if I sampled at 200 kS/s, I would have a data point every 5 µs. The problem is, I need a signal level (i.e. RMS value), not just one data point. And I need RMS values in high enough time resolution that I can verify the duration of the beep to within 0.8 ms. That's why I was trying to run my acquisition loop so often, because I only get one RMS value for each loop iteration. That sounds like a pretty inefficient method, though. Is there a way to capture more data points per iteration but somehow chop them up into smaller groups in real time and get more RMS values per iteration? And then how would I know my time stamps are accurate? (Am I anywhere in the ballpark?)
    Thanks for your suggestion on the DAQ Assistant. I'll see what I can do there -- maybe that will eliminate some of the extra noise.
    Below I've posted the latest version of my VI -- it's a little cleaner than the one I posted yesterday. Take a look at it and maybe my explanation will make a little more sense.
    Thanks,
    David
    Attachments:
    test20080627.vi ‏447 KB

  • 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

  • Basic accelerometer-power spectrum readings

    Hi all,
    I'm new to Labview and am trying to create a simple power spectrum logger. I've had a look at multiple tutorials but am stuck getting to places (most of the tutorials require sound and vibration toolkit, are really old and incompatible with Labview 2011 etc). The program I'm trying to do is:
    1) Collect signals from accelerometer (4kS/s)
    2) Generate power spectrum
    3) Save to disk (on board the cRIO)
    My setup is:
    - cRIO 9014
    - NI 9234
    - Labview 2011
    So far, I've managed to get the signal readings (XYZ axis) and merge them, put them into a 'Collector' block and then output them to the power spectrum block. I've very crudely used a 'Time Delay' block to set the sample rate (which I know is probably not accurate, but I cannot figure out how else to do it). I'm having a problem figuring out how to input the sample rate into the collector, which is why my power spectrum is giving me 0 to 0.5Hz (it's likely assuming the sample rate is 1Hz). I've attached my .vi.
    Would someone be able to point me to a tutorial/example/alternative solution? Thank you very much in advance.
    Attachments:
    accelero.vi ‏93 KB

    I think what you want is the CompactRIO vibration data logger.  It does not require the S&V measurement suite, though you will find it very useful. 
    Check this out!
    http://zone.ni.com/devzone/cda/epd/p/id/6388
    It has a waveform acquisition template for the FPGA.  It has a data logging state design. 
    You can see a Video of it working here
    http://www.ni.com/mcm/wind/
    Let us know if this helps. 
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444

  • Save Power spectrum

    Hi
    I would like to save a power spectrum ( about 80000 lines of data) as a file that i can later plot. When i write the cluster (coming out of FFT Powerspewctrum.vi)  to an excel  (excel works only upt o 56000 or something like that, so i can´t use it anyways) or .txt file using the a combination of open -write -close  file i get weird number and letters and not the data i´d like to have. Which data format ( iwould like to make graphs in origin) and vi´s should i use to export the spectrum or is it the best to extract the y-value of the spectrum (magnitude) using the unbundle by name .vi  and export it as txt?
     Thanks for any help

    I believe this is also something i can use for my application, however, when trying to recreate the code in LabVIEW 2011 SP1, the connections between the For Loop and the Close File return an error that the data types are different.The Path wire returns that the source is 1-D array of byte stream file reference with the sink being byte stream file reference. The Error wire returns that the source is 1-D array of cluster of 3 elements with the sink being a cluster of 3 elements.  How would i go about fixing this?
    I plan on using this to write to the file from an accelerometer connected to a NI-9234 c-series module through a cDAQ-9178 usb chasssis.  So my intention is to use this as a subVI to connect the accelerometer signal from the DAQ Assist of another VI.  I am trying to record the spectral data. Attached is the attempt at recreating your code.
    Attachments:
    Save Power Spectrum.vi ‏55 KB

  • Memory leak with Power Spectrum function

    Hi
    I have a memory leak on my application. By observing with the "Desktop Execution Trace Toolkit", the Power Spectrum function (from NI_AALPro.lvlib) seems to have two "Reference leak".
    The first one refers to the function "Open VI reference"; I got around this problem by replacing the "Open VI reference" by an "Initialize" input boolean, but I don't understand the second memory leak.
    Any idea ?
    Thanks...
    (See attachments : Desktop Execution Trace + code)
    LV8.6.1 + Desktop Execution Trace Toolkit 2009
    Same problem with LV2012 + Desktop Execution Trace Toolkit 2012
    Attachments:
    DesktopExecutionTraceToolkit.png ‏82 KB
    MemoryLeakPowerSpectrum.zip ‏7 KB

    Hi Mathilde,
    Thank you for using NI Discussion Forums!
    I reproduce this problem with LV2012 + Desktop Execution Trace Toolkit 2012. I will look further into this.
    Are there many calls of this function in your code? Could it be a problem for you?
    Thank you.
    Regards,
    Audrey_P
    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;}
    Journées techniques : des fondamentaux aux dernières technologies pour la mesure et le contrôle/comm...

  • Need Help related to Power Spectrum of two signal

    Hello Sir, 
    I have two signals of different frequencies but i want to take the FFT power spectrum of both signals at same graph . So for that case i take the FFT power spectrum of both signal indivisualy and after this build the array. so i got the one graph and all the components in same graph. Now
    The problem is that in that graph i want to extract the magnitudes at each frequency, but when i extract the information from final graph it will be the " 1D array of Cluster of 3 Elements" so its information is saprate for these two signal. but i want to tale the magnitude at each frequency , how can i got this sir . Please Help me 
    Agnivesh

    Sir it works thanks but there is one new problem is that wahen i am going to extract the magnitude for every frequency it is also works, but my question is that if my frequency is in floating point then how can i extract magnitude for that frequency. i mean i extracted the magnitude for every frequency component starting from 0 to 1...2..3...4.............so on (Frequency ) but if my frwquency id 2.3Hz so how can i do this.i am sending you my VI also 
    Agnivesh
    Attachments:
    Analysis HP Compressor test 1.vit ‏3485 KB

  • Read Text row by row, plot them and find the max of its Power spectrum

    Hi, everyone,
    I have to read data from a text file, plot as a time serie and find the frequency to its max power spectrum. I found a previous post related to my issue so I revised his example a little bit. But once I decide to store the data into an array, the Labview reported:' Error 1 occurred at Scan From String (arg 1)'. Can anyone help me out?
    Thanks in Advance!
    Gab
    Attachments:
    ReadXYZmine.vi ‏18 KB

    Again my attachment got missed out.
    - Partha
    LabVIEW - Wires that catch bugs!
    Attachments:
    ReadXYZmine_Trim Whitespaces.vi ‏19 KB

  • Power Spectrum

    Ok here's the deal.. I acquire data (of type numeric array) from an acuqisition unit (the specifics of it aren't important for the problem) at a known sampling rate and wish to perform a power spectrum on this data. I've used the build waveform function to build a waveform from the 1D array of data with the addition of the dt value (1/Fs) and a timestamp and fed this waveform into the power spectrum vi. The spectrum is then plotted on a waveform chart.
    However each time a new data set arrives from the acuqisition unit, the chart is overwritten.I would like to keep the previous data but would prefer not to use shift registers due to the possible size of the array. I thought if the chart's type was a "strip chart" it would hold the data until the buffer is reached but this doesn't seem to be the case.
    Another possible issue is with the timestamp but I think I've accounted for that.
    Note: The attached vi won't run successfully due to not being connected the the acquisition unit. I was hoping the problem might be clear to someone with more experience using the power spectrum function. I have used it successfully with generic sine waves.
    Strokes
    Attachments:
    Power Spectrum.vi ‏19 KB

    Strokes,
    you listen to mp3 music from time to time? Maybe, you have configured your application playing those mp3 to display something called "Bars and Waves" (at least, Microsoft calls it like this in Media Player). This display is comparable to an equalizer view.
    Your display of the power spectrum analysis is really comparable to this
    Does it make sense that the graph does not replace (read: update) instead of "concatenating"? 
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Number of cycles using power spectrum for getting frequency

    Hi,
    I have a square wave that I am getting a frequency estimate from using power and frequency estimate.vi
    I was wondering if it mattered how many cycles were inputted for the frequency estimate. Also, the signal may end in between cycles.
    Thanks,
    Jennifer

    Sorry for the vague first post. The software was already written for the device and I am just trying to understand a few things in order to make some changes.
    I am measuring the speed of a turning rotor using the square wave signal generated from a pattern on the turning rotor. I need to know the frequency of the square wave in order to determine the speed of the rotor. The pulse pattern is used in power spectrum and estimate frequency icons (appears to be similar to an example program for spectrum analyzer). The speed of the rotor is variable until it reaches steady state which can take minutes or hours. Speeds are not too high (Freq 1-100Hz). Right now the measurement is set up to sample a given number of points at a given scan rate. This means that the data most likely does not end exactly as a pulse cycle ends but somewhere in the middle of a cycle.
    We are interested in seeing the transient change in speed from start-up to steady-state. How short of a sampling period (i.e. # of cycles can be put into the power spectrum and estimate frequency.vi's) would give reliable measurments. Right now I just scan for a reasonable time in order to make sure I get enough pulses in order to better estimate the frequency of the pulse signal.
    In the future I will work with completing pulse width measurements which most likely would be the fastest I can complete a transient measurement although my data will have a bit more fluctuations. That's due to each pulse not being exactly the same width.
    Hope that gives you a better idea what's going on here.

Maybe you are looking for

  • Unknown Error message appearing when editing Nikon D810 files on Lr 4

    Hi Guys, Recently bought a Nikon D810 and whenever I import files and have a play around with them Lightroom will freeze and then come up with the Unknown Error message. Just wondering if anybody else has encountered this and if so, what you have don

  • Pricing Procedure could not be determined

    Hi.. basic doubt -- but causing issue. I have assigned the combination of sales area + Doc. Pric Proc + Cust Pric -- > Pricing Procedure in customizing. customer pric prc. -> assigned to BP sales area , billing data (Also seen on Prices tab of transa

  • UI Editor refresh problems and Insight not working

    Hi all, i'm having 2 problems which are really annoying. Everything used to work fine but suddenly one day 2 problems arose. Number 1, code insight isn't working... I checked my options, played with the delay but when I hit . nothing happens. My seco

  • Can't remove photo from dashboard...

    I recently downloaded the new OS X Mav. and was playing around with it and I somehow added a photo to my dashboard. It is locked in there, which wouldn't be a problem except for it never goes away, even when my dashboard is closed, so it is blocking

  • Functional knowledge in XI

    Hi,    I am basically an XI developer, but during interviews they ask for some basic functional knowledge in SD,HR,MM etc.Can you guys send me the basic functional doc for HR,SD,MM  to my mail id : [email protected] ASAP *********Points will be award