Antenna Positioner

Antenna Positioner - MCAD - Render - Measurement setup 3
MCAD – Render – Measurement setup 3

Recently I have designed many antennas, and I thought that it would be nice to be able to measure things other than S11 on site (like radiation patterns). A VNA connected to a single antenna tells you how well it is matched, but nothing about where it radiates. To measure a radiation pattern you need a second antenna, a fixed distance between the two, and a way to point the antenna under test (DUT) in every direction while the VNA records the transmission between them. In a lab this is done in an anechoic chamber with a commercial positioner. I have neither, so I built this Antenna Positioner that I can carry into my garden.

The project is a mix of everything I usually do. The mechanical parts are mostly 3D printed, axes are driven with belts and closed-loop stepper motor. A small PCB connects two MKS SERVO42D closed-loop motors to a CAN bus. A LibreVNA is the measuring instrument (I’m planning to use my new 20 GHz HP8720B VNA in the future). Python program with a browser-based GUI runs the whole measurement and exports CSV files, polar plots and a interactive HTML 3D pattern.

In this post I will describe how it works and how I designed the mechanics to disturb the measured field as little as possible. I will also explain how the software is built and how the measured patterns compare with CST simulations of two of my horn antennas.


1) Research & Principle of operation

Commercial examples

Antenna Positioner - Commercial solutions - Source: mmwavetest.com
Commercial solutions – Source: mmwavetest.com

Commercial antenna positioners are built for anechoic chambers. The examples above (roll-over-azimuth and elevation-over-azimuth positioners) are very expensive. They are designed to carry heavy antennas, to repeat a position to a fraction of a degree and to work inside a complete measurement system. That is exactly what a chamber needs, and it is also why they cost far more than a hobby project.

Low-cost alternatives exist in the literature. Olencki et al. from Gdańsk University of Technology describe a mobile far-field system for non-anechoic environments. It is built from in-house rotary heads and an open-hardware VNA, for around 3,630 USD in total [3]. Interestingly, their VNA is also a LibreVNA. Their goal is the same as mine: not to replace a chamber, but to get patterns good enough to check whether a prototype behaves like its simulation model.

My requirements were:

  • Two axes, so I can measure full 3D patterns.
  • Only dielectric materials near the antenna, so the positioner itself doesn’t become part of the measured pattern.
  • Portable: it has to fold and stand on a tripod in the garden.
  • Fully automatic: I set it up, press start and come back when it is done.

How does it work?

Antenna Positioner - MCAD - Render - Measurement setup 2
MCAD – Render – Measurement setup 2

I’m using the Double Ridged Horn Antenna (1–18 GHz) that I have designed as a reference antenna (first VNA port is connected to it). I will publish a post about this antenna soon! The second VNA port is connected to the DUT antenna. The positioner rotates the DUT in two axes to measure the 2D azimuth / elevation cuts and the 3D radiation patterns. Everything is controlled by a Python script on my laptop. I’m using this positioner in my garden.

What the VNA measures is S21, the transmission from port 1 to port 2. For two antennas facing each other in free space, its magnitude follows the Friis transmission equation [1]:

|S21|dB≈Gref+GDUT−20log10⁡(4πRλ)−Lcab(1)Source: [1] eq. (2-119)\begin{array}{c} |S_{21}|_{\mathrm{dB}} \approx G_{\mathrm{ref}} + G_{\mathrm{DUT}} – 20\log_{10}\!\left(\frac{4\pi R}{\lambda}\right) – L_{\mathrm{cab}} \qquad (1) \\ \scriptstyle \text{Source: [1] eq. (2-119)} \end{array}

Balanis gives the Friis equation as a power ratio with linear gains. Taking 10·log10 and adding the losses between the VNA and the antennas gives the dB form used here. Realized gain already includes the antenna mismatch.

PrPt=(λ4πR)2G0tG0r[1] eq. (2-119), matched and polarization-matched|S21|2=PrPt⋅10−Lcab/10Lcab: cables, connectors and the uncalibrated VNA response, in dB|S21|dB=Gref+GDUT−20log10⁡4πRλ−Lcab10log10⁡(⋅), gains in dBiDerivation of eq. (1)\begin{array}{c} \begin{aligned} \frac{P_r}{P_t} &= \left(\frac{\lambda}{4\pi R}\right)^2 G_{0t}\,G_{0r} && \text{[1] eq. (2-119), matched and polarization-matched} \\ |S_{21}|^2 &= \frac{P_r}{P_t}\cdot 10^{-L_{\mathrm{cab}}/10} && L_{\mathrm{cab}}\text{: cables, connectors and the uncalibrated VNA response, in dB} \\ |S_{21}|_{\mathrm{dB}} &= G_{\mathrm{ref}} + G_{\mathrm{DUT}} – 20\log_{10}\frac{4\pi R}{\lambda} – L_{\mathrm{cab}} && 10\log_{10}(\cdot)\text{, gains in dBi} \end{aligned} \\ \scriptstyle \text{Derivation of eq. (1)} \end{array}

