Cross power spectral density

Hello
I can not figure out how to use "Cross Power Spectral Density" (CPSD)
in Labview. I know that Labview has something about
"Cross Power Spectrum" but I need Cross Power Spectral
Density, because I am going to measure the coherence which
needs CPSD as far as I know.
Thaks for your help.

The following example code should be helpful.  Please take a look, thanks!
 Analyzing Two Input Signals Using the Cross Power Spectrum VI

Similar Messages

  • How to calcualte Cross power spectral denstiy in Labveiw??

    Hi all,
    I unable to figure out how to calculate the cross power spectral density(cpsd) in labview ??? I'm able to calculate crosspower by using
    Cross Spectrum (Real-Im).VI but i need cpsd using labveiw functions.
    i know that, we can get that through script node function cpsd(x,y) but i shouldn't use that it is my functional requirement.
    And one more, Is this right??  psd=power spectrum/ df.  where df is frequency resolution.
    could any one please help me...
    Thanks and regards
    Giridhar

    Hi girikavali,
    does this help you? cross power spectral density and Analyzing Two Input Signals Using the Cross Power Spectrum VI.
    Note: The "cross power spectral density" should mean the same as "cross power spectrum", says Wikipedia - CPS/CPSD.
    The term "density" seems correct to me, because it is devided by the number of the points, see Cross Power Spectrum. If this is not the case, then please supply a mathematical definition, so one could know.
    Cheers,

  • Power spectral density

    Hello,
    I cannot seem to change the "desired units" of the SVT Power Spectral Density.vi in the sound and vibration toolkit. It is still possible to switch between EU^2/Hz and EU/sqrt(Hz) on the Power Spectral Density function?
    Regards,
    Raoul Enning

    Hello Beat,
    thanks for your help in this matter, I really do appreciate it. First and foremost let me mention that I am working with SVT version 3.1- maybe quite antiquated; i un- and reinstalled it just to make sure that no one here in my lab had fooled with it. On that note, my spectrum units.vi looks somewhat different to yours (see attachment). The relevant portion of the naming of the y-axis variables comes in the "svl_Modify Unit Label for Spectrum Type and Spectral Density.vi". If we look in this VI (also attached) we see that the larger outer conditional, which defines if the units are X^2 / Hz or X / sqrt(Hz), has itself a condition that only allows free movement when the input is linear. When the input is in dB, the conditional is always false, which amounts to forced labeling the Y-axis with X / sqrt(Hz). I actually see the same conditional in the VI you posted.
    In addition to this, the data doesnt change either.  This is because of the sv_Linear to dB.vi (also in attachment). when switching between EU^2/Hz and EU/sqrt(Hz), the "input signal" data switches between either 1 set of data, or that same set of data squared. so far so good. However, the calculation that is done here when EU/sqrt(Hz) is selected (i.e. magnitude) is 20log(Vin/Vref) which is equivalen to 10log(Vin^2/Vref^2). So, this returns us to power and not magnitude, converting the data right back to how it is when EU^2/Hz. Now I can imagine that programmers have done this to maintain the definition of the dB in electrical engineering, but I will argue that when I select EU/sqrt(Hz) (this cannot be called power spectral density anymore) I want the units in Volts, and not in Volts squared.
    Regardless of the semantics of the data computation, the units reported on the y-axis are always wrong when dB is active. Following the computation of the data in sv_Linear to dB.vi, they should always be EU^2/Hz, and not the other way around.
    In order to fix this, I am compelled to convert the 20log(Vin/Vref) computation to 10log(Vin/Vref) and to remove the "linear" condition in the svl_Modify Unit Label for Spectrum Type and Spectral Density.vi.
    What do you think of this idea? Am I completely wrong in my thoughts? 
    Regards,
    Raoul Enning
    Attachments:
    spectrum units.JPG ‏67 KB
    unit label.JPG ‏77 KB
    Linear to dB.JPG ‏120 KB

  • Power Spectral Density.vi

    Can someone tell me what the parameter "ENBW" stands for and what it really means in Window Parameters.vi (in Scaled Time Window.vi)  (used for Power Spectral Density.vi). See attached.
    Is it "envelope bandwidth?" I checked some of my signal processing books but came up with no definite answer.
    Thanks,
    Don
    Attachments:
    enbw.png ‏283 KB

    It's the equivalent noise bandwidth of the window.
    From the help file (LV8) on Scaled Time Domain Window:
    "You can use eq noise BW to divide a sum of individual power
    spectra or to compute the power in a given frequency span. "
    and more from:
    Scaling Smoothing Windows
    Applying a smoothing window to a time-domain signal multiplies the
    time-domain signal by the length of the smoothing window and introduces
    distortion effects due to the smoothing window. The smoothing window changes the
    overall amplitude of the signal. When applying multiple smoothing windows to the
    same signal, scaling each smoothing window by dividing the windowed array by the
    coherent gain of the window results in each window yielding the same spectrum
    amplitude result within the accuracy constraints of the window. The following
    plots are the result of applying scaled smoothing windows to the time-domain
    signal.
    An FFT is equivalent to a set of parallel filters with each filter
    having a bandwidth equal to Δf. Because of the spreading effect of a
    smoothing window, the smoothing window increases the effective bandwidth of an
    FFT bin by an amount known as the equivalent noise-power bandwidth (ENBW) of the smoothing
    window. The power of a given frequency peak equals the sum of the adjacent
    frequency bins around the peak increased by a scaling factor equal to the ENBW of the smoothing
    window. You must take the scaling factor into account when you perform
    computations based on the power
    spectrum.
    The table below lists the scaling factor, also known as coherent
    gain, the ENBW, and
    the worst-case peak amplitude accuracy caused by off-center components for
    several popular smoothing windows.
    Window
    Scaling Factor (Coherent Gain)
    ENBW
    Worst-Case Amplitude Error (dB)
    Uniform (none)
    1.00
    1.00
    3.92
    Hanning
    0.50
    1.50
    1.42
    Hamming
    0.54
    1.36
    1.75
    Blackman-Harris
    0.42
    1.71
    1.13
    Exact Blackman
    0.43
    1.69
    1.15
    Blackman
    0.42
    1.73
    1.10
    Flat Top
    0.22
    3.77
    <0.01
    Here's another discussion on it:
    http://forums.ni.com/ni/board/message?board.id=230&message.id=2637&requireLogin=False
    Message Edited by Jonnie 5 on 04-06-2006 10:55 AM
    2006 Ultimate LabVIEW G-eek.

  • Plot Power spectral density of a signal from myDAQ.

    Hello, 
    I need to plot the power spectrum of a signal acquired using myDAQ. I have already been able to acquire and plot the input signal. The example given in Labview for power spectrum uses a pre-defined sine wave and replacing the sine wave by the input signal does not get the work done..
    Please Help...
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    example psd.vi ‏117 KB

    Why have the second loop?  Looks like you should have what you want with just the first loop.  Here's a cleaned up version of your code.  I only removed the second loop and then did some slight rearranging to make it easier to read.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    example psd.zip ‏70 KB

  • Recording data for power spectral density

    Hello
    I need to record the power spectrum for a duration of 2 weeks for 2 hours per day. I can get the averaged power spectrum for the 2 hour duration per day as it is embedded in the Power Spectrum Function. Is there a possiblity of saving the data to some Excel file and later calculating the averaged power spectrum for the whole 2-week duration..
    Please Help. Thank you.

    I was save the data into a TDMS file.  The API is fairly simple and there is a free add on to view the data in Excel.
    You can later also read the TDMS file and do whatever averaging, etc you want to do with the data.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Determining spectral density of poisson process (carson theorem)

    Has anyone ever determined code for working out the spectral density (or
    equivalent) of a Poisson process, based on Carson theorem (or a variant
    thereof)? It doesn't have to be in Labview, but that would be the easiest (or VB).Message Edited by Jo on 05-01-2005 11:34 PM

  • Power Spectrum Density conversion to Time Series Data

    Hi,
    This may seem an odd request but is there a way to convert power spectrum density data back to the time series data that generated it in the first place. I have lost the original time series data but still have the PSD and need the time series to do other analysis.
    Thanks,
    Rhys Williams

    Hate to be the bearer of bad news, but there are an infinite number of time series that will generate a given PSD.  You lose all phase information upon taking the PSD.  For this reason I almost always save time domain data, or at least complex FFT values.  

  • 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

  • Power spectrum density question: One sided convert

    Hi, there
    I am using the PSD function. In order to get the RMS noise, I integrated the PSD data and doubled the result because I have two sides in positive frequency range and negative frequency range. Then my result is 1.414 (or Sqrt(2)) times higher than my RMS data measured in time domain.
    Then I looked into the PSD fuction and found out that in the function of  "Convert to on-sided spectrum", the amplitude was doubled. But it is not meantioned in the help file.
    My thinking is: either change the help file of PSD function and mention that it is a doubled one-sided output or do not double the amplitude when convert the spectrum from two-sided to one-sided output.
    best regards
    Chengquan Li
    CQ

    Dr. Chengquan Li,
    I know sometimes the help can be hard to navigate, but I think I found the help documentation that address this issue.  It can be found here: Power Spectrum.  
    Under the heading "Converting a Two-Sided Power Spectrum to a Single-Sided Power Spectrum", you can find the following:
    "A two-sided power spectrum displays half the energy at the positive frequency and half the energy at the negative frequency. Therefore, to convert a two-sided spectrum to a single-sided spectrum, you discard the second half of the array and multiply every point except for DC by two, as shown in the following equations."
    This is why you noticed that the block diagram of "Convert to One-Sided Spectrum" had the output doubled.  I hope this helps clear up the issue.
    Regards,
    Elizabeth K. 
    National Instruments | Applications Engineer | www.ni.com/support 

  • Inverse Filter

    Hi there, I am measuring the output of a mechanical manipulator in response to band
    limited gaussian white noise. This then allows me to calculate the transfer function using -
    cross-power spectral density of the stimulus and the response divided by the auto-PSD of the
    stimulus. I have been able to achieve this in matlab. Now, I want to nullify the effect of the
    manipulator using a inverse filter with 1/transfer function of the manipulator. This will
    ensure that the noise that I inject in the manipulator passes faithfully without imposing the
    transfer function of the vibrator. I am using invfreqz for getting the filter coefficients in matlab.
    How can I design an arbitrary filter in labview with filter coefficients exported from matlab ? Best, BSG

    Dear Biswa, 
    Firstly, could I enquire about the version of LabView you are using? LabVIEW 8.0 introduced MathScipt, a high-level text-based programming language generally compatible with m-file script syntax. Furthermore, you can create script nodes only in the LabVIEW Full and Professional Development Systems.
    So, if you do have the requisite versions of LabView, then please see the following tutorial, which will walk you through importing your data into LabView…
    http://zone.ni.com/reference/en-XX/help/371361D-01/lvhowto/importing_or_exporting_hiq/
    If you do not have access to the script nodes, then all versions of LabView you should be able to complete the following steps to exchange data between LabVIEW and the MATLAB environment, the process is straightforward as long as you are using ASCII format.
    1. To save a vector or a matrix X in ASCII format with tab delimiter, enter the following in the command window or m-script file in the MATLAB® environment:
    >>SAVE filename X   -ascii -double -tabs
    This creates a file whose name is filename, and it contains the data X in ASCII format with a tab delimiter.
    2. Import the file into LabVIEW using the Read From Spreadsheet File VI located on the Programming»File I/O palette.
    Finally, you may be interested in the following knowledge base article…
    How do I Manipulate the Coefficients and Floating Point Notation In the Filter VIs from the Advanced Analysis Library?
    http://digital.ni.com/public.nsf/allkb/42D101AFC3E1978686256521005E1C78?OpenDocument
    I hope this has been of some use to you,
    Best wishes,
    Rich R
    Applications Engineer
    National Instruments UK & Ireland

  • What's the unit label of y-axis of PSD when using Spectral Measurement Express VI?

    Hi:
     What's the unit label of y-axis of PSD when using Spectral Measurement Express VI?
    Selected Measurement : Power spectral density
    Result : dB
    No Averaging..
    Is dB/Hz the magnitude label of PSD output? Thx!

    There could be an issue the the Express VI converting your waveform data into the dreaded Dynamic Data Type, which is just causing more and more memory to be used.
    So what I would recommend is use the DAQmx Configure Logging  VI to configure DAQmx to stream the data as you read straight to a TDMS file.  There are various other properties you can set to make the logging go across files.  You just set up the logging before running your task.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Spectral Measuremen​ts - Y axis units?

    All;
    When I choose to use the RMS magnitude selection on the spectral measurements dialog attached below.... If I am taking angular velocity measurements in degrees/second, what are the units of magnitude on the y axis of the subsequent frequency domain result? Additionally, what are the units if I select any of the other selections? Thanks!!
    -Nick-
    Attachments:
    Capture.JPG ‏66 KB

    When the selection is rms the output units are the same as the input units. Power Spectrum units are the square of the input units and power spectral density is in units of (input units)^2/Hz. This information is in the detailed help for the VI.
    Lynn

  • How does the window selected on the spectral measurements express vi affect the output?

    I'm using the spectral measurements express vi to find the power spectral density of a fairly broadband signal. I've already discovered a bug in the express vi; it doesn't divide the power spectrum by the equivalent noise bandwith for the window as it should. However, even after taking this into account by using the scaled time window vi to divide this factor out, the PSD is still changing with the window. How can I get the PSD to be constant with varying windows??

    I would like you to prove the "bug" that you're describing by creating an example that shows the calculated and the expected results. By opening the code of the "Spectral Measurements" Express VI you can dig into the heart of the calculation, and there (in the "ma_FFT Power Spectrum and PS Density no State.vi") you will see that the Power Spectral Density indeed IS calculated by using the formula PSD = (Power Spectrum/(df*Noise Power BW of Window)). See the attached PSD.jpg that shows where the calculation happens.
    The Power Spectral Density is supposed to be dependant of the chosen Window. Please read chapter 5 "Smoothing Windows" in the "La
    bVIEW Analysis Consepts" manual.
    Best regards,
    Philip C.
    National Instruments
    - Philip Courtois, Thinkbot Solutions
    Attachments:
    PSD.JPG ‏139 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

Maybe you are looking for