IQ magnitude vs Spectrum magnitude

Trying to sort something out.....Consider the following experiment where I transmit a single CW tone, which is caputred with an A/D that does a complex demodulation.  The IQ samples that result have been decimated to some BW.
Now...I can do two things.  I can take those IQ samples and compute the magnitude for each IQ pair (i.e. - sqrt(I^2 + Q^2)).  OR, I can send those IQ samples into some of the Spectral Measurements Toolkit vi's, and observe the magnitude *spectrum* over the acquisition BW.  In this case, the spectrum consists only of a single impulse at the CW tone.  My feeling was that the magnitude I measure from each IQ pair should be approximately the same as the peak of the computed spectrum, since even though my measurement has some bandwidth, all of my energy is located in a single place.
Unfortunately, this is not the case.  For example, if I put a known power level of x-dBm into say, my NI-5660, then I expected that the magnitude I calculated (i.e. sqrt(I^2+Q^2)), should be traceable back to that known input power.  However, whether I interpret that result in Volts, Vrms, Vpk, Vpk-pk....I can never quite get an "output" power that matches my "input".    
Furthermore, if I take those same IQ samples and put them through the Basic Power Spectrum.vi and then the Scale Power Spectrum.vi.....the peak magnitude of my CW tone is yet another different answer from the previous method, or the actual input.  To make things worse, the Scale Power Spectrum.vi is terribly difficult to follow, making it hard to figure out exactly how the code is scaling everything and what each of the options really does.
I suppose I have three short questions....
1. If I calculate the sqrt(sum of squares)....what units is that in?  Are I and Q scaled somehow such that I shouldn't expect to exactly trace back the input power?
2. Why, for a single CW tone and relatively narrow BW, would the sqrt(sum of squares) method be different than finding the peak of a power spectrum?
3. Is there a decent explanation anywhere regarding how the SMT vi's do scaling?
Brandon