The reference antenna, the distance and the cables don’t change while the DUT rotates. So every change of |S21| with angle comes from the DUT’s pattern. That is why I plot the patterns normalised to their peak: the shape is right without knowing the cable loss exactly, and even without calibrating the VNA.

With my numbers, eq. (1) predicts about −24 dB at 4 GHz (11.3 dBi CST realized gain of the reference horn, 12.5 dBi simulated directivity of the PCB horn, R = 1.5 m). At boresight I measured −40 dB, and the gap grows from 14 dB at 3 GHz to 22 dB at 6 GHz. I didn’t calibrate the VNA for these measurements, so this gap contains everything between the two antennas and the VNA: both coax cables, connectors, mismatch and the LibreVNA’s own uncorrected frequency response. For the radiation patterns this doesn’t matter, because all of these stay constant while the DUT rotates and cancel when the pattern is normalised. For an absolute gain I would need at least a thru calibration of the cables, and better a gain-transfer or three-antenna measurement [1], [2].

I have used a Belden H155A00.00B100 low loss cable, it was low loss enough (and quite cheap) to solve my cable loss / VNA dynamic range issue. The cable is quite long 2 x 5 meters so every dB of loss matters. I didn’t want to buy extremely expensive low loss cable either, that’s why I have picked something in between.

How far is far enough?

A radiation pattern is defined in the far field, where the incoming wave is (almost) a plane wave. The usual criterion is [1], [2]:

Rff≥2D2λ(2)Source: [1] Sec. 2.2.4; [2] eq. (4)\begin{array}{c} R_{\mathrm{ff}} \geq \frac{2D^2}{\lambda} \qquad (2) \\ \scriptstyle \text{Source: [1] Sec. 2.2.4; [2] eq. (4)} \end{array}

Here D is the largest dimension of the antenna. The PCB horn’s aperture is 100 × 99.5 mm , so D ≈ 141 mm. That puts 2D²/λ at 0.80 m at 6 GHz and 0.93 m at 7 GHz, so 1.5 m is comfortably beyond it.

The criterion is really a limit on the phase error across the aperture. A spherical wave from a source at distance R reaches the edge of the aperture slightly later than its centre. The maximum phase difference is:

Δφmax⁡≈πD24λR(3)Source: [2] eq. (3)\begin{array}{c} \Delta\varphi_{\max} \approx \frac{\pi D^2}{4\lambda R} \qquad (3) \\ \scriptstyle \text{Source: [2] eq. (3)} \end{array}

At R = 2D²/λ this gives exactly 22.5° (π/8), which is the error the classic criterion accepts [1], [2]. For the PCB horn at 1.5 m it is 6° at 3 GHz and 12° at 6 GHz. According to IEEE 149, the visible effect of such a phase error is that pattern nulls get partially filled and sidelobe levels change [2], so it matters most for the deep nulls.

The reference horn is the weak point. It is much larger, with D ≈ 281 mm across the aperture. For the pattern, what counts is the curvature of the wave that arrives at the DUT, and IEEE 149 treats it as a spherical wave from the reference antenna [2], which is exactly what eq. (3) describes. Balanis states that the Friis equation needs R > 2D²/λ with D the largest dimension of either antenna [1]. For the reference horn that is 1.6 m at 3 GHz and 3.2 m at 6 GHz, so the prediction from eq. (1) is only a rough check at the upper frequencies.

I might get better results when I will move two antennas further apart, this is problematic due to libreVNA limited dynamic range and cable loss. I have purchased a new VNA though, so I will probably try this in the future.

The ground echo

Without absorbers, the biggest unwanted signal is the reflection from the ground between the antennas. The ground acts like a mirror.

The signal reflected form the ground and other objects (like building, trees etc.) travels longer than signal that hits the antenna directly, so this echo could be removed with time gating [2]. Olencki et al. do exactly that with their LibreVNA [3]. My software doesn’t do it yet, because it stores only |S21| in dB and throws away the phase. I will try to implement this method in the future.


2) MCAD & ECAD design

Antenna Positioner - MCAD - Assembly drawing
MCAD – Assembly drawing

The whole positioner is designed in Autodesk Inventor. It is an elevation-over-azimuth positioner. The lower A axis rotates everything above it (azimuth). The upper B axis tilts the antenna boom around a horizontal axis (elevation). With azimuth −180…+175° and elevation −90…+90°, the two axes cover the full sphere.

