EM Simulations

Quickstart for batched and interactive electromagnetic simulation workflows
View as Markdown

This guide walks through running a simulation in Batched EM mode, where AODT generates channel impulse responses (CIRs) without running the 5G RAN transmit/receive chain.

Complete Installation for the client, worker, and viewer before starting this quickstart.

1. Start the AODT Worker

Colocated deployment

$cd aodt_1.5.0
$./worker/up.sh

Non-colocated deployment

On the worker host, start the worker:

$cd aodt_1.5.0/worker
$./docker/up.sh

When startup completes, the backend is ready to accept client requests.

Backend started and ready to accept requests

2. Run the simulation

From the client machine, activate the virtual environment and run the batched EM example:

$cd aodt_1.5.0/client
$source ~/.venv/bin/activate
$export PYTHONPATH=build/:build/config/ # omit if you ran cmake --install
$python3 examples/example_full_sim.py \
> --import_option file \
> --yaml_file tests/assets/quickstart_batched_em.yaml \
> --s3_provider minio

Note: If you installed the client with cmake --install, omit the PYTHONPATH line.

Simulation running on the worker

For non-colocated deployment, pass additional connection parameters to example_full_sim.py. See Verify Installation.

3. Visualize the scenario in the viewer

The simulation run in the previous step creates the channel impulse responses (CIRs) in the database. The rays (power of the CIRs) can be visualized in the UI.

The following steps set up the viewer in a browser. The viewer can be run on any system with a browser, as long as it has network access to the database.

On the system where the viewer is running, run the following commands:

cd asim_client/client/viewer
npm run dev

Open the URL printed in the console. In Settings, configure the catalog and S3 endpoints:

DeploymentCatalog / S3 host
Viewer on the same machine as the workerlocalhost
Viewer on a different machine, same networkWorker internal IP address
Viewer on a different machine, different networkWorker external IP address

Viewer connection settings

  1. Click Connect.
  2. Select the batched_em database.
  3. Click Load to import the data into the viewer.

Radio units (RUs), user equipment (UEs), and rays appear on the map. Entity properties are listed in the settings panel. Use the time slider at the bottom of the page to step through simulation time.

4. Read data from the database

Extract a CIR sample for a specific RU, UE, and time step:

$source ~/.venv/bin/activate
$export PYTHONPATH=build/:build/config/ # omit if you ran cmake --install
$python3 examples/extract_CIR_sample.py \
> --database quickstart_batched_em \
> --ru_id 1 \
> --ue_id 1 \
> --sample 3

This writes sample-cir-000003.dat containing CIR data for RU 1, UE 1 at time sample 3.

Plot the power delay profile (PDP) from the extracted file:

$source ~/.venv/bin/activate
$export PYTHONPATH=build/:build/config/ # omit if you ran cmake --install
$python3 examples/plot_PDP_from_CIR.py \
> --filename sample-cir-000003.dat \
> --RU 1 \
> --UE 1 \
> --sample 3

This produces pdp-cir-000003.png.

PDP between RU 1 and UE 1 (TX0-RX0) for time sample 3

To plot the channel frequency response (CFR), run:

$source ~/.venv/bin/activate
$export PYTHONPATH=build/:build/config/ # omit if you ran cmake --install
$python3 examples/extract_CFR_sample.py \
> --database quickstart_batched_em \
> --ru_id 1 \
> --ue_id 1 \
> --sample 3
$
$python3 examples/plot_CFR.py \
> --filename sample-cfr-000003.dat \
> --RU 1 \
> --UE 1 \
> --sample 3

5. Interactive simulation

The batched workflow above runs the full configured duration before results are consumed. In Interactive mode, the client requests CIRs at individual time steps during the run.

See Interactive Mode for a full description of this workflow.

The template script examples/example_multi_timesteps.py demonstrates the interactive API:

$source ~/.venv/bin/activate
$export PYTHONPATH=build/:build/config/ # omit if you ran cmake --install
$python3 examples/example_multi_timesteps.py \
> --yaml_file tests/assets/quickstart_interactive_em.yaml

The worker console reports CIR sizes and angle-of-arrival/departure (AoA/AoD) array dimensions. API details are in the Config Builder reference and Client API reference.

Next steps

Continue to RAN Simulations to run a simulation with the 5G RAN stack enabled.