Hi Brandon,
It looks like you're pretty much on the right track with the computations, but as you seemed to allude to the units can get a little confusing. The I and Q values that come out of the niRFSA Fetch IQ (Complex Cluster) VI will be in Volts. If you look in the help for that VI it lays out the equation for conversion to power:
Y returns the complex-value time domain data array.
The real and imaginary parts of this complex data array correspond to the in-phase (I) and quadrature-phase (Q) data, respectively. To calculate the instantaneous power of a sampled I/Q point, use the equation (I2 + Q2)/2R, where R is the input impedance in ohms (Ω). For NI RF vector signal analyzers, R = 50 Ω.
From there you should be able to compare to the peak of the spectrum, but the value won't necessarily match up for a given IQ pair since the FFT for the spectrum is calculated over a full record, generally with some averaging involved. In the case of the SMT IQ Spectrum for niRFSA shipping example it is set up for RMS averaging. You could also change the Fetch IQ VI to return an unscaled 1D array of I16 which will give you the raw data that is acquired by the card.
Your second question may be answered by the inclusion of scaling for the input impedance in the excerpt from the help above. You would also need to bridge the gap between the power in Watts from calculation and the, presumably, dB(m) of the spectrum.
For your third question the answer is sort of yes and no. The "spectral info" output from VIs such as the SMT Zoom Power Spectrum VI will give you some scaling information, and if you are using the SMT Spectrum Unit Conversion VI as well (as in the IQ Spectrum example I've been referencing) then there is a user controlled conversion to a wide range of of units. Did you have specific SMT VIs in mind other than those?
Regards,
Peter Williams

Similar Messages

  • SVT 3.1 FFT Spectrum Magnitude VI output is RMS or Peak (db OFF)

    Please help with my SVT problem:
    1. With db OFF, what magnitude EU value does the SVT 3.1 FFT Spectrum VI output?  More to the point, is the EU an rms value or peak value? I thought it was rms but now I'm not sure.
    2. When I double integrate acceleration values to get displacement then feed the displacement waveform to this FFT Spectrum VI, I seem to get high displacement values compared to other portable analyzers in our shop. If the output of the FFT Spectrum VI is for example, mils rms (single sided) I have to convert this to peak-to-peak values. So I multiply the each spectrum value by 1.414 (to get peak) then by 2 for peak-to-peak. Is there a more accurate way to get peak-to-peak displacement values from an acceleration waveform?
    thanks,
    Glen

    Hi Glen,
    There are several FFT-based VIs in LabVIEW and the output units of each function is different.
    The following table will give you a better idea of what each function does. In your case you might be better off using the FFT VI that comes with the Signal Processing toolkit since you are looking for Volts output instead of the Vrms given by the FFT Spectrum functions.
    If you have doubts about the units returned on a specific function I recommend using the Context Help in LabVIEW. As shown on the image below this gives you more information about the function and the variables used/returned by it. You can open Context Help by going to Help>>Context Help in LabVIEW.
    Hope this helps. Regards,
    Tica T
    Applications Engineer
    Message Edited by Tica T on 04-04-2006 10:38 AM
    Attachments:
    units.JPG ‏50 KB
    functions.JPG ‏85 KB

  • How can i acquire signal magnitude per every 0.2hz using pxi 4472

    helloi am using PXI 4472 card for FFT
    analysis using LabView2009
    i need to acquire the frequency Vs
    magnitude for my application
    Can anybody help me out to get
    voltage magnitude for every (df)0.2Hz up to 500Hz bandwidth.
    i could acquire the Voltage
    magnitude for every (df)0.5hz,
    with configuration continuous mode of 1000 sample
    rate and 1000 samples per channel and spectrum measurement Express VI with
    2000msec
    delay time (‘df’=0.5Hz=1/2000mSec), further less ‘df’ program is terminating
    intermittently
    Please give your suggestion

    Here is a good rule of thumb:
    Frequency Span = 0hz to sample rate divided by 2.56
    lines of resolution =  record block size divided by 2.56
    for example a 1khz sample rate and1k darta points is a 0 to 400hz spectrum (401 to 512 is calculated by not fully trusted in machinery world) and 400 bins or one bin per hz, df = 1. 
    so for this example if you need df to be 0.2Hz, you need five times as much data or 5000 data points. 
    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

  • Spectrogra​m from freq-domai​n magnitude, phase?

    I have complex frequency-domain data that I would like to use to make a spectrogram (energy vs freq and time).  The frequency-domain spectrum is evenly sampled with respect to angular frequency, and contains both magnitude and phase information.  I also already have a program that calculates the complex time-domain waveform for the data.  Is there a way to generate the spectrogram of these data, either by using a combination of built-in functions, or some other method?
    I have looked into using the built-in spectrogram function for this problem, but it seems to deal only with real data, and to assume that the given data is in the time domain.   It also doesn't seem to take a scale along with the amplitude values it reads... in this case, how can it properly display the time and frequency scales? 
    Since I already have the phase of each frequency within my data, I think it should be possible to translate phase into time delay.  I'm just having trouble figuring out how to actually do this.  Does anyone have any ideas?  Thanks!

    Lasergeek,
    As you mentioned, currently the WVD Spectrogram.vi doesn't support complex math. But the good news is that the vi is open source so you can edit it as you see fit. I think this is probably a great product suggestion and encourage you to visit the Product Suggestion Center. Thanks for your feedback!
    Chris C
    National Instruments
    Applications Engineer
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

  • IIR Filtering and response .vi: Butterwort​h filter magnitude response depends on sampling rate -why?

    Hi folks,
    I am not expert in filter design, only someone applying them, so please can someone help me with an explanation?
    I need to filter very low-frequent signals using a buttherwoth filter 2. or 3. order as bandpass 0.1 to 10 Hz .
    Very relevant amplitudes are BELOW 1 Hz, often below 0.5 Hz but there will be as well relevant amplitudes above 5 Hz to be observed.
    This is fixed and prescribed for the application.
    However, the sampling rate of the measurement system is not prescribed. It may be between say between 30 and 2000 Hz. This will depend on whether the same data set is used for analysing higher frequencies up to 1000 Hz of the same measurement or this is not done by the user and he chooses a lower sampling rate to reduce the file sizes, especially when measuring for longer periods of several weeks.
    To compare the 2nd and 3rd order's magnitude response of the filter I used the example IIR Filtering and response .vi:
    I was very astonished when I the found that the magnitude response is significantly influenced by the SAMPLING RATE I tell the signal generator in this example vi.
    Can you please tell me why - and especially why the 3rd order filter will be worse for the low frequency parts below 1 Hz of the signal. I was told by people experienced with filters that the 3rd oder will distort less the amplitudes which is not at all true for my relevant frequencies below 1 Hz.  
    In the attached png you see 4 screenshots for 2 or 3 order and sampling rate 300 or 1000 Hz to show you the varying magnitude responses without opening labview.
    THANK YOU for your ANSWERS!!!
    chris
    Solved!
    Go to Solution.
    Attachments:
    butterworth-filter-differences.png ‏285 KB

    Hello Lynn,
    thanks for the answer. You are right that there are few points "behind" the curve in the graph, see png.
    However, this is the filter response which Labview (2009) provides to me directly out of the "IIR Filter for 1 Channel. vi" in the "filter information" output cluster. Where up to now I do not know how to influence it - apart from adjusting the input parameters "IIR filter specifications". OK, I assume I have to gain more knowledge of this. The curve of the magnitude resonse dies not change when I change the number of samples of the input signal of the signal generator, only wehn I change the sampling rate.
    I used directly the example vi from Labview with the name indicated in my first post "IIR Filtering and Response.vi".
    So I assumed that everybody has it in his/her examples shipped with LV and it is not necessary to post it.
    I just adjusted the size of the diagram of magnitude response to see the curves better as you see in the attached vi.
    So I did no changes to the vital parts of signal generation and filter of the example. The screenshots are like they come from the example when using the option "one waveform" where I as user assume that this which is behind is quality-controlled by NI.
    I was also astonished that the filter magnitude response is different to the one I copied out of graphs 1 year ago - but I unfortunately cannot reconstruct which example I used there...
    Thanks for any further comments
    chris
    Attachments:
    IIR Filtering and Response_CH.vi ‏55 KB
    butterworth2nd_order_bandpass_0p1to10Hz_mag_response.PNG ‏18 KB

  • How can I get my log-scaled chart to zoom in closer than one order of magnitude?

    I have data that sometimes varies over many orders of magnitude, and sometimes varies narrowly. To handle the former gracefully, I chose to use a log scale on the chart for this data. However, when the differences are subtle, the chart does not close in any tighter than 1 order of magnitude.
    Is there a way to get the chart to come in closer automatically? I've definitely seen ticks for 3.5*10^N, not just 1*10^N - but now they don't appear, let alone using them as the boundaries of the graph.
    I'd rather not have to track the chart data in the program and use property nodes to change the scale programmatically myself!
    Solved!
    Go to Solution.

    altenbach wrote:
    Here is the property description. (If loose fit is off, the scale goes from the data minimum to the data maximum.)
    I've seen this, but was not getting a clear picture, how the graph looks with 'Loose Fit' True and how it looks when this property is False...!!
    I'm too lazy, so was asking you to make one...!!
    Anyways... I made it myself.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • Error in finding the phase and magnitude of the acquired signal

    Dear sir,
                  I am trying to develop a module for calculating  unbalance in the spindle . I am using an accelerometer and  tacho for that. Till the last part in my vi I am getting the output properly but in final stage while finding the phase and magnitude I am not getting any outputs , just getting zero value..
    I have attached the vi.
    Please help me to solve the problem.
    Thanks & Regards
    Rajeshkumar C
    Attachments:
    Phase and magnitude.vi ‏60 KB

    Hm...
    my guess is you have to check your configuration.
    Timo
    PS: You may get better help if you tell us a bit more. You did not even bother to tell us if you use jdev at all.

  • What exactly is the point of calculating magnitude for compass.

    //Compute and display the magnitude (size or strength) of the vector, magnitude = sqrt(x^2 + y^2 + z^2).
    CGFloat magnitude = sqrt(heading.x*heading.x + heading.y*heading.y + heading.z*heading.z);
    NSString *magnitude_string = [NSString stringWithFormat:@"%.1f microteslas",magnitude];
    This code is from the example.
    What is the point of calculating this data ? What could it be use for ?

    The magnitude of a vector is used to normalize its components. For example we can't assume that the calibration of our Y accelerometer is the same as the X or Z. If the maximum Y is 1.05, and the maximum X is 0.95, we can have a significant error when calculating the angle. Normalization fixes this problem. The response from mbessey in this thread might be helpful: [http://discussions.apple.com/thread.jspa?messageID=9094888&#9094888].
    For more background, you might want to look up the "Unit Vector" in a physics text. I did a quick Google search for you, and found that most of the links assumed a background in math (get a clue Wikipedia: anyone who can read the notation already knows what a unit vector is!). Here's the best tutorial I found: [http://www.physics.uoguelph.ca/tutorials/vectors/vectors.html].
    Hope that helps!
    \- Ray

  • I'm using the 1D Rectangular to Polar VI and would like to know the output magnitude units.

    What is the magnitude output unit expressed in? VRMS, DB, etc...?The other output from the 1D Rectangular to Polar VI, phase, is expressed in radians.

    The 1D Rectangular to Polar VI only accepts inputs without units, it seems.
    This is just a geometric transformation and the magnitude output should thus get the same "units" as the x and y inputs originally had (before stripping the units off).
    LabVIEW Champion . Do more with less code and in less time .

  • Motion tweening magnitude of change- not what i want to happen

    I created an animation of a wildfire progression which includes 31 hourly perimeters showing the fire spreading. I created motion tweens 24 frames long for each perimeter and tweened the alpha from 0% at the beginning of the tween to 100 % at the end of the tween.  Each tween is the same number of frames, and same frame rate, and all in the same scene. when the animation starts each perimeter is displayed for about 1 second, by the time the animation reaches near the end, the perimeters and durations are almost 6 seconds long.  I want each to display for the same amount of time.  It looks like the tween is adjusting its length to accommodate for the magnitude of change occurring in the scene.  I have no idea why this is happing and can't find any properties that are different that would cause this.  anyone have any ideas or experienced this problem?

    I noticed that when I play the movie the frame rate slows down at the end. (space bar + enter) I set the fps to 12, but when the movie reaches the last 100 frames, the frame rate varies from 1.8 to 4.8 to 6. how could this be, if the entire movie is set to 12fps?

  • Save wavefromgraph data of format [f0,df & magnitude)into TDMS file

    How to save Wavefrom Graph data into TDMS file including fo & df along with the magintude.
    I am able to save magnitude alone which is not correct ,coz i have f0 & df also needs to be saved in order to calculate some values
    pls see the below image which shows the i/p format to the wavefrom graph. Also pls do the needful help.  .
    Attachments:
    Waveform.png ‏11 KB

    Hi, check this link
    Simultaneously Write and Read TDMS Data.......
    https://decibel.ni.com/content/docs/DOC-7982

  • Quick Sign Magnitude Negation question.

    Ok ive learned negation in Sign magnitude but I hit a bump in the road with one problem that seems to make the basic rules not work. So if someone would be so kind as to tell me how you subtract this sign magnitude problem out I would be very thankful.
    01100100 (Which is 100) minus
    00111100 (Which is 60) Seems very simple and I know all you have to do is
    subtract but how do you subtract from 0? Where the 0's are above the 1's. In basic arithmetic that would be negative 1 but not in Sign magnitude. Anyone see what im saying?

    Another way is called 2s complement addition. If you want to subtract 60 from 100 then you can add minus 60 to 100. In 2s complement the high order bit is the sign bit. To represent minus 60 in 2s complement binary notation you first write +60 in binary, then form the 1s complement (by inverting all the bits), and then add 1.
    So,
    0 0 1 1 1 1 0 0 = 60
    1 1 0 0 0 0 1 1 = 1s complement. (-128 sign bit, + 64 + 2 + 1) = -61
    1 + 1 to form the 2s complement
    1 1 0 0 0 1 0 0 = 2s complement (-128 + 64 + 4) = -60
    So, add minus 60 to 100, which is the same as 100 - 60.
    0 1 1 0 0 1 0 0 =100
    1 1 0 0 0 1 0 0 = -60
    0 0 1 0 1 0 0 0 = 40
    Notice that the carry from the left most column is ignored, because we are using 8 bit binary 2s complement addition. Also the sign bit in the answer is cleared, so the answer is positive.

  • Simple Order of Magnitude counts.. do they exist ?

    I don't normally deal with SQL, so apologies if what I am asking is dumb / obvious.
    I have a table [orders] with approx 300,000,000 rows. It is quite wide (approx 500b on avg).
    there is a unique index [idx_a] on [order_id , order_dt, store_chain, store_id]
    there is another index [idx_b] on [order_dt, ...several other columns...]
    At a high level I want to do something like:
    SELECT TO_CHAR(order_dt, 'YYYY'), COUNT(*)
    FROM orders
    GROUP BY order_dt
    But I am not really interested in the exact count, I am more interested in an order of magnitude summary. The system is online and live and continually accepting orders from the various outlets (approx 20 per minute). I have tried running the above query, in a test environment but it does not complete inside of 15 minutes.
    Is there a smarter way to do this ?

    Howler_Fish wrote:
    At a high level I want to do something like:
    SELECT TO_CHAR(order_dt, 'YYYY'), COUNT(*)
    FROM orders
    GROUP BY order_dt
    But I am not really interested in the exact count, I am more interested in an order of magnitude summary. The system is online and live and continually accepting orders from the various outlets (approx 20 per minute). I have tried running the above query, in a test environment but it does not complete inside of 15 minutes.
    Is there a smarter way to do this ?Apart from the other advices you've already got, you could try to use "sampling" if you're actually interesting in just a "rough" estimate:
    SELECT TO_CHAR(order_dt, 'YYYY'), COUNT(*) * 10 as cnt
    FROM orders sample (10)
    GROUP BY order_dt;
    This would "sample" only 10% of the rows using the "SAMPLE" clause, therefore you would have to multiply the count by the same factor to get results comparable to the "actual" query.
    Please note that depending on how "skewed" the distribution of your data is across the table blocks if you use only a low sample size your results might be way off, so you might need to test with a different degree of sampling.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Calculating magnitude of fourier transform

    Hi all,
    I'm currently working on a section of code where I've got to input a JPG, perform Discrete Fourier Transform on it and calculate the magnitude. I'm hoping to return the DFT as a float array
    My questions are:
    When the image is put in, the number of bands is set at 6. Does this represent R,G,B for real and R,G,B for complex?
    When I try and calculate the magnitude, I ideally want an array of floats returned to represent the magnitude of each vector, but I get 3 bands returned. Can I combine these into one band?
    Here's my code listing
    //add image to parameter block
    ParameterBlock pb=new ParameterBlock();
    pb.addSource('my buffered image goes here');
    pb.add(DFTDescriptor.SCALING_NONE);
    pb.add(DFTDescriptor.REAL_TO_COMPLEX);
    //Create the DFT operation.
    PlanarImage dft = (PlanarImage)JAI.create("dft", pb, null);
    System.out.println("Num bands="+dft.getNumBands());
    // Get the DFT image information.
    //Create the ParameterBlock specifying the source image.
    pb = new ParameterBlock();
    pb.addSource(dft);
    // Calculate the magnitude.
    PlanarImage magnitude = JAI.create("magnitude", pb, null);
    // Retrieve the DFT data.
    Raster dftData = magnitude.getData();
    //at line below i get 3 bands returned...can i combine these
    System.out.println("Num bands="+magnitude.getNumBands());
    Thanks for your help!!!!

    Would you like to create a greyscale image?

  • How to change the scale of magnitude in polar plot?

    I use a polarplot-subVI in my application. The usual labels of magnitude scale is devided in steps of 90° (e.g.:0°,90°,180°,360°). How can i increase the number of magnitude labels. When i go into the "pg angle labels.vi" i only found a way to change the content of the labels and not the number. Can someone help me?

    Greetings!
    If you wire in a "polar Attributes" cluster control, you can fiddle with the scales. Alternatively, you can "drill" down through the main vi, and see that the grid is controlled by a "picture plot" subvi. If you are not faint of heart, you can manupulate the grid properties at a lower level, but for the time being, I think the Polar Attributes control should do the trick.
    Eric
    Eric P. Nichols
    P.O. Box 56235
    North Pole, AK 99705

Maybe you are looking for

  • Read a database Oracle  from BW for reports

    Hi gurus, i want to know ,if it is possible, to read data that i have in an Oracle database from my BW. I want to know if it is possible or if i must to load the data into BW. TY

  • Problems with a adaptec ash-1233 card

    i am tryin to install a pci card in my computer so i can use the full 200 gigs of my HD and this is the only pci/ ata adapter card i could find. does anyone know how i can get this to work with my computer that i have now? i have a blue and white g3

  • Portal runtime error under travel/ESS/MSS

    Dear all, When we see privew under Employee self service --> ERP 2005 EhP2 --> iviews -->travel and expenses --> create travel request Here I'm getting Portal runtime error. An exception occurred while processing your request. Send the exception ID t

  • LabVIEW crashes when calling a dll

    I am trying to call a dll through my LabVIEW program. The dll implements a routine to access an ftp server. When the server is found, everything works as expected. However, if there is a delay in finding the server, LabVIEW throws an error � �An exce

  • Dbms_refresh : order of refresh

    When I make a refresh group and execute the refresh, are the materialized views refreshed one at a time in the order they were made (list), or are they refreshed all at once? I need them to be refreshed in order because some are multi-tier (based on