Tutorial: Coax to Waveguide Adapter


 * Simulation time: ~5 minutes
 * Download the latest matlab file:

We will cover in this tutorial:
 * Setup of the FDTD parameters for waveguide
 * Setup of the inhomogeneous FDTD mesh
 * Devices with ports with different characteristic impedance
 * Visualizing the Electric field in the time domain with Matlab

Excitation Setup
This tutorial uses the same layout as the other tutorials. Only the key points to be illustrated will be covered here.

Setup the FDTD parameters
In FDTD there is a conflict between using a wide frequency band pulse and the cutoff frequency of the waveguide. In FDTD, we prefer to use a wide frequency band pulse to study a broad range of frequencies and to shorten the simulation time. Waveguide has a cutoff frequency below which the wave will not propagate. In this example using WR-75 waveguide, the cutoff frequency is 7.87 GHz. The standard operating band is 10 to 15 GHz, which is not that far from the cutoff frequency. The only choice to study frequencies down to 10 GHz is to use a narrow frequency band of 10 to 15 GHz. Using 10 to 20 GHz is too wide, resulting in frequencies below cutoff frequency. The end result is the energy never decays out of the system and the post processing results are garbage. Simply using the standard operating band for the standard waveguide sizes with the code below will produce good results.

Setup the inhomogeneous grid
Other simulation techniques, such as finite elements, allow use of tetrahedral polygons to exactly represent curved surfaces. In FDTD, only rectangular cells are permitted. This forces use of a finer mesh to model curved surface regions in order to reduce the stair-casing effect caused by discretizing the curved surface into a rectangular grid. Unfortunately this smaller cell size causes longer simulation time. On the other hand, the total number of cells can be greatly reduced because FDTD allows a non homogeneous grid. The restriction is that neighboring cells cannot vary in dimension more than a factor of 2. The SmoothLines2 function is used to produce the locally dense mesh as well as gradually transition from the small cell size to the regular cell size of the problem. In this example, the neighbor cell dimension transition factor is set to 1.3

Modeling devices with different characteristic impedances at each port
This is the key problem that is illustrated in this tutorial. In this example, the coax portion has a constant impedance of 50 ohms. However, the waveguide characteristic impedance is a function of frequency and it is typically a few hundred ohms. This presents a problem in the calculation of S21 because both ports do not have the same impedance. In the example, port 1 is the coax port and port 2 is the waveguide port. The calculation of S11 is standard. However, to the standard S21 calculation (port{2}.uf.ref./port{1}.uf.inc)a front multiplication factor is added which is the square root of the ratio of the characteristic impedances at each frequency of each port).  After simulation, you will notice that the S21 is about 0.1 dB even though this is set up as a lossless device.  This is due to discretization errors of the coaxial structure in the rectangular grid which cause the impedance of the coax port to be about 50.7 ohms instead of 50 ohms.

Visualization of the electric field in the time domain using Matlab
This is a great tool for debugging problems that may have occured in the simulation, for example, if the absorbing and PEC boundaries were accidently switched, you can see this by looking at the movie of the E field in the time domain.

The following code snippet is the set up before the simulation engine is run. SubSampling '4,4,4' indicates that only every 4th value is saved to the file in order to save disk space.

The following code snippet is in the post processing section and is where the move is actually displayed. PlotArgs.slice is where the x, y, and z planes are positioned to display the electric field. In this example, the x and y planes are placed in the midle of the waveguide.