GNU-Darwin Web

# Accuracy and run-times of `atlc`

atlc is very accurate, as the data below will confirm. In a total of 31 tests performed on standard two-conductor transmission lines the maximum error was only 0.945 % and the rms error was 0.259 %. On a directional coupler, the maximum error was 0.927%, but the typical error was around 0.6%. Read on if you wish to know how these figures were arrived at.

In order to test the accuracy of `atlc`, some simple geometries were devised, for which there are known exact analytical solutions. Three cases were considered for two-wire lines - the standard coaxial cable, an off-centre or eccentric coaxial cable and a symmetrical strip transmission line. For three-wires, which can be used two make a 4-port directional coupler, the accuacy was compared using two edge-on strip lines..

## Comparisons between atlc and a round coaxial cable

One obvious case is the round coaxial cable, which has a well known and exact formula for its impedance. In the case of an vacuum dielectric, it is simply

Zo=60.0*loge(D/d)

, where D is the inner diameter of the outer conductor and d is the outer diameter of the inner conductor.
Circular conductors can never be defined exactly using a square grid, so differences between the exact answer and `atlc's` answer are due to:

• Errors in representing a circle on a square grid
• Errors in the method `atlc` uses.

Four coaxial cables were defined, which all had the internal dimensions of the outer conductor being 500 pixels. The inners were made 25, 50, 100, 200, and 400 pixels. The table below shows the results.
 Filename D d Er Zo (theory) Zo (`atlc`) Error (%) T1 T2 T1/T2 coax-500-400.bmp 500 400 1.0 13.388 13.3710 -0.127 % 9 7 1.29 coax-500-200.bmp 500 200 1.0 54.977 54.9031 -0.134% 28 18 1.55 coax-500-200.bmp 500 200 100.0 5.4977 5.49031 -0.134% 28 18 1.55 coax-500-100.bmp 500 100 1.0 96.566 96.4277 -0.143% 47 29 1.62 coax-500-50.bmp 500 50 1.0 138.155 137.8984 -0.186% 56 36 1.56 coax-500-25.bmp 500 25 1.0 179.744 179.8969 +0.085 % 66 38 1.73

Notes:

1. T1 is the run time on a dual processor Sun Ultra 60 (300 MHz), where atlc was not configured for multi-processor support, so would not use both processors. T2 is the run time when `atlc` was configured with the `--with-mp` option so used both CPUs. T1/T2 is the ratio of the two times.
2. All timing results were using atlc-3.0.1, which has r=1.95, cut-off=0.0001 and were compiled with gcc-3.0.3 using the -O3 optimisation option. The times recorded include the time to save the images of electric field, voltage energy etc to disk. The time can be reduced somewhat by using the -s option and skipping the saving of images
The largest error for the coaxial cables is only 0.186%, with the RMS value being 0.139 %. In all of these situations, accuracy can be improved at the expense of memory and CPU time, by using a finer grid.

## Comparisons between atlc and an eccentric coaxial line

According to the book Microwave and Optical Components, Volume 1, - Microwave Passive and Antenna Components, page 7, there is an exact formula for the impedance of a coaxial line (see below). If O is the offset between the centres of the two conductors, then the impedance Zo assuming Er=1, is

60 loge(x+sqrt(x^2-1)) where x=(d2+D2-4 O2)/(2*D*d)

 Filename D d O Er Zo (theory) Zo (`atlc`) Error (%) T1 T2 T1/T2 eccentric-a.bmp 400 320 0 1.0 13.388613 13.3755 -0.097 % - 6 - eccentric-b.bmp 500 400 40 1.0 8.043820 8.0240 -0.246% - 7 - eccentric-c.bmp 400 160 0 1.0 54.977 54.9552 -0.040% - 11 - eccentric-d.bmp 500 200 150 1.0 52.020884 51.9983 -0.043% - 13 - eccentric-e.bmp 500 200 100 1.0 41.588831 41.5628 -0.063% - 16 - eccentric-f.bmp 500 100 0 1.0 96.566275 96.4893 -0..080% - 16 - eccentric-g.bmp 500 100 50 1.0 94.007954 93.9300 -0.083% - 18 - eccentric-h.bmp 500 100 100 1.0 85.525017 85.4427 -0.096% - 21 - eccentric-i.bmp 400 40 0 1.0 138.155106 138.0519 -0.075% - 18 - eccentric-j.bmp 500 50 50 1.0 135.679453 135.5753 -0.077% - 20 - eccentric-k.bmp 500 50 100 1.0 127.555728 127.4478 -0.085% - 22 - eccentric-l.bmp 400 40 12 1.0 110.834765 110.7099 -0.113% - 23 - eccentric-m.bmp 400 40 160 1.0 73.540034 73.2376 -0.411% - 21 - eccentric-n.bmp 1600 160 640 1.0 73.540034 73.2376 -0.134% - - -

Note, due to their large size, the eccentric coax files are not distributed. They can however easily be made with the supplied script create, which itself calls the programme circ_in_circ, which is used for creating a circular conductor inside another circular conductor.

``````circ_in_circ 500 400 0 1 > eccentric-a.bmp
circ_in_circ 500 400 40 1 > eccentric-b.bmp
circ_in_circ 500 200 0 1 > eccentric-c.bmp```
```
the file `create `.

## Comparisions between atlc and a symmetrical strip transmission line

Another obvious test is a symmetrical strip transmission line - see diagramme below.

This has an exact analytical solution, dependent on the ratio of the width of the inner conductor w, to the distance between the two outer conductors H. This assumes that the outer conductors extend to plus and minus infinity and the inner conductor is infinitely thin. This structure has the advantage of requiring no curves, so can be represented more accurately with the square grid used in `atlc.` However, its impossible to have an inner conductor that is less than 1 pixel high and it is impossible to make the dimension W infinity wide as it was take an infinite amount of disk space, RAM and CPU time). However, if the width W is made at least 4xH+w, then making it any larger does not seem to have much affect on the result. Hence the results below were obtained by setting the internal W equal to 4 times the internal height plus the inner width W. The actual bitmaps used by atlc are 10 pixels higher and 10 pixels wider, to enforce a boundary. The programme `sym_strip` can be used to quickly produce suitable bitmaps for such circumstances. It enforces having the width W of the equal to at least w+4*h, as well as H being at least 201 pixels. It must be odd, since the one pixel inner conductor must fit centrally between the two outer conductors.
```sym_strip 1200 201 290 50-Ohm-201.bmp w=290 H=201 w/H=1.442786 xo=23.753772 Zo is theoretically 49.989477 Ohms (assuming W is infinite)```
This structure, which has a w/H value of 1.442786, has a theoretical impedance close to 50 Ohms (49.989477 to be precise). atlc calculates this to be 49.8457 Ohms, an error of only 0.087%, when using a grid 1134x201. Increasing the number of pixels to 2222x401, the results are surprisingly somewhat worst with an error of 0.191%. I have no explanation for this. but increasing the pixels further to 4399x801, results in a larger error still, as atlc reports this as 49.9127.

 Filename W H w w/H Zo (theory) Zo (`atlc`) Error (%) T1 T2 T1/T2 25-Ohm-201.bmp 1512 201 668 3.323383 25.017590 24.9194 -0.392% 44 25 1.76 25-Ohm-401.bmp 2978 401 1334 3.326683 24.995678 24.9383 -0.409% 393 216 1.81 25-Ohm-801.bmp 2978 401 1334 3.326683 24.995678 24.9383 -0.409% 393 216 1.81 50-Ohm-201.bmp 1134 201 290 1.42786 49.989477 49.8457 +0.087% 26 19 1.37 50-Ohm-401.bmp 2222 401 578 1.441397 50.026376 49.9307 -0.191% 329 181 1.82 50-Ohm-801.bmp 4399 801 1155 1.441948 50.011737 Zo atlc error t1 t2 t1/t2 100-Ohm-201.bmp 945 201 101 0.502488 100.160858 100.0925 -0.068% ? 22 1.28 100-Ohm-401.bmp 1846 401 202 0.503741 100.023 99.9115 -0.329% 299 207 1.75 100-Ohm-801.bmp 1846 401 202 0.503741 100.023 99.9115 -0.329% 299 207 1.75 200-Ohm-201.bmp 862 201 18 0.089552 200.818306 202.7158 +0.945% x 19 1.53 200-Ohm-401.bmp 1680 401 36 0.089776 200.669461 201.1821 +0.255% 284 1.69 200-Ohm-801.bmp 3317 801 73 0.091136 199.770642 199.6340 -0.068% 3447 1978 1.74

