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

Similar Messages

  • 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.

  • 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

  • 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

  • Converting audio signals from mydaq into discrete values

    Hi guys!
    I am currently building a project that accepts audio signals from mydaq. I wanted to make the analog signals have it descrete peak values. Is this possible? I plan to use the discrete peak values and sum them up using a shift register instead of doing peak detection. I think it is more easy.
    Any suggestions would help. Thank you very much!
    .."in the end we all have false hopes"..
    Solved!
    Go to Solution.

    FalseHope wrote:
    Well actually, i wanted to make the acquired signal have its discrete values because i will use the number of peaks of the sound to determine which sound is louder (my assumption is that, the louder the sound or the nearer the sound to the microphone. The more sound peaks can be acquired. While lesser peaks are acquired the least louder the sound).
    That is wrong (unless you are dealing with Doppler Shifts, but they implies the object is moving).  Closer peaks mean that you are dealing with a higher frequency (or pitch).  Louder sounds just have higher amplitudes (larger peaks).
    FalseHope wrote:
    I will acquire sound signal from the mydaq, then detect the peaks and add those peaks while it is entering the acquisition. I wanted to make it discrete so that i will be able to add the numbers and the addition will stop once the sound is no longer present. The sound im talking about is a sound burst. Or a single instant sound and is not continuous.
    Just use the peak detection function.  You can then add whatever peaks it finds from the current acquisition.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • 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

  • 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,

  • Analog signal from Laser Power Meter

    Hello,
    First, I have to say that I am new using Labview.
    Probably for some of you the question I am going to ask is pretty easy, hope you guys can help me solving this.
    I am trying to acquire an analog signal from a Fieldmate Laser Power meter, the specifications from this meter are shown in the link below:
    http://www.coherent.com/downloads/FieldMateDataSheet.pdf
    I need to get the signal and save it in MS Excel files. My big issue is with the acquisition of the signal from the meter to the NI Board. I am using an NI SCB 68.
    Hope you guys can help me.
    Thanks.

    The SCB68 is just a shielded connector block, not a DAQ device.
    Use NI's MAX utility (Measurement & Automation Explorer) to find out what DAQ card you have installed in the PC.
    There are also plenty of analog acquisition examples that ship with LV, Search Examples in Help.
    -AK2DM
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • How can I tell if signals from two devices are truly synchronised?

    Hi there,
    How does one check that signals from two devices (two separate devices in a single X-series chassis) that should be synchronised actually are?   I am using a PXIe6361 and PXIe4331 on a PXIe-1073, with Labview 2001 SP1 64-bit. All devices are using the Sample Clock from the 4331 device, and an AI Start Trigger, so they should be synchronised.
    I thought that writing the signal data to file and checking the time stamp for each column of data would be the most accurate, but I have been told that timestamps are software created and therefore don't reflect the actual time that the signals were acquired by the hardware.  When I do this, the timestamps vary by up to 150ms which is larger than I expected.
    If I set the x-axis of the waveform graphs (on the GUI) to "Time" then it appears that the first data sample is taken at different times for the two plots (one plot per device).
    If I set the x-axis of the waveform graphs (on the GUI) to "Ignore time stamp" (so that the x-axis just starts from 0 rather than a date-time) then the first data point occurs at "0" for both graphs. However, I'm not sure that this reflects the actual alignment of the signal.
    What is the best way to check if signals collected on different devices in the same chassis are actually synchronised?
    Thanks,
    Claire.

    Hi Lynn,
    Thanks for your help and for sending the demo.
    I understand the concept of how the signals will look if they're not synchronised and your demo shows that nicely. I guess I have been perplexed by someone else telling me that the timestamps in the output file (and following from that I assume timestamps on a waveform graph) do not give an indication of whether signals are synchronised. The reason they gave for this was that the timestamps are manufactured by the software, not the DAQ hardware.  They suggested that I put the setting "ignore waveform timestamps" on my waveform graphs, and then check that both signals come in at the same time (i.e. both start at zero), but I'm not convinced about this. 
    When I use an analog trigger, neither the timestamps in my output file or on the two waveform graphs are synchronised. If I don't use the trigger, then there is far less disparity in the timestamps in the output file. I've attached two output files here, and my VI.
    This is my first attempt to synchronise a voltage module and a strain gauge module on an X-series chassis, so I want to make sure that I'm achieving the best synchronisation that I can, and the difference in behaviour with and without the trigger worries me.
    Thanks,
    Claire.
    Attachments:
    without trigger.txt ‏5 KB
    with trigger.txt ‏6 KB
    Multi-Device Synch-Analog Input-Finite Acq-Analog Start_Claire_wDigitalin_12June2012 PTbridge.vi ‏196 KB

  • No signal from PS3

    I have model 56HM66 tv that works fine until I hook PS3 to it. When I do there is no signal at all.I use an hdmi cable that works fine with the PS3 on other tvs. I also hooked a dvd player to the same port with the same hdmi cable and it worked fine. Does anyone know why there is no signal from the PS3?
    Solved!
    Go to Solution.

    This seems to be a problem with PS3s and their video settings. First, have the PS3 in standby. This means that it's turned "off," but the power button in the back is turned on. There should be a red LED. Next, press the power button with your finger, but continue holding it until it beeps twice and resets the video. Hopefully that fixes it.
    Because your DVD player works with the same port and cable, you know the TV's fine.
    - Peter

  • No signal from airport extreme after switching to optimum online

    I am pretty new to macs and this is my first message posted. A few days ago I switched from Verizon FIOS to Optimum Online and they changed the modem to a Motoroal Surfboard model. As far as I can tell the wiring was done correctly, but now my airport continues to blink amber and I am not getting any signal from it. The only way it gets picked up is by connecting the ethernet from the airport directly to the my macbook. I tried doing a soft reset and a hard reset, but still no luck. Optimum Online is telling me that it is a mac problem, but that seems odd to me since it was working fine before they switched modems. I know the new modem works because I can access the internet directly through it. When I go through airport utility, it keeps telling me that I need a firmware update, but then it cancels out on me with Error Code 6737. Any ideas??
    thanks,
    Ralph

    even flow wrote:
    A few days ago I switched from Verizon FIOS to Optimum Online and they changed the modem to a Motorola Surfboard model. As far as I can tell the wiring was done correctly, but now my airport continues to blink amber and I am not getting any signal from it. The only way it gets picked up is by connecting the ethernet from the airport directly to the my macbook. I tried doing a soft reset and a hard reset, but still no luck. Optimum Online is telling me that it is a mac problem, but that seems odd to me since it was working fine before they switched modems. I know the new modem works because I can access the internet directly through it. When I go through airport utility, it keeps telling me that I need a firmware update, but then it cancels out on me with Error Code 6737. Any ideas?
    Some thoughts that may help with your problem:
    1) When you connect directly to your new modem, open the "Network" panel of System Preferences and check the "Built-in Ethernet" item to check the setting of the "Configure" drop-down list. It will probably be either "Using DHCP" or something mentioning "PPPoE". Your AirPort unit should be configured using the same method.
    2) When you switch between having your computer connected to your modem and having your AirPort unit connected to the modem, you ought to cycle power on the modem. Some modems will lock onto the MAC address of the client device and will refuse to work with anything else until they are reset.

  • Signal from GPS toolkit

    Hi, I am working on the example module "niGPS Write Waveform To File".    I use the default settings to generate the baseband signal. 
    Now I am tring to simulate if there is a GPS signal in it.  I read signal from the file into matlab, and try to acquire a GPS satellite, but cannot find it.
    I checked again and again, do not know what's wrong with it.

    Hello usami,
    This is most likely due to incorrectly reading the data from the binary file. The file is a 1D Array of I16s that is interleaved I and Q data with a 512 byte header.
    The header consists of 8 bytes of version information for the version of GPS toolkit used to generate the file, 16 bytes for the IQ rate and peak power of the waveform and 488 bytes of that are used for padding. Without accounting for this header data you will be unable to accurately reproduce the waveform that follows.
    When using the GPS toolkit and an RF Upconverter in LabVIEW you would then upconvert and generate the resulting waveform using the niGPS Streaming From File VI.
    Exactly how are you using Matlab to simulate the GPS signal in the file.  How are you trying to acquire a GPS satellite?
    Regards,
    Dan King

  • HT5569 Why do I continue to have difficulty connecting to WiFi from my iPhone5? It rarely even picks up signals from networks when my other apple products work.

    Why do I continue to have difficulty connecting to WiFi from my iPhone5? It rarely even picks up signals from networks when my other apple products work.

    Hey CEW724,
    Thanks for the question. I understand you are experiencing issues with Wi-Fi connectivity on your iPhone 5. The following resource may help to resolve your issue:
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/TS1398
    1. Be sure you're in range of your Wi-Fi router (access point).
    2. Tap Settings > Wi-Fi and turn Wi-Fi off and on. If your W-Fi setting is dimmed,follow these steps.
    3. Confirm that your Wi-Fi router and cable or DSL modem are connected to power, turned on, and connected to the Internet. If not, refer to your network administrator or Internet service provider (ISP) for assistance.
    4. Restart your iOS device.
    5. Tap Settings > Wi-Fi and locate the Wi-Fi network to which you're connected.
    6. Tap  and Forget this Network.
    7. Try to connect to your desired Wi-Fi network.
              Note: You may need to enter your Wi-Fi password again if your network requires one.
    8. Turn your Wi-Fi router off and on. If your ISP also provides cable or phone service, check with them before attempting this step to avoid interruption of service.
    9. Update your device to the latest version of software.
    10. Update your Wi-Fi router to the latest firmware. For AirPort Base Stations, install updates using the AirPort Utility.
    Unable to locate a Wi-Fi network
    1. Verify that the network is available by tapping Settings > Wi-Fi and choosing from the available networks. Note: It may take a few seconds for the Wi-Fi network name to appear.
    2, Move closer to your wireless router (access point) and attempt to locate the Wi-Fi network.
    3. If you do not see the network you would like to join, you may be attempting to connect to a hidden network. Learn how to join a hidden network.
    4. Supported Wi-Fi configurations vary by iOS device model. Find out which standardsyour device supports3.
    5. Reset network settings by tapping Settings > General > Reset > Reset Network Settings. Note: This will reset all network settings including:
              - previously connected Wi-Fi networks and passwords
              - recently used Bluetooth accessories
              - VPN and APN settings
    Thanks,
    Matt M.

  • New monitor can not detect signal from new referb pc

     Monitor is a new flat screen,  model 2310m full HD with  vga, hdmi, and dvi-d connectors and boot up CD which includes pdf manual and video drivers etc..
             PC is a referb Pavilion M9200t first time started since referb with a G-Force GT graphics card (1 gigabite) and dual DVI-D connections. No VGA or HDMI out. OS is vista ultimate that I will probably update to windows 7 if I ever get it set up. Monitor does not get a signal from new PC with DVI-D cable or a VGA cable with an adapter. Monitor works fine with my old XP PC after installing drivers  and using the vga cable. New PC has no VGA out, so I bought a VGA to DVI-D adapter thinking that it would have proper drivers for a VGA monitor with no success. I also tried new PC on my old monitor with the DVI-D adapter on the VGA cable and that didn't work either. I can't do a first run setup without a monitor and the monitor won't work without a signal.
            I bought the PC from a friend who decieded to buy a laptop instead and had never started it. He bought it from someone who was selling referbs on E-bay and messed up and accidently started the warranty period  or so they say. 
            Also when I plug the PC in the fan starts and continues running till I do a hard shutdown, that is holding start button down till the PC shuts off. If I unplug and replug the computer it starts again without pushing start button. Does anyone think it is the graphics card issue or maybe power supply, or just not booting at all?  Any ideas would be greatly appreciated.------Thanks in advance.----Larry

                Ok, thats the procedure I was talking about earlier. I did that bios default factory reset just now. First the version 6 and earlier. It didn't work so I tried version 7 and later and that didn't work. I then tried version 6 and earlier again only this time pushed F10 more rapidly and got right in right when I got to the F5 and enter portion. Then I pushed F10 again to save the change and enter again to close. The PC didn't boot up the next screen like the test said it would. So I did it all again and spent some time reading what was on the bios pages but  accidently pushed ESC as the bios menu suggested instead of enter to close out   . No boot up screen again. I did another hard shutdown and then unplugged the cord for 5 minutes and this time the PC stayed off when I plugged it back in. The bios are set to default but I cannot get it to start again in safe mode or boot up. So if the power supply is working properly, and the monitor worked in safe mode, then the video card must be good. right?
              So I'm editing from the night before, its Monday morning here in Wi. and I'm sorry to say that after leaving the PC unplugged all night that when I plugged it back in this morning, the dumb thing started again without pushing the  start button.  So the only thing doing a recovery on the bios accomplished was to prove that my the video card can run the monitor in safe mode which is a good thing I guess. Hope someone has an idea as to what else I can try.-------thanks

  • Transfer 20MHz signal from FPGA to RT

    Hi all,
    I am a newbie to Labview and FPGA programming... I am using NI PXIe-8133 Controller card and NI-5781 FlexRio card. My task is to take input of 20 MHz external signal and then process it further... I have to transfer that signal from FPGA to RT with the use of FIFO (that is what I understand). I referred the following example and succeeded in transferring a low frequency signal (range of KHz) from FPGA to RT as the sampling rate is in micro seconds.
    http://www.ni.com/white-paper/11198/en
    But I want to have sampling rate in nanoseconds if I want to take a signal of 20 MHz. How can I achieve that? Is there any alternate method apart from FIFO to achieve that task?
    I am a starter in Labview, your help will be appreciated...
    Thank you....

    Hello Jimmie_A
    Thank you very much for your help. The example really helped me to understand the input/out operation.
    My application is to take a 20 MHz 'Phase Modulated' signal to FPGA and demodulate it. As a first step i want to take any arbitary signal of Mhz range and examine it if i am getting any phase noise or any other change in attributes.
    I tried to give input signal to FPGA transferred it to RT and plotted it. Also from RT i sent the signal again on FPGA out pin to check on Oscilloscope and compare with the given input signal. Now my problem is I can see the signal on the RT signal plotter but I am not getting any signal back on FPGA pin. I have used Two different FIFOs for Target to Host and Host to Target communication.
    It will be helpfull for me if you comment on my designed program for the said purpose. Here I have attached the screenshot of RT front panel. Also attached my FPGA and HOST vi files.
    Thanks alot....
    Attachments:
    Host.jpg ‏141 KB
    FPGA.vi ‏58 KB
    Host.vi ‏400 KB

Maybe you are looking for

  • Data retrieve from array PL/SQL is "???"

    Hi, I follow the sample code shown in getting the data of PL/SQL using Java. Please see below: OracleCallableStatement stmt =(OracleCallableStatement)conn.prepareCall ( "begin ? := getEMpArray; end;" ); // The name we use below, EMPARRAY, has to matc

  • Need to get employees belonging to this org unit + its lower level org Unit

    Hi ,     We have a requirment where in which we need to get all the employees belongs to a perticular in an          organization UNIT and its lower level org units.IS tehr any FM to find the same.    i.e if we input org unit then it should return al

  • How to quickly combine 2GB QT files for use in FCP Multiclip?

    We have 3 Focus FS-4 Pro 80GB HD units that work with 3 Sony DVCAM camcorders. We edit on FCP 5 and 6 on Quad G5s and one Intel G5 with Mac OS 10.4.11 and 10.5. We work in DV primarily. Recently, we began to do a large number of multi-cam programs wh

  • Nokia c2-02 web browser conflicted

    My nokia c2-02 browser conflicted.but nokia never take this coustmber problem serously to repaire this problem

  • Multiple rows affected message for a single insert

    Why would this show multiple 1 row affected statements in the messages tab? I tried tracing it, but it only shows a single statement: create table #ltbl_Temp (a int, b varchar(100)) insert into #ltbl_Temp values (1, 'AAA') drop table #ltbl_Temp Proce