Chapter 3

Electromagnetics

Maxwell's equations, wave propagation, and transmission lines.

Electromagnetics

Electromagnetics is the study of electric and magnetic fields and their interactions. It forms the foundation for understanding phenomena ranging from static electric charge to electromagnetic wave propagation, including radio waves, light, and X-rays. Maxwell's equations provide the unified mathematical framework for electromagnetic phenomena.

Maxwell's Equations

Differential Forms

E=ρϵ0(Gauss’s Law for Electric Fields)\nabla \cdot \mathbf{E} = \frac{\rho}{\epsilon_0} \quad \text{(Gauss's Law for Electric Fields)} B=0(Gauss’s Law for Magnetic Fields)\nabla \cdot \mathbf{B} = 0 \quad \text{(Gauss's Law for Magnetic Fields)} ×E=Bt(Faraday’s Law)\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t} \quad \text{(Faraday's Law)} ×B=μ0J+μ0ϵ0Et(Ampere-Maxwell Law)\nabla \times \mathbf{B} = \mu_0\mathbf{J} + \mu_0\epsilon_0\frac{\partial \mathbf{E}}{\partial t} \quad \text{(Ampere-Maxwell Law)}

Integral Forms

SEda=Qencϵ0\oint_S \mathbf{E} \cdot d\mathbf{a} = \frac{Q_{enc}}{\epsilon_0} SBda=0\oint_S \mathbf{B} \cdot d\mathbf{a} = 0 CEdl=dΦBdt\oint_C \mathbf{E} \cdot d\mathbf{l} = -\frac{d\Phi_B}{dt} CBdl=μ0Ienc+μ0ϵ0dΦEdt\oint_C \mathbf{B} \cdot d\mathbf{l} = \mu_0 I_{enc} + \mu_0\epsilon_0 \frac{d\Phi_E}{dt}

Constitutive Relations

D=ϵE=ϵ0ϵrE\mathbf{D} = \epsilon\mathbf{E} = \epsilon_0\epsilon_r\mathbf{E} H=1μB=1μ0μrB\mathbf{H} = \frac{1}{\mu}\mathbf{B} = \frac{1}{\mu_0\mu_r}\mathbf{B} J=σE(Ohm’s Law in differential form)\mathbf{J} = \sigma\mathbf{E} \quad \text{(Ohm's Law in differential form)}

Where:

  • ϵ0=8.854×1012 F/m\epsilon_0 = 8.854 \times 10^{-12} \text{ F/m} (permittivity of free space)
  • μ0=4π×107 H/m\mu_0 = 4\pi \times 10^{-7} \text{ H/m} (permeability of free space)
  • ϵr,μr\epsilon_r, \mu_r are relative permittivity and permeability
  • σ\sigma is conductivity

Electrostatics

Coulomb's Law

F=14πϵ0q1q2r2r^\mathbf{F} = \frac{1}{4\pi\epsilon_0}\frac{q_1q_2}{r^2}\hat{r}

Electric Field

E=Fqtest=14πϵ0iqiri2r^i\mathbf{E} = \frac{\mathbf{F}}{q_{test}} = \frac{1}{4\pi\epsilon_0}\sum_i \frac{q_i}{r_i^2}\hat{r}_i

For continuous charge distributions:

E(r)=14πϵ0ρ(r)rr2r^rrdτ\mathbf{E}(\mathbf{r}) = \frac{1}{4\pi\epsilon_0} \int \frac{\rho(\mathbf{r'})}{|\mathbf{r}-\mathbf{r'}|^2}\hat{r}_{\mathbf{r}\mathbf{r'}} \, d\tau'

Electric Potential

V=rEdl=14πϵ0iqiriV = -\int_{\infty}^{\mathbf{r}} \mathbf{E} \cdot d\mathbf{l} = \frac{1}{4\pi\epsilon_0}\sum_i \frac{q_i}{r_i} E=V\mathbf{E} = -\nabla V

Laplace and Poisson Equations

2V=ρϵ0(Poisson’s equation)\nabla^2 V = -\frac{\rho}{\epsilon_0} \quad \text{(Poisson's equation)} 2V=0(Laplace’s equation for charge-free regions)\nabla^2 V = 0 \quad \text{(Laplace's equation for charge-free regions)}

Capacitance

C=QV=ϵAd(parallel plate capacitor)C = \frac{Q}{V} = \epsilon \frac{A}{d} \quad \text{(parallel plate capacitor)}

Magnetostatics

Biot-Savart Law

dB=μ04πIdl×r^r2d\mathbf{B} = \frac{\mu_0}{4\pi}\frac{I d\mathbf{l} \times \hat{r}}{r^2} B=μ04πICdl×r^r2\mathbf{B} = \frac{\mu_0}{4\pi}I \oint_C \frac{d\mathbf{l} \times \hat{r}}{r^2}

Ampère's Law

CBdl=μ0Ienc\oint_C \mathbf{B} \cdot d\mathbf{l} = \mu_0 I_{enc}

Magnetic Vector Potential

B=×A\mathbf{B} = \nabla \times \mathbf{A} A=μ04πJ(r)rrdτ\mathbf{A} = \frac{\mu_0}{4\pi} \int \frac{\mathbf{J}(\mathbf{r'})}{|\mathbf{r}-\mathbf{r'}|} \, d\tau'

Magnetic Dipole Moment

m=Ia(loop of current area vector)\mathbf{m} = I\mathbf{a} \quad \text{(loop of current area vector)}

Electromagnetic Waves

Wave Equation

Taking the curl of Faraday's law and substituting Ampère-Maxwell:

2Eμϵ2Et2=0\nabla^2\mathbf{E} - \mu\epsilon\frac{\partial^2\mathbf{E}}{\partial t^2} = 0 2Bμϵ2Bt2=0\nabla^2\mathbf{B} - \mu\epsilon\frac{\partial^2\mathbf{B}}{\partial t^2} = 0

Plane Wave Solutions

E=E0ej(krωt)\mathbf{E} = \mathbf{E}_0 e^{j(\mathbf{k} \cdot \mathbf{r} - \omega t)} B=B0ej(krωt)\mathbf{B} = \mathbf{B}_0 e^{j(\mathbf{k} \cdot \mathbf{r} - \omega t)}

Where k\mathbf{k} is the wave vector, and k=k=ω/ck = |\mathbf{k}| = \omega/c in free space.

Wave Properties

Phase Velocity

vp=ωk=1μϵv_p = \frac{\omega}{k} = \frac{1}{\sqrt{\mu\epsilon}}

Group Velocity

vg=ωkv_g = \frac{\partial \omega}{\partial k}

Intrinsic Impedance

η=μϵ=μ0ϵ0=377Ω(for free space)\eta = \sqrt{\frac{\mu}{\epsilon}} = \sqrt{\frac{\mu_0}{\epsilon_0}} = 377 \Omega \quad \text{(for free space)}

Poynting Vector (Power Flow)

S=E×H\mathbf{S} = \mathbf{E} \times \mathbf{H} S=12Re(E×H)\langle\mathbf{S}\rangle = \frac{1}{2}\text{Re}(\mathbf{E} \times \mathbf{H}^*)

Transmission Lines

Telegrapher's Equations

For a differential length dzdz of transmission line:

V(z,t)z=LI(z,t)tRI(z,t)\frac{\partial V(z,t)}{\partial z} = -L\frac{\partial I(z,t)}{\partial t} - RI(z,t) I(z,t)z=CV(z,t)tGV(z,t)\frac{\partial I(z,t)}{\partial z} = -C\frac{\partial V(z,t)}{\partial t} - GV(z,t)

Where RR, LL, CC, GG are resistance, inductance, capacitance, and conductance per unit length.

Characteristic Impedance

Z0=R+jωLG+jωCZ_0 = \sqrt{\frac{R + j\omega L}{G + j\omega C}}

For lossless line (R=G=0R = G = 0):

Z0=LCZ_0 = \sqrt{\frac{L}{C}}

Propagation Constant

γ=(R+jωL)(G+jωC)=α+jβ\gamma = \sqrt{(R + j\omega L)(G + j\omega C)} = \alpha + j\beta

Where α\alpha is the attenuation constant and β\beta is the phase constant.

For lossless line:

γ=jωLC=jβwhere β=ωLC\gamma = j\omega\sqrt{LC} = j\beta \quad \text{where } \beta = \omega\sqrt{LC}

Wave Velocity on Transmission Line

v=ωβ=1LCv = \frac{\omega}{\beta} = \frac{1}{\sqrt{LC}}

Waveguides

Rectangular Waveguide

Cutoff Frequency

fc,mn=c2(ma)2+(nb)2f_{c,mn} = \frac{c}{2}\sqrt{\left(\frac{m}{a}\right)^2 + \left(\frac{n}{b}\right)^2}

Where a,ba, b are dimensions of the waveguide cross-section.

Phase and Group Velocities

vp=c1(fcf)2v_p = \frac{c}{\sqrt{1 - \left(\frac{f_c}{f}\right)^2}} vg=c1(fcf)2v_g = c\sqrt{1 - \left(\frac{f_c}{f}\right)^2}

Note: vpvg=c2v_p \cdot v_g = c^2

TE and TM Modes

TE Modes (Transverse Electric)

Ez=0,Hz0E_z = 0, \quad H_z \neq 0

TM Modes (Transverse Magnetic)

Hz=0,Ez0H_z = 0, \quad E_z \neq 0

Antennas and Radiation

Antenna Parameters

Gain and Directivity

D=4πUmaxPradD = \frac{4\pi U_{max}}{P_{rad}} G=ηrDG = \eta_r D

Where UmaxU_{max} is maximum radiation intensity and PradP_{rad} is total radiated power.

Effective Aperture

Ae=λ24πGA_e = \frac{\lambda^2}{4\pi}G

Radiation Resistance

Rrad=2PradIrms2R_{rad} = \frac{2P_{rad}}{I_{rms}^2}

Near and Far Field Regions

Near Field

r<2D2λr < \frac{2D^2}{\lambda}

Where DD is the largest dimension of the antenna.

Far Field (Fraunhofer)

r>2D2λandr>λ2πr > \frac{2D^2}{\lambda} \quad \text{and} \quad r > \frac{\lambda}{2\pi}

Electromagnetic Boundary Conditions

At Interface Between Two Media

Normal Components

D1nD2n=σs(Surface charge density)D_{1n} - D_{2n} = \sigma_s \quad \text{(Surface charge density)} B1nB2n=0(No magnetic monopoles)B_{1n} - B_{2n} = 0 \quad \text{(No magnetic monopoles)}

Tangential Components

E1tE2t=0(Conservative field)E_{1t} - E_{2t} = 0 \quad \text{(Conservative field)} H1tH2t=Ks×n^(Surface current density)H_{1t} - H_{2t} = \mathbf{K}_s \times \mathbf{\hat{n}} \quad \text{(Surface current density)}

Applications in Engineering

Radar Systems

Radar equation:Pr=PtG2λ2σ(4π)3R4L\text{Radar equation}: P_r = \frac{P_t G^2 \lambda^2 \sigma}{(4\pi)^3 R^4 L}

Where σ\sigma is radar cross-section, RR is range, and LL is system losses.

Wireless Communications

Friis equation:PrPt=GtGr(λ4πR)2\text{Friis equation}: \frac{P_r}{P_t} = G_t G_r \left(\frac{\lambda}{4\pi R}\right)^2

Shielding Effectiveness

SE=A+R+B(Absorption + Reflection + Multiple Reflection)SE = A + R + B \quad \text{(Absorption + Reflection + Multiple Reflection)}

Real-World Application: Antenna Design for 5G Communications

5G communications require sophisticated antenna design for millimeter-wave frequencies.

5G Antenna Analysis

# 5G antenna design parameters at 28 GHz
freq_5g = 28e9  # Hz (28 GHz band)
wavelength_5g = 3e8 / freq_5g  # meters
wavelength_mm = wavelength_5g * 1000  # mm

# Calculate Fresnel zone for antenna separation
antenna_distance = 0.5  # meters
first_fresnel_radius = math.sqrt((wavelength_5g * antenna_distance) / 4)  # meters

# Path loss calculation (Free space)
path_loss_fs = 20 * math.log10(4 * math.pi * antenna_distance / wavelength_5g)  # dB

# Calculate antenna parameters
antenna_diameter = 2 * wavelength_5g  # 2λ diameter for good directivity
beamwidth = 70 * wavelength_5g / antenna_diameter  # degrees (approximation)

# Aperture efficiency considerations
aperture_efficiency = 0.7  # Typical for well-designed antennas
physical_aperture = (antenna_diameter / 2)**2 * math.pi  # m²
effective_aperture = aperture_efficiency * physical_aperture  # m²

# Calculate gain assuming aperture efficiency
gain_directivity = 4 * math.pi * effective_aperture / wavelength_5g**2
gain_db = 10 * math.log10(gain_directivity)

# Calculate beamwidth-radius relationship
beamwidth_exact = 2 * math.asin(1.22 * wavelength_5g / antenna_diameter) * 180 / math.pi  # degrees

print(f"5G antenna design at {freq_5g/1e9:.0f} GHz:")
print(f"  Wavelength: {wavelength_mm:.2f} mm")
print(f"  Antenna diameter: {antenna_diameter*1000:.1f} mm")
print(f"  First Fresnel zone radius: {first_fresnel_radius*1000:.1f} mm")
print(f"  Free space path loss: {path_loss_fs:.1f} dB")
print(f"  Estimated beamwidth: {beamwidth:.2f}°")
print(f"  Exact beamwidth: {beamwidth_exact:.2f}°")
print(f"  Antenna gain: {gain_db:.1f} dBi")
print(f"  Effective aperture: {effective_aperture*1e4:.2f} cm²")

# Calculate number of antenna elements for beamforming
# In 5G, multiple elements are used for MIMO
elements_1d = 8  # Number of elements in one dimension
total_elements = elements_1d**2  # For 2D array
array_side = elements_1d * wavelength_5g  # Physical size of array

print(f"  Total array elements: {total_elements}x")
print(f"  Array physical size: {array_side*100:.1f} cm x {array_side*100:.1f} cm")

# Calculate beamforming gain
array_gain = total_elements * gain_directivity  # If all elements phased correctly
array_gain_db = 10 * math.log10(array_gain)

print(f"  MIMO array gain: {array_gain_db:.1f} dBi")

# Link budget considerations
transmit_power = 0.1  # W (20 dBm)
received_power = transmit_power / (10**(path_loss_fs/10))  # W
received_power_dbm = 10 * math.log10(received_power) + 30  # dBm

print(f"  Received power: {received_power_dbm:.1f} dBm")
print(f"  For successful communication, Rx power should be > -90 dBm (typical sensitivity)")

# Feasibility assessment
if received_power_dbm > -90:
    link_feasibility = "Feasible - sufficient signal strength"
    margin = received_power_dbm - (-90)
    print(f"  Link margin: {margin:.1f} dB")
else:
    link_feasibility = "Not feasible - insufficient signal strength"
    required_improvement = -90 - received_power_dbm
    print(f"  Required improvement: {required_improvement:.1f} dB")
    
print(f"  Link feasibility assessment: {link_feasibility}")

Millimeter-Wave Challenges

Addressing the unique challenges of high-frequency communications.


Your Challenge: Transmission Line Analysis

Analyze the behavior of a transmission line with various load impedances and determine the resulting voltage standing wave patterns.

Goal: Calculate impedance transformations, standing wave ratios, and reflection coefficients for different loading conditions.

Transmission Line Parameters

import math

# Coaxial transmission line analysis
line_params = {
    'characteristic_impedance': 50,  # Ohms (RG-58/U)
    'frequency': 1e9,              # Hz (1 GHz)
    'line_length': 0.5,            # meters
    'relative_permittivity': 2.3,  # For PTFE dielectric
    'attenuation_constant': 0.02,   # Neper/meter
    'load_impedance': 75 + 50j,    # Ohms (complex load)
    'source_impedance': 50,        # Ohms (generator impedance)
    'source_voltage': 10.0         # Volts (generator voltage)
}

# Calculate wavelength in the line
c = 3e8  # m/s (speed of light)
velocity_factor = 1 / math.sqrt(line_params['relative_permittivity'])
wavelength = c / line_params['frequency'] * velocity_factor

# Calculate electrical length
beta = 2 * math.pi / wavelength  # Phase constant
electrical_length = beta * line_params['line_length']  # radians

# Calculate propagation constant
gamma = line_params['attenuation_constant'] + 1j * beta  # Complex propagation constant

# Calculate reflection coefficient at load
ZL = line_params['load_impedance']
Z0 = line_params['characteristic_impedance']
reflection_load = (ZL - Z0) / (ZL + Z0)  # Complex reflection coefficient

# Calculate VSWR (Voltage Standing Wave Ratio)
magnitude_refl = abs(reflection_load)
if magnitude_refl < 1:
    vswr = (1 + magnitude_refl) / (1 - magnitude_refl)
else:
    vswr = float('inf')  # Perfectly matched if magnitude_refl = 0

# Calculate input impedance looking into the line
# Z_in = Z0 * (ZL + Z0 * tanh(gamma * length)) / (Z0 + ZL * tanh(gamma * length))
# For lossless line: Z_in = Z0 * (ZL + j*Z0*tan(beta*l)) / (Z0 + j*ZL*tan(beta*l))

# Simplified lossless calculation first
if line_params['attenuation_constant'] == 0:
    ZL_real = ZL.real
    ZL_imag = ZL.imag
    tan_bl = math.tan(electrical_length)
    
    numerator = complex(ZL_real, ZL_imag + Z0 * tan_bl)
    denominator = complex(Z0, ZL_imag * tan_bl)
    Z_input = Z0 * numerator / denominator
else:
    # More complex calculation with attenuation
    Z_input = Z0 * (ZL + Z0 * math.tanh(gamma * line_params['line_length'])) / (Z0 + ZL * math.tanh(gamma * line_params['line_length']))

# Calculate reflection coefficient at input
reflection_input = (Z_input - line_params['source_impedance']) / (Z_input + line_params['source_impedance'])

# Calculate power delivered to load
# Need to calculate voltage and current at load
source_Z = line_params['source_impedance']
source_V = line_params['source_voltage']

# For simplification, calculate power transfer efficiency
Z_load_conjugate_match = Z_input.conjugate()
power_transfer_efficiency = 4 * Z_load_conjugate_match.real * Z0 / abs(Z_load_conjugate_match + Z0)**2

# Calculate maximum power transfer when Z_load = Z_source (matched)
if abs(Z0 - line_params['source_impedance']) < 0.1:  # Approximately matched
    max_power_condition = "Matched"
    reflection_at_source = 0
else:
    max_power_condition = "Mismatched"
    reflection_at_source = (line_params['source_impedance'] - Z0) / (line_params['source_impedance'] + Z0)

Analyze the transmission line behavior for various loading conditions.

Hint:

  • Use transmission line equations to calculate input impedance
  • Consider the effects of line length and load impedance
  • Calculate reflection coefficients and standing wave ratios
  • Analyze power transfer efficiency
# TODO: Calculate transmission line parameters
input_impedance = 0+0j  # Complex input impedance in ohms
vswr = 0  # Voltage Standing Wave Ratio
reflection_coefficient_load = 0+0j  # Complex reflection coefficient at load
power_transfer_efficiency = 0  # Fraction (0-1 scale)
attenuation_db = 0  # Total line attenuation in dB
wavelength_in_line = 0  # Meters (wavelength in transmission line)

# Calculate wavelength in line
velocity_factor = 1 / math.sqrt(line_params['relative_permittivity'])
wavelength_in_line = (c / line_params['frequency']) * velocity_factor

# Calculate electrical length
beta = 2 * math.pi / wavelength_in_line
electrical_length = beta * line_params['line_length']

# Calculate input impedance (lossless line approximation)
ZL = complex(line_params['load_impedance'])  # Convert to complex if not already
Z0 = line_params['characteristic_impedance']

numerator = ZL + 1j * Z0 * math.tan(electrical_length)
denominator = Z0 + 1j * ZL * math.tan(electrical_length)
input_impedance = Z0 * (numerator / denominator)

# Calculate reflection coefficient at load
reflection_coefficient_load = (ZL - Z0) / (ZL + Z0)

# Calculate VSWR
refl_mag = abs(reflection_coefficient_load)
vswr = (1 + refl_mag) / (1 - refl_mag) if refl_mag < 1 else float('inf')

# Calculate power transfer efficiency
# For power transfer, we want to consider the source match
Z_source = line_params['source_impedance']
Z_in = input_impedance

# Reflection coefficient looking into the line from source
reflection_input = (Z_in - Z_source) / (Z_in + Z_source)
power_transfer_efficiency = 1 - abs(reflection_input)**2

# Calculate total attenuation in dB
attenuation_db = line_params['attenuation_constant'] * line_params['line_length'] * 8.686  # Convert from nepers to dB

# Print results
print(f"Line parameters:")
print(f"  Characteristic impedance: {Z0} Ω")
print(f"  Operating frequency: {line_params['frequency']/1e9} GHz")
print(f"  Line length: {line_params['line_length']} m")
print(f"  Load impedance: {line_params['load_impedance']} Ω")
print(f"  Wavelength in line: {wavelength_in_line*100:.2f} cm")

print(f"\nResults:")
print(f"  Input impedance: {input_impedance:.2f} Ω")
print(f"  Reflection coefficient (load): {reflection_coefficient_load:.3f}")
print(f"  VSWR: {vswr:.2f}")
print(f"  Attenuation: {attenuation_db:.2f} dB")
print(f"  Power transfer efficiency: {power_transfer_efficiency:.3f}")

# Analyze matching conditions
if vswr < 1.5:
    match_quality = "Excellent match"
elif vswr < 2.0:
    match_quality = "Good match"
elif vswr < 3.0:
    match_quality = "Fair match"
else:
    match_quality = "Poor match - significant reflections"

print(f"\n  Match quality: {match_quality}")

# Efficiency assessment
if power_transfer_efficiency > 0.9:
    efficiency_label = "High efficiency - minimal reflected power"
elif power_transfer_efficiency > 0.7:
    efficiency_label = "Moderate efficiency - some power loss"
else:
    efficiency_label = "Low efficiency - significant reflected power"
    
print(f"  Power efficiency: {efficiency_label}")

# Applications recommendation
if vswr < 2.0 and power_transfer_efficiency > 0.8:
    application = "Suitable for high-power applications"
elif vswr < 3.0:
    application = "Suitable for low-power applications with some caution"
else:
    application = "Requires impedance matching network"

print(f"  Recommended application: {application}")

How would you design an impedance matching network to transform the load impedance to match the characteristic impedance of the transmission line?

ELI10 Explanation

Simple analogy for better understanding

Think of electromagnetics like understanding the invisible forces that surround us everywhere. Just like how you can't see the wind but can feel it and see its effects (moving leaves, feeling cool), electromagnetic fields are invisible forces that can push and pull on things without direct contact. Just as gravity pulls objects toward Earth, electromagnetic forces can attract or repel charged particles. The most familiar electromagnetic phenomenon is light - which is actually just electromagnetic waves that are visible to our eyes. Radio waves, microwaves, X-rays, and gamma rays are also electromagnetic waves, just at different 'frequencies' (think of them as different 'speeds' of vibration). Maxwell's equations are like nature's law book that tells us how these invisible electromagnetic forces behave and interact. Transmission lines are like special highways built to carry these electromagnetic waves efficiently from one place to another (like how power lines carry electricity, but for high-frequency signals). Understanding electromagnetics is like learning to see and work with the invisible force field that surrounds everything in our universe - it's the foundation for everything from radio communication to medical imaging to how your phone connects to the internet.

Self-Examination

Q1.

How do Maxwell's equations describe the relationship between electric and magnetic fields?

Q2.

What are the boundary conditions for electromagnetic fields at interfaces between different materials?

Q3.

How do transmission line effects impact high-frequency signal integrity?