USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

Two TX in one USRP with complicate transmission scenario

Solved!
Go to solution

Hi all,

 

Please take a look at the following picture. I tried to illustrate you what I want to code in the LabVIEW.

 

Let me explain to you the scenario. I want to use one USRP-2943R with two enabled channels (0,1). In both channels the active antennas will transmit a signal with a fixed size (IQ rate = 1M, Waveform size=100000 Samples). However the carrier frequencies are different in both channels. Also the transmission will not be continuous. As it is shown in the figure in some intervals, they may need to wait and don't transmit. Or, they can also transmit at the same time. Actually, the decision for each channel to transmit or not transmit, is made at random in the beginning of the each time slot. 

 

As I tried to code this scenario, I encountered some challenges. For example: 

 

1- Since both channels are involved in this scenario so I need to enable both channels in the beginning of the session. So how can I disable and enable them as the session is running?

 

2- If we cannot disable the channel which is already enabled, then how we can write the data in the targeted channel in a specific time but not to write on the other channel? 

 

3. Do you think that I need to use LabVIEW FPGA module instead of LabVIEW software to implement this transmission scenario?

 

Thank you.

 

1.jpg

 

0 Kudos
Message 1 of 17
(4,383 Views)

Hi Amir2, 

I have some clarifying questions: 
1) Have you looked at the niUSRP EX Tx Multiple Output (Single Device, Multi Channel).vi example? 

2) How strict are your timing constraints? 

3) Do your channels have to be synchronized? 

4) What is your application? 

Regarding your questions:
I don't believe there is a way to disable the channel that is already enabled. However, if you look at the niUSRP Write TX Data (poly).vi function, there is a "end of data?" input that when set to true, the transmission aborts when the last data sample generates. You might consider starting with the example I mentioned earlier, if you haven't already, and adding in logic with the waveform you create and the "end of data" input. The example is writing a CW to each channel but you could write your entire waveform selectively. 

Shalini M.
Partner Development Engineer
Alliance Partner Network
National Instruments
0 Kudos
Message 2 of 17
(4,311 Views)

Hi Shalini,

 

Thank you for your message. 

Below please find my answers to your questions inline:

 

1) Have you looked at the niUSRP EX Tx Multiple Output (Single Device, Multi Channel).vi example?

 Yes. This is actually the example that I started to work on. 

2) How strict are your timing constraints? 

Timing is very strict for my application. Although there might be some small (like 5ms) delay in the beginning of each transmission at each time slot but it will be okey. However, we would like to be on time in transmission as much as we can. 

3) Do your channels have to be synchronized? 

Yes. As you see in the figure sometimes we need to have transmission in both channels at the same time. 

4) What is your application? 

This transmission scenario is one part of the whole algorithm that we would like to prototype. The application is related to the Cognitive Radio Networks. Actually, these two transmitters are primary users. Each primary user is active in its associated channel in the beginning of each time slot uniformly at random. In other words, not only primary users do not transmit all the time in the channel, but also their activity in the channel is random.

 

Regarding your explanation:

 

In the niUSRP Write TX Data (poly).vi function, if I set the "end of data?" to true, my understanding is that, it will abort the transmission when the last data generates, in both channels. However, as we see in the figure sometimes we may need to transmit in one channel but not transmit in the other channel. How we can control writing in one channel but not writing on the other channel? 

Yes. We can write different type of waveform for each channel.So, How this and "end of data?" together, can help us to decide how to write on a specific channel?

 

Let's say in one iteration of while loop how we can write the data on one channel but not write on the other one? 

Thank you.

 

 

 

0 Kudos
Message 3 of 17
(4,307 Views)

Hi Amir, 

Thank you for answering those questions!


Would you be able to provide a state diagram of what you are doing?
You mentioned that the decision for each channel to transmit is random but I'm still unclear on what is determining when something is transmitted on each channel. Also, you say the timing is very strict but 5ms out of 100ms is a significant difference. 

 

For writing on a specific channel, you can use the channel list input and you could potentially add in logic that specifies which channel to write the data to on each iteration. Alternatively, it would be significantly more complicated but if you are comfortable with LV FPGA programming, you could create a custom bitfile that uses 2 DMA FIFOs for your waveforms and on the host decide which waveform writes to each channel. 

 

 

Shalini M.
Partner Development Engineer
Alliance Partner Network
National Instruments
0 Kudos
Message 4 of 17
(4,294 Views)

Hi Shalini,

Attached please find the VI that I am trying to code this algorithm. 

I am also using the following setting as well. 

 

At each iteration of the while loop, the output of the MathScript Node, Selection, decides that the data should be written on which channel or channels. This is established by the *.m code such that at each iteration, the probabilities that Tx1 in channel 0, and TX1 in channel 1 transmit are p0 and p1, respectively.

 

As I run the code, at each while loop iteration it writes the data on both channels instated of following the rules that is governed by the output of the case structure.

 

Thank you.

 

b.jpg

 

 

 

0 Kudos
Message 5 of 17
(4,280 Views)

Hi Amir2, 

If you diagram disable the mathscript node and just wire a 0 or 1 into the channel list, does that still write the data on both channels? 
Also, what are you using to test the results? 

Shalini M.
Partner Development Engineer
Alliance Partner Network
National Instruments
0 Kudos
Message 6 of 17
(4,266 Views)

Yes, in that case, it still writes the data on both channels. 

0 Kudos
Message 7 of 17
(4,262 Views)

Let me answer to your question below as well:

Also, what are you using to test the results? 

As I mentioned before, this transmission scenario is just one part of the algorithm used in Cognitive Radio. This is how Primary Users (PU) are active in the channels. After prototyping this scenario for the PU, we need to add Secondary User (SU) activity in the channels which follows another type of channel access algorithm. The secondary user needs to sense the selected channel first and if it finds that the channel is idle then decides to transmit. But, we will focus on SU after we solved the first problem which is the PU activity in the channels.

 

 

 

0 Kudos
Message 8 of 17
(4,255 Views)

Hi Amir2, 

Thank you for answering my questions! I plan on playing around with the channel list input using that example and a USRP RIO on Monday. In the case that that option doesn't allow you to selectively write to channels, are you able to implement the FPGA solution I mentioned in a previous post? 

Shalini M.
Partner Development Engineer
Alliance Partner Network
National Instruments
0 Kudos
Message 9 of 17
(4,237 Views)

Thank you. I appreciate your help. I will be waiting for your reply regarding changing the channels list input to implement this specific transmission scenario.

 

  I don't have any experiences working on LabVIEW FPGA. But, I am very interested in learning that tool as well. If we need to use LabVIEW FPGA for this project, please let me know from where and how should I start such that I target just to implement this transmission scenario. I''l follow your advice step by step. 

Thank you. 

0 Kudos
Message 10 of 17
(4,232 Views)