You are on page 1of 6

The Finite-Difference

Time-Domain Method for


Electromagnetics
with MATLAB Simulations

Atef Z. Elsherbeni
and
Veysel Demir

SciTech Publishing, Inc


Raleigh, N C
scitechpublishing.com

Contents
Preface
Author Acknowledgements
Acknowledgement of Reviewers
Chapter 1

Introduction to FDTD

1.1
1.2
1.3
1.4
1.5
1.6
Chapter 2

Chapter 3

Chapter 4

xxi
xxv
xxvii
1

The Finite-Difference Time-Domain Method Basic Equations


Approximation of Derivatives by Finite Differences
FDTD Updating Equations for Three-Dimensional Problems
FDTD Updating Equations for Two-Dimensional Problems
FDTD Updating Equations for One-Dimensional Problems
Exercises

2
4
13
22
26
32

Numerical Stability and Dispersion

33

2.1 Numerical Stability


2.1J Stability in Time Domain Algorithm
2.1.2 CFL Condition for the FDTD Method
2.2 Numerical Dispersion
2.3 Exercises

33
33
34
37
41

Building Objects in the Yee Grid

43

3.1 Definition of Objects


3.1.1 Defining the Problem Space Parameters
3.1.2 Defining the Objects in the Problem Space
3.2 Material Approximations
3.3 Subcell Averaging Schemes for Tangential and Normal Components
3.4 Defining Objects Snapped to the Yee Grid
3.5 Creation of the Material Grid
3.6 Improved Eight-Subcell Averaging
3.7 Exercises

43
44
48
50
52
55
57
67
67

Active and Passive Lumped Elements

71

4.1 FDTD Updating Equations for Lumped Elements


4.1.1 Voltage Source
4.1.2 Hard Voltage Source
4.1.3 Current Source
4.1.4 Resistor
4.1.5 Capacitor
4.1.6 Inductor
4.1.7 Lumped Elements Distributed over a Surface or within
a Volume
4.1.8 Diode
4.1.9 Summary

71
72
74
75
76
77
78

VII

79
81
85

Contents

VIII

Chapter 5

4.2 Definition, Initialization, and Simulation of Lumped Elements


4.2.1 Definition of Lumped Elements
4.2.2 Initialization of FDTD Parameters and Arrays
4.2.3 Initialization of Lumped Element Components
4.2.4 Initialization of Updating Coefficients
4.2.5 Sampling Electric and Magnetic Fields, Voltages and Currents
4.2.6 Definition and Initialization of Output Parameters
4.2.7 Running an FDTD Simulation: The Time-Marching
Loop
4.2.8 Displaying FDTD Simulation Results
4.3 Simulation Examples
4.3.1 A Resistor Excited by a Sinusoidal Voltage Source
4.3.2 A Diode Excited by a Sinusoidal Voltage Source
4.3.3 A Capacitor Excited by a Unit-Step Voltage Source
4.4 Exercises

118
130
131
131
134
138
139

Source Waveforms and Transformation from Time Domain to


Frequency Domain

143

5.1 Common Source Waveforms for FDTD Simulations


5.1.1 Sinusoidal Waveform
5.1.2 Gaussian Waveform
5.1.3 Normalized Derivative of a Gaussian Waveform
5.1.4 Cosine-Modulated Gaussian Waveform
5.2 Definition and Initialization of Source Waveforms for FDTD
Simulations
5.3 Transformation from Time Domain to Frequency Domain
5.4 Simulation Examples
5.4.1 Recovering a Time Waveform from Its Fourier
Transform
5.4.2 An RLC Circuit Excited by a Cosine-Modulated Gaussian
Waveform
5.5 Exercises
Chapter 6

Chapter 7

86
86
89
90
97
108
111

143
143
146
149
151
152
154
158

160
161
166

Scattering Parameters

169

6.1 S-Parameters and Return Loss Definitions


6.2 S-Parameter Calculations
6.3 Simulation Examples
6.3.1 Quarter-Wave Transformer
6.4 Exercises

169
170
178
178
184

Perfectly Matched Layer Absorbing Boundary

187

7.1 Theory of PML


7.1.1 Theory of PML at the Vacuum-PML Interface
7.1.2 Theory of PML at the PML-PML Interface
7.2 PML Equations for Three-Dimensional Problem Space
7.3 PML Loss Functions

187
18 7
190
193
195

Contents

Chapter 8

Chapter 9

IX

7.4 FDTD Updating Equations for PML and MATLAB Implementation


