Inverted-F Antenna Design - simple#

This tutorial tells you how to design a simple printed inverted-F antenna (IFA) with simpleEMS. An IFA is a compact antenna made of a shorting leg, a radiating tip, and a feed line printed on a substrate.

Note

You must have simpleEMS and openEMS on your computer. See Installation.

The example script below is InvertedFAntenna_2.45GHz.py, which designs an IFA that resonates at 2.45 GHz.

Import the modules#

Import InvertedFAntennaParams, InvertedFAntenna, and setup_simulation from simpleEMS.

from simpleEMS import (
    InvertedFAntenna,
    InvertedFAntennaParams,
    setup_simulation,
)

InvertedFAntennaParams holds the parameters of the antenna and of the simulation.

InvertedFAntenna makes the antenna.

setup_simulation makes the CSXCAD geometry and the FDTD solver. It also sets the frequency range of the simulation.

Set the parameters#

params = InvertedFAntennaParams(
    resonant_freq=2.45e9,
    span_freq=1e9,
    substrate_thickness_mm=1.6,
    substrate_eps_r=4.4,
    substrate_tand=0.001,
    charac_imp=50,
)

InvertedFAntennaParams derives the IFA geometry — the shorting leg, the radiating tip, and the feed spacing — from the resonant frequency and the properties of the substrate.

Set up the simulation#

sim = setup_simulation(params)

setup_simulation prepares the FDTD solver and the CSXCAD geometry. It returns a SimSetup with the CSX, FDTD, and freqs attributes.

Build the antenna#

ifa = InvertedFAntenna(params, sim)
ifa.print_and_save_params(params)
port = ifa.build_inverted_f_antenna()
nf2ff = ifa.create_nf2ff(sim)
ifa.add_field_dump(sim, params)
ifa.write_and_show_structure(sim)

build_inverted_f_antenna builds the substrate, the ground plane, the shorting leg and via, the feed line, the radiating tip, the port, and the mesh in one call. Then these commands show the structure in AppCSXCAD. Close the AppCSXCAD window to continue. The antenna is now ready for the simulation.

Run the simulation#

ifa.run_simulation(sim)

This command runs the openEMS solver. Wait until the solver stops.

Show the results#

sim_data = ifa.compute_sim_data(sim, port)
nf2ff_3d_result = ifa.compute_nf2ff_3d(nf2ff, params.resonant_freq)
ifa.plot_s_param(sim_data.freqs, sim_data.s11)
ifa.plot_smith_chart(sim_data.freqs, sim_data.s11)
ifa.plot_vswr(sim_data.freqs, sim_data.vswr)
ifa.plot_impedance(sim_data.freqs, sim_data.z11)
ifa.plot_2d_directivity(nf2ff, params.resonant_freq)
ifa.plot_2d_rad_pattern(nf2ff, params.resonant_freq)
ifa.plot_3d_directivity(nf2ff_3d_result, params.resonant_freq)
ifa.plot_3d_gain(nf2ff_3d_result, params.resonant_freq, sim_data.input_power)
ifa.plot_3d_power(nf2ff_3d_result, params.resonant_freq)
ifa.save_plots()
ifa.show_plots()
ifa.export_step(sim)
ifa.export_gerber(sim)

These commands show the S11 curve, the VSWR, and the complex impedance. They also show the radiation pattern and the directivity in 2D and in 3D. Finally, they export the model to a STEP file and to Gerber files, which you can send to a PCB manufacturer.

Complete script#

The complete script is below. It designs the antenna, runs the simulation, shows the results, and exports the model.

#!/usr/bin/env python3
# IMPORTS
from simpleEMS import (
    InvertedFAntenna,
    InvertedFAntennaParams,
    setup_simulation,
)

# IMPORTS

# PARAMS
params = InvertedFAntennaParams(
    resonant_freq=2.45e9,
    span_freq=1e9,
    substrate_thickness_mm=1.6,
    substrate_eps_r=4.4,
    substrate_tand=0.001,
    charac_imp=50,
)
# PARAMS

# SETUP
sim = setup_simulation(params)
# SETUP


# BUILD
ifa = InvertedFAntenna(params, sim)
ifa.print_and_save_params(params)
port = ifa.build_inverted_f_antenna()
nf2ff = ifa.create_nf2ff(sim)
ifa.add_field_dump(sim, params)
ifa.write_and_show_structure(sim)
# BUILD

# SIMULATE
ifa.run_simulation(sim)
# SIMULATE

# PPROCESS
sim_data = ifa.compute_sim_data(sim, port)
nf2ff_3d_result = ifa.compute_nf2ff_3d(nf2ff, params.resonant_freq)
ifa.plot_s_param(sim_data.freqs, sim_data.s11)
ifa.plot_smith_chart(sim_data.freqs, sim_data.s11)
ifa.plot_vswr(sim_data.freqs, sim_data.vswr)
ifa.plot_impedance(sim_data.freqs, sim_data.z11)
ifa.plot_2d_directivity(nf2ff, params.resonant_freq)
ifa.plot_2d_rad_pattern(nf2ff, params.resonant_freq)
ifa.plot_3d_directivity(nf2ff_3d_result, params.resonant_freq)
ifa.plot_3d_gain(nf2ff_3d_result, params.resonant_freq, sim_data.input_power)
ifa.plot_3d_power(nf2ff_3d_result, params.resonant_freq)
ifa.save_plots()
ifa.show_plots()
ifa.export_step(sim)
ifa.export_gerber(sim)
# PPROCESS