read_ila

Posted yssrf-possible

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了read_ila相关的知识,希望对你有一定的参考价值。

close all;
clc;
%clear;
%点数
%point=40960;
fft_point=200;
show_point=200;
end_point=1024;
FS=30.72;%%MHZ
%转换为频率
f=((2:fft_point)-1)*FS/fft_point; %换算成实际的频率值
w=boxcar(fft_point-1);
%读取ila
ila_data_get_I=ci(2:4:end_point,1);
ila_data_get_I(1)=0;
ila_data_get_Q=cq(2:4:end_point,1);
ila_data_get_Q(1)=0;% ila_data_get_I_2=[ila_data_get_I_1‘ ila_data_get_I_1‘ ila_data_get_I_1‘ ila_data_get_I_1‘];
% ila_data_get_Q_2=[ila_data_get_Q_1‘ ila_data_get_Q_1‘ ila_data_get_Q_1‘ ila_data_get_Q_1‘];
% ila_data_get_I=ila_data_get_I_2;
% ila_data_get_Q=ila_data_get_Q_2;
ila_data_get=ila_data_get_I+ila_data_get_Q*1i;
% ila_data_get_2=[ila_data_get_1‘ ila_data_get_1‘ ila_data_get_1‘ ila_data_get_1‘];
% ila_data_get=ila_data_get_2‘;
% ila_data_get=ila_data_get_Q;
%显示部分ila_data
figure;
plot(ila_data_get_I(1:show_point));title(‘信号I‘);grid on;legend(‘信号I‘);ylabel(‘幅度(V)‘);
ila_data_get_a=ila_data_get(2:fft_point);
fft_data=fft(ila_data_get_a,(fft_point-1));
%取模
abs_fft=abs(fft_data);
%转换为幅度
V_fft=abs_fft/(fft_point/2);
V_fft(1)=abs_fft(1)/fft_point;
%转换为对数
data_dB=20*log10(abs(fft_data));
len=length(data_dB);
fri_fig=data_dB(1:len/2);
sec_fig=data_dB((len/2+1):len);
tol_fig_l=[sec_fig‘ fri_fig‘];
tol_fig=tol_fig_l‘;

figure;
plot(f,V_fft);title(‘IQ的频谱幅度‘);xlabel(‘频率(MHz)‘);ylabel(‘幅度(V)‘);grid on;legend(‘IQ的频谱‘);
figure;
plot(f,data_dB);title(‘IQ的频谱对数‘);xlabel(‘频率(MHz)‘);ylabel(‘dB‘);grid on;legend(‘IQ的频谱‘);
figure;
plot(tol_fig);title(‘IQ的中心谱‘);ylabel(‘dB‘);grid on;legend(‘IQ中心谱‘);

  

以上是关于read_ila的主要内容,如果未能解决你的问题,请参考以下文章