7.4.1 PML Updating EquationsTwo-Dimensional TEZ
Case
7.4.2 PML Updating EquationsTwo-Dimensional TMZ
Case
7.4.3 MATLAB Implementation of the Two-Dimensional FDTD
Method with PML
7.5 Simulation Examples
7.5.1 Validation of PML Performance
7.5.2 Electric Field Distribution
7.5.3 Electric Field Distribution Using D F T
7.6 Exercises

196

201
215
215
219
225
229

The Convolutional Perfectly Matched Layer

231

8.1 Formulation of CPML


8.1.1 PML in Stretched Coordinates
8.1.2 Complex Stretching Variables in CFS-PML
8.1.3 The Matching Conditions at the PML-PML Interface
8.1.4 Equations in the Time Domain
8.1.5 Discrete Convolution
8.1.6 The Recursive Convolution Method
8.2 The CPML Algorithm
* 8.2.1 Updating Equations for CPML
8.2.2 Addition of Auxiliary CPML Terms at Respective
Regions
8.3 CPML Parameter Distribution
8.4 MATLAB Implementation of CPML in the Three-Dimensional
FDTD Method
8.4.1 Definition of CPML
8.4.2 Initialization of CPML
8.4.3 Application of CPML in the FDTD Time-Marching
Loop
8.5 Simulation Examples
8.5.1 Microstrip Low-Pass Filter
8.5.2 Microstrip Branch Line Coupler
8.5.3 Characteristic Impedance of a Microstrip Line
8.6 Exercises

231
2 31
232
233
233
234
235
236
236

Near-Field to Far-Field Transformation

271

9.1 Implementation of the Surface Equivalence Theorem


9.1.1 Surface Equivalence Theorem
9.1.2 Equivalent Surface Currents in FDTD Simulation
9.1.3 Antenna on Infinite Ground Plane
9.2 Frequency Domain Near-Field to Far-Field Transformation
9.2.1 Time-Domain to Frequency-Domain Transformation
9.2.2 Vector Potential Approach

272
272
274
276
277
277
277

196
199

238
239
240
241
242
248
250
250
252
261
267

Contents

Chapter 10

Chapter 11

9.2.3 Polarization of Radiation Field


9.2.4 Radiation Efficiency
9.3 MATLAB Implementation of Near-Field to Far-Field Transformation
9.3.1 Definition of NF-FF Parameters
9.3.2 Initialization of NF-FF Parameters
9.3.3 N F - F F D F T during Time-Marching Loop
9.3.4 Postprocessing for Far-Field Calculation
9.4 Simulation Examples
9.4.1 Inverted-F Antenna
9.4.2 Strip-Fed Rectangular Dielectric Resonator Antenna
9.5 Exercises

279
280
281
2 81
282
284
288
299
299
307
310

Thin-Wire Modeling

315

10.1 Thin-Wire Formulation


10.2 MATLAB Implementation of the Thin-Wire Formulation
10.3 Simulation Examples
10.3.1 Thin-Wire Dipole Antenna
10.4 Exercises

315
319
322
322
327

Scattered Field Formulation

331

11.1
11.2
11.3
11.4

331
332
336
340
340
341
344
344
348
350
350
355

Scattered Field Basic Equations


The Scattered Field Updating Equations
Expressions for the Incident Plane Waves
MATLAB Implementation of the Scattered Field Formulation
11.4.1 Definition of the Incident Plane Wave
11.4.2 Initialization of the Incident Fields
11.4.3 Initialization of the Updating Coefficients
11.4.4 Calculation of the Scattered Fields
11.4.5 Postprocessing and Simulation Results
11.5 Simulation Examples
11.5.1 Scattering from a Dielectric Sphere
11.5.2 Scattering from a Dielectric Cube
11.5.3 Reflection and Transmission Coefficients of a Dielectric
Slab
11.6 Exercises

Chapter 12

Appendix A

358
366

Graphics Processing Unit Acceleration of Finite-Difference


Time-Domain

369

12.1
12.2
12.3
12.4
12.5

371
373
375
377
379

Graphics Processors and General Math


Introduction to Brook
Sample Two-Dimensional FDTD Implementation Using Brook
Extension to Three-Dimensional
Three-Dimensional Parameter Exploration

One-Dimensional FDTD Code

399

Contents
Appendix

XI

Convolutional Perfectly Matched Layer Regions and Associated Field


Updates for a Three-Dimensional Domain

403

B.l Updating
Regions
B.2 Updating
B.3 Updating
B.4 Updating
B.5 Updating
B.6 Updating

403
405
406
408
409
411

Ex at Convolutional Perfectly Matched Layer (CPML)


EY at CPML Regions
Ez at CPML Regions
Hx at CPML Regions
Hy at CPML Regions
Hz at CPML Regions

AppendixC MATLAB Code for Plotting


Bibliography
About the Authors
Index

413
417
421
423