unit conversion

Forums BB Series Discussions unit conversion

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #245533
    JeremyLin
    Participant

    I am using python to get data from BB60C, but I met some problems during unit conversion to mV from I/Q data .

    In this reference https://relatedcontentdemo.kinsta.cloud/sigdownloads/SDK/online_docs/bb_api/index.html#IQDataTypes

    It said dBm = 10log (I^2 + Q^2), I^2+Q^2 is P in mW, I tried AM_in_mV = (P_in_mW * 0.05)^0.5
    But the result is not the same as in SPIKE. Where did I get wrong?

    #245540
    AndrewAndrew
    Moderator

    Is the I/Q data 16-bit integer or are you using the 32-bit floating point data from the API? If you are using the 16-bit integer data, there is an additional scale factor you must account for.

    Also, what value are you comparing it to in Spike? If you are looking at a modulated signal, you’re going to need to do a channel power measurement. If looking at a CW, then the instantaneous I/Q power will have more relevance.

    dBm = 10*log10(i^2 + q^2) is the correct equation. Make sure it’s log10 not log2.

    Look forward to your response.

    #245543
    JeremyLin
    Participant

    I tired to convert I/Q data to AM in mV (AM linear)and want to compre it with SPIKE under zero span mode.

    The iq data is returned by bb_get_IQ_unpacked(). I’m not sure it is 16-bit or 32-bit. I’ve tested.
    bbConfigureIQDataType(handle,’bbDataType32fc’) bbConfigureIQDataType(handle,’bbDataType16sc’)
    but the result looks the same.

    Attachments:
    You must be logged in to view attached files.
    #245545
    AndrewAndrew
    Moderator

    Jeremy,

    To convert to mV (voltage) you have to use the V = sqrt(P*R) Ohms law relationship. The system is 50 Ohm. This simplifies to

    mV = 10^((dBm+46.9897)/20)

    You can also derive an equation to go directly from I/Q to mV without needing to log/power the data too.

    Use the 32-bit floating point values to avoid the need for an additional scalar.

    #245552
    JeremyLin
    Participant

    Thanks for showing me some hint, and here’s how I fix it.

    Attachments:
    You must be logged in to view attached files.
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.