一、简介

支持向量机(Support Vector Machine)是Cortes和Vapnik于1995年首先提出的,它在解决小样本、非线性及高维模式识别中表现出许多特有的优势,并能够推广应用到函数拟合等其他机器学习问题中。
1 数学部分
1.1 二维空间
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_进制
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_拟合_02
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_2d_03
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_拟合_04
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_进制_05
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_机器学习_06
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_机器学习_07
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_2d_08
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_拟合_09
2 算法部分
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_拟合_10
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_拟合_11
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_2d_12
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_拟合_13

二、源代码

% function [ err_flage,f_t_data_abs] = DataConvert(str_1 )
% 
% %%
% %%
% %--------------单位及常量------------%
% us=1e-6;
% KHz=1e3;
% MHz=1e6;
% GHz=1e9;
% km_h=1e3/3600;
% km_s=1e3;
% c=3e8;              % 光速299792.458*km_h
% mm=1e-3;
% 
% %%
% f0=24.125*GHz;                   % 发射信号的载频
% B=250*MHz;
% 
% c = 3e8;
% lambda = c/f0;
% 
% lambda1 = c/(24*GHz);
% lambda2 = c/(24.25*GHz);
% 
% fs_r =426.666*KHz;
% fs_v = 5.12*KHz;
% 
% N_R = 512;
% N_V = 512; 
% 
% N_SAMPLE = 5;
% 
% N_R_NULL = 0;
% N_R_NULL1 = 0;
% N_V_NULL = 0;
% N_V_NULL1 = 0;
% 
% tao_r = 100e-3;
% tao_v = 100e-3;
% miu_r=B/tao_r;
% miu_v=B/tao_v;
% 
% 
% %%
% a=textread(str_1,'%s')';
% 
% data=hex2dec(a)'; %16进制转化为10进制数,存入data矩阵
% clear a;
% one_prf_length = (N_R+0)*2 + (N_V+0)*2;%IQ两个通道传上的来的字节数
% 
% frame_flage_index = strfind(data,[0 17 34 51]);%cd cd ef ef   %帧间标志位检测
% err_flage = 0;
% 
% for i=1:length(frame_flage_index)-1       %检查数据是否传错
%     err_num(i) = frame_flage_index(i+1) - frame_flage_index(i);
%     if(err_num(i) ~= one_prf_length*4 )
%         err_flage = err_flage+1;
%     end
% end
% 
% data12 = data(1:(frame_flage_index(end)+3));
% 
% data1=reshape(data12,2,floor(length(data12)/2));
% clear data12;
% for i=1:size(data1,2)
%     data2(i)=data1(1,i)+256* data1(2,i);
% end
% clear data1;
% data2 =(data2/65536*5-2.5);%hilbert
% data3=(reshape( data2,N_R+2,floor( length(data2)/(N_R+2) ) )).';
% % clear data2;
% % for i=1:size(data1,2)
% %     data2(i)=data1(1,i)+256* data1(2,i);
% % end
% % clear data1;
% % data2 = data2/65536*5-2.5;
% % data3=(reshape( data2,1024,floor( length(data2)/1024 ))).';
% 
% ch1 = reshape(data3(:,1:256-1).', 1, length(data2)/2-size(data3,1)*2);
% ch2 = reshape(data3(:,256:511-1).', 1, length(data2)/2-size(data3,1)*2);
% clear data2;
% clear data3;
% 
% data6 = ch1 + j* ch2;
% data7 = data6(1:N_SAMPLE:end);
% 
% %%
% Nfft = (N_R-2)/N_SAMPLE;
% x_in = [zeros(1,Nfft) data6 zeros(1,Nfft)];
% w = hamming(Nfft);
% noverlap = Nfft/2;
% [f_t_data,f1,t1] = spectrogram(x_in,w,noverlap,Nfft,fs_r/N_SAMPLE);
% f_t_data_abs = abs(fftshift(f_t_data,1));%最终时频图数据矩阵
% clear f_t_data;
% % figure(1)
% % imagesc(t1,f1-max(f1)/2,f_t_data_abs);%fftshift;
% % view(2)%plot
% end
% 
% 
function [ err_flage,f_t_data_abs] = DataConvert(str_1 )

%%
%%
%--------------单位及常量------------%
fs_v = 1024;
N_R = 256;
N_V = 256; 
%%
a=textread(str_1,'%s')';
data=hex2dec(a)'; %16进制转化为10进制数,存入data矩阵
clear a;
one_prf_length = (N_R*2)*2 + 4;
frame_flage_index = strfind(data,[0 17 34 51]);%cd cd ef ef   %帧间标志位检测
err_flage = 0;
for i=1:length(frame_flage_index)-1       %检查数据是否传错
    err_num(i) = frame_flage_index(i+1) - frame_flage_index(i);
    if(err_num(i) ~= one_prf_length*1 )
        err_flage = err_flage+1;
    end
end

data12 = data(1:(frame_flage_index(end)+3));
data1=reshape(data12,2,floor(length(data12)/2));
clear data12;
for i=1:size(data1,2)
    data2(i)=data1(1,i)+256* data1(2,i);
end
clear data1;
data2 = data2/65536*5-2.5;
data3=(reshape( data2,N_R*2+2,floor( length(data2)/(N_R*2+2) ) )).';
clear data2;
%%
 ch4_I = data3(:,1:2:512);     %Q4
 ch4_Q = data3(:,2:2:512);   %Q4 
 ch4 = ch4_I + j*ch4_Q;
 clear data3;
%% 
data6 = reshape((ch4).',1,size(ch4,1)*size(ch4,2));
len=length(data6);
total=0;
for nn=1:len
    total=total+data6(nn);
end
total_avg=total/len;
for nn=1:len
   data6(nn)=data6(nn)-total_avg;
end

三、运行结果

【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_拟合_14
【雷达通信】基于matlab SVM识别雷达数据【含Matlab源码 305期】_机器学习_15

四、备注

2014a