Software Defined Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

Angle of Arrival Detection with NI USRP and LabVIEW Communications

Angle of Arrival Detection with NI USRP RIO

 

The RF Angle of Arrival (AoA) detection system has been implemented with NI USRP RIO hardware in both LabVIEW 2015 as well as LabVIEW Communications 2.0. The material below is relevent to both of these versions but in order to get these two versions running you need to have LabVIEW 2015 and LabVIEW Communications 2.0 (respectively) installed. For more background on this system, refer to the original AoA Detection System section of this document.

 

Overview:

This part of the document describes how to implement the RF Angle of Arrival (AoA) detection system from the previous section with NI USRP RIO hardware. This system uses the same direction finding and phase compensation methods and is still capable of detecting up to three transmitting sources.

 

NI USRP RIO devices have two daughterboards, each with two RF ports, so that they can support twice as many channels as the NI USRP 2920 can. This feature allows users to use two USRP RXs as opposed to four.

 

This system uses the same methods for correcting USRP phase ambiguities as the previous version did, so there is a reference transmit signal as well as a target transmit signal. The same type of USRP TXs were used in this system for simplicity.

 

Hardware Configuration:

The following hardware was used to implement this system:

  • One PC with a free Gigabit Ethernet port
  • Gigabit Ethernet switch
  • 2 USRP TXs (NI USRP 2920s were used)
  • 2 USRP RIO RXs (an NI USRP 2950R and an NI USRP 2942R were used)
  • 5 antennas
  • 1 octoclock (with 10MHz reference clock and PPS output)
  • BNC splitter T's, cables, and SMA to BNC adapters

Capture.JPG

Figure 7: The AoA Detection System with USRP RIO Hardware Setup Diagram

 

  • Connect one antenna to the USRP that is going to serve as the target transmitter (NI recommends using RX1/TX1 port for simplicity).
  • Connect one antenna to each of the four USRP RX ports on the USRP RIO devices that are going to serve as the receiver (NI recommends using RX1/TX1 port for simplicity).
  • All four receiving antennas should be exactly half a wavelength (of the carrier frequency used) apart.
  • Connect both of the USRP RIOs to the octoclock to receive the reference signal and the PPS signal.
  • Physically wire the RX1/TX1 port of the USRP Ref TX to all four of the RX2 ports on the USRP RIO devices.
  • Connect the two USRP 2920s directly to the Gigabit Ethernet Switch with appropriate gigabit Ethernet cable.
  • Connect Gigabit Ethernet Switch to the host.
  • Connect the USRP RIOs to the host via PCIe x4. Make sure that the USRP RIO PCI cards are seated securely in the computer. Power up all four USRPs, the octoclock, and the Gigabit Ethernet switch and then power up the host to complete the hardware configuration procedure.

 

Software Configuration:

The AoA Detection 1st TX Ref Signal.vi and AoA Detection 2nd TX Target Signal.vi function exactly the same as the previous version’s TX VIs. Therefore, the parameters can be set exactly as they would have been in the previous example.

 

The AoA Detection RX Localization using MUSIC.vi functions exactly as the previous version’s RX VI did. The only difference is that the ‘Device IP Array’ was replaced with a single ‘Device Names’ control for simplicity. The user can enter in the names of the two USRP RIO RXs devices separated by a semicolon into the ‘Device Names’ control (you can find your USRP RIO device names in NI MAX).The ‘Gain Array’ has also been replaced by a single ‘Gain’ control, which is applied to all four RX channels. The rest of the parameters remained the same as they were in the previous version.

 

You can run both the TX Vis and the RX VI as you would in the previous version.

 

Note:

For optimal performance, make sure you have installed a current ethernet driver version and close out of all other programs when running the AoA detection system.

 

*Original AoA Detection System*

 

Overview:

This document describes how to set up an RF Angle of Arrival (AoA) detection system using the MUSIC multiple array processing algorithm with NI LabVIEW software and NI USRP™ (Universal Software Radio Peripheral) hardware. After a brief discussion of AoA detection or direction finding and phase compensation method, the paper examines the hardware and software within LabVIEW. The system presented here is  capable of detecting up to three transmitting sources simultaneously with appropriate parameter configuration.

 

 

This software was provided courtesy of Professor A. Manikas holds the Chair of Communications & Array Processing in the Department of Electrical & Electronic Engineering, Imperial College London with Marc Willerton and David Yates

 

Table of Contents

1. What Is AoA Detection and Phase Compensation?

2. Implementing an AoA Detection System

3. AoA Detection System: Hardware Configuration

4. AoA Detection System: Software Configuration

5. Working With the Example

6. Building an AoA Detection System in LabVIEW

      6.1Target Transmitter

      6.2 Reference Transmitter at the Receiving End

      6.3 Receiver

7. Additional Resources

 

1. What is AoA Detection and Phase Compensation

Angle of arrival (AoA) measurement is a method for determining the direction of propagation of a radio-frequency wave incident on an antenna array. Generally this measurement is made by measuring the difference in received phase at each element in the antenna array.

 

The operation of any phased array system requires RF local oscillator synchronization and ADC timestamp alignment. In this example the local oscillator synchronization among the NI USRPs is achieved using external reference clock. Timestamp synchronization is achieved using external PPS signal. This works fine in the NI USRPs in terms of effectively eliminating relative phase shift over time. Unfortunately, however, every time an USRP re-tune command is sent there is a new phase ambiguity between the boards. Therefore a calibration procedure is required every time a new measurement is taken.

 

NI USRP boards have two RF ports for duplex operation. It turns out a second signal applied to the second port couples into the software selected receive channel. An RF signal applied directly to the second RF port of each of the NI USRP boards in the array can thus be used to discover the phase ambiguity without a calibration step. It has to be separable in some way from the target signal. A separate NI USRP board can be used for this purpose. So the steps for phase synchronization are:

 

  • Apply 2 different tones (using SSB-SC AM modulation)
  • Filter the signals in software
  • Use the RF synchronisation signal to evaluate the channel phase offset among different receive antennas
  • Align the target signals in phase and gain
  • This effectively eliminates gain and phase uncertainties between channels due to the NI USRP boards

After the NI USRPs are synchronized in terms of phase and gain, Multiple Signal Classification (MUSIC) algorithm is used for detecting the AoA of the received signal.

 

 

2. Implementing an AoA Detection System

The AoA detection system described here uses a new approach to eliminate phase and gain uncertainty among the USRPs at the receiving end. A separate NI USRP is used to eliminate these uncertainties. After the phase synchronization is achieved, MUSIC algorithm is used to determine the location of the transmitting NI USRP. The overall system including the hardware and software configuration along with a working example is presented below:

 

3. AoA Detection System: Hardware Configuration

You need five NI USRP transceivers for an AoA detection system. The following configuration is recommended:

 

  • One PC with a free Gigabit Ethernet port.
  • Gigabit Ethernet switch
  • 6 USRPs (NI USRP-2920 were used in our experiment)
  • 5 antennas
  • 1 external OCXO based 10MHz reference clock with PPS output
  • BNC splitter T's, cables, and SMA to BNC adapters

 

AOA Figure 1.png

Figure 1: The AoA Detection System Hardware Setup Diagram

 

 

Figure 1 shows the configuration you can use for this AoA detection system. The detailed configuration procedure to set up the direction finding system is given here:

 

  • Connect one antenna to the USRP that is going to serve as the target transmitter (NI recommends using RX1/TX1 port for simplicity).
  • Connect one antenna to each of the four USRPs that are going to serve as the receiver (NI recommends using RX1/TX1 port for simplicity).
  • For desired operation, the all the four receiving antennas should be exactly half a wavelength (of the carrier frequency used) apart.
  • Connect all the four USRPs of the receiving side to the external clock to receive the reference signal and the PPS signal.
  • Physically wire the RX1/TX1 port of the USRP Ref TX to the TX2 port of all the four USRP RX devices. This USRP Ref TX will provide the signal that the USRP RXs are going to use for eliminating the phase and gain uncertainties.
  • Connect all of the 6 USRPs directly to the Gigabit Ethernet Switch with appropriate gigabit Ethernet cable.
  • Connect Gigabit Ethernet Switch to the host.
  • Power up all six USRPs, the external clock, and the Gigabit Ethernet switch to complete the hardware configuration procedure.

 

 

4. AoA Detection System: Software Configuration

This Angle of Arrival Detection example is a LabVIEW application that requires the following software components:

 

  • NI LabVIEW Version 2011 (or later) system design software—Full, Professional, or Student Edition
  • NI-USRP Version 1.1
  • NI LabVIEW Modulation Toolkit Version 4.3.1
  • AoA Detection Example VIs

 

 

5. Working with the Example

Unzip the associated zip file to a new folder.  Make sure that the location of the folders that contain the MathScript files are included in the MathScript Search Path list. The process of including the folder location in the search path list is given bellow:

  • Open LabVIEW
  • Select Tool>Options
  • Under the Category list, select MathScript
  • On the "Search Path" panel include all the folder locations that contains the MathScript files used in this example.

Once the search path is set, open the file entitled AoA Detection 1st TX Ref Signal.vi, AoA Detection 2nd TX Target Signal.vi, and AoA Detection RX Localization using MUSIC.vi in LabVIEW.

 

 

The front panel of the AoA Detection 1st TX Ref Signal.vi and AoA Detection 2nd TX Target Signal.vi (Figure 2) contains the parameters for the NI USRP transceivers that are used for both the transmitters. Set the controls of these parameters with the following guidelines in mind:

 

Figure 2.png

 

Device Names: Enter the IP addresses associated with the USRP TX1, and USRP Ref TX.

 

Active Antennas: Enter the appropriate antenna ports TX1 or TX2 that you connected the antennas to each of the devices. For the transmitters in the example, we connected all the antennas to the TX1 port of the devices.

 

I/Q rate [S/sec], and carrier frequency [Hz]: For the I/Q rate, and carrier frequency enter the sample rate, and the carrier frequency. These parameter values have to be the same for both the transmitter and receiver.

 

timeout: timeout specifies the time to wait in seconds, before returning an error if the requested number of samples have not been generated. A negative value indicates to the driver to wait indefinitely.

 

tone frequency: tone frequency specifies the frequency of the transmitted signals. In this example we have chosen 10 KHz for the USRP Ref TX and 100 KHz for the USRP TX1.

 

  • The front panel of the AoA Detection RX Localization using MUSIC.vi (Figure 3, and Figure 4) contains the parameters for the NI USRP transceivers that are used for the receiver. Set the controls of these parameters with the following guidelines in mind:

 

Figure 3 AOA.png

Figure 3: Front panel of the AoA Detection RX Localization using MUSIC.vi­

 

Referring to Figure 4 showing the MUSIC spectrum, it also shows the calibration signal and the target signal after being synchronized, and the phases of these signals before and after the synchronization. The dial on the top right corner presents the location of the target source detected by MUSIC algorithm.

 

Device IP Array: Enter the IP addresses associated with the USRP RXs.

 

Gain: Enter the appropriate gain values for all the USRP RXs. For the receiver in the example, we used a gain of 30 for all the USRP RXs.

 

Sampling Frequency and carrier frequency: For the Sampling Frequency and carrier frequency enter the sample rate and carrier frequency. These parameter values have to be the same for both the transmitters and the receiver.

 

Threshold: Threshold specifies the threshold to which the receiver compares the received signal strength to detect the presence of the transmitted signal. The value of this parameter depends on the distance of the transmitter.

 

Filter: This parameter offers you to choose between a FIR implementation and an IIR implementation of low-pass and high-pass filters. These filters are used to separate the target signal from the USRP TX1 and the signal from the USRP Ref TX which is used for calibrating the phase uncertainty among the USRP RXs. In this example, an FIR implementation is used.

 

start trigger time: Configures the start trigger generated by the onboard device timer and specifies the time to start the trigger. In case of multiple synchronized devices, all of them must use a Start Trigger.

 

With the parameters set appropriately, you can run both the TX Vis and the RX VI. Doing so; the AoA Detection 1st TX Ref Signal.vi and AoA Detection 2nd TX Target Signal.vi start to continuously transmit the calibration signal and the target signal. The AoA Detection RX Localization using MUSIC.vi upon receiving the signal performs the phase and gain uncertainty elimination using the calibration signal and then uses MUSIC algorithm to detect the AoA of the target signal. The MUSIC spectrum, the phase synchronized signals, and their corresponding phases are also displayed in the AoA Detection RX Localization using MUSIC.vi.

 

6. Building an AoA Detection System in LabVIEW

This section describes the key components of the AoA detection system:

 

6.1 Target Transmitter:

 

image004.png

Figure 4: Block diagram of the AoA Detection 2nd TX Target Signal.vi

 

Figure 4 presents the block diagram of the AoA Detection 2nd TX Target Signal.vi. As can be seen from the block diagram, it opens the target USRP TX session and waits for the other transmitter session to open before performing any further steps. In this example, we have used global variables to make sure both the transmitter USRP sessions are open before they start transmitting. This is necessary if we are trying to initiate multiple USRP transmitters from a single host. The trick is to make sure all the USRP sessions are open and then proceed with transmission. If the transmitter USRP is controlled by a separate host, then we do not need these extra steps. After the VI receives the confirmation that both the transmitter USRP sessions are open, then it starts to continuously transmit a tone of given parameters. This signal is considered as the target signal whose AoA at the receiver is to be detected.

 

6.2 Reference Transmitter at the Receiving End

 

 

image005.png

Figure 5: Block diagram of the AoA Detection 1st TX Ref Signal.vi

 

Figure 5 presents the block diagram of the AoA Detection 1st TX Ref Signal.vi. As can be seen from the block diagram, it opens the calibrations USRP TX session and waits for the other transmitter session to open before performing any further steps. After the VI receives the confirmation that both the transmitter USRP sessions are open, then it starts to continuously transmit a tone of given parameters. This signal is considered as the calibration signal that is being used to eliminate the phase and gain uncertainties among the USRP receivers. To facilitate this calibration process, this USRP Ref TX is physically wired to all the four USRP RXs.

 

6.3 Receiver:

Figure 6 presents the block diagram of AoA Detection RX Localization using MUSIC.vi. The RX VI sets up all the USRPs at the receiver to have the appropriate operating configurations. It first captures a specified number of samples per processing cycle. The RX VI then separates the calibration signal and the target signal using filters as specified by the user. The phase and gain calibration to eliminate the uncertainties is done based on the information provided by the calibration signal. After the target signal is calibrated, it is then fed to the MUSIC algorithm to detect the AoA.

 

Aoa Block Diagram.png

Figure 6: Block diagram of the AoA Detection RX Localization using MUSIC.vi – part 1

 

 

7. Additional Resources

  1. Schmidt, R., “Multiple Emitter Location and Signal Parameter Estimation,” IEEE Transactions on Antennas and Propagation, vol. 34, pp. 276-280, Mar. 1986.
  2. Manikas, A., Y.I. Kamil, and M. Willerton, “Source Localization using Large Aperture Sparse Arrays,” IEEE Transactions on Signal Processing, 2012, to appear.
  3. Willerton, M., D. Yates, V. Goverdovsky, and C. Papavassiliou, “Experimental Characterization of a Large Aperture Array Localization Technique Using an SDR Testbench,” Wireless Innovation Forum Conference on Communications Technologies and Software Defined Radio (SDR’11-WInnComm), 2011.
Comments
ErikL
NI Employee (retired)
on

My guess is that you did not quite remove all of the code pieces that required 3 or more USRP's.

atafa
Member
Member
on

Hi vassili2806,

Have you found the answer for your question ? About "Antenna Array"-Part that consist of 4*3 array.

I also curious about that matter.

atafa
Member
Member
on

Dear Mr. ErikL

Yes you're right. My late error occurs because I haven't edit Device IP Array-Part and Gain Array-Part that defined a used of 4-element Rx.

After I fixed it, output error transfer to output VI Fetch Data Array. following error notif "niUSRP Fetch Rx Data (2D CDB).vi<ERR>A stream command was issued in the past"

Why it happened ?

Is it because of synchronization ? I already change Ref-Freq Source and Time-based source using MIMO. Am I lost something ?

ErikL
NI Employee (retired)
on

One device needs to be set to internal. the other to mimo cable.

From: atafa <web.community@ni.com>

To: ErikL <erik.luther@ni.com>

Date: 09/02/2015 11:37 AM

Subject: Re: - Angle of Arrival Detection

with NI USRP

Community

Angle of Arrival Detection with NI USRP

new comment by atafa View all comments on this document

Dear Mr. ErikL

Yes you're right. My late error occurs because I haven't edit Device IP

Array-Part and Gain Array-Part that defined a used of 4-element Rx.

After I fixed it, output error transfer to output VI Fetch Data Array.

following error notif "niUSRP Fetch Rx Data (2D CDB).viA stream

command was issued in the past"

Why it happened ?

Is it because of synchronization ? I already change Ref-Freq Source and

Time-based source using MIMO. Am I lost something ?

Reply to this email to respond to atafa's comment.

atafa
Member
Member
on

Sorry Mr.ErikL. I didn't get it.

What do you mean by internal ? Internal source ?

ErikL
NI Employee (retired)
on

Depending on your setup, it may differ slightly. However the basic idea

is that you can sync the Ref and PPS off of 1 of 3 lines in the 292x

devices. The Clock Ref options include: 1. Internal TCXO, 2. MIMO Cable,

3. External Ref In. When hooking two devices with the MIMO cable, one

must be the Master and the other Slave. For this reason one will be set

to Internal or Ref In while the second would be set to MIMO, meaning MIMO

Cable as the clock source or PPS source.

Lastly, the error you're getting is most likely because the devices are

not synchronized so this was my guess as to the issue.

Regards,

Erik

From: atafa <web.community@ni.com>

To: ErikL <erik.luther@ni.com>

Date: 09/02/2015 07:19 PM

Subject: Re: - Angle of Arrival Detection

with NI USRP

Community

Angle of Arrival Detection with NI USRP

new comment by atafa View all comments on this document

Sorry Mr.ErikL. I didn't get it.

What do you mean by internal ? Internal source ?

Reply to this email to respond to atafa's comment.

atafa
Member
Member
on

Dear Mr.Erik

From receiver-vi, this blok (added pic) is about queue received signal >> placed it at matrix >> addressed it as "m" >> process to Music algorithm. Am I right, sir ?

So.. about placing the received signal at the matrix, are we sure that the first row has signal from USRP#1, 2nd signal on the 2nd row, and so on ?

queue.png

wiiwiiya
Member
Member
on

Hi Erik:

Physically wire the RX1/TX1 port of the USRP Ref TX to the TX2 port of all the four USRP RX devices. This USRP Ref TX will provide the signal that the USRP RXs are going to use for eliminating the phase and gain uncertainties.

So we use the two port TX1/RX1 and TX2 of the 4NI USRP(receiver)?

BUT I use 2932 with SBX daughterboard. As I know, the SBX can only receive one port in the same time,so how to use two port(one is receive target signal, the other is for ref signal.)??

THX!!

bojuchen
Member
Member
on

Hi wiiwiiya

You could refer the discussion in the thread.

http://forums.ni.com/t5/USRP-Software-Radio/Angle-of-arrival-MUSIC-algorithm/m-p/3206027

I hope it will be helpful to you.

atafa
Member
Member
on

Hi ErikL,

on the direction finding case study (http://sine.ni.com/cs/app/doc/p/id/cs-15016#) they wrote about "pilot source"

I'm so confused because of this phrase "A pilot source is located in the far field of the array at 105 deg" what is the pilot source thing ? Why it places at 105deg ? Is it the same thing as Tx-ref ?

Can you help me please to describe this pilot source ? I can't get the right AoA yet...and I'm afraid my problem occurs because of phase-align between rx element

Many thanks..

Prakash17
Member
Member
on

how to setup 5 usrp please help

wiiwiiya
Member
Member
on

Hi Everyone:

I do this example.

Hovever the performance is not good in all azimuths.

I analyze the phase thita(t) and amplitude A(t), I found something that the air signal phase is not calibrated correctly.

(I did simulation to get the phase difference to compare with the experimental measurement.)

I am considering:

1. Is the filter make the phase calibration unsuitable?

2. Is the phase calibration unsuitalbe in the difference frequency originally?

can any one gives me some suggestion? thx a lot!!

bojuchen
Member
Member
on

Hi, wiiwiiya 

Please refer the following link: http://sine.ni.com/cs/app/doc/p/id/cs-15016# 

The section 'Case A: The MUltiple SIgnal Classification (MUSIC) Algorithm' 

It seems that it needs to perform pilot source calibration before tracking the real target TX by MUSIC. 

Hope it helps you.

yy18382410987
Member
Member
on

Hi Erik,

This is a cool example! Thanks for sharing it

I've got 2 questions:

1. Is MUSIC applicable to other modulated signal? I tried QPSK, QAM and they works. How about other modulated signal?

2. How should I configure the example to support 2 emitters? I tried 2 emitters but it doesn't work.

Thanks and have a nice day!

True_Boombo
Member
Member
on

MUSIC can be applied for any modulated signal as it just only related with sample phase different from different located antennas. I test the QPSK, QAM even OFDM, and analog FM signal. All works.

For 2 emitters, it depends on what purpose you want to achieve, you want emulate two target situation or your want try Tx beamforming?

yy18382410987
Member
Member
on

Hi Boombo,

What I want to achieve is to distinguish 2 targets on MUSIC spectrum.

True_Boombo
Member
Member
on

Hi,

if you want to distinguish multiple target I think you need to think from 3 aspect

1. angle resolution of your receiving array. if you are using a ULA, I think it better you have more elements in your array (>4 I assume)

2. your sources need to be spatially separate enough. Also, it will be good that your sources are uncorrelated (eg. if you split one signal source into two. this means correlated).

3. try to avoid place your source at the angles less than 30 degree and larger 60 degree if you are using ULA

Hope above information helps

yy18382410987
Member
Member
on

Does the signals have to be uncorrelated? Or it is also possible to distinguish 2 correlated signals?

True_Boombo
Member
Member
on

Hi YY,

Think about if your transmitters are correlated. when the two signal arrive at receiving array elements with co-herent phase relation. there will be counteracting or reinforcing effect (actually, you form up a transmitting beamforming in this situation). Then, you may not be able to distinguish on the receiving side.

Cheers,

Bo

yy18382410987
Member
Member
on

I tried uncorrelated signal sources and it works. Thanks!

True_Boombo
Member
Member
on

Hi YY, good to know it works. Cong.

mkrishna
Member
Member
on

Hi

i have one doubt which i am unable to clear from the USRP ref material. How is it that we are able to receive both RX1/TX and RX2 at the same time in all the devices. Is this not a mandatory requirement. more over if we are going to sync the phase, shoudnt that be with respect to the signal received from RX2 alone since it is connected to TX of the reference signal generator.

How are we able to separately receive the direct and air signal separately and process them ? 

wsl.hanyang
Member
Member
on

This is very good example to me. Thank you for your work.

I have some questions.

 

1.  Is it possible to detect the direction using only the antenna by removing the Ref signal?

 

2. If 1 is not possible, more than 2 Tx are needed. Do I have to input additional Ref signal at this time?

JonasM
Active Participant
Active Participant
on

Hello ErikL,

 

I'm looking into using the MUSIC algortihm you have posted here but for a slightly different Antenna positioning. I was wondering if the antenna array HAS to be linear or if it could be place in other patterns and the algorithm would still work. I'm thinking it might be related to the antenna array setup you do in attached picture.

antennaarray.PNG

for example using the first 3x3 indexes as below.

0 1 0

1 0 1

0 1 0

Best regards
JM, LabVIEW CLA
Contributors