Most parts are 3D printed in PLA. The COTS parts are mostly standard:

  • 20 × 20 mm aluminium profiles for the lower frame
  • Eight 27 × 24 mm fiberglass tubes for the arms
  • HTD3M timing belts and pulleys
  • a large 6020-2RS bearing (150 × 100 × 24 mm) in the azimuth joint
  • two 6016 POM bearings (125 × 80 × 22 mm) in the elevation joint
  • a lot of M6 × 50 nylon screws with nylon nuts

The full BOM is in the GitHub repository.

Antenna Positioner - MCAD - Render - Front
MCAD – Render – Front

The front view shows the main idea of the layout. The lower half is allowed to contain metal: the frame with three foldable legs, the azimuth motor, the power supply and the electronics. The upper half, everything that the DUT “sees” at short distance, is made of dielectric materials.

Antenna Positioner - MCAD - Render - A joint motor
MCAD – Render – A joint motor
Antenna Positioner - MCAD - Render - A joint exploded view
MCAD – Render – A joint exploded view
Antenna Positioner - MCAD - Render - A joint cross section
MCAD – Render – A joint cross section

The azimuth (A) joint carries the whole upper structure. A 6020-2RS bearing takes the load, and a printed rotating stage sits on top of it. The motor drives the stage through an HTD3M belt: 24 teeth on the motor pulley and 192 teeth on the stage, a ratio of 8. Two printed idlers with small bearings keep the belt wrapped around the big pulley.

The belt reduction gives more torque at the output, a finer step and no gearbox backlash. One encoder count of the motor is 0.0027° at the antenna after the 8:1 gearbox, far finer than the measurement needs. The MKS manual gives an axis error of about ±15 encoder counts in the absolute-move mode [4], which is only 0.04° at the antenna. So the real pointing accuracy is set by belt stretch and the stiffness of the printed parts.

Antenna Positioner - MCAD - Render realistic - Antenna mount
MCAD – Render realistic – Antenna mount
Antenna Positioner - MCAD - Render - B joint exploded view
MCAD – Render – B joint exploded view
Antenna Positioner - MCAD - Render - B joint cross section 2
MCAD – Render – B joint cross section 2
Antenna Positioner - MCAD - Render - B joint motor
MCAD – Render – B joint motor

The elevation (B) joint is the most interesting part mechanically. It sits right next to the DUT, so it can’t contain a motor. Instead, the B motor is mounted low, on the bracket next to the azimuth stage. It drives the B axis through a 1530 mm long HTD3M belt that runs up inside the fiberglass pipe to a printed 200-tooth pulley (20 teeth on the motor, ratio 10).

The B axis turns in two 6016 POM bearings (all-plastic ball bearings), and the belt idlers next to it use 604H ceramic ball bearings. Every screw in this area is nylon, and the antenna boom is a pair of fiberglass tubes held by 3D printed PLA clamps.

Antenna Positioner - MCAD - Render - Unfolded legs
MCAD – Render – Unfolded legs

The lower frame is made of 20 × 20 mm aluminium profiles. The three legs fold up for transport on hinges and latch into printed holders. Three 5 mm carbon rods carry the load to three legs.

Antenna Positioner - MCAD - Render - PSU and electronics
MCAD – Render – PSU and electronics

A 24 V power brick is held on the frame by four printed clamps. A small printed box above it holds the MKS CANable V2.0 adapter. There are only two USB cables connected to the laptop: one from the CANable and one from the LibreVNA.

Antenna Positioner - MCAD - Render - Antenna mount
MCAD – Render – Antenna mount

The DUT mount is the only part that changes between antennas. The PCB horn sits in a dedicated 3D printed mount on the fiberglass boom, which puts its aperture at the right place relative to the axes. For another antenna I only need to print a new mount. The CAD library in the repository already contains models of my other antennas, which I use to check the fit before printing.

Antenna Positioner - ECAD - Schematic
ECAD – Schematic

I have designed a simple PCB just to connect all of the servo motors together (using nice Molex connectors). I’m using MKS SERVO42D 40 CAN MT closed-loop motors, controlled via CAN bus by the CANable V2.0 USB ↔ CAN converter.

The PCB is deliberately simple:

  • a 5.5/2.5 mm DC jack for 24 V and a power LED
  • three Molex Micro-Fit 3.0 2 × 2 connectors, one per motor (24 V, GND, CANH, CANL), each with a 10 µF decoupling capacitor
  • a 3-pin terminal for the CAN lines from the CANable

Two connectors are used today. The third is a spare for a future third axis.

In the GitHub repository (MCAD folder) you can find the following files:

  • Autodesk Inventor project of the antenna positioner,
  • exported STL files for 3D printing,
  • exported STEP file of the whole assembly,
  • exported PDF file with the assembly drawing, BOM and assembly instructions,
  • exported assembly renders.

