Skip to content

Examples

github-actions[bot] edited this page Jul 1, 2026 · 3 revisions

Examples

The examples/ directory contains working scenarios and analysis scripts. These are the best starting points for learning FERS because they show complete XML files, waveform generation, CLI usage, and post-processing.

Python analysis scripts generally need:

  • numpy
  • h5py
  • matplotlib
  • scipy for some signal-processing examples

Mixed Pulsed And CW Scenario

Directory:

examples/mixed_scenario

This scenario contains:

  • One pulsed monostatic radar.
  • One CW monostatic radar.
  • One moving target.
  • A generated pulsed waveform stored as HDF5.
  • Python analysis for range and Doppler behavior.

Run it:

cd examples/mixed_scenario
python3 genpulse.py
../../build/release/packages/fers-cli/fers-cli example.fersxml --out-dir=. --log-level=INFO -n=2
python3 analysis.py

Expected generated files:

pulse.h5
PulsedRadar_results.h5
CWRadar_results.h5
pulsed_analysis.png
cw_analysis.png

What to look at:

  • genpulse.py shows how to create a pulse file with /I/value and /Q/value.
  • example.fersxml shows two radar modes in one scenario.
  • analysis.py shows how to reconstruct I/Q with fullscale and estimate range/Doppler.

Use this example when you want to learn:

  • How pulsed and CW radars can coexist in one scenario.
  • How to use a file-backed pulsed waveform.
  • How receiver output differs between pulsed chunk output and streaming output.

VITA49 Mixed Modes

Directory:

examples/vita49_mixed_modes

This scenario contains pulsed, CW, and FMCW monostatic radars in one run. Use it with the VITA49 CLI switches to verify that each receiver-mode stream gets its own VRT Stream ID and mode metadata.

Run it:

cd examples/vita49_mixed_modes
python3 genpulse.py
../../build/release/packages/fers-cli/fers-cli example.fersxml --out-dir=. --vita49 127.0.0.1:4991 --vita49-fullscale 1.0 --log-level=INFO -n=2

SFCW Monostatic

Directory:

examples/sfcw_monostatic

This scenario contains one monostatic stepped-frequency continuous-wave radar, one static point target, and a finite stepped-frequency sweep.

Run it:

cd examples/sfcw_monostatic
../../build/release/packages/fers-cli/fers-cli example.fersxml --out-dir=. --log-level=INFO -n=2
python3 analysis.py

Expected generated files:

SfcwRadar_results.h5
sfcw_range_profile.png
sfcw_analysis_summary.json

What to look at:

  • The waveform uses <stepped_frequency>.
  • The monostatic radar uses <sfcw_mode/>.
  • The output metadata includes sfcw and sfcw_sources blocks with first/last RF frequency, effective bandwidth, range resolution, unambiguous range, sweep count, and emitted step counts.
  • analysis.py samples each SFCW dwell, forms an IFFT range profile, and checks the peak against the target range.

FMCW Monostatic Dechirp

Directory:

examples/fmcw_monostatic_dechirp

This scenario contains:

  • One monostatic FMCW radar.
  • One target.
  • A linear chirp waveform.
  • Receiver-side dechirping inside FERS.
  • IF output analysis.

Run it:

./build/release/packages/fers-cli/fers-cli examples/fmcw_monostatic_dechirp/example.fersxml --out-dir=./results/mono_fmcw --log-level=INFO -n=2
python3 examples/fmcw_monostatic_dechirp/analysis.py --results-dir ./results/mono_fmcw --output-dir ./results/mono_fmcw

Expected generated files:

MonoFmcwRadar_results.h5
monostatic_dechirp_analysis.png

What to look at:

  • The waveform uses <fmcw_linear_chirp>.
  • The monostatic radar uses <fmcw_mode dechirp_mode="physical">.
  • The dechirp reference is source="attached", which is the normal monostatic setup.
  • The analysis script reads dechirped IF output and compares it to the expected beat signal.

