- Created by Josh Moore, last modified by Subas Dhungana on Mar 08, 2021

## CONSTPOUT - Constant Output Power

#### How does the CONSTPOUT block work?

The CONSTPOUT block uses optimization to servo the input power (starting with the input power level specified in the schematic) to find the specified output power

#### That CONSTPOUT stuff sounds simple, so why am I having problems?

There are three common issues that users find with the CONSTPOUT block:

- It is important to not sweep input power when using the CONSTPOUT block. The CONSTPOUT block will automatically servo the input power to find the specified output power. Thus, the extra sweep points all have the same answers but cause the simulation to take extra time.

- During the optimization, the input power is limited by the CONSTPOUT block MAX parameter which specifies that the maximum input source scale factor (in W or V depending on the specified source).
- For example, if the input power level specified on the schematic is 0 dBm and MAX=100 then the input power level is limited to 20 dBm when searching for the specified output power (0 dBm → 1 mW, 1 mW * 100 = 100 mW, 100 mW → 20 dBm).

- For example, if the input power level specified on the schematic is 0 dBm and MAX=100 then the input power level is limited to 20 dBm when searching for the specified output power (0 dBm → 1 mW, 1 mW * 100 = 100 mW, 100 mW → 20 dBm).
- The optimization does not find the desired output power before hitting the XDB block MAX_ITER number of iterations
- This can be caused by the optimization getting limited by MAX as discussed above, or, like any optimization, simply not having enough iterations to converge on the specified answer, or, because the specified output power is not achievable.

The good news is that all of these are easy to diagnose by inspecting the simulation output file link in the Status Window.

#### How do I read the CONSTPOUT simulation output file?

First, find the link to the output file in the Status Window (the Output - file link below) and click on it which will open the output file in AWRDE.

Simulation - NLN:CONSTPOUT.AP_HB.$FDOC 1:49:10 PM Begin Simulate 1:49:10 PM Freq - 3 points 1:49:10 PM Netlist - file://C:\My Dropbox\awr\appdata\jomoore\13.0\temp\Curtice_model_gain_expansion\NLN_CONSTPOUT.AP_HB.$FDOC\mwo_aplac_netlist.i 1:49:10 PM Output - file://C:\My Dropbox\awr\appdata\jomoore\13.0\temp\Curtice_model_gain_expansion\NLN_CONSTPOUT.AP_HB.$FDOC\mwo_aplac_output.txt 1:49:11 PM End Simulate (0.50s)

The file shows the specified output power optimization results for each sweep point. The final output power and input power scaling are shown on the last ITER line of each sweep point.

SWPVAL 1, INITIAL SCALE = 1.000 ITER = 1, POUT =-18.648 dBm, SCALE = 1.210 ITER = 2, POUT =-17.181 dBm, SCALE = 1.688 . . . ITER = 10, POUT = 7.998 dBm, SCALE = 181.185 SWPVAL 2, INITIAL SCALE = 181.185 ITER = 1, POUT = 7.953 dBm, SCALE = 170.233 ITER = 2, POUT = 7.895 dBm, SCALE = 168.880 ITER = 3, POUT = 8.000 dBm, SCALE = 171.342 SWPVAL 3, INITIAL SCALE = 171.342 ITER = 1, POUT = 8.259 dBm, SCALE = 167.006 ITER = 2, POUT = 8.005 dBm, SCALE = 161.251

#### How do I spot problems in the CONSTPOUT simulation output file?

If the CONSTPOUT block fails to converge one of the likely causes is that the input power scaling is limited. This is easy to see in the simulation output file as the optimizer will get "stuck" trying to raise the scale value higher than allowed by the CONSTPOUT block MAX parameter value. In the example below POUT = 8 dBm and MAX = 100. As can be seen in the data, the output power search "gives up" because of the scale limit.

