Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UAV-Aided Secure Short-Packet Communications

MATLAB CVX License: MIT

This repository contains the MATLAB implementation of the joint trajectory and resource optimization algorithm described in the paper:

M. Tatar Mamaghani, X. Zhou, N. Yang, and A. L. Swindlehurst, "Secure Short-Packet Communications via UAV-Enabled Mobile Relaying: Joint Resource Optimization and 3D Trajectory Design," IEEE Transactions on Wireless Communications, vol. 23, no. 7, pp. 7802-7815, July 2024.

Abstract of Article

Short-packet communication (SPC) and unmanned aerial vehicles (UAVs) are anticipated to play crucial roles in the development of 5G-and-beyond wireless networks and the Internet of Things (IoT). In this paper, we propose a secure SPC system, where a UAV serves as a mobile decode-and-forward (DF) relay, periodically receiving and relaying small data packets from a remote IoT device to its receiver in two hops with strict latency requirements, in the presence of an eavesdropper. This system requires careful optimization of important design parameters, such as the coding blocklengths of both hops, transmit powers, and UAV's trajectory. While the overall optimization problem is nonconvex, we tackle it by applying a block successive convex approximation (BSCA) approach to divide the original problem into three subproblems and solve them separately. Then, an overall iterative algorithm is proposed to obtain the final design with guaranteed convergence. Our proposed low-complexity algorithm incorporates 3D trajectory design and resource management to optimize the effective average secrecy throughput of the communication system over the course of UAV-relay's mission. Simulation results demonstrate significant performance improvements compared to various benchmark schemes and provide useful design insights on the coding blocklengths and transmit powers along the trajectory of the UAV.


Overview

The code implements an iterative block successive convex approximation (BSCA) algorithm to maximize the effective average secrecy throughput (EAST) in a UAV-relayed IoT system with finite blocklength constraints and an eavesdropper with uncertain location.

Features

  • Joint optimization of transmit powers, coding blocklengths, and 3D UAV trajectory.
  • Robust design under eavesdropper location uncertainty.
  • Modular subproblem solvers (power allocation, blocklength allocation, trajectory optimization).
  • Support for benchmark schemes: resource-only optimization (RDFT) and trajectory-only optimization (TDFR).
  • Comprehensive visualization of results.

Requirements

  • MATLAB (R2023b or later recommended)
  • CVX (http://cvxr.com/cvx/) with a compatible solver, e.g., SDPT3, SeDuMi, Mosek (recommended)

Installation

  1. Clone this repository:
    git clone https://github.com/yourusername/UAV-Secure-SPC.git
    cd UAV-Secure-SPC
  2. Install CVX and add it to your MATLAB path.
  3. Run startup.m in MATLAB to add all required folders to the path.

Quick Start

Run a simple demo:

params = get_system_params(4);        % load scenario 4 parameters
results = joint_optimization(params); % run joint optimization
visualize_system(gca, params.qa, params.qb, params.qe_est, params.qi, params.qf);
plot_uav_trajectory(gca, results.qr, 'DisplayName', 'JTRD');

You can also use the provided scripts:

  • scripts/run_single_scenario.m – run one configuration and plot results.
  • scripts/run_eve_uncertainty.m – study the impact of Eve's location uncertainty.
  • scripts/run_blocklength_sweep.m – sweep over maximum blocklength Lmax.
  • scripts/run_comparison.m – compare JTRD against RDFT and TDFR.

Repository Structure

UAV-Secure-SPC/
├── README.md
├── LICENSE
├── .gitignore
├── startup.m
├── config/
│   └── get_system_params.m
├── src/
│   ├── algorithms/
│   │   ├── joint_optimization.m
│   │   ├── power_optimization.m
│   │   ├── blocklength_optimization.m
│   │   ├── trajectory_optimization.m
│   │   ├── resource_optimization.m
│   │   └── trajectory_only_optimization.m
│   ├── utils/
│   │   ├── compute_asb.m
│   │   ├── channel_dispersion.m
│   │   ├── func_A.m
│   │   ├── f_lb.m
│   │   ├── f_ccv.m
│   │   ├── generate_interval.m
│   │   ├── initialize_trajectory.m
│   │   ├── midway_turn_constraint.m
│   │   ├── linear_interp.m
│   │   └── pad_concatenate.m
│   └── visualization/
│       ├── visualize_system.m
│       └── plot_uav_trajectory.m
└── scripts/
    ├── run_single_scenario.m
    ├── run_eve_uncertainty.m
    ├── run_blocklength_sweep.m
    └── run_comparison.m

Documentation

Each function includes a help header describing its purpose, inputs, outputs, and references to equations in the paper. For detailed explanations, please refer to the paper.

License

This project is licensed under the MIT License – see the LICENSE file.

Citation

If you use this code in your research, please cite the paper:

@article{mamaghani2024secure,
  author={Tatar Mamaghani, Milad and Zhou, Xiangyun and Yang, Nan and Swindlehurst, A. Lee},
  journal={IEEE Transactions on Wireless Communications}, 
  title={Secure Short-Packet Communications via UAV-Enabled Mobile Relaying: Joint Resource Optimization and 3D Trajectory Design}, 
  year={2024},
  volume={23},
  number={7},
  pages={7802-7815},
  doi={10.1109/TWC.2023.3344802}
}

Contact

For questions or issues, please open an issue on GitHub or contact the authors.


2. LICENSE (MIT)

MIT License

Copyright (c) 2024 Milad Tatar Mamaghani et al.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

MATLAB simulation code for "Secure Short-Packet Communications via UAV-Enabled Mobile Relaying: Joint Resource Optimization and 3D Trajectory Design" — IEEE TWC 2024

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages