S-parameters and Smith chart
The S-Parameters tab plots the network response of a finished run: magnitude in dB against frequency, the same data on a Smith chart, and the port input impedance against frequency. It also carries the markers, reference overlays, imports, and exports for that data.
After a run, each active port contributes a column of traces. The tab shows the reflection Sii for every active port, and both Sij and Sji for every active pair. The reflection trace of the port that was driven this run is the one that carries impedance, so it also appears on the Smith chart.
Trace labels follow the port identities recorded by the run, including sparse result sets. A result for port 2 stays S22 even when no port 1 result is present. It uses port 2's recorded reference impedance rather than its position in the result file. Labels through port 9 use compact forms such as S21. If either port number has two digits, a comma keeps the identities unambiguous, as in S10,1, S1,10, and S10,10.
Traces and parameter chips
The toolbar carries a chip for S11 and S21 and a More Parameters popover. A chip toggles that trace on the plot and colors itself to match it. More Parameters lists every remaining Sij for the port count, plus S12 and S22 even for a one-port run, and holds one checkbox per imported overlay. Each trace keeps a fixed color so a port reads as the same hue across the plot, the chart, and the editor canvas.
The active ports determine which traces are initially visible. Changing the active ports resets the trace selection. Chips remain enabled when data is missing. A selected trace with no data means the run did not produce that result.
Once you edit the project after a run, a badge in the corner says so ("Geometry changed since this run", "Config changed since this run", or both). A run that stopped before its ring-down target also gets a badge that says how it stopped. A stale badge means re-run before trusting the numbers.
The panels
Panels is a dropdown of checkable entries, one per panel: Magnitude (dB), Smith chart, and Impedance. Any subset can be checked, and the visible panels sit side by side in that fixed order, divided by draggable splitters. At least one panel is always visible: unchecking the last one is refused. A new project starts with the magnitude plot and the Smith chart. The selection and the splitter widths are stored in the project.
When a run recorded matching-network loss, the Panels list adds Matching-network loss. It plots each network part's dissipated power and the total, as a percent of total incident power at the driven terminals, against frequency. Passive-port networks use the same driven baseline. With more than one matched port, each curve is named by its port.
The dB plot has frequency in GHz on the x-axis and magnitude in dB on the y-axis. Drag to pan, scroll to zoom both axes, Ctrl+scroll to zoom frequency only, Shift+scroll to zoom magnitude only.
The Smith chart is normalized to 50 Ω. Constant-resistance circles and constant-reactance arcs are labeled in ohms, the center is the matched load, the left real-axis endpoint is a short and the right is an open, and inductive (+jX) reactance is the upper half. It stays square and aspect-locked, so it never stretches. Only reflection traces carry the complex impedance the chart needs, so a magnitude-only trace does not draw here. An exact short stays at the left endpoint and reads 0 ohm. An exact open stays at the right endpoint and reads infinite ohm rather than a clipped finite value.
The impedance panel plots the port input impedance Zin = Z0 (1 + S) / (1 - S) of every visible reflection trace, using that port's reference impedance recorded with the run for Z0. Editing the live port after a run does not change the plotted impedance. Recorded reference-impedance metadata must contain finite positive values through the highest recorded backend port. A partial record is refused rather than padded with 50 ohms. Each trace contributes a solid Re Z curve and a dash-dot Im Z curve in the trace color, against frequency, with the axis in ohms. Reference and imported overlays draw here the same way they do on the magnitude plot, dashed. Transmission and magnitude-only traces carry no input impedance and do not appear. The hover readout shows the same R + jX value the magnitude plot's marker readout shows at that frequency. At S = +1 the readout is infinite ohm, and at S = -1 it is 0 ohm.
Ports with matching networks
A port that carries a matching network is plotted at the system plane: its reflection is referenced at the ideal source behind the network, against the port's reference impedance. That is what an instrument connected through the same network would read, and every export (CSV, Touchstone, sweep output) uses the same plane. The run keeps recording the port's other recorded plane too, so the input impedance is available at both planes from one run: the port terminal when there is no measurement shift, the de-embedded plane when there is. The per-port network-loss CSV carries both, under headers that name which plane each one is.
A measurement shift on a port that carries a matching network is the one case where the reference plane is a choice. The shift moves the spot where the run records voltage and current, and the network sits between the ideal source and the port footprint, so the shifted spot is past the network as well as past the feed, and the two planes give genuinely different answers. The editor's Reported plane control, network_plane in a spec file, decides which one is reported. system, the default, keeps the plotted and exported response at the system plane through the network, and the de-embedded input impedance is recorded beside it in the per-port loss CSV. deembed reports the de-embedded plane instead, where the network is absent from the reflection by construction, and the system-plane impedance is recorded beside it. Either way the dissipated-power columns are referred to total incident power at all driven terminals and do not change with the choice, the Smith chart's other-plane overlay is labeled with the plane it draws, and the exported Touchstone names its reference plane in a comment line.
The loss CSV reports each circuit part's dissipated power as a share of total incident power at all driven terminals, including for a passive network. Accepted fraction = incident-normalized fraction * pinc_spectral_w_s2 / positive accepted spectrum, using port_power.csv at the same bin and completed window. pacc_input_spectral_w_s2 sums external input over all ports. port_N_pacc_input_spectral_w_s2 selects one port. Deposited and terminal accepted columns select those planes instead. zin_sys alone does not supply that denominator. The file opens with comment lines starting with # that name the reference locations its impedance columns describe, and a frequency where a quantity is undefined is written as an empty cell, never as a number. The run manifest names both planes per port: loss_reference_plane for the loss columns and reported_plane for the S-parameters.
Every inductor and capacitor in a matching network requires a positive Q and the frequency that Q is exact at. The loss resistance it realizes is computed once at that frequency and is constant over frequency, so nothing about the simulation band or the excitation changes a component value. A resistor takes no Q: it dissipates the resistance you entered. The continuous preview, the stepped simulation, and the loss report all use the same realized values.
When a run recorded matching-network results, a checkbox for the port's other recorded plane appears in the controls row, labeled Device plane or De-embedded plane for the plane the run actually recorded. It overlays each matched port's other recorded input impedance on the Smith chart, dimmer, beside its system-plane trace, so the transformation the network applies is visible as the movement between the two loci.
A matching network attaches across the whole port footprint. It distributes current over the driven edges and loads the conjugate voltage from those same edges. Bare and networked ports use this same terminal pair. The center-line voltage and Ampere-loop current remain separate field measurements. A wider footprint can support transverse fields, so scalar terminal work and deposited field work can differ.
The network transforms the load between its terminal and system planes. The plotted response is co-simulated: the port loads the network with whatever the structure presents. A cascade prediction agrees to the extent that the cascade models that load.
Range and Home
Range opens a popover to set the frequency and magnitude axis limits. Leave a bound on Auto to fit the data. The popover reflects the plot's true current extent: a manual bound shows its value, and an Auto bound shows the value it resolves to in the gray caption beneath. Home clears every bound back to Auto and refits every visible panel. Range applies to the dB plot only.
Markers
Marker (shortcut M) arms placement. Click the plot to drop a marker on the nearest trace point, and placement disarms after one marker. A marker reads out its frequency and magnitude, and the impedance where the trace carries it. On the Smith chart the readout is frequency, |Gamma|, angle of Gamma, and impedance.
Drag a marker to slide it along the trace, or to another trace. Esc cancels placement, Delete removes the selected marker, and Ctrl+Z undoes the last marker edit.
Right-click a marker for Rename, Hide, Delete, and, on the dB plot, Properties. The properties dialog:
- Sets the source trace and renames the marker.
- Follows a chosen dip. Pick the rank N and the ordering (deepest, shallowest, lowest frequency, highest frequency). A tracked marker re-snaps to that dip on every replot, including each Live-mode rerun, so a linked surface-current or radiation viewer stays on the resonance as it moves. If the dip is gone the marker shows (no match) and holds its last frequency.
- Draws a vertical line at the center frequency, shades the bandwidth band below a dB threshold (default -10 dB, reflection traces only), and shows a center-frequency and bandwidth readout on the plot.
Set as Reference
Set as Reference freezes the traces currently on screen as gray dashed overlays, so you can change the design and watch each trace shift against the frozen one. The baseline is stored in the project, and one is kept at a time: setting a new reference replaces the old one.
The reference is view-neutral. Reflection traces keep their complex impedance and phase, so the baseline shows on both the dB plot and the Smith chart, while transmission traces keep magnitude and show on the dB plot only. Setting a reference does not move the axes. In live mode the button moves into the More Parameters popover.
Importing reference traces
Import a measured or external sweep to overlay it on the run. Both live in the Import / Export dropdown, render as dashed traces in distinct colors, and are stored in the project so the source file can be deleted afterward. Importing requires a signed-in license.
- Touchstone (.s1p, .s2p, ...) reads
.s1pthrough.s8pand any.sNp, where N is the port count. Each S-parameter in the file becomes one overlay trace. - CSV opens a column-mapping dialog, because a plain CSV is not self-describing. Choose the frequency column and one of three data types: an S-parameter as dB magnitude plus phase in degrees, an S-parameter as real plus imaginary, or an impedance Z as real plus imaginary in ohms. The second value column is optional. The frequency unit is taken from an explicit choice, then from the column header, then guessed from the values, with the guess confirmed before import. The reference Z0 you set converts an imported impedance to S and is stored with the trace so the Smith chart renders it correctly.
Connecting devices
Connect device (.s1p, .s2p, ...) in the Import / Export dropdown combines the board's simulated S-parameters with Touchstone files for linear devices, such as an amplifier, a filter, or a load, attached at the board ports you choose. It is network math on S-parameters, exact for linear (small-signal) devices. The fields are not recomputed with the devices in place, so the Field Viewer and the radiation pattern still show the board alone.
Workflow
- Draw the whole board with a port at every pad where a device connects (the input and output pads of each amplifier footprint, for example) and one at each connector.
- Drive every port. One run drives one port and fills one column of the S-matrix, so open the sweep dialog and turn on Drive every port (full S-matrix). Its point in Run History holds the full matrix. A one-port board needs one ordinary run.
- Open Connect device, choose that point as the Board, and use Add file... for each device. For each device port choose a board port or Leave open. A board port takes one device port, so a port already taken is greyed out in every other choice.
- Read the summary, name the result, and click Apply. The result is added to Run history with its overlay on.
For example, a transmit chain drawn as one board: P1 at the mixer output, P2 and P3 at the first amplifier's input and output pads, P4 and P5 at the second amplifier's pads, and P6 at the antenna connector, with the interstage match and the output filter as copper between them. Attach amp1.s2p port 1 to P2 and port 2 to P3, and amp2.s2p port 1 to P4 and port 2 to P5. The result is a two-port from P1 to P6 with both amplifiers in the chain.
Port numbering
The result's ports follow one rule: the board's open ports first, in their own order, then each device's open ports, device by device in the order you added them. The summary names where each result port comes from and its reference impedance, for example "Port 2 = board P6 (50 ohm)" or "Port 3 = amp1 port 2 (50 ohm)". The record and any exported file keep the same list.
Frequencies
The board's frequency points are the result's frequency points. Device data is interpolated onto them, linearly in its real and imaginary parts, and only inside the device file's own frequency range. Nothing is extrapolated. When a device file covers less than the board's band, the result covers the band every file shares, and the summary says so with the numbers before you apply. A device with no frequency in common with the board is refused. When a device file's points are not the board's, the summary says how many of its points fall in the band.
Reference impedance
Each joined pair of ports uses one real reference impedance: the device port is renormalized to its board port's reference impedance before the join, and the board is never renormalized. A complex reference impedance is refused. A Touchstone file records one reference impedance, so when the result's ports differ (an open device port at 75 ohm beside board ports at 50 ohm, for example) the record and any exported file hold the result renormalized onto 50 ohm and say so.
Refusals
A setup that cannot be computed shows the reason in place of the summary, and Apply stays unavailable until it is fixed:
- A board whose matrix is missing a column. The refusal names the ports that were never driven.
- A device attached to no board port, or a setup that leaves no port open.
- A file value that is not a number, named by file and line, a frequency that does not increase, or a Touchstone 2.0 keyword that changes how the data is read.
- A join with no solution at some frequency, where the joined ports form a loop whose reflections cancel exactly (an oscillation condition). The refusal names the frequency.
Active devices, with gain above 0 dB, are connected as they are. Stability is not analyzed. A 2-port file's noise parameters are not used, and the summary says the file carries them.
A Touchstone file RayRF wrote says in its comments when a value was filled by an assumption, such as S12 taken from S21 by reciprocity. Connecting such a file carries the same statement into the result's record and into any file exported from it. A file whose comments say some values were written as 0 is refused.
The result
A connected result is its own kind of Run History record, so it is never mistaken for a simulated run. It records the board's identity, each device file's name, size and SHA-256, the port map, the band it kept, and the interpolation rule. Overlay, rename, restyle, and delete it like any other record. When connected results exist, Export Touchstone writes the one you choose, and asks only when there is more than one to choose from. The chosen record's provenance goes in the file's comments.
The same connection runs headless, with the same summary and the same refusals:
rayrf connect --project chain.rfsim --record r0007 --device-file amp1.s2p --map 1=2,2=3 --device-file amp2.s2p --map 1=4,2=5 --out chain.s2p--board FILE.sNp takes a Touchstone file as the board instead of a project. Each --map belongs to the --device in the same position, a port it leaves out stays open, and 2=open says so explicitly. Without --out the command prints the summary and writes nothing. --record-history also adds the result to the project's Run History, and --json prints a rayrf-connect/v1 envelope.
Exporting
Every export is in the Import / Export dropdown. Exact file layouts are on File formats and outputs.
- CSV writes one row per frequency, with each trace interpolated onto the first parameter's frequency grid and points outside a trace's own band left blank. When both plots are visible and reflection data is present, a dialog offers the dB magnitude, the reflection coefficient, or both.
- Touchstone writes all S-parameters as one network file, labeled by port count (
.s2pfor two ports). Filled values are disclosed in the export dialog and in file comments. The fill rules are on File formats and outputs. Touchstone export is a Pro feature and shows a lock badge otherwise. It is also inFilethenExportthenTouchstone S-parameters..., andrayrf project export-touchstonewrites the same file. Results from a run with a different number of ports than the project has now are refused, so run the simulation again after adding or removing a port. - PNG saves the plot as an image. PNG export covers the dB plot and the Smith chart. When both are visible a dialog offers the dB plot alone, both as two files, or both stitched into one wide image. Marker and curve legends are drawn into the saved image.