Use this example when you want to learn:

  • Basic FMCW XML structure.
  • How to request dechirped IF output.
  • How to analyze legacy full-rate dechirped IF output when no if_sample_rate is configured.

FMCW Bistatic External Dechirp

Directory:

examples/fmcw_bistatic_external_dechirp

This scenario contains:

  • A separate FMCW transmitter.
  • A separate receiver.
  • One target.
  • Raw received FMCW output from FERS.
  • Python-side dechirping in the analysis script.

Run it:

./build/release/packages/fers-cli/fers-cli examples/fmcw_bistatic_external_dechirp/example.fersxml --out-dir=./results/bistatic_fmcw --log-level=INFO -n=2
python3 examples/fmcw_bistatic_external_dechirp/analysis.py --results-dir ./results/bistatic_fmcw --output-dir ./results/bistatic_fmcw

Expected generated files:

BistaticFmcwRx_results.h5
bistatic_external_dechirp_analysis.png

What to look at:

  • The transmitter and receiver are separate objects.
  • The receiver uses <fmcw_mode dechirp_mode="none">.
  • The HDF5 output contains raw received complex baseband.
  • The analysis script performs the reference mixing outside FERS.

Use this example when you want to learn:

  • Bistatic scenario structure.
  • How to export raw FMCW receive data.
  • How external dechirping compares with built-in dechirping.

XML Antenna Pattern Example

File:

examples/example_antenna_pattern.xml

This is a standalone antenna pattern asset. A scenario can reference it like this:

<antenna name="ExampleXmlAntenna" pattern="xml" filename="example_antenna_pattern.xml"/>

The pattern file defines azimuth and elevation gain samples. Use this when an analytic antenna model is not enough.

What to look at:

  • unit="deg" or unit="rad" controls angle units.
  • format="dBi" or format="linear" controls gain value format.
  • symmetry="mirrored" can mirror positive-angle samples to negative angles.

XML Target RCS Example

File:

examples/example_target_rcs.xml

This is a standalone target RCS asset. A scenario can reference it from a target like this:

<target name="AspectTarget">
    <rcs type="file" filename="example_target_rcs.xml"/>
</target>

The file defines separate azimuth and elevation RCS sample axes. Use this when a target should have a simple aspect-dependent RCS pattern instead of one isotropic value.

What to look at:

  • Target-RCS file angles are radians.
  • Target-RCS files do not have unit, format, or symmetry attributes.
  • FERS interpolates the azimuth and elevation axes separately.
  • The final RCS used by the simulation is the selected azimuth-axis value multiplied by the selected elevation-axis value.
  • Relative RCS filenames must be resolvable from the directory where you run FERS. Use an absolute path if needed.

Starting A New Scenario From An Example

The fastest way to create a new scenario is to copy the closest example and change one thing at a time:

  1. Copy the example directory.
  2. Rename the scenario and output objects.
  3. Change platform positions and motion.
  4. Change waveform parameters.
  5. Run the scenario.
  6. Update the analysis script only after the simulation output looks reasonable.

For early debugging:

  • Use pattern="isotropic" antennas.
  • Use simple static platforms.
  • Disable schedules until the geometry works.
  • Start with nopropagationloss="true" only if you need to confirm signal timing without realistic link loss.
  • Add antenna pointing, schedules, noise, and propagation-loss realism after the basic result is correct.

Common Example Mistakes

Problem Fix
pulse.h5 is missing Run python3 genpulse.py in examples/mixed_scenario.
Analysis script cannot find results Pass the same output directory to fers-cli and the analysis script.
HDF5 file exists but analysis gives zeros Reconstruct I/Q with fullscale before calculating power or spectra.
FMCW output sample count is unexpected Check whether dechirped output is using if_sample_rate or legacy <rate> * <oversample> output. Also check chirp duration, chirp count or triangle count, and schedule duration.
KML geometry looks misplaced Set the KML/geospatial <origin> and <coordinatesystem> explicitly.

Clone this wiki locally