Note, due to their large size, most of the files *Ohm*.bmp are not distributed with `atlc`. but may be produced easily with the aid of a script called `create` in the examples directory. The script create calls a programme `sym_strip`, which was developed for the purpose of producing symmetrical stripline bitmaps. Sorry there is no documentation for `sym_strip` now, but if look at the script `create`, its use should be obvious.

## Accuracy of `atlc` with coupled lines

Testing the accuracy of `atlc` with coupled lines is more difficult that with single isolated lines, since there is to my knowledge only one structure for which exact analytical results exist. For two infinitely thin conductors halfway between two infinitely wide groundplanes (see below)

the odd and even mode impedances can be calculated analytically. If the spacing between the two groundplanes is H, the width of the conductors w, the spacing between the conductors s, and the permittivity of the medium Er,

``````----------^-------------------------------------------------------------
|
|              <---w---><-----s----><---w-->
H              ---------            --------            Er
|
|
----------v-------------------------------------------------------------
``````
then the impedances are given by.

Zeven=(30*pi/sqrt(er))*(K(ke')/K(ke))
Zodd=(30*pi/sqrt(er))*(K(ko')/K(ko))

K(kx)=complete elliptic integral of the first kind.

ke=(tanh((pi/2)*(w/H)))*tanh((pi/2)*(w+s)/H)
ko=(tanh((pi/2)*(w/H)))*coth((pi/2)*(w+s)/H)

ke'=sqrt(1-(ke^2))
ko'=sqrt(1-(ko^2))

Those equations are taken from Matthaei, Young and Jones, Microwave Filters, Impedance Matching Networks and Coupling Structures, Artech House, Dedham, MA., 1980. I'm very grateful to Paul Gili AA1LL / KB1CZP for providing me with these equations, references and nomographs.

A programme `make_coupler` was written to automatically generate bitmaps given the height H between the groundplanes, the conductor widths w and spacing s. Ideally this needs simulating from -infinity to +infinity, but that is not practical. It was assumed that if the complete structure width W was equal to 2*w+s+8*H that would be adequate (this seemed about right, but I've no proof it is optimal). As well as producing a bitmap, `make_coupler`also calculate the theoretical values of impedance. In order to perform calculations of the theoetical impedance, `make_coupler ` uses the GNU scientific library gsl for the elliptic integral calculations. Hence to obtain the theoretical values, gsl, available at http://sources.redhat.com/gsl, must be installed. The bitmaps will still be produces without the gsl library.

 Filename W H w s Er Zodd Zodd(atlc) Error Zeven Zeven(atlc) Error coupler1.bmp 11 1.0 1.0 1.0 1.0 64.7675 64.3750 -0.606% 66.0151 65.6213 -0.597% coupler2.bmp 19 1.991 1.0 1.0 1.0 93.282 92.4177 -0.927% 107.229 106.3752 -0.796% coupler3.bmp 27 3.0 1.0 1.0 1.0 105.481701 104.7110 -0.731% 139.767112 138.9298 -0.599% coupler5.bmp 43 5.0 1.0 1.0 1.0 114.316017 113.3319 -0.861% 189.265925 188.1258 -0.602% coupler6.bmp 10.0 1.0 1.0 0.5 1.0 62.200158 61.7915 -0.657% 68.243083 67.8686 -0.549% coupler7.bmp 10.0 1.0 1.0 .099 1.0 50.723352 50.3224 -0.790% 74.403376 73.9993 -0.543% coupler8.bmp 5 0.25 1.0 1.0 1.0 21.220896 21.0692 -0.715% 21.220907 21.0692 -0.715%

Note, because of the need to simulate a large width W, these calculations are much slower than those above. The fact the simulation has to be done twice also adds to the time taken. A typical run, using the default bitmap size (18, which gives bitmap of 128 to 512kb), the time taken is approximately 2 minutes on a dual 300 MHz Sun Ultra 60.

atlc is written and supported by Dr. David Kirkby (G8WRB) It it issued under the GNU General Public License