Hi Marc_A,
There are several differences between peak power and average power, I think it's worth addressing several of them here. To summarize the notes below, you'll likely just need to divide your I/Q data by sqrt(2). I've added a couple of other notes about switching from average power to peak power that may be helpful but are only applicable in specific cases.
The help documentation is very confusing on this; it required a fair amount of time to pull this information out. When in average power mode, the I/Q data is scaled from -1 to 1, while in peak power mode, the peak power is scaled from -1 to 1. Peak power is given by sqrt(I^2+Q^2), meaning that if your I/Q data is scaled from -1 to 1, your peak peak power will be scaled from 0 to sqrt(2). To compensate, you'll need to divide your I/Q data by sqrt(2); I've attached a VI that does both peak and average power for arbitrary waveforms. This VI isn't built on script mode, but it should show how to manipulate your I/Q data to compensate for peak mode.
One thing to be wary of with average power vs. peak power; when in average power mode, the driver will scale I/Q data from whatever range it is in to the -1 to 1 range. For example, in average power mode, if my I/Q data is scaled from -1 to 1 and I set the power level to be -20 dBm, my signal's maximum output will be -20 dBm. Also, if my I/Q data is in the -0.5 to 0.5 range and the power level to be -20 dBm, the driver will still assume we want a maximum power of -20 dBm and scale my I/Q data by a factor of 2; I will still see -20 dBm as my output. Average power always sets your signal to the power level requested and scales the I/Q data to match.
This is not the case with the peak power case. With peak power, the driver does not scale the peak power to -1 to 1 for you, it instead leaves it the way it is. If you're coming from the average power case, this problem can manifest itself in three ways:
- Lower than expected power levels. If your I/Q data is scaled from -0.5 to 0.5 and specify a power level of -20 dBm, you'll get a lower than expected power level, around 6 dB lower.
- Error being thrown if the highest magnitude of your I/Q data is greater than 1. If we forget to divide by sqrt(2), this will likely occur. Average power mode will allow you to specify any range you want (even -100 to 100), but peak power will not allow you to select anything greater than a peak power of 1.
- Unexpected power levels if using multiple waveforms. In average power mode, if the waveforms have different ranges, the driver will match them all to the specified power level. Therefore, in average power mode, all of our waveforms will have the same power level unless we change the power setting as well. However, in peak power mode, if the waveforms have different ranges, they will be different power levels since the driver does not scale to the -1 to 1 range.
To summarize: as long as your I/Q data is scaled from -1 to 1, all you need to do is divide it all by sqrt(2). The last 3 notes are caveats only if your data wasn’t scaled from -1 to 1 originally.
Thanks,
David Bell
National Instruments
Applications Engineer