This section shows how several mixed-mode AC quantities are inquired.
Curve { file = if (~resonant, "res_out", "band_out"); Response { +mhz = ~Solve.frequency / 1 MHz; // will become dimensionless +outAc = V("out", ac = yes); +outAbs = abs(V("out", ac = yes)); +outArg = arg(V("out", ac = yes)); +outAbsdB = 20 * log10(value(outAbs)); +acVc = output("C", "acV"); +acIr = output("R", "acI"); } }
The V function has been extended to handle also complex-valued node voltages. In that case, the user has to set the optional parameter ac to yes. Several built-in functions of the input-deck are used for further calculations finally resulting in the logarithmic value. While the output function remained basically unchanged, it can be used to inquire complex-valued quantities from devices in a straightforward way.
The built-in input-deck functions abs, arg, realpart, imagpart, log10, value (to get the dimensionless value) etc. can be used to transform the actual simulator output to common output formats, such as dB.