Skip to content

Deep Reinforcement Learning for Energy-Efficient Computation Offloading in Mobile-Edge Computing

Notifications You must be signed in to change notification settings

mehrshaad/DeepRL-Offloading-MEC

Repository files navigation

DeepRL-Offloading-MEC

This repository implements the DRL framework from Zhou et al., “Deep Reinforcement Learning for Energy‑Efficient Computation Offloading in Mobile‑Edge Computing” IEEE Internet of Things Journal, 2022. It reproduces the paper’s joint optimization of offloading decisions, MEC CPU allocation, and spectrum allocation under per‑task delay constraints, and provides a practical DRL policy implementation with Greedy and Random baselines to evaluate energy–delay tradeoffs.

Project Overview

The system consists of a single cell with an Access Point (AP) hosting an MEC server. User Equipments (UEs) generate computation tasks that can be executed locally or offloaded to the MEC server wirelessly. Tasks are indivisible and have strict delay requirements. The goal is to minimize the long-term average system energy consumption while meeting these constraints.

System Model & Parameters

  • Tasks are characterized by data size, CPU cycles needed, and maximum tolerable delay.
  • UEs have local CPU frequencies and energy coefficients.
  • Wireless channel conditions affect transmission rates.
  • Resource allocation includes CPU frequency shares and spectrum fractions allocated to offloaded tasks.
  • Energy consumption includes local execution energy, transmission energy, MEC execution energy, and idle standby energy.

Offloading Algorithms

Two algorithms are implemented for task offloading and resource allocation as the baselines:

  • Greedy Policy: Selects offloading decisions to minimize immediate energy consumption based on task and channel conditions. Computation and spectrum resources are allocated in proportion to local energy requirements.
  • Random Policy: Randomly assigns offloading decisions among feasible candidates and randomly distributes resources as a baseline for comparison.

Results Summary

Simulations run over multiple time slots show the Greedy policy reduces average energy consumption significantly compared to the Random policy, demonstrating the benefits of intelligent offloading and resource allocation.

Usage

  • The main experiment is run via main.py. It performs multiple runs comparing Greedy and Random policies.
  • The simulation.py module generates randomized tasks, UEs, and channel parameters based on system specifications.
  • Policies are implemented in greedy_policy.py and random_policy.py.
  • Results print mean and standard deviation of energy consumption.

System Requirements

  • Python with NumPy installed.
  • Run python main.py to start simulations.

Table of Parameters

Symbol Description Value / Range
$p_i$ Transmission power of UE $i$ $23,\text{dBm}$
$N_0$ Noise power spectral density $-158,\text{dBm/Hz}$
$L_i$ Distance between UE $i$ and MEC server $[50, 300],\text{m}$
$g_i$ Channel power gain $127 + 30\log(L)$
$W$ Transmission bandwidth $10,\text{MHz}$
$f_i^{\text{loc}}$ Local computational capability of UE $i$ $[0.5, 1.5],\text{GHz}$
$f_{\text{MEC}}$ MEC computation capability $8,\text{GHz}$
$P_{\text{MEC}}$ MEC full-load power $5,\text{W}$
$p_i^{w}$ Standby power of UE $i$ $0.03,\text{W}$
$d_{i,\max}^{t}$ Maximum tolerant delay of the task $\Lambda_i^t$ $3,\text{s}$
$D_i^t$ Task input data size $[16, 80],\text{Mbit}$
$C_i^t$ Required CPU cycles per task $[1000, 3500],\text{Megacycles}$

About

Deep Reinforcement Learning for Energy-Efficient Computation Offloading in Mobile-Edge Computing

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages