This branch is based on the master branch as of Juli 19th, 2026 Selected patches from https://github.com/javaNoviceProgrammer/Ngspice_OpenVAF_Enhancements/tree/main have been added, some have been slightly modified, compatibility with VS 2022 is achieved. PSS, HB, and reading, converting and using S parameters have been tested on a few examples. Documentaion and further testing are due, as well as finally adding suitable commit messages. The following commands have been taken from the docs at https://github.com/javaNoviceProgrammer/Ngspice_OpenVAF_Enhancements/blob/main/docs/Ngspice-OpenVAF-Handbook.pdf Commands available in https://sourceforge.net/p/ngspice/ngspice/ci/hv_rf_preliminary/tree/: Writing two-port or multi(N)-port S parameters spar_write() (2-port) or spar_write_np() (N-port) Periodic steady state (PSS) pss Periodic AC (PAC) pac PNOISE pnoise Periodic transfer function (PXF) pxf [max sideband] Cyclostationary noise pnoise cyclo Periodic S parameters psp [max sideband] Quasi-periodic two-tone steady state (QPSS) qpss [periods] [max order] | e.g. V(out) Harmonic Balance (HB) hb [points] [maxiter] Two-tone HB (frequency domain QPSS) qpss hb Two-tone small-signal QPAC (quasi periodic AC) qpss hb qpac Two-tone small-signal Qnoise (quasi periodic noise) qpss hb qnoise Cyclo stationary QPNOISE qnoise cyclo Oscillator phase noise (autonomous HB plus phase noise) hbosc [fguess] [tstab] phasenoise [points] Two-tone small-signal quasi-periodic transfer function QPXF qpss hb qpxf QPAC, QPnoise, and QPXF may be swept over frequency instead of fixed f_in, e.g. replace 'qpxf ' by 'qpxf ' Read S parameters and convert to instance with ports p1 to pN, referenced to ref. Command in the .control section: pre_snp -native my_touchstone.s2p ; reads a Touchstone file, vector fits and issues a *.nport file Instance in the netlist N1 p1 p2 ... pN ref mymodel .model mymodel nport(file=my_touchstone.nport) RF two-port stability sp ... (generate the S parameters) stab load pull loadpull -load -out -drive -f [-supply ]