Presentation on theme: "Computational Electromagnetics"— Presentation transcript:
1 Computational Electromagnetics High frequencyrigorous methodsIEDEMoMFDTDTLMfield basedcurrentbasedGO/GTDPO/PTDTDFDVMFEM
2 Computational Electromagnetics Electromagnetic problems are mostly described by three methods:Differential Equations (DE) Finite difference (FD, FDTD)Integral Equations (IE) Method of Moments (MoM)Minimization of a functional (VM) Finite Element (FEM)TheoreticaleffortlessmoreComputationaleffortmoreless
5 Introduction to differentiation Conventional CalculusThe operation of diff. of a function is a well-defined procedureThe operations highly depend on the form of the function involvedMany different types of rules are needed for different functionsFor some complex function it can be very difficult to find closed form solutionsNumerical differentiationIs a technique for approximating the derivative of functions by employing only arithmetic operations (e.g., addition, subtraction, multiplication, and division)Commonly known as “finite differences”
6 Taylor Series Problem: For a smooth function f(x), Given: Values of f(xi) and its derivatives at xiFind out: Value of f(x) in terms of f(xi), f(xi), f(xi), ….xyf(x)f(xi)xi
7 Taylor’s TheoremIf the function f and its n+1 derivatives are continuous on an interval containing xi and x, then the value of the function f at x is given by
8 Finite Difference Approximations of the First Derivative using the Taylor Series (forward difference)Assume we can expand a function f(x) into a Taylor Series about the point xi+1xyf(x)f(xi)xixi+1f(xi+1)hh
9 Finite Difference Approximations of the First Derivative using the Taylor Series (forward difference)Assume we can expand a function f(x) into a Taylor Series about the point xi+1Ignore all of these terms
10 Finite Difference Approximations of the First Derivative using the Taylor Series (forward difference)yf(x)hxixi+1xf(xi)f(xi+1)
11 Finite Difference Approximations of the First Derivative using the forward difference: What is the error?The first term we ignored is of power h1. This is defined as first order accurate.First forwarddifference
12 Finite Difference Approximations of the First Derivative using the Taylor Series (backward difference)Assume we can expand a function f(x) into a Taylor Series about the point xi-1xyf(x)f(xi-1)xi-1xif(xi)h-h
13 Finite Difference Approximations of the First Derivative using the Taylor Series (backward difference)Ignore all of these termsFirst backwarddifference
14 Finite Difference Approximations of the First Derivative using the Taylor Series (backward difference)yf(x)hxi-1xixf(xi-1)f(xi)
15 Finite Difference Approximations of the Second Derivative using the Taylor Series (forward difference)yxf(x)f(xi)xixi+1f(xi+1)hxi+2f(xi+2)(1)(2)(2)-2*(1)
16 Finite Difference Approximations of the Second Derivative using the Taylor Series (forward difference)yxf(x)f(xi)xixi+1f(xi+1)hxi+2f(xi+2)Recursive formula forany order derivative
24 Finite Difference Approx. Partial Derivatives Problem: Given a function u(x,y) of two independent variables how do we determine the derivative numerically (or more precisely PARTIAL DERIVATIVES) of u(x,y)
25 Pretty much the same way STEP #1: Discretize (or sample) U(x,y) on a 2D grid of evenly spaced points in the x-y plane
26 2D GRID xi xi+1 xi-1 xi+2 yj yj+1 yj-1 yj-2 y axis u(xi,yj) u(xi+1,yj) x axis
27 ui,j ui+1,j ui-1,j ui,j-1 ui,j+1 SHORT HAND NOTATION i i+1 i-1 i+2 j y axisii+1i-1i+2jj+1j-1j-2ui,jui+1,jui-1,jui,j-1ui,j+1x axis
33 Partial Second Derivatives: short hand notation Problem: FINDDyDx
34 FINITE DIFFERENCE ELECTROSTATICS Electrostatics deals with voltages and charges that do no vary as a functionof time.Poisson’s equationLaplace’s equationWhere, F is the electrical potential (voltage), r is the charge density ande is the permittivity.
35 FINITE DIFFERENCE ELECTROSTATICS: Example FoF1F2F3Find F(x,y) inside the box due to the voltages applied to its boundary. Thenfind the electric field strength in the box.
36 Electrostatic Example using FD Problem: FINDDyDx
37 Electrostatic Example using FD Problem: FINDIf Dx = Dy
38 Electrostatic Example using FD Problem: FINDIterative solution technique:Discretize domain into a grid of pointsSet boundary values to the fixed boundary valuesSet all interior nodes to some initial value (guess at it!)Solve the FD equation at all interior nodesGo back to step #4 until the solution stops changingDONE
39 Electrostatic Example using FD MATLAB CODE EXAMPLE
40 FINITE DIFFERENCE Waveguide TM modes: Example Where for TM modesandIfthen kz becomes imaginary and the mode does notpropagate.
41 FINITE DIFFERENCE Waveguide TM modes: Example Goal: Find all permissible values of kt and the correspondingmode shape (F(x,y)) for that mode.
43 Waveguide Example using FD Problem: FINDIf Dx = Dy=h
44 Waveguide Example using FD letwhere N is the number of interior nodes (i.e. not on a boundary)If we now apply the FD equation at all interior nodes we canform a matrix equationWhere I is the identity matrix
45 Waveguide Example using FD is an eigenvalue equation usually cast in the formThe eigenvalues will provide the permissible values for the transverse wavenumberkt and the eigenvectors are the corresponding mode shapes (F(x,y))
47 Waveguide Example using FD hWNode #1:Node #2:Node #3:Node #4:Solve using the Matlab “eig” function
48 Waveguide Example using FD is an eigenvalue equation usually cast in the formThe eigenvalues will provide the permissible values for the transverse wavenumberkt and the eigenvectors are the corresponding mode shapes (F(x,y))HOMEWORK: WRITE A MATLAB PROGRAM THAT CALCULATES THE TRANSVERSE WAVENUMBERS AND MODE SHAPES FOR A RECTANGULAR WAVEGUIDE FOR TM MODES
50 Some big advantages Broadband response with a single excitation. 3D models easily.Frequency dependent materials accommodated.Most parameters can be generated e.g.Scattered fieldsantenna pattersRCSS-parametersetc…..
51 How does it work?Based on the 2 Maxwell curl equations in derivative form. Theseare linearized by central finite differencing. We only considernearest neighbor interactions because all the fields are advancedtemporally in discrete time steps over spatial cells.ie we sample in space & timeembedding of an antennain a FDTD space lattice(note that the whole volumeis meshed!)
52 closed & open problemsFDTD is especially suitable for computing transients for closedgeometries. When an open geometry is required, such as whenwe are dealing with an antenna, we need a boundary condition tosimulate infinity. In this case the FDTD requires an absorbing boundarycondition (ABC) at the grid truncation.This means there is no reflection from the boundary where themesh ends.
53 FDTD: The Basic Algorithm Maxwell’s Equations in the TIME Domain:
54 Equate Vector Components: Six E and H-Field Equations
55 2-D Equations: Assume that all fields are uniform in y direction (i. e 2-D Equations: Assume that all fields are uniform in y direction (i.e. d/dy = 0)2D - TE2D - TM
56 1-D Equations: Assume that all fields are uniform in y and x directions (i.e. d/dy =d/dx= 0) 1D - TE1D - TM
57 Discretize Objects in Space using Cartesian Grid 2D Discretization3D Discretizationzx1D Discretization
58 Define Locations of Field Components: FDTD Cell called Yee Cell Finite-DifferenceSpace is divided into small cellsOne Cell: (dx)(dy)(dz)E and H components are distributed in space around the Yee cell (note: field components are not collocated)FDTD: Yee, K. S.: Numerical solution of initial boundary value problems involving Maxwell's equations in isotropic media. IEEE Transactions on Antennas Propagation, Vol. AP-14, pp , 1966.
59 Replace Continuous Derivatives with Differences Derivatives in time and space are approximated as DIFFERENCES
60 Solution then evolves by time-marching difference equations Time is DiscretizedOne Time Step: dtE and H fields are distributed in timeThis is called a “leap-frog” scheme.
61 1-D FDTDAssuming that field values can only vary in the z-direction (i.e. all spatial derivatives in x and z direction are zero), Maxwell’s Equations reduce to:zHyExe(z), m(z)
62 1-D FDTD – Staggered Grid in Space Interleaving of the Ex and Hy field components in space and time in the 1-D FDTD formulationTime plane
63 Replace all continuous derivatives with finite differences 1-D FDTDReplace all continuous derivatives with finite differences
64 Substitution of difference equations in above yields: 1-D FDTDSubstitution of difference equations in above yields:
65 After some simple algebra: 1-D FDTDAfter some simple algebra:
66 1-D FDTD Algorithm – Flow Chart StartCompute 1-D Faraday’s FDTD equation: For all nodes n inside the simulation region:Compute 1-D Ampère-Maxwell’s FDTD equation: For all nodes n inside the simulation region:Electric current density excitation: For all excitation nodes n:Boundary condition: For all PEC boundary nodes n:NoYesStop
67 FDTD Solution of 1-D Maxwell’s Equations (EXAMPLE) FDTD equationsInitial conditionsinitial-boundary-value problemFor all values of iBoundary condition for a perfectly electrically conducting (PEC) material
68 FDTD Solution of the First Two 1-D Scalar Maxwell’s Equations Excitation pulse: RC2(t) – Time DomainAmplitude RC2(t)Excitation pulse: RC2(f) – Frequency DomainMagntiude |RC2(f)|
71 SOME OPEN QUESTIONS??How do we determine what Dt and Dz should be?How do we implement real sources?How do we simulate open boundaries?How accurate is the solution?
72 Potential Source of Error: Numerical Dispersion In implementing any numerical technique, it is essential to understand the origin and nature of errors that are introduced as a result of the computational approach.In the FDTD errors arise from the discretization of the computational space and finite difference approximations to Maxwell’s equations.One particularly important source of error is call numerical dispersion.To see this consider the continuous wave equation in ID:Which has a solution of the form we have looked at before:
73 If we substitute this expression into the wave equation, we get: From this we see that the wave number is linearly proportional to the frequency.This is more widely known as the phase velocity, when expressed as np = w/k np=cTo determine how the FDTD effects this relationship, we repeat the same procedure using the difference equations.
74 Let’s now look at the discrete wave equation Represent the second order difference equation (for both time and space) in terms of:Doing the same for the time derivative, we get:
75 Now defining the solution from in difference form: Substituting this into the difference form of the wave equation we get:Factor out:
77 We get:Group time and space terms and divide both sides by 2Use Euler’s Identity:(FDTD)(continuous)
78 This is a nonlinear equation that represents the relationship between the wave number, and the frequency, w. It is a function of the time step Dt, spatial step Dx and frequency wThis means that as a simulated wave propagate through the solution space it undergoes phase errors because the numerical wave either slows down or accelerates relative to the actual wave propagation in physical space.To examine the implication we consider 3 special cases:Case 1Consider Δt and Δx 0In this case, use the first two terms of the Taylor series expansion of terms Same as in real space
79 Case 2Use the relation cΔt = ΔxThis is often referred to as the magic time step!Plugging in we get: Implies thatNo dispersionUnfortunately the relation cΔt = Δx is unstable!
80 Case 3In this case we consider the general case where there is no assumed relation between Δt and Δx.Therefore we need to solve for a general expression that can tell us the effect of numerical dispersion for a given relationship.To do this, we solve in terms of the wave number.Using this equation we can determine the numerical wave number for any relation between Δt and Δx for a given sampling rate.Substitute in the appropriate parameters and determine the effects of discretizing the computational space.
81 Where we have used k= w/c, use the sampling note of xWhere we have used k= w/c, use the sampling note ofNow define numerical phase velocity as
82 Over a distance of 10λ, which is in this case in no computational cells The numerical wave would only propagate cells phase error of 45.72ºIf we repeat this analysis forNow the phase error at wλ is 11.19ºThe conclusion to draw from this is that the larger the solution space, the greater the phase error is going to be.(MATLAB DEMO)
83 StabilityAs stated before, the FDTD method approximates M.E.’s as a set of completed difference equations.As such this method is useful only when the solution of the difference equations are convergent and stable.Convergence means that as time stepping continues, the solution of the difference equations asymptomatically approach the solution given by Maxwell’s equations.On the other hand, stability is basically stated as a set of condition under which the error generated does not grow in an unbounded fashion.
84 In order for the FDTD equations to remain stable the following relationship (called the Courant stability criteria must be met)This is the stability condition for 1D caseFor higher dimensional cases we have the form,whereD=1, 2, 3 depending on the number of dimensions used(MATLAB DEMO)
85 So far we have considered a sample 1D FDTD formulation, that physically represents the propagation of a plane wave.More often than not, EM BVP’s cannot be accurately represented as a 1D problem.2D FDTD FormulationIn the formulation of the two-dimensional FDTD, one can assume either TE ( electric field is to the plane of incidence, or TM; magnetic field is to the plane of incidence).This results from the fact that in 2D neither the fields nor the object contain any variations in the z-direction,consequently at
86 So in this context, Maxwell’s Equations can be reduced to:
88 Applying the central difference expression, for TE mode, we get: For the TM case, we have:
89 Numerical Dispersion 2D case Using same procedure as for the 1D case we obtain:
90 Numerical Dispersion 2D case Plot of the normalised phase velocity vs. travelling wave angle.
91 Writing a 2D FDTD Program Defining physical constantsDefine program constantsmagnitude of electric field: total # of time steps: # of nodes in the x, y directionIf using a pulse source, define Ez and Hx, or we can implement a hard source.Start time marching nΔt, time value n = 1 : NtIncrement the spatial indexFirst apply the absorbing boundary conditionsApply the ABC along the edges of the computational region
94 Transition to 3DThe 1D formulation involved 2 degrees of freedom (one fieldquantity E or H and one time variable). In 3D we have 4 degreesof freedom (3 in space and 1 in time). The following notation issomewhat standardwhere the increment is the lattice space increments and i,j,k areintegers. Any field may be represented as
95 The Yee Cell seen in a more Macroscopic view – Faraday's and Ampere’s lawFall 2007
96 So far we have considered the 1D and 2D formulations. General 3D FormationSo far we have considered the 1D and 2D formulations.Now we will do the 3D formulation.Recall that Maxwell’s curl equations are:(i, j, k)(i, j, k)
97 For simplicity, consider a linear and isotropic medium. In Cartesian coordinates, the curl equations reduce to:ijk/x/y/zExEyEz
98 Also, for Ampere’s Law:3D DiscretizationGiven a function f(x, y, z, t) we write it in discrete form as:f(x, y, z, t) = f(iΔx, jΔy, kΔz, nΔt)=In general, we let: Δx = Δy = Δz = d
99 3D formulation These six coupled equations form the basis for the FDTD algorithm.3D DiscretizationGiven a function f(x, y, z, t) we write it in discrete form as:f(x, y, z, t) = f(iΔx, jΔy, kΔz, nΔt)=In general, we let: Δx = Δy = Δz = d
100 FDTD Discretization of 3D Curl Equations Where we have used time interpolation
104 ABC’sIn general EM analysis of scattering structures often requires the solution of “open region” problems.As a result of limited computational resources, it becomes necessary to truncate the computational domain in such a way as to make it appear infinite.This is achieved by enclosing the structure in a suitable output boundary that absorbs all outward traveling wavesABC
105 In this lecture we will describe some of the more common ABC’s, such as: Bayliss-Turkel annihilation operatorsEnqquist-Majda one way operatorsMur ABCLiao’s extrapolation methodAnd the PML, perfectly matched layerThe PML method which was introduced in 1994 by Berenger, represents one of the most significant advances in FDTD development, since it conception I 1966, by Kane Yee.The PML produces back reflection ~ over a very broad range of incidentPMC Region
106 Early ABC’sWhen Yee first introduced the FDTD method, he used PEC boundary conditions.This technique is not very useful in a general sense.It wasn’t until the 70’s when several alternative ABC’s were introduced.However, these early ABC’s suffered from large back reflections, which limited the efficacy of the FDTD method.
107 Extrapolation from Interior Node (Taylor 1969) If we consider the electric field located on a 2D boundarySince and are determined in the FDTD calculations, and are therefore known values, we can solve this equation for the exterior node.This equation is only effective on normally incident waves and degrades rapidly when the incident wave is off-normal.y, (j)Wavex, (i)
108 Extending this method to 2D: This approach applies to a wide range of incident field angles, but due to the nature of the averaging process often gives rise to significant non-physical back reflections.j=3j=2j=1i-1ii+1
109 Dissapative MediumIn this technique a lossy medium is used to surround the FDTD computational region.The idea is that as that waves propagate into this medium, they are dissipated before they can undergo back reflection
110 The problem is that there is often an input impedance between the FDTD region and the long media. The back reflection results from the ratio of electrical-conductivity and magnetic-conductivity parameters, respectively.QuadraticLinear
111 Here the are assumed to be free space. Therefore the input impedance is:which is not necessarily equal to Zo.To overcome this the conductivity values can be implemented in a non-uniform fashion.That is the can have a linear or quadratic profile.This tends to require relatively thick medium layers - computational requirements!