In the GitHub repository (ECAD folder) you can find the following files:

  • KiCad project of the antenna positioner PCB,
  • exported Gerber files for manufacturing,
  • exported STEP file of the PCB,
  • exported PDF file with the schematic and layout.

In the GitHub repository (SOFTWARE folder) you can find the following files:

  • ANTENNA_POSITIONER.py, libreVNA.py and install_packages.bat,
  • example measurement results (CSV, notes, plots, 3D HTML),
  • 10_MEAS_VS_SIM_COMPARISON.py with the CST far-field exports.
Antenna Positioner - MCAD - Render - Right side
MCAD – Render – Right side
Antenna Positioner - MCAD - Render - Left side
MCAD – Render – Left side
Antenna Positioner - MCAD - Render realistic - Front
MCAD – Render realistic – Front
Antenna Positioner - MCAD - Render - Measurement setup 4
MCAD – Render – Measurement setup 4
Antenna Positioner - MCAD - Render - Measurement setup 2
MCAD – Render – Measurement setup 2
Antenna Positioner - MCAD - Render realistic - Measurement setup
MCAD – Render realistic – Measurement setup

3) EM simulations

Antenna Positioner - EM Simulation - Plane wave - E field animation - 2.45 GHz - Orientation: boresight - Whole assembly
EM Simulation – Plane wave – E field animation – 2.45 GHz – Orientation: boresight – Whole assembly

I have made these simple simulations of the whole antenna positioner placed on the ground and illuminated by a plane wave (1 or 2.45 GHz), just to check how the construction alters the wavefront. Unfortunately, I was able to simulate only these two frequencies due to the mesh size.

The simulations were done in CST Studio Suite with the time-domain solver. A plane wave arriving from the boresight or side direction illuminates the positioner standing on a block of ground. The field plots show the E-field magnitude in dB in vertical and horizontal cuts through the A and B joints. Ideally, the straight stripes of the plane wavefronts would pass through the antenna position undisturbed. Where the structure scatters, the stripes bend. You can see a lot of interesting electromagnetic effects on these animations !

The model is large in wavelengths. The positioner is about 1.35 m tall, which is 4.5 λ at 1 GHz and 11 λ at 2.45 GHz. A mesh fine enough for 3–6 GHz, where I actually measure, would be far too big for my PC. These simulations are not simulations of the measurement itself (there is no reference antenna and no DUT), but they show where to expect trouble.

Antenna Positioner - Boundary between dielectric and metal parts
Boundary between dielectric and metal parts

The upper section of the positioner is made from dielectric materials only, to minimise the impact on the wavefront. The bearings are either ceramic or plastic, the pipes are made from fiberglass composite, the screws are nylon and the rest is 3D printed from PLA with low infill, both to reduce the effective permittivity and the weight.

The plots confirm the split. The strongest disturbance comes from the metal in the lower half (aluminium frame, motors, power supply) and from the ground itself. Around the DUT and the antenna boom, the wavefronts stay almost straight (boresight wavefront direction). The dielectric parts of the B joint affect the wavefront a little (side wavefornt direction – B joint overshadows DUT) – this shouldn’t be a big problem for directional antennas (10 dBi +), the side lobes might be a little asymmetric due to this. The only way to check how it really works is to build it and measure some radiation patterns !

Antenna Positioner - EM Simulation - Plane wave - E field animation - 2.45 GHz - Orientation: boresight - B joint
EM Simulation – Plane wave – E field animation – 2.45 GHz – Orientation: boresight – B joint
Antenna Positioner - EM Simulation - Plane wave - E field animation - 1 GHz - Orientation: boresight - B joint
EM Simulation – Plane wave – E field animation – 1 GHz – Orientation: boresight – B joint
Antenna Positioner - EM Simulation - Plane wave - E field animation - 2.45 GHz - Orientation: boresight - A joint vertical cross section
EM Simulation – Plane wave – E field animation – 2.45 GHz – Orientation: boresight – A joint vertical cross section
Antenna Positioner - EM Simulation - Plane wave - E field animation - 1 GHz - Orientation: boresight - A joint vertical cross section
EM Simulation – Plane wave – E field animation – 1 GHz – Orientation: boresight – A joint vertical cross section
Antenna Positioner - EM Simulation - Plane wave - E field animation - 2.45 GHz - Orientation: boresight - A joint vertical cross section
EM Simulation – Plane wave – E field animation – 2.45 GHz – Orientation: boresight – A joint vertical cross section
Antenna Positioner - EM Simulation - Plane wave - E field animation - 1 GHz - Orientation: boresight - A joint vertical cross section
EM Simulation – Plane wave – E field animation – 1 GHz – Orientation: boresight – A joint vertical cross section
Antenna Positioner - EM Simulation - Plane wave - E field animation - 2.45 GHz - Orientation: boresight - A joint horizontal cross section
EM Simulation – Plane wave – E field animation – 2.45 GHz – Orientation: boresight – A joint horizontal cross section
Antenna Positioner - EM Simulation - Plane wave - E field animation - 1 GHz - Orientation: boresight - A joint horizontal cross section
EM Simulation – Plane wave – E field animation – 1 GHz – Orientation: boresight – A joint horizontal cross section
Antenna Positioner - EM Simulation - Plane wave - E field animation - 2.45 GHz - Orientation: boresight - B joint horizontal cross section
EM Simulation – Plane wave – E field animation – 2.45 GHz – Orientation: boresight – B joint horizontal cross section
Antenna Positioner - EM Simulation - Plane wave - E field animation - 1 GHz - Orientation: boresight - B joint horizontal cross section
EM Simulation – Plane wave – E field animation – 1 GHz – Orientation: boresight – B joint horizontal cross section
Antenna Positioner - EM Simulation - Plane wave - E field animation - 2.45 GHz - Orientation: side - B joint horizontal cross section
EM Simulation – Plane wave – E field animation – 2.45 GHz – Orientation: side – B joint horizontal cross section
Antenna Positioner - EM Simulation - Plane wave - E field animation - 1 GHz - Orientation: side - B joint horizontal cross section
EM Simulation – Plane wave – E field animation – 1 GHz – Orientation: side – B joint horizontal cross section

