next up previous contents
Next: Circuit Element records Up: CKT - END Section Previous: .STD ON   Contents

.PARameter Records

The .PARameter record specifies a symbolic constant for later use. Parameters can be used in subsequent parameter calculations involving other parameters or element values. For example, consider specifying a quartz crystal in terms of its center frequency and Q value:

.CKT

...

* specify Q as 75,000

.par q 75.k

* specify crystal center frequency as 10 MHz

.par fo 10.e6

* calculate center frequency in RPS

.par wo { fo 2. X PI X }

* crystal motional resistance = 25 ohms

r r1 1 2 25.

* calculate value of motional inductance, L1 = R1 * Q / Wo

L L1 2 3 { r1 q X wo / }

* calculate value of motional capacitance, C1 = 1 / L1 / Wo**2

C C1 3 4 { 1. L1 / wo / wo / }

...

.END

In this example, the crystal center frequency or Q is easily changed and CCICAP will calculate the new values for L1 and C1.

Parameter records that involve a calculation define the calculation between '{' and '}'. Parameter calculations within the .CKT - .END section can refer to previously defined parameters and the values of previously defined circuit elements. The parameter records are parsed as they are read in from the input file.

There are several predefined parameters and allowed operations that are described under the .PAR Record description and the section on Reverse Polish Notation (RPN).

Note that the calculations on parameter records are performed using Reverse Polish Notation (RPN). See the section on RPN for an explanation of its use.


next up previous contents
Next: Circuit Element records Up: CKT - END Section Previous: .STD ON   Contents
Bob Smither 2008-11-19