W-band radios#
Component data and a field test
Keep two W-band (75–110 GHz) point-to-point radios’ component data and field-test telemetry in
Nominal, along with the telemetry of the drones that carry them, then analyze it all in the Nominal platform. Each radio is a Nominal asset,
with its parts’ Touchstone files as attachments and its field test as a
run. All data is
simulated, with scikit-rf standing in for vector network analyzer
measurements.
Download the notebook to run it in JupyterLab.
Requirements: a default profile
for the Nominal Python Client, and the packages the notebook imports, including scikit-rf and
nominal-learning[plotly]. Running the notebooks explains how to set them up.
Each execution of the notebook reuses the two assets. It archives what earlier executions created on them, so they hold one set of data: this execution’s.
Setup#
Connect to Nominal#
from pathlib import Path
import numpy as np
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
import plotly.io as pio
import skrf as rf
from nominal.core import EventType, NominalClient, set_display_options
from learning.style import set_plotly_style
from nominal.thirdparty.pandas import upload_dataframe_to_dataset
from plotly.subplots import make_subplots
# A Nominal object at the end of a cell displays as a card. Show its timestamps in a readable
# format.
set_display_options(time_format="readable")
# Plotly figures use the learning style, on plotly's dark template.
set_plotly_style()
pio.templates.default = "plotly_dark+learning"
client = NominalClient.from_profile("default")
Synthesize the component Touchstone files#
Every part is characterized from 75 to 110 GHz. The radios use frequency-division duplexing: they transmit in 81–86 GHz and receive in 91–96 GHz, so each has a bandpass filter for each direction.
Part |
File |
Model |
|---|---|---|
Tx filter |
|
5th-order Chebyshev bandpass, 81–86 GHz |
Rx filter |
|
5th-order Chebyshev bandpass, 91–96 GHz |
Amplifier |
|
about 21 dB gain, rolling off toward the band edges |
Antenna |
|
horn antenna, return loss only |
Coupler |
|
10 dB directional coupler: port 1 in, 2 through, 3 coupled, 4 isolated |
Each radio’s parts vary slightly, from a fixed random seed. RadioTwo was built with a marginal amplifier, about 2.5 dB below RadioOne’s.
The code that synthesizes data is folded. Select Show code cell source to read it.
scikit-rf writes each network to a Touchstone file whose extension matches its port count:
# Overlay the two radios' parts: RadioOne solid, RadioTwo dashed.
panels = ["Filters", "Amplifier", "Antenna", "Coupler"]
fig = make_subplots(
rows=2, cols=2, subplot_titles=panels, shared_xaxes=True, vertical_spacing=0.12
)
def add_s_db(
network: rf.Network, m: int, n: int, name: str, row: int, col: int, dash: str
) -> None:
fig.add_scatter(
x=network.f / 1e9,
y=network.s_db[:, m, n],
name=name,
line={"dash": dash, "width": 1.5},
row=row,
col=col,
)
for radio, parts in RADIOS.items():
dash = "solid" if radio == "RadioOne" else "dash"
for part in ["tx_filter", "rx_filter"]:
add_s_db(parts[part], 1, 0, f"{radio} {part} S21", 1, 1, dash)
add_s_db(parts["amplifier"], 1, 0, f"{radio} amplifier S21", 1, 2, dash)
add_s_db(parts["amplifier"], 0, 0, f"{radio} amplifier S11", 1, 2, dash)
add_s_db(parts["antenna"], 0, 0, f"{radio} antenna S11", 2, 1, dash)
for m, port in [(1, "through"), (2, "coupled"), (3, "isolated")]:
add_s_db(parts["coupler"], m, 0, f"{radio} coupler {port}", 2, 2, dash)
fig.update_yaxes(range=[-60, 5], row=1, col=1)
fig.update_yaxes(title_text="dB", col=1)
fig.update_xaxes(title_text="frequency (GHz)", row=2)
fig.update_layout(
height=640, hovermode="closest", legend={"y": -0.2, "yanchor": "top"}
)
fig
Register the radios as assets#
A few key figures become asset properties, so they show on each asset’s page in Nominal and can be searched. Filter loss is read at the center of each filter’s band, and the rest at the center of the receive band, 93.5 GHz.
def db_at(network: rf.Network, m: int, n: int, ghz: float) -> float:
return round(float(network.s_db[np.argmin(np.abs(F_GHZ - ghz)), m, n]), 2)
def key_figures(parts: dict[str, rf.Network]) -> dict[str, float]:
return {
"tx_filter_insertion_loss_db": -db_at(parts["tx_filter"], 1, 0, 83.5),
"rx_filter_insertion_loss_db": -db_at(parts["rx_filter"], 1, 0, 93.5),
"amplifier_gain_db": db_at(parts["amplifier"], 1, 0, 93.5),
"antenna_return_loss_db": -db_at(parts["antenna"], 0, 0, 93.5),
"coupler_coupling_db": -db_at(parts["coupler"], 2, 0, 93.5),
}
pd.DataFrame({radio: key_figures(parts) for radio, parts in RADIOS.items()})
get_or_create_asset_by_properties() finds each radio by its
properties, or registers it the first time. The example property keeps these assets apart from
real radios with the same radio_id.
Each Touchstone file is uploaded with create_attachment and added to its radio with
add_attachments.
EXAMPLE = "rf_radio_field_test"
PART_DESCRIPTIONS = {
"tx_filter": "Tx channel filter, 81–86 GHz",
"rx_filter": "Rx channel filter, 91–96 GHz",
"amplifier": "W-band amplifier",
"antenna": "Horn antenna",
"coupler": "10 dB directional coupler (1 in, 2 through, 3 coupled, 4 isolated)",
}
assets = {}
for radio, parts in RADIOS.items():
asset = client.get_or_create_asset_by_properties(
{"radio_id": radio, "example": EXAMPLE},
name=radio,
description="W-band (75–110 GHz) point-to-point radio",
labels=["w-band", "radio"],
)
asset.update(properties={**asset.properties, **key_figures(parts)})
attachments = [
client.create_attachment(
path,
description=f"{radio} {PART_DESCRIPTIONS[part]}, 75–110 GHz",
properties={
"part": part,
"ports": str(parts[part].nports),
"radio_id": radio,
},
labels=["touchstone", path.suffix.lstrip(".")],
)
for part, path in touchstone_files[radio].items()
]
asset.add_attachments(attachments)
assets[radio] = asset
Field test#
Simulate the field test#
Both radios carry traffic over the same link for 10 minutes, recorded at 10 Hz. Each records:
Dataset |
Channel |
Unit |
What it measures |
|---|---|---|---|
|
|
V |
amplifier drain bias, regulated at 4.0 V |
|
|
V |
12 V supply bus, which sags under load |
|
|
V |
heat: an NTC thermistor divider, which rises as the radio warms |
|
|
million packets/s |
packets received intact |
|
|
packets/s |
packets lost to bit errors or a full queue |
|
|
Gb/s |
delivered throughput |
|
|
° |
the drone’s position |
|
|
m |
height above mean sea level |
|
|
m/s |
speed over the ground |
|
|
V |
6S flight battery, which sags as it drains |
|
|
% |
battery charge left |
Traffic is 1500-byte packets, so 1 Mpps is 12 Gb/s. The modem runs at 20 Gb/s, about 1.67 Mpps, while it has at least 2 dB of link margin. Below that, it steps down to a more robust modulation at 14 Gb/s, and back up above 3 dB.
The amplifier loses about 0.05 dB of gain per °C, which eats into the link margin. Five minutes in, RadioTwo’s cooling fan fails. Its marginal amplifier then runs out of margin.
Each radio hangs under a drone. The drones take off 1.2 km apart, climb to about 160 m in 30 s, then fly over their sites for the rest of the test: RadioOne’s a figure eight 500 m wide and RadioTwo’s circles 350 m across, with wind pushing them east. The radios’ power draw adds to the batteries’ load.
# Plot the simulated test for both radios.
CHANNEL_PLOTS = [
("power", "thermistor_voltage", "thermistor (V)"),
("comms", "throughput_gbps", "throughput (Gb/s)"),
("comms", "dropped_packets_pps", "dropped (packets/s)"),
("flight", "battery_voltage", "drone battery (V)"),
]
radio_colors = {"RadioOne": "#2ca02c", "RadioTwo": "#ff7f0e"}
fig = make_subplots(
rows=len(CHANNEL_PLOTS), cols=1, shared_xaxes=True, vertical_spacing=0.04
)
for row, (scope, channel, label) in enumerate(CHANNEL_PLOTS, start=1):
for radio, tables in tests.items():
fig.add_scatter(
x=tables[scope].index,
y=tables[scope][channel],
name=radio,
legendgroup=radio,
showlegend=row == 1,
line={"color": radio_colors[radio], "width": 1},
row=row,
col=1,
)
fig.update_yaxes(title_text=label, row=row, col=1)
fig.update_yaxes(type="log", row=3, col=1)
fig.update_layout(height=760)
fig
The map shows where each drone flew. It opens on the centroid of both drones’ tracks, with each radio’s track as a line and its takeoff point marked:
flights = pd.concat(
[tables["flight"].assign(radio=radio) for radio, tables in tests.items()]
)
# Open the map on the centroid of all the positions, zoomed to fit both tracks.
center = {"lat": flights["latitude"].mean(), "lon": flights["longitude"].mean()}
radio_map = px.line_map(
flights,
lat="latitude",
lon="longitude",
color="radio",
center=center,
zoom=14,
height=420,
)
starts = flights.groupby("radio").first().reset_index()
radio_map.add_scattermap(
lat=starts["latitude"],
lon=starts["longitude"],
mode="markers+text",
text=starts["radio"],
textposition="top right",
textfont={"color": "white"},
marker={"size": 10},
showlegend=False,
)
radio_map.update_layout(
map_style="carto-darkmatter", margin={"l": 0, "r": 0, "t": 0, "b": 0}
)
radio_map
Upload the field test#
Both radios store their data under the same data scope names, power, comms and flight, so one workbook
template or checklist works for either radio. get_or_create_dataset()
creates each radio’s dataset under its data scope, and upload_dataframe_to_dataset uploads the
test, waiting until Nominal has ingested it.
Then set each channel’s unit and description. The packet-rate channels carry their unit in their names and descriptions.
Each radio’s run also gets its Touchstone files, as a record of the parts the radio had during the test.
CHANNELS = {
"bias_voltage": ("V", "Amplifier drain bias, regulated at 4.0 V"),
"dc_supply_voltage": ("V", "12 V supply bus"),
"thermistor_voltage": (
"V",
"NTC thermistor divider from 3.3 V. Rises as the radio warms.",
),
"rx_packets_mpps": (
None,
"Packets received intact, in millions of packets per second (1500-byte packets)",
),
"dropped_packets_pps": (
None,
"Packets dropped to bit errors or a full queue, in packets per second",
),
"throughput_gbps": ("Gb/s", "Delivered throughput"),
"latitude": ("°", "Drone latitude, WGS 84"),
"longitude": ("°", "Drone longitude, WGS 84"),
"altitude": ("m", "Drone altitude above mean sea level"),
"groundspeed": ("m/s", "Drone speed over the ground"),
"battery_voltage": ("V", "6S flight battery voltage"),
"battery_remaining": ("%", "Flight battery charge remaining"),
}
runs = {}
for radio, tables in tests.items():
asset = assets[radio]
for scope, table in tables.items():
dataset = asset.get_or_create_dataset(
scope,
name=f"{radio} {scope}",
description=f"{radio} {scope} telemetry from field tests",
labels=["field-test", scope],
properties={"sample_rate_hz": SAMPLE_RATE_HZ},
)
upload_dataframe_to_dataset(
dataset,
table,
"time",
"iso_8601",
file_name=f"{radio}_{scope}_{test_start:%Y%m%dT%H%M%S}.csv.gz",
)
for channel in dataset.get_channels():
unit, description = CHANNELS[channel.name]
channel.update(unit=unit, description=description)
runs[radio] = asset.create_run(
f"{radio} field test {test_start:%Y-%m-%d %H:%M}",
start=times[0],
end=times[-1],
description="10-minute W-band link test at 20 Gb/s line rate, with the radio on a drone",
properties={
"site": "Range 4",
"link_distance_km": 1.2,
"packet_bytes": 1500,
},
labels=["field-test"],
attachments=asset.list_attachments(),
)
RadioTwo’s fan failure and the modem stepping down become events, so they show on the timeline
in Nominal:
# Look after the first minute, while traffic ramps up and throughput is low anyway.
throughput = tests["RadioTwo"]["comms"]["throughput_gbps"][
test_start + pd.Timedelta(seconds=60) :
]
first_step_down = throughput[throughput < 15].index[0]
fan_failure = assets["RadioTwo"].create_event(
"Cooling fan failure",
EventType.ERROR,
start=test_start + pd.Timedelta(seconds=300),
description="Fan tachometer read zero for the rest of the test.",
labels=["field-test"],
)
step_down = assets["RadioTwo"].create_event(
"Modem stepped down to 14 Gb/s",
EventType.FLAG,
start=first_step_down,
duration=times[-1] - first_step_down,
description="Link margin fell below 2 dB. Excess traffic was dropped.",
labels=["field-test"],
)
Review with Nominal’s Analyst#
Analysis happens in the Nominal platform. Open the RadioTwo run in Nominal, then give its assistant a prompt like the ones below to set up a workbook.
What’s in Nominal#
The two radio assets are in Nominal. A card’s name links to its page there, and its copy button copies its RID. Each card lists the asset’s datasets by data scope, its runs and its attachments, and links on to them. Each Touchstone file’s name downloads the file from Nominal, after signing in if needed:
assets["RadioOne"]
assets["RadioTwo"]
Overview of a run#
A map, the key telemetry and an amplifier gain curve in one workbook.
make a workbook for this run that shows
* the drone's position on a map, using the "street" base layer
* thermistor voltage, throughput and dropped packets on separate plots, stacked
* the distance between the two drones, computed from their latitude and longitude,
on a new plot under dropped packets
* the drone's battery voltage and altitude on a plot
* the amplifier's S21 gain from the attached Touchstone file, full width at the bottom
Compare RadioOne and RadioTwo, and mark the fan failure event.
Flight telemetry against dropped packets#
Both drones’ flight data overlaid on dropped packets, to check whether where and how the drones flew explains RadioTwo’s drops.
make a workbook that compares RadioOne and RadioTwo's flight telemetry against dropped packets
* dropped packets for both radios on one plot, on a log scale, at the top
* below it, one plot per flight channel with RadioOne and RadioTwo overlaid:
altitude, groundspeed, battery voltage and battery remaining
* the distance between the two drones, computed from their latitude and longitude,
on a plot of its own
* a scatter plot of dropped packets against the distance between the drones
* a map of both drones' flights, using the "street" base layer
* a table of each drone's mean altitude, mean groundspeed and battery remaining at the
end, next to each radio's total dropped packets
Mark RadioTwo's fan failure event on every time series plot.
Touchstone files#
One radio’s component data, on a Smith chart and in log magnitude.
make a workbook for the RadioOne asset that shows its attached Touchstone files
* the antenna's S11 on a Smith chart
* the Tx filter's S21, the Rx filter's S21 and the amplifier's S21 in log magnitude (dB)
on separate plots, stacked, with frequency in GHz
* the Tx filter's and Rx filter's S11 in log magnitude on one plot
* the coupler's S31 (coupled) and S41 (isolated) in log magnitude on one plot
Mark the Tx band (81–86 GHz) and the Rx band (91–96 GHz) on the log magnitude plots.
The workbook it builds in Nominal. Select the image to open it at full size: