当前位置:网站首页>【信号识别】基于深度学习CNN实现信号调制分类附matlab代码
【信号识别】基于深度学习CNN实现信号调制分类附matlab代码
2022-06-24 06:41:00 【Matlab科研工作室】
1 简介
大容量、高速率的信息传输需求极大地推动了认知无线电领域的技术发展,其中,复杂电磁环境中信道均衡及通信调制类型识别技术,是该领域重要组成之一。传统的均衡处理主要是利用梯度下降法逼近信道特征,在时域或频域对信号进行逆卷积运算,以抑制信道干扰和畸变,改善系统响应;而传统的调制识别方法主要通过提取信号的专家特征,选择合适的分类器进行识别。近年来,许多先进的卷积神经网络架构及优化算法相继提出,深度学习在多个领域都取得了突破性的成果。基于卷积神经网络对原始输入的抽象特征学习能力,本文对其在信号去噪、信道均衡及调制识别等方面的应用进行了深入研究。
2 部分代码
classdef helperModClassFrameStore < handle%helperModClassFrameStore Manage data for modulation classification% FS = helperModClassFrameStore creates a frame store object, FS, that% stores the complex baseband signals in a format usable in machine% learning algorithms.%% FS = helperModClassFrameStore(MAXFR,SPF,LABELS) creates a frame store% object, FH, with the maximum number of frames, MAXFR, samples per% frame, SPF, and expected labels, LABELS.%% Methods:%% add(FS,FRAMES,LABEL) adds frame(s), FRAMES, with label, LABEL, to the% frame store.%% [FRAMES,LABELS] = get(FS) returns stored frames and corresponding% labels from frame store, FS.%% See also ModulationClassificationWithDeepLearningExample.propertiesOutputFormat = FrameStoreOutputFormat.IQAsRowsendproperties (SetAccess=private)%NumFrames Number of frames in the frame storeNumFrames = 0%MaximumNumFrames Capacity of frame storeMaximumNumFrames%SamplesPerFrame Samples per frameSamplesPerFrame%Labels Set of expected labelsLabelsendproperties (Access=private)FramesLabelendmethodsfunction obj = helperModClassFrameStore(varargin)%helperModClassFrameStore Store complex I/Q frames% FS = helperModClassFrameStore(MAXFR,SPF,LABELS) returns a frame% store object, FS, to store complex I/Q baseband frames of type% LABEL with frame size of SPF. Frame are stored as a% [SPFxNUMFRAMES] array.inputs = inputParser;addRequired(inputs, 'MaximumNumFrames')addRequired(inputs, 'SamplesPerFrame')addRequired(inputs, 'Labels')parse(inputs, varargin{:})obj.SamplesPerFrame = inputs.Results.SamplesPerFrame;obj.MaximumNumFrames = inputs.Results.MaximumNumFrames;obj.Labels = inputs.Results.Labels;obj.Frames = ...zeros(obj.SamplesPerFrame,obj.MaximumNumFrames);obj.Label = repmat(obj.Labels(1),obj.MaximumNumFrames,1);endfunction add(obj,frames,label,varargin)%add Add baseband frames to frame store% add(FS,FRAMES,LABEL) adds frame(s), FRAMES, with label, LABEL, to% frame store FS.numNewFrames = size(frames,2);if (~isscalar(label) && numNewFrames ~= length(label)) ...&& (size(frames,1) ~= obj.SamplesPerFrame)error(message('comm_demos:helperModClassFrameStore:MismatchedInputSize'));end% Add framesstartIdx = obj.NumFrames+1;endIdx = obj.NumFrames+numNewFrames;obj.Frames(:,startIdx:endIdx) = frames;% Add labels typesif all(ismember(label,obj.Labels))obj.Label(startIdx:endIdx,1) = label;elseerror(message('comm_demos:helperModClassFrameStore:UnknownLabel',...label(~ismember(label,obj.Labels))))endobj.NumFrames = obj.NumFrames + numNewFrames;endfunction [frames,labels] = get(obj)%get Return frames and labels% [FRAMES,LABELS]=get(FS) returns the frames and corresponding% labels in the frame store, FS.%% If OutputFormat is IQAsRows, then FRAMES is an array of size% [2xSPFx1xNUMFRAMES], where the first row is the in-phase% component and the second row is the quadrature component.%% If OutputFormat is IQAsPages, then FRAMES is an array of size% [1xSPFx2xNUMFRAMES], where the first page (3rd dimension) is the% in-phase component and the second page is the quadrature% component.switch obj.OutputFormatcase FrameStoreOutputFormat.IQAsRowsI = real(obj.Frames(:,1:obj.NumFrames));Q = imag(obj.Frames(:,1:obj.NumFrames));I = permute(I,[3 1 4 2]);Q = permute(Q,[3 1 4 2]);frames = cat(1,I,Q);case FrameStoreOutputFormat.IQAsPagesI = real(obj.Frames(:,1:obj.NumFrames));Q = imag(obj.Frames(:,1:obj.NumFrames));I = permute(I,[3 1 4 2]);Q = permute(Q,[3 1 4 2]);frames = cat(3,I,Q);endlabels = obj.Label(1:obj.NumFrames,1);endfunction [fsTraining,fsValidation,fsTest] = ...splitData(obj,splitPercentages)%splitData Split data into training, validation and test% [FSTRAIN,FSVALID,FSTEST]=splitData(FS,PER) splits the stored% frames into training, validation, and test groups based on the% percentages, PER. PER is a three-element vector,% [PERTRAIN,PERVALID,PERTEST], which specifies training,% validation, and test percentages. FSTRAIN, FSVALID, and FSTEST% are the frame stores for training, validation, and test frames.fsTraining = helperModClassFrameStore(...ceil(obj.MaximumNumFrames*splitPercentages(1)/100), ...obj.SamplesPerFrame, obj.Labels);fsValidation = helperModClassFrameStore(...ceil(obj.MaximumNumFrames*splitPercentages(2)/100), ...obj.SamplesPerFrame, obj.Labels);fsTest = helperModClassFrameStore(...ceil(obj.MaximumNumFrames*splitPercentages(3)/100), ...obj.SamplesPerFrame, obj.Labels);for modType = 1:length(obj.Labels)rawIdx = find(obj.Label == obj.Labels(modType));numFrames = length(rawIdx);% First shuffle the framesshuffleIdx = randperm(numFrames);frames = obj.Frames(:,rawIdx);frames = frames(:,shuffleIdx);numTrainingFrames = round(numFrames*splitPercentages(1)/100);numValidationFrames = round(numFrames*splitPercentages(2)/100);numTestFrames = round(numFrames*splitPercentages(3)/100);extraFrames = sum([numTrainingFrames,numValidationFrames,numTestFrames]) - numFrames;if (extraFrames > 0)numTestFrames = numTestFrames - extraFrames;endadd(fsTraining, ...frames(:,1:numTrainingFrames), ...obj.Labels(modType));add(fsValidation, ...frames(:,numTrainingFrames+(1:numValidationFrames)), ...obj.Labels(modType));add(fsTest, ...frames(:,numTrainingFrames+numValidationFrames+(1:numTestFrames)), ...obj.Labels(modType));end% Shuffle new frame storesshuffle(fsTraining);shuffle(fsValidation);shuffle(fsTest);endfunction shuffle(obj)%shuffle Shuffle stored frames% shuffle(FS) shuffles the order of stored frames.shuffleIdx = randperm(obj.NumFrames);obj.Frames = obj.Frames(:,shuffleIdx);obj.Label = obj.Label(shuffleIdx,1);endendend
3 仿真结果


4 参考文献
[1]周煜. 基于深度学习的无线信号调制方式识别技术研究[D]. 北京邮电大学, 2019.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
边栏推荐
- Vmware tools still exist after normal uninstallation for many times. How to solve it
- MFC使用控制台时 项目路径中不能有空格和中文,否则会报错误 LNK1342 未能保存要编辑的二进制文件的备份副本等
- 面渣逆袭:MySQL六十六问,两万字+五十图详解
- In the middle of the year, I have prepared a small number of automated interview questions. Welcome to the self-test
- 【小技巧】使用matlab的深度学习工具箱deepNetworkDesigner快速设计
- System design: partition or data partition
- JSON formatting method advantages of JSON over XML
- The third session of freshman engineering education seminar is under registration
- Huawei Cloud Database Advanced Learning
- JVM调试工具-jvisualvm
猜你喜欢

面渣逆袭:MySQL六十六问,两万字+五十图详解

华为云数据库进阶学习

Leetcode概率题面试突击系列11~15

MFC使用控制台时 项目路径中不能有空格和中文,否则会报错误 LNK1342 未能保存要编辑的二进制文件的备份副本等

35 year old crisis? It has become a synonym for programmers

Virtual file system

【帧率倍频】基于FPGA的视频帧率倍频系统verilog开发实现

Functions in setinterval cannot have parentheses

Interpreting top-level design of AI robot industry development

在js中正则表达式验证小时分钟,将输入的字符串转换为对应的小时和分钟
随机推荐
What is JSP technology? Advantages of JSP technology
Decryption of the original divine square stone mechanism
树莓派4B开发板入门
[cloud based co creation] overview of the IOT of Huawei cloud HCIA IOT v2.5 training series
Canal安装配置
Big factories are not the only way to measure ability. The three years' experience of Shangcai's graduation
MAUI使用Masa blazor组件库
I failed to delete the database and run away
Functions in setinterval cannot have parentheses
Hyperledger fabric ledger snapshot - fast data synchronization
[security] how to [host security - hybrid cloud version] support secure access to non Tencent virtual machines
Unexpected token u in JSON at position 0
云监控系统 HertzBeat v1.1.0 发布,一条命令开启监控之旅!
[problem solving] virtual machine configuration static IP
Tencent host security captures Yapi remote code execution 0day vulnerability for wild exploitation. The attack is spreading and can be intercepted by firewall
Stop looking! The most complete data analysis strategy of the whole network is here
[binary number learning] - Introduction to trees
An example of MySQL accidental deletion recovery - using Myflash
The cloud monitoring system hertzbeat V1.1.0 is released, and a command starts the monitoring journey!
应用配置管理,基础原理分析