01-17-2014 07:28 AM
Greetings
I am working on a masters thesis project using USRPs in a reverberation chamber measuring throughput over the air.
I have a problem when using 2x2 mimo using 4 USRPs connected via 2 MIMO cables when I need to use channel state information at the transmitterside. Since the channel is rapidly changing I need to be able to send one packet, estimate the channel from that packets training sequence, precode the next and transmit. I've estimated that the packet transmission time is around 5ms, computation time is around 5ms but the problem lies in that I can't get less than 120ms as wait time sent into the "niUSRP set time" and "niUSRP configure trigger" VIs or else i'll get the error "Packet had timestamp that was late (or too early)?"
This provides no problem where I don't need the precoding, but when using beamforming algorithms then the precoding is needed. Is there a way to either implement a way for the USRPs to run continously and change the input waveform as they are running OR somehow reduce that wait time ?
I wanted to attach the sub VI in question and its overhead sub VI along with all sub VI's needed for it to run but it is too large 9(MB) so I've added a dropbox link to it here. The problem is in sub_txrxData_SVD.vi which is called by sub_tx_rx_hande.vi which is called by a larger program that does pre & post processing of the packets.
Thanks in advance
Bjarni Þór
01-17-2014 10:01 AM
The wait time is necessary to allow the waveform packets to cross the bus and arrive at the device before the time that the device starts outputting. The minimum time required will vary and depends on many factors including machine speed and bus speed.
I think your suggestion of running Tx continuously, inserting precoded packets when they are available, and just sending 0s between packets might work. This depends on your transmission bandwith... is your IQ rate small enough to not overwhelm the bus bandwidth?
01-17-2014 10:15 AM
In the attached code we were able to get the round trip latency down to 15-20 ms. It impliments an ALOHA MAC with TX and RX between 3+ devices.
02-03-2014 03:21 AM - edited 02-03-2014 03:22 AM
I'm aware of the time needed to send the packet over the bus.
My IQ bandwidth is only 400k so it's far from overwhelming the bandwidth. I have tried to implement the continous tx/rx soloution using several while loops & queues as I need three components, the previous packet channel state, the precoded packet for transmission and the received packet in order to estimate the channel state.
I run into the problem there that it is crapshoot which of the 3 actions (precode, transmit, estimate) is done first and it tends to hang on the deque element if the que is empty resulting in the code hanging. I start the code with the assumption of unit channel sending a dummy packet to get the "true" state estimate, then it should precode using the until channel, transmit/receive, estimate and then repeat it self.
I have also taken a look at the ALOHA MAC code and used some ideas from there on how to implement this.
02-03-2014 06:28 AM
02-03-2014 07:21 AM
It's a race condition indeed.
The desired dataflow is:
My code seems to have a tendency to get stuck in 2. a perpetual loop of transmit/receive where it's just transmitting buffer zeros and receives nothing, I'm working on a way to force it out of 2. and accept a unit channel estimate for next precoding
02-03-2014 08:58 AM