4) Software

The software is a single Python program, ANTENNA_POSITIONER.py (about 3,000 lines). It runs on my Windows laptop with Python 3.10+, and install_packages.bat installs everything it needs. The user interface is a web page served by NiceGUI and opened automatically in the browser, so the GUI is really a local website on localhost:8080. Everything runs in one asyncio event loop: button handlers, motor moves and VNA sweeps.

The laptop talks to two devices. The motors are on a CAN bus behind the CANable adapter, which python-can drives with the SLCAN protocol at 500 kbit/s (the motors’ default CAN rate [4]). The VNA is controlled through LibreVNA-GUI, which must be running: it has an SCPI server on a TCP port set in its preferences (19542 on my laptop), and the script sends text commands to it [5].

Antenna Positioner - System block diagram
System block diagram
LibraryUsed for
NiceGUIThe whole user interface: a web page served on localhost:8080
python-can + pyserialCAN bus over the CANable V2.0 USB <-> CAN dapter
libreVNA.py [5]Small socket helper from the LibreVNA project: sends SCPI commands, reads answers, parses the trace data
asyncio + ThreadPoolExecutorOne event loop for UI and measurement.
NumPy, pandasAngle grids, data storage, CSV export, normalisation
SciPySavitzky–Golay filter over frequency, Gaussian smoothing of the preview
MatplotlibPNG polar and 1D plots after the measurement (Agg backend, no window)
PlotlyLive preview in the GUI and the exported interactive 3D far-field HTML

How a measurement runs

When I press START MEASUREMENT, the script does the following:

  1. Connect. Opens the CAN bus, flushes old frames, declares the current position of both motors as zero (command 0x92 [4]) and enables them (0xF3).
  2. Configure the VNA. Sets the mode, the start and stop frequencies, the number of points, averaging, IF bandwidth and output level.
  3. Build the angle grid. A 2D cut goes from −180° to +175° in the chosen step. A 3D scan does the same in azimuth with elevation from −90° to +90°. On every azimuth column the elevation direction flips (a snake scan), so the motors never have to rewind.
  4. Measure every point. Sends an absolute move (0xF5) to both motors, waits until they report that they stopped, waits the settle delay, triggers one sweep, polls until it is finished and reads S21. Then it converts S21 to dB, stores it and updates the gauges and plots.
  5. Finish. Parks the motors at their mechanical zero and saves the CSV and the notes. The polar plots and the 3D HTML are generated in a worker thread, so the GUI stays responsive.
Antenna Positioner - Software flowchart
Software flowchart

GUI walkthrough

Below are screenshots of the real GUI, taken after measurement of 3D radiation pattern of the PCB horn. The blue numbers match the tables under each picture.

Antenna Positioner - GUI - Measurement setup
GUI – Measurement setup
#ElementWhat it does
1Save / Load settingsWrites every field to antenna_settings.json and reads it back. The file is also loaded automatically when the program starts.
2Project nameName of the results folder RESULTS/<project>/ and prefix of every output file.
3Measurement type2D (one cut), 3D – Full (whole sphere) or 3D – Range (a limited azimuth/elevation window).
4Frequency rangeSweep start–stop in GHz, e.g. “3-6 GHz”. The LibreVNA covers 100 kHz – 6 GHz.
5Frequency stepStep in MHz. Together with the range it sets the number of points.
6Acquisition pointsComputed: (stop − start)/step + 1, limited to 2…10001. 3–6 GHz in 10 MHz steps gives 301.
7Data smoothing (Savitzky–Golay)Optional smoothing of each sweep over frequency, half-window 0–25 points. It is applied before the data is stored, so I keep it at 0.
8AveragingNumber of sweeps the VNA averages per point. Less noise, but slower.
9IF bandwidthNarrower = lower noise floor, but a slower sweep. I use 1 kHz.
10Stimulus levelOutput power of the VNA, typically −42 to 0 dBm. I use −5 dBm.
11Angle stepGrid step in degrees, the same for both axes in 3D.
122D cut type / constant angleWhich axis sweeps in a 2D cut and the fixed angle of the other one. Greyed out in 3D mode.
133D range settingsAzimuth and elevation start/stop angles for 3D – Range mode.
14Project notesFree text saved to _notes.txt.
Antenna Positioner - GUI - Export
GUI – Export
#ElementWhat it does
15S21 normalisationOff (raw dB), Angle (S21 at a reference direction is taken as 0 dBi) or Max (the peak (main lobe) is taken as 0 dBi). Only the plots are normalised, the CSV always contains raw data.
16Reference azimuth / elevationReference direction for Angle mode. The nearest measured point is used.
17Farfield plot exportGenerate PNG plots automatically after the measurement.
18Plot frequenciesList of frequencies in GHz. The nearest measured frequency is used.
19Interactive 3D farfield (HTML)Exports a Plotly 3D HTML file with the radiation pattern for the listed frequencies.
Antenna Positioner - GUI - Motor settings
GUI – Motor settings
#ElementWhat it does
20CANable portSerial port of the SLCAN adapter (COM5 on my laptop).
21Settle delayPause after the motors stop and before the sweep, so the boom stops swinging. I use 1 s.
22Antenna speedAxis rotation speed in °/s
23Motion smoothnessAcceleration ramp of the MKS motors: acc byte = 256 − value, so 255 is the gentlest ramp.
24Axis zero offsetsPhysical motor angle = measurement angle + offset. Adjust this so that DUT boresight points to reference antenna.
25Test zero / Return to physical 0°Moves to measurement 0° so I can check that the DUT faces the reference antenna, then back to the mechanical zero.
26Start / StopStarts or stops the measurement.
27InstructionsMotor setup guide, VNA wiring etc..
Antenna Positioner - GUI - Instructions
GUI – Instructions

The motors need a one-time setup on their own OLED menu before first use: restore the defaults, select the SR_CLOSE mode (bus control in closed loop with encoder feedback), enable stall protection and set the CAN ID (1 = azimuth, 2 = elevation) [4]. The same dialog shows the VNA wiring (port 1 → reference antenna, port 2 → DUT). It also warns that the two cables together ideally should have less than 10 dB of loss, because the LibreVNA’s dynamic range and port isolation get worse at higher frequencies.

Antenna Positioner - GUI - Progress
GUI – Progress
#ElementWhat it does
28ProgressPercentage, current point and estimated time left.
29Motor / VNA status“Moving…”, “In position”, “Sweeping…”, “Done”, plus VNA error messages if the instrument reports any.
30Azimuth / elevation gaugesThe current measurement angles of both axes.
Antenna Positioner - GUI - 3D preview
GUI – 3D preview
#ElementWhat it does
31Preview frequencyWhich frequency the preview shows. The slider range follows the sweep.
32Smoothing σGaussian smoothing of the preview.
33Shape compression γγ < 1 inflates the weak lobes so the 3D shape is easier to read. Colours stay in dB with a 30 dB window.
343D farfield previewMeasured pattern as a 3D surface: X lateral, Y up, Z boresight. It updates during the scan.
Antenna Positioner - GUI - 2D preview
GUI – 2D preview
#ElementWhat it does
372D previewIn 2D mode the preview is a cut in dB versus angle, normalised to its peak.
Antenna Positioner - GUI -VNA trace
GUI -VNA trace
#ElementWhat it does
35Live VNA S21 traceS21 versus frequency at the current point. A quick check that the signal is well above the noise.
36Trace plotRaw dB, before any normalisation.

Output files

FileContent
RESULTS/<project>/<project>_S21.csvOne row per angle: azim_deg, elev_deg, frequencies, s21_logmag. The last two are space-separated lists (Hz and dB). Always raw, never normalised.
<project>_notes.txtDate and time, all VNA, scan, motor and normalisation settings, and the text notes
PLOTS/…_<f>GHz_…_polar.png / _1D.pngFor every requested frequency: polar and Cartesian plots of each cut. 3D scans give an azimuth plane and an elevation plane.
<project>_3D_farfield.htmlInteractive 3D pattern (HTML + Plotly) with frequency, smoothing and shape-compression sliders. 3D modes only, loads Plotly.js from a CDN.
antenna_settings.jsonAll GUI settings (Save / Load buttons)

