- bbowar June 23, 2015 at 2:53 pm
I am writing a routine to calculate channel power using the SA44B. As part of the calculation I need the noise bandwidth of the resolution bandwidth filter. I have seen values for other spectrum analyzers that are a function of the RBW setting (for example 1.05*RBW). What should I use for the SA44B?Andrew June 24, 2015 at 9:15 am
We use custom size flattop windows to achieve our RBWs, which means the noise bandwidth will be dependent on the current RBW. You will need to calculate the noise bandwidth of our window function like this.
// rbw = current resolution bandwidth
// log2 = log base 2
// pow2 = 2 ^ value
double min_bin_sz = rbw / 3.2;
double min_fft = 486111.111 / min_bin_sz;
int order = (int)ceil(log2(min_fft));
int fft_size = pow2(order);
double noise_bw = (rbw * (double)fft_size) / 486111.111;
This could probably be simplified a bit more as well.
Just to verify, here is how we calculate channel power in our software to compare against.
1) Set Average Detector and Power video units
2) Get sweep
3) Convert frequency range to power units (W)
4) Sum frequency range of interest in power units
5) Divide sum by the window bandwidth (or noise bandwidth) as calculated above.
Let me know if you have any further questions
A.J.bbowar June 25, 2015 at 1:38 pm
Thanks for the noise bandwidth information. I now get the same channel power reading as SPIKE.
Justin CrooksModeratorJustin Crooks June 26, 2015 at 9:36 am
Bbowar, to simplify the thought process, we use wide flat top windows, so the noise bandwidth is very close to the resolution bandwidth.bbowar May 16, 2016 at 6:56 am
We just took delivery of a BB60C unit and I would like to make the same channel power measurement that I am doing with the SA44B. Is the algorithm for computing noise bandwidth of the BB60C different than the SA44B?
Justin CrooksModeratorJustin Crooks May 16, 2016 at 9:07 am
The algorithm is basically the same, but with the SA44B, software image and spur rejection is on by default, and this can cause inaccuracies if the signal changes rapidly. The BB60C defaults to using only hardware image and spur rejection, so it is immune from this added measurement error, and will be more accurate for dynamic, real-world signals.
sstreeterParticipantsstreeter July 24, 2016 at 4:05 pm
Hi Signal Hound,
I’ve an SA44B spectrum analyzer and have generated a list of BBR binary files that I’m converting into spectrograms using a Python script. I’m trying to calculate the total signal power as well, so needless to say, this thread is extremely useful for my application too.
I’ve one question regarding the workflow that A.J. presented on June 24. Specifically, in the five steps that the Signal Hound software uses to calculate total signal power, I need a little clarification on step 3. The conversion of dBm (or dBm/Hz) to watts and the summing along the entire trace is straight forward. I just want to verify whether or not I must do a slightly more complicated calculation, namely dBm/(bin size in Hz) to watts and then sum along the entire trace. The calculation this latter case?
SamAndrew July 25, 2016 at 10:25 am
The process is similar for the SA44B except there are a few things you need to be aware of.
You will need to disable the software spur rejection to be able to make accurate channel power measurements. This can be disabled in the “Settings” menu. The SA44B enables this setting by default.
Average detector and Power video units should still be set.
If the traces are stored in dBm units, then steps 3,4,5 will apply.
Since I have posted the steps above, I have a simplified approach to approximating the window bandwidth. This will be possible as well with the BBR files as well.
The window bandwidth can be approximated as
WB = rbw / bin_size(freq between each spectrum bin)
Both RBW and bin size are stored in the BBR file.
I will attach two files that we use as examples for customers.
One is for calculating channel power, the other is for parsing BBR files.
Let me know if you have additional questions or need clarifications.
[Edited to fix upload errors]
dmyersParticipantdmyers January 31, 2018 at 1:35 pm
I am trying to use the contents of a sweep array to calculate a total power, I’ve followed the guidelines you’ve provided above to the limits of my understanding.
Would you please look over the attached pseudo code and let me know where I am going wrong?
DavidAndrew January 31, 2018 at 3:05 pm
I think the biggest issue I see is that since you specified a linear scale output from the API, the sweep is in the units of mV. In the Spike software we specify a log scale output and then convert each sweep bin to mW (power units) before summing them up, and then convert the final result back to dBm. If you want to stay with the linear scale (mV) output from the API, just square each sweep bin before summing.
I will attach a file I have sent others from the Spike software. It has some additional details that are irrelevant here, such as only summing up the power in a range specified by the user, but you will notice the same logic for summing the bins as mW and then dividing by the window bandwidth.
If you aren’t already, you can test the output of your code to the values Spike provides. Assuming similar channel widths, it should match very closely.
dmyersParticipantdmyers January 31, 2018 at 3:19 pm
Andrew, thank you for the timely reply.
Could you help me to understand the effect of bbConfigureProcUnits(d_handle, BB_POWER) in my example code?
Does this not cause sweep to be returned from bbFetchRealTimeFrame(d_handle, &sweep, &frame) as any array of mW values rather than mV?Andrew January 31, 2018 at 4:26 pm
The bbConfigureProcUnits() refers to the video processing units, “Video Units” in the Spike software. For channel power you will want to set this value to power as you were. The detector should be set to average, and the scale in the bbConfigureAcquisition() function should be set to BB_LOG_SCALE. You have the scale set to BB_LIN_SCALE, which is what changes the output units from dBm to mV.
You must be logged in to reply to this topic.