BPS Support

cancel
Showing results for 
Search instead for 
Did you mean: 

NanoBEE configuration and signal generation

Hello everyone, my name is Guillaume Dupré, I am an intern at the LASSENA laboratory in Montréal (ÉTS).

In the context of the AVIO-601 project, my mission is to create a radio frequency interference generator on Matlab using a NanoBEE. To do so, I am currently using some Matlab code you gave to the LASSENA team such as the MimoDashboard GUI.

What I understand is that it is possible to configure the NanoBEE through a file named "example.conf" located in the "media/card" folder by connecting via ssh to the device.

The problem is I need to change the parameters (carrier frequency and bandwidth) using Matlab only. Some code you wrote allows me to change the carrier frequency of the card through Matlab. However, I also need to be able to change its bandwidth and I could not find how to do so in your code. That is why I am asking for your help to solve my problem. Is there any way to change the bandwidth of the NanoBEE using Matlab only ?

Last but not least, I also need to generate different types of signals with the NanoBEE. For now, the only signal I can generate is a wide-band one. How could I, for instance, generate a simple sinewave on Matlab with the NanoBEE ?

Thank you for your help.

0 Kudos
Message 1 of 2
(1,903 Views)

Hi Guillaume,

 

Please see my responses below:

1. Yes, you can program RF bandwidth settings via "fmc112ctl" command and MATLAB M-scripts on Linux/Unit systems.  When you log in the Linux system of nanoBEE, please check the RF bandwidth information using "fmc112ctl" command:  

root@bee:~# fmc112ctl rf_bandwidth --help

Here is an example function of rf_bandwidth, which is used to change RF bandwidths for a specific RF channel on any of top or bottom FMC112 transceiver boards of nanoBEE.

 

function cmdout = rf_bandwidth(remote, conf, card, direction, rf_bw_hz)

% Function: Set RF Bandwidth with remote account, configuration file, card

% ID (Top/Buttom), signal direction (tx or rx) and RF bandwith (Hz)

% Input Parameters:

% Remote -- root@192.168.0.233 (root@NanoBEE IP Address)

% Conf   -- A configuration file name, e.g. 'example.conf'.

% card   -- RF transcever card ID: 0 (buttom FMC112 card), 1 (Top FMC112 card)

% direction -- signal direction: 'tx' or 'rx'

% rf_bw_hz  -- a string of RF bandwidth, e.g. '30000000' represents 30 MHz.

% Output:

% cmdout: output lines/return from fmc112ctl command.

% Usage examples:

%  Set TX RF bandwidth to 30 MHz on bottom FMC112 card with 'example.conf' configuration file

%  under the current working directory in MATLAB.

%  rf_bandwidth('root@192.168.0.233','example.conf','0', 'tx', num2str(30000000))

%

sendScpCommand(remote, conf, '/dev/shm/.conf');

cmd = ['rf_bandwidth --file=/dev/shm/.conf --card=' card ' --' direction  '=' rf_bw_hz];

cmdout = fmc112ctl(remote, cmd);

 

Other functions called by rf_bandwdith are defined as follows:

function cmdout = sendScpCommand(remote, file, destination)

                [status, cmdout] = unix(['scp -o StrictHostKeyChecking=no ' file ' ' remote ':' destination ' >/dev/null']);

                if status

                                error(['Unable to send file/s: ' file ' to destination: ' destination ' on: ' remote]);

                end

function cmdout = fmc112ctl(remote, cmd)

                cmd = ['fmc112ctl ' cmd];

                cmdout = sendSshCommand(remote, cmd);

 

function cmdout = sendSshCommand(remote, cmd)

                [status, cmdout] = unix(['ssh -o StrictHostKeyChecking=no ' remote ' "' cmd '"']);

                if status

                                error([cmdout 'Unable to send command: ' cmd ' to remote: ' remote]);

                end

 

2.  You can find many MATLAB examples about how to generate sinusoidal signals inside MATLAB. For example, an easy way is to utilize dsp.SineWave object from MATLAB DSP toolbox.

 %Generate a sine wave with an amplitude of 1, frequency of 1 MHz, and initial phase of 0:
 hsin1 = dsp.SineWave(1, 1e+6);
 hsin1.SamplesPerFrame = 5000;
 y = step(hsin1);
 plot(y);

0 Kudos
Message 2 of 2
(1,854 Views)