RF Measurement Devices

cancel
Showing results for 
Search instead for 
Did you mean: 

RFSA scaling complex I16 data

I've successfully acquired complex I16 data using the niRFSA_FetchIQSingleRecordComplexI16 function but after computing the spectral result my amplitudes are ~15dBm too low.  I must be scaling the data incorrectly.  I'm assuming that the gain and offset values returned in the wfmInfo structure are applied to the real and imaginary values. I'm also assuming that the gain and offset values take the programmed reference level set with the niRFSAConfigureReferenceLevel into account. The gain scaling values do change when select a differect reference level.  

 

Are these assumptions correct?  The gain value seems to be off by a factor of 4 (or so).

 

I'm using the 5663 RFSA hardware configuration.   When I use the RFSA SFP the amplitudes are correct.

0 Kudos
Message 1 of 6
(6,483 Views)

Additional info:

 

If I call niRFSA_GetScalingCoefficients after getting the data with niRFSA_FetchIQSingleRecordComplexI16, the scaling coefficients are different than the values returned in the wfmInfo structure returned by niRFSA_FetchIQSingleRecordComplexI16.  Using the GetScalingCoefficients values result in a signal amplitude that is too high by roughly 5dBm.  It seems like neither set of offset and gain values are correct (or I'm using them wrong).

 

Shouldn't the scaling coefficients returned by these two functions be the same?  

0 Kudos
Message 2 of 6
(6,480 Views)

I would also expect the two functions to return the same scaling info.  I don't know why they are different.

 

I think I can help with the original question, however.  I have a VI that I use to scale binary IQ data using the scaling info returned by fetch.  I get the same results using the binary fetch VI (and converting) as I do using RFSA's floating-point Read VI.  Both methods give me the signal power I expect.  Maybe there's a little something missing in the math you are using.  I think you'll find the VI clearer than a text explanation.

 

I'm using a PXIe-5663, and RFSA 2.4.0.

0 Kudos
Message 3 of 6
(6,469 Views)

gsa,

 

From what I can tell going through the different functions, for a given acquisition and hardware configuration, those two sets of scaling values should be the same. Different values will be computed based on the acquired values and hardware configuration, so could you explain a bit more about how you are configuring the actual acquisition steps for the 5663? There could be something in the configuration steps that is causing the changes we are seeing. Also, are you trying to use these values to scale the values after they are fetched?

 

Timothy S.
Senior Technical Support Engineer
0 Kudos
Message 4 of 6
(6,448 Views)

Hi Timothy,

 

 

To setup a measurement I call the following sequence of functions:
niRFSA_ConfigureReferenceLevel,  -20dBm
niRFSA_ConfigureRefClock, OnboardClock, 10e6
niRFSA_ConfigureIQCarrierFrequency, 975e6
niRFSA_ConfigureIQRate, 64e6
niRFSA_ConfigureNumberOfSamples, 131072
niRFSA_Commit
To start the measurement I then call niRFSA_Initiate.
Then niRFSA_CheckAcquisitionStatus is called repeatedly until it indicates
that data is available.
When data is available I call niRFSA_FetchIQSingleRecordComplexI16
to get the int16 complex data.
I then call niRFSA_GetScalingCoefficients to get the scaling coefficients and
find that the gain and offset values are different than those returned in
niRFSA_FetchIQSingleRecordComplexI16. I added this call to niRFSA_GetScalingCoefficients
since the results I was getting with the gain returned by niRFSA_FetchIQSingleRecordComplexI16
wasn't producing the correct result.
I then use the gain and offset values to scale the int16 complex values into real32 complex values.
I'm puzzled as to why the scaling coefficients are different between 
niRFSA_GetScalingCoefficients and niRFSA_FetchIQSingleRecordComplexI16.
For this setup the gain value returned by niRFSA_GetScalingCoefficients is 2.88301e-5
and the gain value returned by niRFSA_FetchIQSingleRecordComplexI16 is 4.61151e-6. 
When I apply either of these gain values to the data and compute the spectrum my
signal amplitudes are not correct.
Hope this help,
Gary

 

0 Kudos
Message 5 of 6
(6,437 Views)

Gary,

 

Thank you for the code there for me to work with. This issue has been moved in to a service request, so lets focus on working from that side of things. I'll keep this thread updated once we can get to the root cause of the issue. Thanks.

Timothy S.
Senior Technical Support Engineer
0 Kudos
Message 6 of 6
(6,426 Views)