# Phased Array Beam Steering with the Phaser (CN0566) Exploration Kit

We’re making our way through understanding and programming the new “Phaser” phased array exploration platform from Analog Devices.  So far, we’ve introduced the Phaser in this blog.  Then we described the software and hardware ecosystem and how that could scale to other prototyping.  Finally, in the most recent blog entry, we described how that software connects to the hardware for control and data collection.  That means we’re finally ready to do something with our Phaser-phased array!

Let’s Steer our “Electronically Steerable Array”

Phased arrays are more accurately called “electronically steerable arrays”, or ESAs.  A good first activity for any ESA is to steer it.  So how do we electronically steer an antenna array? I covered most of this already in a previous blog series on digital beamforming.  And there are excellent introductory articles to phased arrays here.  Those articles have many of the key equations and concepts.

But the short answer is we form the beam by setting a delay per element and then adding all the elements together.   Consider an RF signal that is striking our 8-element Phaser receive array:

Based on the direction of arrival (DOA) of the RF signal to the array, each element will see the signal at some slightly different time.  You can see that that delay will be smaller if the signal moved directly over the array (called the broadside or mechanical boresight direction). And the delay will be larger as the signal moves toward either horizon of the array.  So the delay that we pick will set the steering angle so that the array will optimally add all the elements together.  Signals arriving from other angles will then have a greatly reduced gain.

So how do we choose the exact delay we want, to steer the array to a particular angle?  If you just turn our setup on its side, you’ll see an equivalent view of it here:

You can see that we now have a right triangle whose hypotenuse is the incoming wavefront.  The distance between elements is “d” (14mm for the Phaser board).  And the angle from mechanical boresight is called theta.  And if we form another right triangle with the wavefront and theta, we can calculate L, which is the incremental propagation distance between elements.  We can do some simple math to show that the time delay between when the wavefront strikes one element to when it strikes the neighboring element is:

And we can convert that time delay into a phase shift if we multiply by 2 Pi f, where f is the frequency of the incoming signal.

So if we shift each element from its neighbor by that amount, then we will steer the antenna in the direction of “theta.”  Here’s an example of how that would work for a 30 deg steering angle (theta), at a frequency of 10.3 GHz:

So that’s the basic idea of how we can electronically steer the receive array of Phaser.  Now, let’s try it out!

Python and Matlab for the Phaser

We can program the Phaser in either Python or Matlab.  For Python, you can run directly on Phaser’s Raspberry Pi (which is included in the kit).  Or you can run remotely on your computer using a Python IDE like Spyder or PyCharm.  Details can be found here

If you will be using Matlab, then you'll connect both Phaser and Pluto to your computer and download a few “Board Support Packages” to your Matlab install.  Full setup instructions for this can be found here.  As always, if you encounter any problems with the Phaser (CN0566), or its supporting software, please post the issue here

Example Beam Steering Program

I've placed some simple examples using either Matlab or Python here.  Let’s take a look at one of them, the beamsteer.py file in the Python folder.  We’ve talked about most of this code already – including importing the Python libraries and mapping the hardware to the software via the device tree.  So let’s focus on the main portion:

We first create a list of steering angles, called “SteerValues”, which cover -90 deg to +90 deg.  Then convert those steering angles into phase shifts and use the ADAR_set_Phase method to program that phase shift to each element’s ADAR1000.  Element 1 gets a phase shift of 0*PhDelta, element 2 gets 1*PhDelta, …., and element 8 gets 7*PhDelta.

Next, we get the data from Pluto, sum both channels together, and convert that result to dBFS (decibel full scale – which is how much receive power there is relative to Pluto’s full-scale 12-bit ADC).  We add that into a “peak_gains” array and repeat the whole process for the next steering angle.

Plotting the Beam Pattern

Finally, we plot that “peak_gains” array vs steering angle, and we should see something like this beautiful picture:

You can see a peak response at 30 deg – so that looks right.  However, our simple right triangle phase delay equation did not prepare us for all the other peaks and nulls we see in this plot.  Where did those come from?  What do they mean?  Are they good or bad?  We’ll explore those questions in the next blog post where we’ll cover antenna patterns and the array factor equation.