next up previous contents
Next: B.4 Stepping Control Up: B. The Stepping Module Previous: B.2 The Special-Purpose Stepping


B.3 Conditional Stepping

Function stepCond provides a conditional stepping based on a simple zero point approximation within two boundaries given by the first two parameters:

// Threshold Voltage Extraction
A = stepCond(0.7V, 0.8V,                         // boundaries
             output("Device", "I", "A") - 1e-7A, // comparison value
             1e-4,                               // error value
             pri = 2, maxCount = 20);            // optional

The stepping is coupled to an internal control mechanism which determines the new stepping value depending on the evaluation of the condition. This implementation of this mechanism is based on the False Position or Regula Falsi method (see Section 3.3.3)).

The condition is the combination of the third and fourth argument. Here, the comparison value in the third argument is coupled to an output current and has to be smaller than the error value of 1e-4. If the condition cannot be fulfilled within maxCount steps (iterations), the approximation is terminated. If maxCount is not given, a default value of 1000 is used.

Sometimes it is more applicable to determine the threshold voltage by logarithmic stepping. For this purpose, the stepping function can be defined as follows:

// Threshold Voltage Extraction
A = stepCond(0.7V, 0.8V,                                 // boundaries
             log(value(~Curve.Response.Id)) - log(1e-7), // comparison value
             1e-4,                                       // error value
             pri = 2, maxCount = 20);                    // optional

Conditional stepping is particularly useful to determine the cut-off frequency $ f_\textrm {T}$. The small-signal simulation mode (see Appendix A.1) requires the setup of the variable frequency. This variable can be subject of a conditional stepping:

// Cut-off Frequency Extraction
frequency = stepCond(10 GHz, 100 GHz, ~Curve.Response.beta - 1.0, 1e-05);

As shown in the following example, the Curve.Response section contains the calculation of beta, which equals 1.0 at the cut-off frequency. For that reason, the condition beta - 1.0 should be fulfilled within an error of 1e-5.

Curve
{
   +Response
   {
      ic   = abs(output("Device", "I", "CollectorContact", ac=yes)); 
      ib   = abs(output("Device", "I", "BaseContact",      ac=yes)); 
      beta = ic / if (ib == 0.0 A, 1e-20 A, ib);
   }  
}

Conditional stepping obviously fails if the zero point cannot be found within the boundaries given as the first two arguments. By setting up a proper stepping control (see Appendix B.4), the boundaries can be automatically varied during stepping. The boundary adaptation allows to resolve the trade-off between usability and narrow boundaries. Narrow boundaries speed up the iterative stepping process significantly (see Section 3.3.3).


next up previous contents
Next: B.4 Stepping Control Up: B. The Stepping Module Previous: B.2 The Special-Purpose Stepping

S. Wagner: Small-Signal Device and Circuit Simulation