Skip to content

sourav2609/Code..Dynamic..FDD...Journal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dynamic FDD for Spectrum Sharing in Non-Terrestrial Networks

Author

Sourav Mukherjee
PhD Student
Room N2410
University of Bremen
Department of Communications Engineering (Arbeitsbereich Nachrichtentechnik)
Otto-Hahn-Allee NW1
D-28359 Bremen, Germany
πŸ“§ mukherjee@ant.uni-bremen.de


License

If you use the code in any way, please cite the original papers and the code.
The code is citable using the following DOI: DOI

Papers

Journal Version

Title: Dynamic FDD for Spectrum Sharing in Non-Terrestrial Networks
Authors: Sourav Mukherjee, Bho Matthiesen, Armin Dekorsy, Petar Popovski
ArXiv:

Conference Version

Title: Dynamic Downlink-Uplink Spectrum Sharing in Non-Terrestrial Networks
Authors: Sourav Mukherjee, Bho Matthiesen, Armin Dekorsy, Petar Popovski
ArXiv: https://arxiv.org/abs/2511.08188
Published: in IEEE Proceedings of International Conference on Communications Workshops (ICC Workshops) 2026, Glasgow, UK


Requirements

Python Packages

  • numpy
  • skyfield
  • matplotlib
  • cvxpy
  • mosek

cvxpy is configured to solve with MOSEK, so a working MOSEK installation and license are required.

Example installation:

pip install numpy skyfield matplotlib cvxpy mosek

How To Run

1. Run A Single Configuration

Use main.py to run one (J, K) case directly.

Example:

python3 main.py \
  --num-sat 2 \
  --num-ue 10 \
  --n-iter 5 \
  --chunk-id 1 \
  --output-root Data

Main arguments:

  • --num-sat: number of satellites J
  • --num-ue: number of UEs K
  • --n-iter: number of simulation iterations for this run
  • --chunk-id: chunk number used in output filenames
  • --output-root: where results are written
  • --seed: reproducible base seed
  • --plot: also save a chunk-level CDF plot

2. Run Multiple Configurations In Parallel

Use scripts/generate_experiment_jobs.py.

This script now does three things automatically:

  1. Generates chunk job scripts
  2. Runs the chunk jobs in parallel locally
  3. Merges the chunk outputs at the end

Example:

python3 scripts/generate_experiment_jobs.py \
  --j-values 1 2 3 4 \
  --k-values 10 15 20 25 30 40 \
  --total-iterations 200 \
  --chunk-size 10 \
  --jobs-root Data/jobs \
  --output-root Data \
  --max-parallel 4

Meaning of the main batch arguments:

  • --j-values: list of J values
  • --k-values: list of K values
  • --total-iterations: total iterations per configuration
  • --chunk-size: iterations per chunk job
  • --jobs-root: where generated shell scripts and logs are stored
  • --output-root: where simulation results are stored
  • --max-parallel: maximum number of chunk jobs running at the same time

Example:

  • --total-iterations 200
  • --chunk-size 10

means each (J, K) configuration is split into 20 chunk jobs, each running 10 iterations.

3. Generate Scripts Only

If you only want the shell scripts without executing them:

python3 scripts/generate_experiment_jobs.py \
  --j-values 1 2 \
  --k-values 10 15 \
  --total-iterations 40 \
  --chunk-size 10 \
  --jobs-root Data/jobs \
  --output-root Data \
  --generate-only

Where Results Are Stored

If --output-root Data is used, results are written under:

Data/experiments/

For a configuration (J=2, K=15), the structure is:

Data/experiments/J_02_K_015/
β”œβ”€β”€ chunks/
β”‚   β”œβ”€β”€ chunk_001.json
β”‚   β”œβ”€β”€ chunk_002.json
β”‚   └── ...
β”œβ”€β”€ merged/
β”‚   β”œβ”€β”€ results.json
β”‚   └── cdf_merged.eps
β”œβ”€β”€ plots/
β”‚   └── chunk_001.eps
└── runtime/
    β”œβ”€β”€ chunk_001_satellites.json
    └── ...

Chunk Results

Each chunk file is saved here:

Data/experiments/J_XX_K_YYY/chunks/chunk_ZZZ.json

Each chunk file is checkpointed after every completed iteration and overwritten in the same file.
If you open the file during execution, you can see:

  • status
  • completed_iterations
  • target_iterations
  • iteration_results
  • result_case_order
  • results_by_case
  • results_with_spin
  • results_without_spin

So if a run fails midway, the file still shows how many iterations were already completed and their values.

The main f_0 series saved for each chunk are:

  • bestSolution_wspin: max(solutions)
  • bestSolution_spin0: solutions[0]
  • bestSolution_spin1: solutions[-1]
  • bestSolution_randSpin: random choice between solutions[0] and solutions[-1]

For backward compatibility, the chunk files also keep:

  • results_with_spin as an alias of bestSolution_wspin
  • results_without_spin as an alias of bestSolution_randSpin

Runtime Satellite Instances

For each chunk, the generated satellite geometry is stored in:

Data/experiments/J_XX_K_YYY/runtime/chunk_ZZZ_satellites.json

Merged Results

After all chunks finish, merged outputs are stored in:

Data/experiments/J_XX_K_YYY/merged/results.json
Data/experiments/J_XX_K_YYY/merged/cdf_merged.eps

The merged JSON stores the same four f_0 cases inside results_by_case, and the merged CDF plot shows all available cases.

The overall summary across configurations is stored in:

Data/experiments/summary.csv

summary.csv includes mean and max columns for each saved case.

Where Job Files And Logs Are Stored

Generated shell scripts and local execution logs are stored under:

Data/jobs/

Example:

Data/jobs/J_02_K_015/
β”œβ”€β”€ chunk_001.sh
β”œβ”€β”€ chunk_002.sh
β”œβ”€β”€ run_all_chunks.sh
└── logs/
    β”œβ”€β”€ chunk_001.log
    └── chunk_002.log

Useful generated files:

  • Data/jobs/run_all.sh: run all chunk scripts sequentially
  • Data/jobs/run_all_parallel.sh: run all chunk scripts in parallel
  • Data/jobs/manifest.json: manifest of all generated chunk jobs

Notes

  • The default UE drop radius is controlled in main.py by DEFAULT_RADIUS_KM.
  • The default local parallelism is based on CPU count if --max-parallel is not specified.
  • If you want a specific radius, pass --radius-km ... explicitly.

Project Structure

root/
β”œβ”€β”€ main.py
β”œβ”€β”€ satTLEgenerator.py
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ generate_experiment_jobs.py
β”‚   └── merge_experiment_results.py
β”œβ”€β”€ Data/
β”œβ”€β”€ Results/
└── utils/
    β”œβ”€β”€ __init__.py
    β”œβ”€β”€ components.py
    β”œβ”€β”€ helper.py
    β”œβ”€β”€ network.py
    β”œβ”€β”€ optimizer.py
    β”œβ”€β”€ simulator.py
    └── synthetic_orbit.py

About

This is the repository for the paper: Dynamic FDD for Spectrum Sharing in Non-Terrestrial Networks

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors