Requirements
- Language: Python 3.x
- Required Libraries:
numpy,scipy,matplotlib,tkinter
Overview
Paul’s Interpolation Engine (PIE) is a tool designed to reconstruct the full 3-D radiation pattern using only the two principal orthogonal cuts: the azimuth plane — and the elevation plane — . In effect, this tool is an open-source recreation of the function patternFromSlices from MATLAB’s Antenna Toolbox.
- This allows you to reconstruct the full pattern using 720 datapoints (360 Azimuth, 360 Elevation). Doing this by measurement would require around 65,000 datapoints.
- This tool requires ~1% of the required data to function, so there is an obvious tradeoff in accuracy. This is a tool for rapid estimation, not precise calculation.

Figure 1: PIE Graphic User Interface. Original Pattern Window.

Figure 2: PIE Graphic User Interface. Reconstructed 3D Pattern Window.
- represents the gain in the azimuthal plane where is fixed as or depending on mounting.
- represents the gain in the elevation plane where for the front hemisphere and for the back.
- Data must be normalized such that the maximum gain equals to preserve the integrity of the Summing Algorithm.
The goal of this tool is to aid in rapid prototyping and visualization of antenna patterns without the time-consuming anechoic chamber measurements or computationally expensive 3-D simulations.
graph TD A[/"<b>Raw Input Data:</b></b><br/> G<sub>AZ</sub>(θ), G<sub>EL</sub>(φ)"/] --> B["<b>Preprocessing</b><br/>(Auto-Center, Loop Closure)"] B --> C[/"<b>Input Data:</b><br/> G̃<sub>AZ</sub>(θ), G̃<sub>EL</sub>(φ)"/] C --> D["<b>2D Interpolation</b><br/>(Cubic Spline)"] D --> E[/"<b>Smoothed Input Data:</b><br/> Ĝ<sub>AZ</sub>(θ), Ĝ<sub>EL</sub>(φ)"/] E --> F["<b>3D Interpolation</b><br/>(Summing, Approx, Hybrid)"] F --> G[/"<b>Raw 3D Pattern:</b><br/> G̃(θ, φ)"/] G --> H["<b>Post-Processing</b><br/>(Gaussian Smoothing)"] H --> I[/"<b>Output Data:</b><br/> Ĝ(θ, φ)"/] style A fill:#f0f0f0,stroke:#333,stroke-width:2px,color:black style C fill:#f0f0f0,stroke:#333,stroke-width:2px,color:black style E fill:#f0f0f0,stroke:#333,stroke-width:2px,color:black style G fill:#f0f0f0,stroke:#333,stroke-width:2px,color:black style I fill:#f0f0f0,stroke:#333,stroke-width:2px,color:black style B fill:#ffffff,stroke:#000,stroke-width:2px,color:black style D fill:#ffffff,stroke:#000,stroke-width:2px,color:black style F fill:#ffffff,stroke:#000,stroke-width:2px,color:black style H fill:#ffffff,stroke:#000,stroke-width:2px,color:black
Figure 3: Interpolation Flowchart.
Antenna Data Sources
When developing this tool, I used antenna patterns provided by UniFi for their commercial Wi-Fi Routers. The specific model I used was the U7 Outdoor.
![]()
Figure 4: UniFi U7 Outdoor Router.
Contained below are a couple of graphs provided by UniFi for this router [1].
![]()
Figure 5: UniFi-provided antenna patterns for the U7 Outdoor Router.
Aside from these graphs, UniFi also provides the data points for their antenna patterns in a
.antfile:
- First 360 values: Azimuth plane
- Next 360 values: Elevation plane
All 3D patterns on this page are reconstructed using the
.antor.txtfile for a U7 Router operating at 5 GHz.
2D Interpolation
The tool accepts text file inputs (.ant or .txt) containing a column of gain values. The only requirements are:
- The total number of data points is an even number divided equally between azimuth and elevation (top half of file is azimuth data, bottom half is elevation).
- The total number of data points is at least 10 (Minimum: 5 Azimuth, 5 Elevation).
- Input gain values should be in dB. The absolute gain reference is discarded when the data is normalised to the peak value.
Before passing these data points for 3-D interpolation, cubic splines are used to map the arbitrary number of input points to a standard 360-point grid at 1-degree resolution.

Figure 6: 2D Interpolation Example with Cubic Splines.
3D Interpolation
The purpose of 3-D interpolation is to take the smoothed input data ( Azimuth + Elevation total) and use this to generate a matrix of data points. The tool implements three different 3-D interpolation algorithms to handle situations of varying complexity:
Summing Algorithm
Figure 7: 3-D Radiation Pattern Reconstructed with Summing Algorithm.
The first method is the Summing Algorithm [3, p.1]. This approach adds the logarithmic (dB) gain elevation and azimuth cuts. This is mathematically equivalent to multiplying the linear gain patterns.
- This method can perfectly reconstruct omni-directional patterns (e.g., dipoles) with no error due to their inherent axial symmetry, however, it assumes pattern separability [2,p.2].
- The Summing method is effective at reconstructing the main lobe of directive antennas but interpolation can fail with side lobes.
- Summing systematically underestimates gain in complex directional antennas. This can be good if you want a conservative estimate.
- Summing can introduce artifacts (“creases”) at the intersection of the principal cuts.
Approximation Algorithm
Figure 8: 3-D Radiation Pattern Reconstructed with Approximation Algorithm.
The Approximation Algorithm is a variation on summing which introduces geometric cross-weighting (p-norm blend). This means that the magnitude of the azimuthal cut is used to weigh the contribution of the elevation cut and vice-versa. In other words, one of the principal planar cuts is related to its orthogonal pair as a function of its normalized linear magnitude. This approach addresses the inherent weakness of summing with reconstructing side lobes.
At an arbitrary point , the approximated antenna gain is [2, p.2-3]:
where is the normalization parameter (discussed later) and the weight functions and are given by:
where the linear gain terms are derived from the logarithmic input patterns:
If we define and as the overall normalized weights:
then the initial weights are normalized such that the following relationship is satisfied:
- This method generally produces more optimistic (higher gain) estimates than summing while retaining more side-lobe detail.
- Like summing, when the antenna pattern is axially symmetric, no error is produced from interpolation.
- The overall normalized weights, and , define the participation of each slice in the interpolation. When and , the Approximation and Summing Algorithms are equivalent.
Interpolation is governed by the normalization parameter (), which controls the mathematical locus of the weights. Increasing k produces a more conservative (lower gain) estimate.
- : Applies standard linear weighting.
- (Default): Uses Euclidean blending (square root of the sum of squares). This has been seen to minimize approximation error for standard directional antennas [2,p.3].
- : The behavior converges to the Summing Algorithm.
Hybrid Algorithm
Figure 9: 3-D Radiation Pattern Reconstructed with Hybrid Algorithm.
The Hybrid Algorithm [2, p.2] is a weighted mix of the Summing and Approximation algorithms which cross fades based on local gain intensity. This approach works by increasing or decreasing the weight of the two algorithms based on angular distance.
where:
- The hybrid algorithm is optimal for radiation patterns of directive arrays with complex principal patterns.
- The transition slope parameter (n): Controls the “slope” of the bridging function between the two algorithms.
- increasing n increases the dominance of the Summing Algorithm. This improves main lobe accuracy but may degrade mean error in side lobes.
- Recommended Range for n is around to but ultimately depends on the directivity of the antenna under test [2 p.4].
- Yagi-Uda Arrays: Optimal
- Panel Antennas: Optimal
Evaluation of Error
For the UniFi U7 Outdoor, I did not have the full 3-D pattern available to me, only the principal cuts. It would not have been rigorous, or even meangful, to compare planar slices from the reconstructed pattern with the planar slices used as an input. There is little that can be extrapoled from such a restricted scope to the overall error or error in key pattern features.
I decided to export a pattern from HFSS, manually extract the azimuth and elevation slices, interpolate a full pattern, then compare the full 3D-patterns. The results can be found here.
References
[1] “AP Antenna Radiation Patterns,” UniFi, March. 1, 2023. [Online]. Available: https://help.ui.com/hc/en-us/articles/115005212927-AP-Antenna-Radiation-Patterns
[2] T. G. Vasiliadis, A. G. Dimitriou and G. D. Sergiadis, “A novel technique for the approximation of 3-D antenna radiation patterns,” in IEEE Transactions on Antennas and Propagation, vol. 53, no. 7, pp. 2212-2219, July 2005.
[3] N. R. Leonor, R. F. S. Caldeirinha, M. G. Sánchez and T. R. Fernandes, “A Three-Dimensional Directive Antenna Pattern Interpolation Method,” in IEEE Antennas and Wireless Propagation Letters, vol. 15, pp. 881-884, 2016.


