• No se han encontrado resultados

In some applications the FDTD method is used in a quasi-harmonic way, meaning the source is turned on, or ramped up, and then run continuously in a harmonic way until the simulation is ter- minated. Although this prevents one from obtaining broad spectrum output, for applications that have highly inhomogeneous media and where only a single frequency is of interest, the FDTD method used in a quasi-harmonic way may still be the best numerical tool to analyze the problem. The FDTD method is often used in this when in the study of the interaction of electromagnetic fields with the human body. (Tissues in the human body are typically quite dispersive. Imple- menting dispersive models that accurately describe this dispersion over a broad spectrum can be quite challenging. When using a quasi-harmonic approach one can simply use constant coefficients for the material constants, i.e., use the values that pertain at the frequency of interest which also corresponds to the frequency of the excitation.)

When doing a quasi-harmonic simulation, the simulation terminates when the fields have reached steady state. Steady state can be defined as the time beyond which temporal changes in the amplitude and phase of the fields are negligibly small. Thus, one needs to know the amplitude and phase of the fields at various points. Fortunately the amplitude and phase can be calculated from only two sample points of the time-domain field.

Let us assume the field at some point(x, y, z)is varying harmonically as

f(x, y, z, t) =A(x, y, z) cos(ωt+φ(x, y, z)). (5.52) whereA is the amplitude andφ is the phase, both of which are initially unknown. We will drop the explicit argument of space in the following with the understanding that we are talking about the field at a fixed point.

5.6. AMPLITUDE AND PHASE FROM TWO TIME-DOMAIN SAMPLES 127 Consider two different samples of the field in time

f(t1) = f1 = Acos(ωt1+φ), (5.53)

f(t2) = f2 = Acos(ωt2+φ). (5.54)

We will assume that the samples are taken roughly a quarter of a cycle apart to ensure the samples are never simultaneously zero. A quarter of a cycle is given byT /4whereT is the period. We can express this in terms of time steps as

T 4 = 1 4f = λ 4c = Nλ∆x 4c ∆t ∆t = Nλ 4Sc ∆t. (5.55)

Since we only allow an integer number of time-steps betweent1 and t2, the temporal separation

betweent1andt2would be int(Nλ/4Sc)time-steps.

Given these two samples,f1andf2, we wish to determineAandφ. Using the trig identity for

the cosine of the sum of two values, we can express these fields as

f1 = A(cos(ωt1) cos(φ)−sin(ωt1) sin(φ)), (5.56)

f2 = A(cos(ωt2) cos(φ)−sin(ωt2) sin(φ)). (5.57)

We are assuming thatf1andf2are known and we know the times at which the samples were taken.

Using (5.56) to solve forAwe obtain

A= f1

cos(ωt1) cos(φ)−sin(ωt1) sin(φ)

. (5.58)

Plugging (5.58) into (5.57) and rearranging terms ultimately leads to

sin(φ)

cos(φ) = tan(φ) =

f2cos(ωt1)−f1cos(ωt2)

f2sin(ωt1)−f1sin(ωt2)

. (5.59)

The time at which we take the first sample,t1, is almost always arbitrary. We are free to call that

“time zero,” i.e.,t1 = 0. By doing this we havecos(ωt1) = 1andsin(ωt1) = 0. Using these values

in (5.59) and (5.58) yields φ= tan−1 cos(ωt2)− f2 f1 sin(ωt2) ! , (5.60) and A= f1 cos(φ). (5.61)

Note that these equations assume thatf1 6= 0and, similarly, thatφ 6=±π/2radians (which is the

same as requiring thatcos(φ)6= 0).

If f1 is identically zero, we can say thatφ is±π/2(where the sign can be determined by the

other sample point: φ=−π/2iff2 >0andφ= +π/2iff2 <0). Iff1 is not identically zero, we

can use (5.60) to calculate the phase since the inverse tangent function has no problem with large arguments. However, if the phase is close to±π/2, the amplitude as calculated by (5.61) would

involve the division of two small numbers which is generally not a good way to determine a value. Rather than doing this, we can use (5.57) to express the amplitude as

A= f2

cos(ωt2) cos(φ)−sin(ωt2) sin(φ)

. (5.62)

This equation should perform well when the phase is close to±π/2.

At this point we have the following expressions for the phase and magnitude (the reason for adding a prime to the phase and magnitude will become evident shortly):

φ0 =        −π/2 iff1 = 0andf2 >0 π/2 iff1 = 0andf2 <0 tan−1 cos(ωt2)−ff2 1 sin(ωt2) otherwise (5.63) and A0 = ( f 1 cos(φ0) if|f1| ≥ |f2| f2

cos(ωt2) cos(φ0)−sin(ωt2) sin(φ0) otherwise

(5.64) There is one final step in calculating the magnitude and phase. The inverse-tangent function returns values between −π/2 and π/2. As given by (5.64), the amplitude A0 can be either positive or negative. Generally we think of phase as varying between−πandπand assume the amplitude is non-negative. To obtained such values we can obtain the final values for the amplitude and phase as follows (A, φ) =    (A0, φ0) ifA0 >0 (−A0, φ0−π) ifA0 <0andφ0 ≥0 (−A0, φ0+π) ifA0 <0andφ0 <0 (5.65) Finally, we have assumed thatt1 = 0. Correspondingly, that means thatt2can be expressed as

t2 = N2∆twhereN2 is the (integer) number of time steps between the samplesf1 andf2. Thus

the argument of the trig functions above can be written as ωt2 = 2πSc

N2

(5.66) whereNλ is the number of points per wavelength of the excitation (and frequency of interest).

Documento similar