### Where To Find This Example

Select **Help > Open Examples...** from the menus and type either the example name listed above or one of the keywords below.

Or in Version 13 or higher you can open the project directly from this page using this button. Make sure to select the **Enable Guided Help** before clicking this button.

### Design Notes

**EM Optimization of a Power Amplifier Output Matching Network**

This project shows the output matching network of a power amplifier, and demonstrates how EM optimization can be used to ensure the desired matching impedance at the operating frequency and its harmonics.

__Overview__

Power amplifier output matching networks are difficult to simulate accurately with standard circuit element models, because they tend to be large, and include closely spaced discontinuities. Such structures support non-TEM mode waves, particularly at higher frequencies such as harmonics of the amplifiers operating frequency. Matching at harmonics can significantly affect amplifier performance, so EM simulation should be used to ensure accurate modeling of the network at higher frequencies.

This example focuses only on the EM optimization task: to make the EM simulation results match the desired impedance values at the output fundamental, 2^{nd}, and 3^{rd} order harmonics.

The circuit element model parameters were already optimized to achieve the desired matching impedance at the fundamental, 2^{nd}, and 3^{rd} order harmonics of the output. Then the network was set up for extraction, so that it can be simulated and optimized using Axiem.

To start the optimization, click the **Start** button in the **Optimizer** window. Depending on computing power, the optimization may take as long as 2 minutes or more. The Discrete Local Search optimizer is ideal for this type of problem as no points are ever simulated twice. Additionally, using this optimizer eliminates the need for discrete variables to set the parameter values. This exercise is left to the user.

__Desired_Gamma__

In this schematic, the desired gamma values at the fundamental, 2^{nd}, and 3^{rd} order harmonics are entered into a properly terminated **HBTUNER** element as parameters. These values may be supplied by the manufacturer of the transistor, or may be arrived at by using the **HBTUNER** or **HBTUNER2** element, and simulated load-pull analyses.

__Simulated_Gamma__

This schematic is the output matching network. The circuit element model parameters were already optimized to achieve the desired matching impedance at the fundamental, 2^{nd}, and 3^{rd} order harmonics of the output. Then the network was set up for extraction, so that it can be simulated and optimized using Axiem.

The equations in this schematic have been set up to keep the layout geometries on the same 20mil grid as the extracted EM structure. The “res” variable sets the resolution, and the “grid” variable is an array (or vector) of numbers, from 0 to 1.2” in 20mil increments. The dimension variables all point to specific indices of “grid”, so they can only take on values that are in that vector. Finally, “res” is also used to specify the **X_Cell_Size** and **Y_Cell_Size** parameters in the **EXTRACT** block, which sets up the EM structure.

You can disable the **EXTRACT** block and simulate to see the results using the models, and re-enable it to see the results EM simulation. The results match closely at the 2GHz fundamental, but differ at the harmonics.

__Difference Between Simulated and Desired_Gamma__

This graph uses the **SMODEL** measurement to show the difference between the s11 of the “Simulated_Gamma” and “Desired_Gamma” schematics. Although it is displayed in dB, this is the difference between the complex values, not just the magnitudes. The optimization goal is to make the difference lower than -50dB.

__Match at Harmonics__

__Phase and Magnitude__

These graphs show the gamma of the two schematics for comparison, on a Smith chart and a rectangular graph, respectively.