AnsweredAssumed Answered

MATLAB AD9361 HIL EXAMPLE QUESTIONS

Question asked by chaoloveai on Sep 10, 2015
Latest reply on Sep 10, 2015 by dpu

I use the ZEDBOARD AND fmcomms3 Eval Board . When I use ADI fmcomms2_3_data_stream example in the MATLAB 2014b 。I don't get the ideal sine wave .Below is the picture. Could you show me how to solve this problem? Thank you . 

 

AD9363  fmcomms2_3_data_stream  MATLAB CODE.

 

clear;

clc;

s = iio_sys_obj_matlab; % Constructor

s.ip_address = '192.168.1.102';

s.dev_name = 'ad9361';

s.in_ch_no = 2;

s.out_ch_no = 2;

s.in_ch_size = 8192;

s.out_ch_size = 8192;

 

 

s = s.setupImpl();

 

 

input = cell(1, s.in_ch_no + length(s.iio_dev_cfg.cfg_ch));

Fs = 30.72e6;

Fc = 1e6;

t = 1/Fs:1/Fs:s.in_ch_size/Fs;

for i=1:s.in_ch_no

    input{i} = sin(2*pi*Fc*t+(i-1)*pi/2)*1024;

end

 

 

input{s.in_ch_no+1} = 2.4e9;

input{s.in_ch_no+2} = 30.72e6;

input{s.in_ch_no+3} = 18.0e6;

input{s.in_ch_no+4} = 'slow_attack';

input{s.in_ch_no+5} = 0;

input{s.in_ch_no+6} = 'slow_attack';

input{s.in_ch_no+7} = 0;

input{s.in_ch_no+8} = 2.4e9;

input{s.in_ch_no+9} = 30.72e6;

input{s.in_ch_no+10} = 18.0e6;

 

 

output = cell(1, s.out_ch_no + length(s.iio_dev_cfg.mon_ch));

 

 

for i = 1:5

output = stepImpl(s, input);

rssi1 = output{s.out_ch_no+1};

rssi2 = output{s.out_ch_no+2};

end

 

 

s.releaseImpl();

 

 

figure % new figure

ax1 = subplot(2,1,1); % top subplot

ax2 = subplot(2,1,2); % bottom subplot

 

 

plot(ax1,output{1});

title(ax1,'I');

xlabel('Sample');

ylabel('Amplitude');

 

 

plot(ax2,output{2});

title(ax2,'Q');

xlabel('Sample');

ylabel('Amplitude');

QQ截图20150910131814.png

QQ截图20150910132204.png

Outcomes