Problem of generating sine wave with Simulink

Having issues with the site, hardware, source code, or any other issues?
Post Reply
ycchang
Posts: 3
Joined: Thu Mar 16, 2017 10:29 pm

Problem of generating sine wave with Simulink

Post by ycchang »

hi all,

my bladeRF confiugration is as below

bladeRF-cli version: 1.4.0
libbladeRF version: 1.7.2

Firmware version: 1.9.1
FPGA version: 0.6.0

1. When I use simulink to generate sine wave and observe the result in the spectrum analyzer. I found the
spectrum is not OK (having so many spurs).

2. I use GNU radio instead, the spectrum looks pretty nice.

I am doubting if there is anything wrong with my setting for MATLAB case. For 4Mhz sine wave, What is the correct
sample rate, number of samples to TX during each simulation step and buffers?
I have attached my simulink design, please kindly give any advise.
ycchang
Posts: 3
Joined: Thu Mar 16, 2017 10:29 pm

Re: Problem of generating sine wave with Simulink

Post by ycchang »

I have played around with the bladeRF_tx_tone.m.

Comparing 3 types of tx mode:

(a) single_burst - spectrum looks OK
(b) split_burst - driver reported operation timeout
(c) stream - spectrum looks bad as I saw with Simulink , I guess the data is not burst so sometimes zero complex value is
feed in, and that's the reason why there are many spurs there in the spectrum anaylzer

Looks like Simulink uses the underlying wrapper of libbladerf in stream mode and may not feed in continuous samples.

Does anyone successfully use Simulink for testing continuous sine wave or single tone ? please kindly give any advise.


Thank you
ycchang
Posts: 3
Joined: Thu Mar 16, 2017 10:29 pm

Re: Problem of generating sine wave with Simulink

Post by ycchang »

hi all,

I modify the Simulink block to put another buffer (16384*100) which can extend the transfer of samples in burst. But after
each 16384*100 burst, there is gap with no data between subsequent transfer.

I am wondering why there's no such symptom in GNU radio. Besides for the USRP reference design, there's no need to
put such kind of a big buffer in simulink

screen.PNG
Post Reply