# Trace Impedance Calculator for Microwave, RF, and PCB Designs

## Introduction and Motivation

Transmission line impedance has long been an important subject for microwave and RF engineers. With the advancement in digital technologies, especially when the clock and/or data rate reached multiple gigahertz (GHz), designers of printed circuit board (PCB) and package have to care about the trace impedance in order to maintain the signal integrity (SI). The demand for impedance calculators rises dramatically.

I wrote several trace impedance calculators before and deployed on my EE Circle website. The core of those applets were all based on empirical formulas that are available in the transmission line handbook. I got user feedback from time to time complaining about the accuracy of those calculators. I realized that there were no easy fixes unless I study the problem thouroughly in the context of solving Maxwell's equations for 2D geometry. Three years ago, I started the quest of finding a better solution in my spare time. The result is this Trace Impedance Analyzer applet. My goal is to make it versatile and accurate. Hopefully, it will be adopted by my colleagues who need to know the characteristic impedance for single, coupled, or multi-trace transmission-line structures.

## System Requirement

This applet employs many Java Swing elements that requires the browser support of J2SE (JDK) 1.2 or higher. If needed, please visit Sun's website to dowload the latest JRE installation with browser plug-in.

## Basic Assumptions

• This applet emphasizes the characteristic impedance (matrix form for multi-line system)
• Phase velocity and effective dielectric constant values are also reported
• It automatically detects a differential pair and correspondingly reports the odd/even mode and differential/common mode impedances
• This applet solves only a lossless problem. Losses induced by dielectric and metal (caused by finite conductivity and skin efect) are ignored
• In this release, all trace conductors are assumed to have rectangular cross sections
• A metal layer is anchored on the boundary of two adjacent dielectric layers
• All dielectric layers are indexed starting with "1" at the top
• All metal layers are indexed starting with "1" at the top
• User can specify "trace above boundary" to allow the bottom side of the metal layer aligning with the boundary, or "trace below boundary" to indicate the top side of the metal layer aligning with the boundary
• It is strongly recommended to maintain the relationship of (Number of dielectric layer) = (Number of metal layer) + 1
• The top-most and/or the bottom-most dielectric layers can be used to describe the solder mask layers
• If the top-most and/or the bottom-most dielectric layers are not needed, just assign er = 1 to them with any non-zero thickness

## Features

• No limitation on the number of metal layers and dielectric layers. In other words, this applet solves the multi-conductor transmission line system in a layered (stratified) dielectric environment
• No limitation on the number of metal traces. Traces need not be on the same layer.
• Allowing the user to specify whether if a trace is grounded. This is very useful in defining the return paths for CPW, or guard/shield traces in the design
• User needs not know the classifications of the special transmission line configurations formed by the traces, such as
• Microstrip
• Stripline (edge coupled and broad-side coupled)
• Co-Planar Waveguide (CPW)
• Guard trace width is always finite
• Optional ground backing and/or ground cover
• Hybrid structures such as
• Traces resembling microstrip or stripline but in different layers
• Four traces forming edge coupled as well as broad-side coupled CPW's
• Design can be saved in two files
• Layer stackup defintion, or technology file, using the EE Circle format
• Trace defintions using the EE Circle format
• User can choose diffenerent length units for stackup (Unit z) and traces (Unit x). The allowable units are: inches, cm, mm, mil, um, and nm

## Graphical User Interface

For a first-time user, it is highly recommended to get familiar with the GUI. It may even be more helpful to print a hard copy while using the above applet.

## Benchmarking

Getting numbers are easy, getting correct number are not. The following pages illustrate the accuracy of this tool in agreement with published data to within 3% of error. Each page has embeded a specialized version of Trace Analyzer applet. User can also use them as templates.

Another example, interesting but not benchmarked, contains four traces that are broad-side coupled CPW lines.

## Stackup and Trace Defintion File Formats

### Comment Statement

In both stackup and trace files, any line starting with the "#" sign is a comment statement.

### Layer Stackup (Technology) File Format

User can specify the unit in the z-direction by a statement in form of

Unit unit_name

where unit_name can be one of the followings: {in, cm, mm, mil, um, nm}.

All materials used in a specific layer stackup have to be defined. A material definition is in form of

material material_name

type = type

er = er

tand = tanD

mr = mr

sigma = sigma

;

where

• material_name: Any name. But, it has to be in one word
• type: either "conductor" or "insulator"
• er: relative permittivity (dielectric constant)
• tanD: loss tangent
• mr: relative permeability
• sigma: conductivity in (S/m). It is important only for conductor, may use 0 for insulator

