WLAN and Zigbee Signals Classification Using AI ๐Ÿ“ก

August 3, 2025 ยท View on GitHub

Table of Contents

Project Overview

The 2.4 GHz ISM band is a busy place, with protocols like Wi-Fi and Zigbee constantly vying for space. In environments like smart homes, industrial IoT, or crowded offices, distinguishing between these signals can be a significant challenge.

This project addresses that problem by developing a lightweight, AI-based classifier that identifies Zigbee and Wi-Fi signals from spectrogram images. Built with MATLAB and deep learning, the system classifies time-frequency spectrograms into three categories: Zigbee, WLAN, and Background. The solution supports both synthetic signal generation and live signal classification using an ADALM-PLUTO SDR.

This project is designed as part of the Mathworks AI Challenge.

Link to the YouTube Video

Classification

Zigbee

To evaluate the model's performance, each signal is first generated using the MATLAB Wireless Waveform Generator and then transmitted over the air using the ADALM-PLUTO SDR.

The figure below shows a Zigbee signal prepared for transmission:

WLAN Transmission

The following image presents the classification results for the Zigbee signal.

  • Top left: The received spectrogram captured by the ADALM-PLUTO SDR.
  • Bottom left: Pixel-wise classification results. Zigbee pixels are correctly labeled in pink, and background noise is labeled in blue.
  • Right: The frequency mask highlights the detected Zigbee band in pink, consistent with the transmitted signal (centered at 2.4 GHz, 2 MHz wide).

Zigbee Classification

WLAN

The next figure shows the WLAN signal generated for transmission:

WLAN Transmission

The following classification result shows:

  • Top left: The received WLAN signal from the ADALM-PLUTO SDR.
  • Bottom left: Pixel classification, where WLAN regions are marked in purple and background in blue.
  • Right: The model identifies the WLAN operating band in gray, correctly corresponding to the transmitted signal (centered at 2.4 GHz, 20 MHz wide).

WLAN Classification

Background (Noise)

To verify that the model is not producing false positives, it's also tested without transmitting any signal. As shown below, the model correctly labels the entire frame as background (blue), indicating no active Zigbee or WLAN signals:

Noise Classification

Hardware

Installation and Usage

Prerequisites

Steps

  1. Clone the repository:

    git clone https://github.com/Gonzaleski/WLAN-Zigbee-Classifier.git
    
  2. Change the directory:

    cd WLAN-Zigbee-Classifier
    
  3. Open MATLAB

  4. Generate the training data:

    • Go to scripts/dataGeneration
    • In MATLAB, run generateData.m
  5. Train the model:

    • Go to scripts/training
    • In MATLAB, run trainModel.m
  6. Connect the SDR to the laptop

  7. Initialize the SDR:

    • Go to scripts/testing
    • In MATLAB, run initializeSDR.m
  8. Run the test and see the results:

    • Go to scripts/testing
    • In MATLAB, run testWithSDR.m

References