Comparison with simulation

A second, smaller script, 10_MEAS_VS_SIM_COMPARISON.py, puts the measured cuts on top of CST far-field exports. It reads the 2D measurement CSVs and the 3D farfield text files exported from the CST. It then builds full ±180° cuts (elevation and azimuth) and shifts every measured cut so that the main lobes from the simulation and measurement point to the same direction. After 5-point Savitzky–Golay smoothing over angle, it computes the RMS difference in dB. It saves one polar plot per frequency and cut, with a coloured RMS badge.

Video

On the video above you can see the measurement process (for 2D and 3D radiation patterns).


5) Photos

Antenna Positioner - Assembled - Front view
Assembled – Front view

On the photos above and below you can see the finished antenna positioner.

The grey parts are printed in PLA, the olive tubes are fiberglass and the white heads all around the joints are nylon screws. The electronics box with the CANable sits on the frame below the azimuth joint, next to the power brick.

Antenna Positioner - Assembled - Side view
Assembled – Side view
Antenna Positioner - Assembled - B joint
Assembled – B joint
Antenna Positioner - Assembled - PSU and electronics
Assembled – PSU and electronics
Antenna Positioner - Assembled - B joint 3
Assembled – B joint 3
Antenna Positioner - Assembled - A joint motor
Assembled – A joint motor
Antenna Positioner - Assembled - Leg boom
Assembled – Leg boom
Antenna Positioner - Assembled - B joint motor
Assembled – B joint motor
Antenna Positioner - Assembled - Base plate
Assembled – Base plate
Antenna Positioner - Assembled - Electronics box
Assembled – Electronics box
Antenna Positioner - Assembled - Antenna mount
Assembled – Antenna mount

6) Measurements

Antenna Positioner - Measurement setup 4
Measurement setup 4

All measurements were done in my garden. The reference DRH stands on a photo tripod. The positioner stands about 1.5 m away, and both antennas are about 1.25 m above the grass. The laptop that controls everything sits on a small table behind the positioner.

Antenna Positioner - PCB Coaxial-Fed Horn Antenna mounted to the positioner
PCB Coaxial-Fed Horn Antenna mounted to the positioner

I measured two of my antennas: the PCB coaxial-fed horn (3–7 GHz) and the 3D-printed double-ridged horn (2–6 GHz). Both have CST models, so I can compare the measured cuts with simulated far-field cuts. Settings:

  • 3–6 GHz in 10 MHz steps (301 points) for the PCB horn, 2–6 GHz for the DRH
  • IF bandwidth 1 kHz, −5 dBm, no averaging, settle delay 1 s
  • 5° steps for the 2D cuts, 10° for the 3D scans
Antenna Positioner - Measurement setup 7
Measurement setup 7
Antenna Positioner - Measurement setup 5
Measurement setup 5

The plots below compare the two 2D cuts of the PCB horn with the CST cuts (elevation and azimuth). The RMS difference is computed in dB on a 1° grid, with both curves clipped at −30 dBi so the noise floor doesn’t dominate. The badge is green up to 3 dB, amber up to 6 dB and red above.

Antenna Positioner - PCB Coaxial-Fed Horn Antenna (3-7 GHz) - Simulation vs. Measurement - Radiation Pattern (Azimuth cut, 3 GHz)
Simulation vs. Measurement – Radiation Pattern (Azimuth cut, 3 GHz)
Antenna Positioner - PCB Coaxial-Fed Horn Antenna (3-7 GHz) - Simulation vs. Measurement - Radiation Pattern (Elevation cut, 3 GHz)
Simulation vs. Measurement – Radiation Pattern (Elevation cut, 3 GHz)
Antenna Positioner - PCB Coaxial-Fed Horn Antenna (3-7 GHz) - Simulation vs. Measurement - Radiation Pattern (Azimuth cut, 4 GHz)
Simulation vs. Measurement – Radiation Pattern (Azimuth cut, 4 GHz)
Antenna Positioner - PCB Coaxial-Fed Horn Antenna (3-7 GHz) - Simulation vs. Measurement - Radiation Pattern (Elevation cut, 4 GHz)
Simulation vs. Measurement – Radiation Pattern (Elevation cut, 4 GHz)
Antenna Positioner - PCB Coaxial-Fed Horn Antenna (3-7 GHz) - Simulation vs. Measurement - Radiation Pattern (Azimuth cut, 5 GHz)
Simulation vs. Measurement – Radiation Pattern (Azimuth cut, 5 GHz)
Antenna Positioner - PCB Coaxial-Fed Horn Antenna (3-7 GHz) - Simulation vs. Measurement - Radiation Pattern (Elevation cut, 5 GHz)
Simulation vs. Measurement – Radiation Pattern (Elevation cut, 5 GHz)
Antenna Positioner - PCB Coaxial-Fed Horn Antenna (3-7 GHz) - Simulation vs. Measurement - Radiation Pattern (Azimuth cut, 6 GHz)
Simulation vs. Measurement – Radiation Pattern (Azimuth cut, 6 GHz)
Antenna Positioner - PCB Coaxial-Fed Horn Antenna (3-7 GHz) - Simulation vs. Measurement - Radiation Pattern (Elevation cut, 6 GHz)
Simulation vs. Measurement – Radiation Pattern (Elevation cut, 6 GHz)