Then, the stackup file contains several interleaved dielectric and metal layer definition statements.

A dielectric layer is specified by

layer material_name

thickness = thickness

;

where material_name should be among the defined dielectric material names. thickness is a numerical value measured by the z unit.

A metal layer is specified by

layer material_name
index = metal_layer_index
thickness = thickness
under_cut = 0.0
trace_over_boundary = yes_or_no
# between dielctric Layers 1 and 2
z_offset = 0.0
;

where material_name should be among the defined conductor material names. metal_layer_index is an integer value (The top layer has index 1). thickness is a numerical value measured by the z unit. yes_or_no for the "trace_over_boundary" attribute can be "yes" if the trace bottom side coincide with the dielectric layer boundary, or "no" if the trace top side align with the dielectric layer boundary.

#### An Example Stackup File for Microstrip:

```# Tech file content
# generated by EE Circle TraceAnalyzer
# on 9-29-2004 at 11:20
# Unit
Unit mil
# BEGIN material Copper
material Copper
type = conductor
er = 1.0
tand = 0.0
mr = 1.0
sigma = 7.0E7
;
# END material Copper
# BEGIN material Er_4.7
material Er_4.7
type = insulator
er = 4.7
tand = 0.02
mr = 1.0
sigma = 0.0
;
# END material Er_4.7
# BEGIN material air
material air
type = insulator
er = 1.0
tand = 0.0
mr = 1.0
sigma = 0.0
;
# END material air
# BEGIN material Er_5.23
material Er_5.23
type = insulator
er = 5.23
tand = 0.02
mr = 1.0
sigma = 0.0
;
# END material Er_5.23
# BEGIN material FR4
material FR4
type = insulator
er = 4.2
tand = 0.02
mr = 1.0
sigma = 0.0
;
# END material FR4
# 1: The 1-th dielectric layer
layer air
thickness = 10.0
;

# 2: The 1-th metal layer
layer Copper
index = 1
thickness = 2.8
under_cut = 0.0
trace_over_boundary = yes
# between dielctric Layers 1 and 2
z_offset = 0.0
;

# 3: The 2-th dielectric layer
layer Er_5.23
thickness = 8.0
;

# 4: The 2-th metal layer
layer Copper
index = 2
thickness = 5.0
under_cut = 0.0
# constructed with entire_plane
trace_over_boundary = yes
trace_over_boundary = no
# between dielctric Layers 2 and 3
z_offset = 0.0
;

# 5: The 3-th dielectric layer
layer air
thickness = 10.0
;
```

### Trace File Format

User can specify the unit in the x-direction by a statement in form of

Unit unit_name

where unit_name can be one of the followings: {in, cm, mm, mil, um, nm}.

Next, the total number of traces is specified by a statement in form of

Num number_of_traces

Then, each trace is specified by

Trace metal_layer_index x_left width s_or_g;

where

• metal_layer_index: index of the metal layer
• x_left: x-coordinate of the left edge of the trace
• width: trace width
• s_or_g: use "g" if the trace is grounded. "s" for regular signal trace

#### An Example Trace File for Coupled Microstrips:

```# Trace file
# generated by EE Circle Trace Analyzer
# on 9-30-2004 at 11:23
# Unit
Unit mil
# Number of metal layers
Num 2
# Traces arranged as:  index  x_coord  width  grounded
Trace 1 10.0 10.0 s;
Trace 1 25.0 10.0 s;```

## Using the Quasi-I/O Capability

Regular applet is intrinsically prohibited to read and write files from/to local computer. Although there are work-around solutions for the applet to gain read/write access to the local file system, they usually pose threat to the security of the browsers and the client computer. A quasi-I/O scheme is designed here to transfer the text content of the files using an intermediate pot-up Java text window. The read and write procedures are described below:

### Reading file from local system

User first opens the local text file in a text editor such as Notepad. Then, select and copy the entire file content. Follow the applet menu item for opening a file to get a pop-up window. Paste the copied text into the pop-up window, click "Done" button to complete the file reading process.

### Writing file to local system

Follow the applet menu item for saving a file to get a pop-up window with all the exported text content. Move the mouse anywhere inside the pop-up window and click once, then user Ctrl-A to select the entire text, and Ctrl-C to copy. Now, open a local text editor, use Ctrl-V to paste the text, then save the file in local file system.