-
Notifications
You must be signed in to change notification settings - Fork 1
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:
numpyh5pymatplotlib-
scipyfor some signal-processing examples
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.pyExpected generated files:
pulse.h5
PulsedRadar_results.h5
CWRadar_results.h5
pulsed_analysis.png
cw_analysis.png
What to look at:
-
genpulse.pyshows how to create a pulse file with/I/valueand/Q/value. -
example.fersxmlshows two radar modes in one scenario. -
analysis.pyshows how to reconstruct I/Q withfullscaleand 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.
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=2Directory:
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.pyExpected 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
sfcwandsfcw_sourcesblocks with first/last RF frequency, effective bandwidth, range resolution, unambiguous range, sweep count, and emitted step counts. -
analysis.pysamples each SFCW dwell, forms an IFFT range profile, and checks the peak against the target range.
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_fmcwExpected 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_rateis configured.
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_fmcwExpected 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.
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"orunit="rad"controls angle units. -
format="dBi"orformat="linear"controls gain value format. -
symmetry="mirrored"can mirror positive-angle samples to negative angles.
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, orsymmetryattributes. - 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.
The fastest way to create a new scenario is to copy the closest example and change one thing at a time:
- Copy the example directory.
- Rename the scenario and output objects.
- Change platform positions and motion.
- Change waveform parameters.
- Run the scenario.
- 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.
| 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. |