SWPVAL 1, INITIAL SCALE = 1.000 ITER = 1, POUT =-18.656 dBm, SCALE = 1.208 ITER = 2, POUT =-17.241 dBm, SCALE = 1.665 . . . ITER = 100, POUT = 3.785 dBm, SCALE = 100.000 ITER = 101, POUT = 3.785 dBm, SCALE = 100.000 ITER = 102, POUT = 3.785 dBm, SCALE = 100.000 APLAC 9.10 WARNING: MinMax optimization terminated due to maximum number of cycles (OPT_CYCLES) at sweep point 1 (Freq=2.2 GHz)

Another likely cause is that the optimizer stopped before finding the specified answer due to the CONSTPOUT block MAX_ITER parameter limiting the number of iterations such that the optimizer has not yet had time to find the user specified output power. In the example below POUT = 8 dBm, MAX = 10000, and MAX_ITER = 4. As can be seen in the data, 4 iterations were not sufficient for the optimizer to find the specified output power so the analysis failed.

SWPVAL 1, INITIAL SCALE = 1.000 ITER = 1, POUT =-1.179 dBm, SCALE = 3.120k ITER = 2, POUT =-5.655 dBm, SCALE = 2.381k ITER = 3, POUT =-4.807 dBm, SCALE = 23.691 ITER = 4, POUT =-4.520 dBm, SCALE = 25.017 APLAC 9.10 WARNING: Random optimization terminated due to maximum number of cycles (OPT_CYCLES) at sweep point 1 (Freq=2.2 GHz)

The last likely cause is that optimizer stopped before finding the specified answer because the specified output power is not achievable for one of the sweep points. In the example below POUT = 20 dBm but the DUT has a PSAT = 17.2 dBm. As can be seen in the data, the optimizer tried until it reached the maximum number of iterations and scaled the input power to a high value but could not reach the specified output power.

SWPVAL 1, INITIAL SCALE = 1.000 ITER = 1, POUT =-18.649 dBm, SCALE = 1.210 ITER = 2, POUT =-17.188 dBm, SCALE = 1.685 ITER = 3, POUT =-14.845 dBm, SCALE = 2.857 . . . ITER = 101, POUT = 17.195 dBm, SCALE = 747.433 ITER = 102, POUT = 17.200 dBm, SCALE = 742.745 APLAC 9.10 WARNING: MinMax optimization terminated due to maximum number of cycles (OPT_CYCLES) at sweep point 1 (Freq=2.2 GHz)

## XDB - User Specified Compression Point

#### How does the XDB block work?

The XDB block performs several different analyses. The first analysis subtracts the specified XDB block GAIN_BACKOFF parameter from the input power level to compute the linear gain at every sweep point. If compression is defined from maximum gain rather than linear gain then the next analysis uses optimization to find the maximum gain. During the optimization, the input power starts at the input power level specified on the schematic and ramps up to find the maximum gain. The last analysis uses optimization to find the specified compression. During the optimization, the input power ramps up from the input power level specified on the schematic when compression is relative to linear gain and ramps up from the maximum gain point when compression is defined relative to the maximum gain.

#### That XDB stuff sounds simple, so why am I having problems?

There are three common issues that users find with the XDB block:

- It is important to not sweep input power when using the XDB block. The XDB block will automatically servo the input power to find the linear gain, max gain, and specified compression points. Thus, extra sweep points that all have the same answers is the best possible result when sweeping input power with an XDB block. Setting up a simulation that converges poorly (due to the initial input power level - see the Implementation Details of the XDB help page for additional details) at some power levels is likely to result when sweeping input power with an XDB block.

- During each optimization, the input power is limited by the XDB block MAX parameter which specifies that the maximum input source scale factor (in W or V depending on the specified source).
- For example, if the input power level specified on the schematic is 0 dBm and MAX=100 then the input power level is limited to 20 dBm when searching for the maximum gain or specified compression point (0 dBm → 1 mW, 1 mW * 100 = 100 mW, 100 mW → 20 dBm).

- For example, if the input power level specified on the schematic is 0 dBm and MAX=100 then the input power level is limited to 20 dBm when searching for the maximum gain or specified compression point (0 dBm → 1 mW, 1 mW * 100 = 100 mW, 100 mW → 20 dBm).
- The second is that the optimization does not find the desired compression point before hitting the XDB block MAX_ITER number of iterations
- This can be caused by the optimization getting limited by MAX as discussed above; or, like any optimization, simply not having enough iterations to converge on the specified answer.

The good news is that all of these are easy to diagnose by inspecting the simulation output file link in the Status Window.

#### How do I read the XDB simulation output file?

First, find the link to the output file in the Status Window (the Output - file link below) and click on it which will open the output file in AWRDE.

Simulation - NLN:XDB.AP_HB.$FDOC 10:41:19 AM Begin Simulate 10:41:19 AM Freq - 11 points 10:41:19 AM Netlist - file://C:\My Dropbox\awr\appdata\jomoore\13.0\temp\Curtice_model_gain_expansion\NLN_XDB.AP_HB.$FDOC\mwo_aplac_netlist.i 10:41:19 AM Output - file://C:\My Dropbox\awr\appdata\jomoore\13.0\temp\Curtice_model_gain_expansion\NLN_XDB.AP_HB.$FDOC\mwo_aplac_output.txt 10:41:20 AM End Simulate (0.87s)

The first section of the file shows the input power used to find the linear gain and the linear gain values computed for each sweep point. Any simulation warnings will appear only under the first sweep point.

FIND SMALL SIGNAL GAIN POWER IN=-80.000 dBm SWPVAL 1 LINEAR GAIN = 472.011mdB SWPVAL 2 LINEAR GAIN = 943.270mdB SWPVAL 3 LINEAR GAIN = 1.393 dB

The next section of the file shows the maximum gain optimization results if the XDB block is calculating compression from maximum gain. If the XDB block is set up to calculate compression from linear gain that this section will not be in the output file. Note that the maximum gain point and input power scaling (from the input power defined on the schematic) that generates the maximum gain are shown on the last ITER line of each sweep point.

FIND MAX GAIN SWPVAL 1 ITER =1, MAX GAIN = 739.169mdB, DELTA = 267.158mdB, POWER IN =-12.093 dBm, SCALE = 6.175 ITER =2, MAX GAIN = 978.818mdB, DELTA = 506.807mdB, POWER IN =-9.242 dBm, SCALE = 11.906 . . . ITER =42, MAX GAIN = 9.031 dB, DELTA = 8.559 dB, POWER IN = 7.263 dBm, SCALE = 532.436 SWPVAL 2 ITER =1, MAX GAIN = 1.203 dB, DELTA = 259.453mdB, POWER IN =-12.093 dBm, SCALE = 6.175 ITER =2, MAX GAIN = 1.436 dB, DELTA = 493.117mdB, POWER IN =-9.242 dBm, SCALE = 11.906 . . . ITER =48, MAX GAIN = 9.311 dB, DELTA = 8.368 dB, POWER IN = 7.086 dBm, SCALE = 511.178 SWPVAL 3 ITER =1, MAX GAIN = 1.648 dB, DELTA = 254.644mdB, POWER IN =-12.093 dBm, SCALE = 6.175 ITER =2, MAX GAIN = 1.878 dB, DELTA = 485.021mdB, POWER IN =-9.242 dBm, SCALE = 11.906 . . . ITER =46, MAX GAIN = 9.626 dB, DELTA = 8.233 dB, POWER IN = 6.886 dBm, SCALE = 488.194

The last section of the file shows the specified gain compression optimization results. If the XDB block is set up to calculate compression from linear gain then the linear gain for each sweep point will be displayed on the SWPVAL line. Similarly, If the XDB block is setup to calculate gain compression from maximum gain then the maximum gain for each sweep point will be displayed on the SWPVAL line. The DELTA value on each ITER line shows the difference between the maximum gain or linear gain for the current input power (i.e. the amount of compression). As with the maximum gain optimization results above the final gain, amount of compression and input are shown on the last ITER line of each sweep point.

FIND 1 dB GAIN COMPRESSION SWPVAL 1, MAX GAIN = 9.031 dB, MINIMUM SCALE = 532.436 , INITIAL SCALE = 1.198k ITER = 1, GAIN = 6.496 dB, DELTA = 2.535 dB, POWER IN = 10.145 dBm, SCALE = 1.034k ITER = 2, GAIN = 7.146 dB, DELTA = 1.886 dB, POWER IN = 9.634 dBm, SCALE = 919.261 ITER = 3, GAIN = 8.091 dB, DELTA = 940.480mdB, POWER IN = 8.983 dBm, SCALE = 791.282 ITER = 4, GAIN = 8.158 dB, DELTA = 873.343mdB, POWER IN = 8.938 dBm, SCALE = 783.114 ITER = 5, GAIN = 8.031 dB, DELTA = 1.000 dB, POWER IN = 9.023 dBm, SCALE = 798.634 SWPVAL 2, MAX GAIN = 9.311 dB, MINIMUM SCALE = 511.178 , INITIAL SCALE = 798.634 ITER = 1, GAIN = 8.274 dB, DELTA = 1.037 dB, POWER IN = 8.946 dBm, SCALE = 784.515 ITER = 2, GAIN = 8.311 dB, DELTA = 1.000 dB, POWER IN = 8.922 dBm, SCALE = 780.160 SWPVAL 3, MAX GAIN = 9.626 dB, MINIMUM SCALE = 488.194 , INITIAL SCALE = 780.160 ITER = 1, GAIN = 8.567 dB, DELTA = 1.059 dB, POWER IN = 8.822 dBm, SCALE = 762.452 ITER = 2, GAIN = 8.626 dB, DELTA = 1.000 dB, POWER IN = 8.785 dBm, SCALE = 755.884

#### How do I spot problems in the XDB simulation output file?

If the XDB results are unrealistic the most likely cause is that the input power scaling is limited. This is easy to see in the simulation output file as the optimizer will get "stuck" trying to raise the scale value higher than allowed by the XDB block MAX parameter value. In the example below MAX=500 and, as can be seen in the data, the max gain search "gives up" because of the scale limit.

FIND MAX GAIN SWPVAL 1 ITER =1, MAX GAIN = 728.268mdB, DELTA = 256.258mdB, POWER IN =-12.277 dBm, SCALE = 5.919 ITER =2, MAX GAIN = 933.092mdB, DELTA = 461.082mdB, POWER IN =-9.667 dBm, SCALE = 10.798 . . . ITER =47, MAX GAIN = 8.867 dB, DELTA = 8.395 dB, POWER IN = 6.990 dBm, SCALE = 499.999 ITER =48, MAX GAIN = 8.867 dB, DELTA = 8.395 dB, POWER IN = 6.990 dBm, SCALE = 499.999 ITER =49, MAX GAIN = 8.867 dB, DELTA = 8.395 dB, POWER IN = 6.990 dBm, SCALE = 499.999 SWPVAL 2

If the XDB simulation gives warnings about optimization terminated due to maximum number of cycles then it is important to look at the gain compression optimization section of the output file and see if the maximum number of cycles has been reached because the XDB block MAX parameter is limiting the input power scaling or if the optimizer simply needs more iterations to converge (as shown below). The maximum number of iterations is controlled by the XDB block MAX_ITER parameter.

SWPVAL 1, MAX GAIN = 9.031 dB, MINIMUM SCALE = 532.436 , INITIAL SCALE = 1.198k ITER = 1, GAIN = 6.496 dB, DELTA = 2.535 dB, POWER IN = 10.145 dBm, SCALE = 1.034k ITER = 2, GAIN = 7.146 dB, DELTA = 1.886 dB, POWER IN = 9.634 dBm, SCALE = 919.261 ITER = 3, GAIN = 8.091 dB, DELTA = 940.462mdB, POWER IN = 8.983 dBm, SCALE = 791.280 ITER = 4, GAIN = 8.158 dB, DELTA = 873.301mdB, POWER IN = 8.938 dBm, SCALE = 783.109 APLAC 9.10 WARNING: MinMax optimization terminated due to maximum number of cycles (OPT_CYCLES) at sweep point 1 (Freq=2.2 GHz)

#### What should I do if none of this helps?

Please contact technical support at `Getting AWR Technical Support.`