The main lobes match well at all frequencies. The differences are in the side and back lobes, 20–30 dB down, where every echo from the ground, the tripods or the garden matters (see equation (5)). The elevation cuts of the PCB horn are within 1.6–3.3 dB RMS. The worst case is the azimuth cut at 5 GHz with 6.6 dB.

Interestingly, the 3D-printed DRH is also worst in the azimuth cut at 5 GHz (5.4 dB). When two different antennas fail at the same frequency and in the same cut, that points to the measurement setup rather than to the antennas.

AntennaCut2 GHz3 GHz4 GHz5 GHz6 GHz
PCB coax-fed hornazimuth (φ = 0°)–2.33.76.62.8
elevation (φ = 90°)–2.01.63.33.0
3D-printed DRHazimuth (φ = 0°)2.71.91.85.43.8
elevation (φ = 90°)1.92.31.73.02.8
RMS difference between the measured and the simulated cut in dB (1° grid, clipped at −30 dBi).

On the video below you can see how the antenna positioner rotates the antenna:

Below you can find the real measured interactive 3D radiation pattern that you can rotate with your mouse!

What limits the accuracy

  • Echoes from the ground, the tripods, the table and the garden. They mostly affect sidelobes and back lobes (eq. (5)). Time gating would remove most of them, but needs complex S21.
  • Distance. 1.5 m is enough for the DUT, but short for the large reference horn at 5–6 GHz , I will increase this distance in the future,
  • Alignment. Zero offsets are set by eye with TEST ZERO POSITION. A few degrees of error shift the whole cut.
  • The positioner itself. The dielectric upper part still scatters a little, and the metal lower also interacts with the DUT for some of the angles (EM absorbers would help here)

7) Specifications

ConfigurationElevation-over-azimuth, 2 axes
Angular rangeAzimuth −180…+175°, elevation −90…+90° (full sphere)
Drive2× MKS SERVO42D CAN, HTD3M belts 8:1 (azimuth), 10:1 (elevation)
VNALibreVNA, 100 kHz – 6 GHz, S21
Typical scan duration2D cut: 72 stops (5°), a few minutes · 3D: 684 stops (10°), under 1 hour
Test rangeOutdoor, open field
SoftwarePython: NiceGUI, python-can, NumPy, pandas, SciPy, Matplotlib, Plotly
OutputsCSV, notes TXT, PNG polar/1D plots, interactive 3D HTML

8) Conclusions

The positioner does what I wanted. I can take an antenna into the garden, press start, and come back to a full set of 2D cuts and a 3D pattern that I can compare with the simulation. For the main lobe and the first sidelobes, the agreement with CST is 2–4 dB RMS at most frequencies. That is good enough to tell whether a design behaves like its model. Below about −20 dB, the garden takes over.

This setup will be ideal for phased array prototyping / debugging ( I will change phases and amplitudes at each element to fine tune the array ). Instead of going into a professional lab with anechoic chamber every time I can simply do most of the preliminary measurements on-site which is huge time saver.

What I want to improve next:

  • store complex S21, so I can time-gate the ground echo [2], [3]
  • measure absolute gain with a gain-transfer or three-antenna measurement [1], [2]
  • put some absorbers in the appropriate places

9) References

  • [1] C. A. Balanis, Antenna Theory: Analysis and Design, 4th ed., Wiley, 2016.
  • [2] IEEE Recommended Practice for Antenna Measurements, IEEE Std 149-2021, 2022.
  • [3] J. Olencki, V. Waladi, A. Bekasiewicz and L. Leifsson, “A low-cost system for far-field non-anechoic measurements of antenna performance figures,” IEEE Access, vol. 11, pp. 39165–39175, 2023, doi: 10.1109/ACCESS.2023.3268116.
  • [4] Makerbase, MKS SERVO42D/57D_CAN User Manual, V1.0.3.
  • [5] LibreVNA SCPI Programming Guide, LibreVNA project, https://github.com/jankae/LibreVNA.

If you enjoyed this post and would like to support more open-source projects like this, you can

Don’t forget to like, follow and subscribe ByTechLab on other websites:

As always, feel free to leave a comment below if you have any questions or feedback!