USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

Alamouti 2x2 using USRP- PPL did not lock within the allotted time

Hello.

I've been trying to use the following example VI:

http://www.ni.com/white-paper/13878/en/

 

 

 

I can't understand how to connect the two USRPs 

 

 

What clock source should I use? How should I connect it?

right now I have my USRPs connected with a MIMO cable, and both are connected to my laptop with a gigabit switch.

 

 

currently, when I'm tring to run the VI without the clock source, there is this error:

 

niUSRP initiate.vi<ERR>The reference clock PPL did not lock within the alloted time.

 

 

Thank you in advance.

0 Kudos
Message 1 of 15
(7,000 Views)

Yes, I also am a beginner and have similar problems. In the white paper, it says that , for each element in Tx set OR Rx set, we need to set it as follows:

Element 0:

             Ref Frequency Source: Internal

             Timebase Clock Source: Internal

Element 1:

             Ref Frequency Source: MIMO

             Timebase Clock Source: MIMO

 

But in the diagram given by Mr Erik_L at: 

 

https://decibel.ni.com/content/docs/DOC-21751#/

 

It states that i need to use an external Ref_in and PPS_in source for the Tx and the Rx by splitting a common source using BNC Splitter and then to the individual SMA ports. 

 

I think that we do need a phase coherent LO on Tx and Rx side and thats why an external Ref_in and PPS_in are neccessary but this is not at all stated on the white paper link here: http://www.ni.com/white-paper/13878/en/

 

Can someone from the LabView guys, please clarify this ? I need to understand this problem, and get to a solution. Please

0 Kudos
Message 2 of 15
(6,479 Views)

Hello msohaibiqbal

 

Is the configuration recommended on the white paper failing for you?

 

Regards

Frank R.

0 Kudos
Message 3 of 15
(6,456 Views)

Yes it is, beacuse I did not use an external PPS in and REF in for the 4 devices, because in the white paper, there was no such mention. In the white paper, it actually says to use the interal reference clock and internal time base. But the code does not seem to work with this way.

0 Kudos
Message 4 of 15
(6,452 Views)

Hello msohaibiqbal

 

The whitepaper uses this hardware configuration on the left, and the community example uses the hardware configuration with Clock source on the right:

Capture.PNGCapture1.PNG

So, if you do not have an external source you are using HW configuration 1, so you should follow the information in the whitepaper, where Ref Frequency Source for Element 1 is Internal, and Ref Frequency source for Element 2 is MIMO. If this is your case, and it is failing, what exactly is failing? Could you describe what is happening?

 

Regards

Frank R.

 

0 Kudos
Message 5 of 15
(6,436 Views)

 

Sorry for the late reply, I did not have access to the lab over the weekend. 

 

 

Yes I am uing HW configuration 1.  i set my IPs for the Txs and Rxs (4 NI 2921 boards), set the symbol rate, and appropriate IQ sampling rate. I then set the Tx element 1 Ref Frequency Source and timbase clock to internal. and for element 2 to be MIMO. I do the same for the Rx element 1 and element 2 as mentioned in the white paper. I set an appropriate carrier freq according to my machine (shown in snapshot below)

 

1.jpg

 

 
I then run the code, and the error shown in the picture shows up. Apparently, the error code is not recognized. I also show a picture of the error recorded on the front panel (which is the actual error, that needs to looked at). I then re-wire the error out in the block diagram to be connected to the last block in the chain 'Calculate BER VI' (shown in the 3rd picture below) which was previously not the case. Now i rerun the VI, and the error showing up in the block diagram is gone but the error mentioned on the front panel is still there (which is normal becuase i have not changed anything important in the block diagram). 

3.jpg

 

 

 

4.jpg6.jpg

 

 

I look up this error 'Error -107411864 - A stream command was issued in the past' and find this NI-known issues document: http://www.ni.com/product-documentation/52445/en/ 

 

7.jpg

 

 

And I see this error there. ID number 467209 (corresponding to the above error) . In this it states:

This error occurs when you set Timebase Clock Source to PpsIn and do not provide a timebase clock source to the PPS IN port.
If you set Timebase Clock Source to PpsIn and do not provide a timebase clock source to PPS IN, the USRP device will revert back to its internal timebase clock source. This may result in error -1074118649 "A stream command was issued in the past."

 

 

 

Since I have not even setup the configuration on the front panel using the Ref_in and PPS_in (i have actually set them to internal) why am i still getting this error. 

 

I also looked at the ID number '466351' in the same list (right below the prev one) and find out that also seems to be fine since not all of the follwing conditions are being met:

 

The slave device has a GPSDO.
The niUSRP Set Time VI is called only on the master.
The timestamp is applied immediately.

 

as mentioned in the description. 

 

 

And since, there is a clear conflict between the white paper configuration designed for this 2x2 scheme (HW configuration 1) and the actual HW configuration corresponding to this same white paper (HW configuration 2), how can i expect the code to run without the Refi_in and PPS_in for all 4 devices (for sync between Transmitters and Recievers) which seems to important for this code to run properly. 

 

I do not understand this error either 'A stream command was issued in the past' since i have not found a soultion to it online. 

 

Now can you elaborate on what seems to be a conflict and elaborate on this error, which has been reported on other threads as well but the NI people do not seem to bother to respond as to why this is so.

 

 

0 Kudos
Message 6 of 15
(6,375 Views)

Hello msohaibiqbal

 

Using the community example, please try the following:

Since you are not using a clock:

  • In the block diagram, at point number 2 (TX and RX with NI-USRP), "Next Timebase Edge" need to be changed to Now and the Trim WFM VI needs to be by-passed at point number 1 (Process Received Signal)
  • In the front panel, please set the Ref Frequency Source and Timebase Clock Source to Internal.

Did you avoid error -21865?

 

Regards

Frank R.

0 Kudos
Message 7 of 15
(6,343 Views)

Yes Mr Frank I did avoid the error. I had the Ref Frequency Source and Timebase Clock Source set to Internal before your comment. And i tried the changing to "Now" option before your comment as well, motivated by the example VI named "niUSRP EX Rx Multiple Synchronized Inputs" and "niUSRP EX Tx Multiple Synchronized Outputs".

 

There is no error now but the output is very strange. I cannot explain it.  

 

Now, according to your last comment I have also by passed the 'subTrimWaveform.VI' and looked at the output. Its still very strange, nothing much has changed from before. 

 

I am attaching the plots and my settings

FP.jpgBD.jpg

 

I have run the VI multiple times to see if the output is just random OR there is some logic to it. 

 

Here are the results of the re runs. The VI does find a trigger for finding the BER but the BER is usually above 0.5 

 

I got the following by increasing the total no of symbols that i was sending.

 

Result1.jpg

 

And the follwing plots with the symbols per packet set to 10000 and slightly different  start trigger times (Does not make much difference here)

 

Result2.jpgResult3.jpg

 

I dont seem to understand the ouputs. Mazbe you can make sense of it and explain it here. I was also thinking that looking at the constellations of the individuals signals Rxd at each antenna (the first 2 constellation plots above), the output is almost zero but when these signals are decoded using the Alamouti scheme and then MRC combined for 2 Rx antennas, i still get a peak of about 2.8 in the 3rd constellation. The time domain Rxd signals also seem to be very low power. 

 

Can you explain this part?

 

Is this beacuse of not using an external clock to synch all 4 USRP boards?

 

 

0 Kudos
Message 8 of 15
(6,334 Views)

did you try to enable the 'frequency error correction' in the front panel? worked for me..

0 Kudos
Message 9 of 15
(6,330 Views)

With that 'frequency offset correction' set to ON , I am getting this:

 

result4.jpg

 

Still cant make much sense of this.

 

@Dor_Afriat. Did you also only use the internal clocks for the Tx side and for the Rx side. And NOT use an external clock (external PPS in and External REF in) to synchronize between the Tx and Rx set?

0 Kudos
Message 10 of 15
(6,327 Views)