# Run and interpret a complex small-signal AC analysis

Use one .AC analysis, explicit nonzero AC source attributes and .PRINT AC selectors. Read magnitude and phasor angle against frequency, while retaining typed real/imaginary data for numerical work.

## Compatibility

2.9.0 release target; frozen Windows candidate CLI/native evidence

Published guidance with release-applicability limits. Confirm package applicability before following this guide.

[Download Run and interpret a complex small-signal AC analysis (ZIP)](/_functions/kbExample?name=ac-rc-response.zip)

Includes: ac_rc.cir, ac_rc_corner.cir, README.txt.

## Choose the AC signal and frequency grid

Use a matching licensed JoSIM®-Pro 2.9 release and a stationary circuit. AC linearizes about its selected stationary bias; it does not simulate a running junction or prove that the bias is stable or unique.

An independent source needs a resolved nonzero AC magnitude. DC sets bias, AC sets the separate peak phasor, and an optional source angle is in degrees. With multiple drives there is no automatic input normalization; request a supported ratio when you need gain or impedance.

## Save the complete example as ac_rc.cir

```text
* Linear RC low-pass; peak phasors with a 30-degree source angle
V1 IN 0 DC 2m AC 1 30
R1 IN OUT 50
C1 OUT 0 0.2p
.OPTION SEED=321
.AC DEC 10 1G 100G
.PRINT AC V(OUT) V(OUT)/V(IN)
.END

```

## Configure and run it in the GUI

1. Open the saved ac_rc.cir source. Run > Analysis workbench can inspect the existing AC analysis, or create one in a new circuit. Select DEC, 10 points per decade, start 1G and stop 100G, with the required .PRINT AC outputs.
2. For this example preserve V1’s DC 2m bias and AC magnitude 1 with angle 30 degrees. Inspect any proposed source diff, acknowledge it, apply and save. The provided deck already contains the intended commands.
3. Choose a separate Primary native output such as ac.csv in Run settings, preview the complete saved plan and use the normal Run action.
4. Check the task verdict and inspect magnitude/angle panels against frequency. This example requests V(OUT) and the dimensionless ratio V(OUT)/V(IN).

```text
josim-pro-cli -o ac.csv ac_rc.cir
```

![Current native RC AC response: output magnitude and angle, plus gain magnitude and angle, plotted on a logarithmic frequency axis in gigahertz.](https://static.wixstatic.com/media/31de30_6fdc5f417e734c7792d7f44cd5aeaf67~mv2.png)

The actual 1–100 GHz response: output phase includes the source’s 30-degree angle, while the gain ratio removes it. Engineering display scaling changes labels, not the raw complex data.

## Check the RC response and corner

For R = 50 Ω and C = 0.2 pF, H(f) = V(OUT)/V(IN) = 1 / (1 + j 2πfRC). The corner is about 15.915494309 GHz. At that frequency H = 0.5 − 0.5j, magnitude ≈ 0.707107, gain ≈ -3.010300 dB relative to 1 and angle -45 degrees.

The source angle is +30 degrees, so V(OUT)’s phasor angle at the corner is -15 degrees. That is different from the transfer ratio’s -45 degrees. P(node) in .PRINT AC means physical phase excursion in radians; it is not the plotted arg(...) phasor angle in degrees.

The checked DEC grid contains 21 frequencies from 1e9 to 1e11 Hz. Every complex output/gain sample matches the independent ideal RC equation within the recorded example-specific bound. Native GUI and CLI typed numerical columns match exactly in this run; this is not a general accuracy or cross-platform claim.

The native picture displays frequency in GHz and voltage in mV. Its dimensionless gain axis also uses a 10^-3 scale: a displayed value near 998 represents about 0.998, not a gain of 998. Read the axis scale; typed CSV keeps Hz, V and dimensionless raw values.

## Save the exact-corner variant as ac_rc_corner.cir

```text
* Linear RC low-pass; peak phasors with a 30-degree source angle
V1 IN 0 DC 2m AC 1 30
R1 IN OUT 50
C1 OUT 0 0.2p
.OPTION SEED=321
.AC LIN 1 15915494309.189531 15915494309.189531
.PRINT AC V(OUT) V(OUT)/V(IN)
.END

```

## Run the corner check

A one-point LIN grid requires equal positive bounds. For broader scans choose LIN count start stop, DEC points_per_decade start stop, or OCT points_per_octave start stop. M means milli; use MEG or X for mega. Counts are integer tokens and the emitted grid is limited to 65,536 increasing positive frequencies.

```text
josim-pro-cli -o corner.csv ac_rc_corner.cir
```

## Read typed complex CSV or CSV.gz

Native AC CSV begins with a # josim-ac-csv/1 JSON metadata line, then frequency (Hz) and paired real/imaginary columns. Do not parse it as an ordinary real time-waveform file or treat a magnitude projection as the underlying complex response.

The phasor convention is peak_exp_positive_j: x(t) = x0 + Re{x̂ exp(j2πft)}. The metadata retains the actual stimuli, fixed seed, bias and model validity information. The .csv.gz variant decompresses to the same typed content.

```text
import csv, json
with open("ac.csv", encoding="utf-8-sig", newline="") as f:
    first = f.readline()
    prefix = "# josim-ac-csv/1 "
    assert first.startswith(prefix), "Expected a typed JoSIM AC result"
    metadata = json.loads(first[len(prefix):])
    rows = list(csv.DictReader(f))
row = rows[0]
f_hz = float(row["frequency (Hz)"])
gain = complex(float(row["Re(V(OUT)/V(IN)) (1)"]),
               float(row["Im(V(OUT)/V(IN)) (1)"]))
print(metadata["phasor_convention"], f_hz, gain)
```

## Reopen or export the result

1. Use File > Open on the committed typed ac.csv or ac.csv.gz. Reopening the freshly generated file restored the complex result and logarithmic magnitude/angle view in the checked native candidate.
2. Treat the imported tab as inspection data. Reopening is not a new solve and does not establish complete source provenance or replay safety.
3. For native calculation output keep the typed CSV written by the run. For plot export, the maintained GUI contract requires CSV data with All traces for original AC Re/Im series; TSV and partial AC data scopes are unsupported. That Plot export studio Save/retry route was not exercised by this example.
4. Use Run > AC display views for a display-only magnitude/phase, real/imaginary or dB/phase projection. dB requires an explicit reference such as 1 for gain or 1 V for peak voltage. Display-only views are separate from the authored complex selectors.

## Recover from a rejected request

ac.grid.range: require 0 < fstart <= fstop, with an increasing supported grid. ac.source.no_drive: provide a nonzero independent AC magnitude. ac.output.expression with a zero ratio denominator: choose a physically meaningful nonzero denominator rather than substituting zero gain.

The checked zero-frequency, zero-drive and zero-denominator requests rejected the whole staged result and preserved an existing file. Correcting the source and running to a fresh destination restored the typed reference response.

Remove streaming, mixed analyses, .STEP, transient measurements and unsupported RAW/STDOUT targets. Ordinary real-trace FFT, trigger and time-calculus operations do not apply to AC projections. A zero response has an undefined phasor angle; gaps are not zero-degree samples.

Keep requests within each model’s supported bias, temperature and frequency range. This RC recipe does not qualify stationary junction, TJM, wideband-line or measured-device models; consult their maintained validity rules before interpreting those results.

## Sources and verification details

Recorded inputs/builds only. Complete walkthrough and final-package acceptance remain separate.

- VAL-018: JoSIM-Pro 2.9 frozen Windows source-candidate CLI, built 3 November 2026. Twenty-six checks of complete OP/DC and ideal RC AC inputs, scalar/source/frequency axes, gzip, independent equations, rejected requests, preservation and recovery The example-specific numerical bounds do not establish physical-device calibration, stability, uniqueness or universal solver accuracy. Other devices, platforms and the final distributed package remain unverified.
- VAL-019: JoSIM-Pro 2.9 frozen Windows native candidate with matching freshly built runtime. Normal licensed production Run actions for OP/DC/AC, OP failure with preserved prior report and recovery, current scalar/retained source-axis/typed complex results and reopening the newly written AC CSV Sixteen independent checks cover these native actions. Paths were supplied to production OpenFile/SetRunOptions boundaries. Physical pickers, workbench Apply/Undo, cancellation, plot-export recovery, restart and final-package acceptance remain pending. A retained failure receipt is not numerical success; imported data is inspection, not a new solve or replay-safety proof.

- josim-ac-current-complex-view: JoSIM-Pro 2.9 frozen Windows candidate, licensed native result, 3 November 2026. The recorded candidate result illustrates this example. It does not establish physical accuracy, all GUI branches or final distributed-package applicability.

- josim-pro:docs/manual_source/sections/syntax.tex: Small-signal AC frequency sweeps
- josim-pro:docs/manual_source/sections/gui_simulation_results.tex: Configure an analysis; AC magnitude and angle views; Native imports and case review
- validation:josim-static-ac-windows-20261103: VAL-018/019; exact CLI/native actions, output/input integrity and independent numerical checks
- owner:technical-review-20261102: 2.9 public target; final distributed-package applicability still required

- The maintained syntax and GUI references still match their reviewed hashes. Complete handwritten inputs are downloadable with their exact checked bytes.
- VAL-018 records 26 CLI checks; VAL-019 records 16 independent native checks. Workbench editing, physical pickers, cancellation, restart, complete article and final-package acceptance remain pending.

## Related guides

- [Run a static operating point or DC source sweep](/knowledge-base/josim-dc-op)
- [Export waveform figures or numerical CSV/TSV data](/knowledge-base/josim-export-results)
- [Check temperature, noise bandwidth and sample time in JoSIM®-Pro](/knowledge-base/josim-noise-settings)
- [Prepare a useful support report without exposing a licence or private design](/knowledge-base/support-effective-report)
- [Hand off an already fitted line model from external network data](/knowledge-base/sparameter-model-handoff)
- [Use dependent sources and verify their control direction](/knowledge-base/josim-controlled-sources)
