next up previous contents
Next: A.10 Setup for the Up: A. Input-Deck Interface to Previous: A.8 Setup of the


A.9 Inquiring Complex-Valued Node Voltages and Terminal Quantities

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.


next up previous contents
Next: A.10 Setup for the Up: A. Input-Deck Interface to Previous: A.8 Setup of the

S. Wagner: Small-Signal Device and Circuit Simulation