next up previous contents
Next: .OPW Record Up: Circuit Optimization Control Records Previous: .OPF Record   Contents

.OPR Record

This record is used with the .OPF and .OPM records above. The .OPR record specifies the circuit output to be optimized, the weight given to errors at the specified output, and the desired circuit responses at the specified output at the frequencies specified in the .OPF record. The response unit is that specified for the current analysis.

The desired circuit responses are values that the optimizer attempts to realize. The desired circuit response value can be specified as a target (in which case any response above or below the desired value is considered an error), a floor (in which case any response greater than that specified is not considered an error) or a ceiling (in which case any response less than that specified is not considered an error). Unless otherwise indicated the desired circuit response values are considered to be targets.

There can be multiple .OPR records specifying multiple outputs to be optimized. Each .OPR record is associated with a single output.

As mentioned, each named output can be specified as a target, a floor, or a ceiling. To specify an acceptable range (ie, both a floor and a ceiling) for an output define two output variables for the same signal in the circuit, then specify a floor for one and a ceiling for the second. See the example below.

Example:

; establish desired responses at four frequencies,

; 1.0, 10.0, 100.0, and 1000.0 ...

.OPF 1.0 10.0 100.0 1000.0

; the four desired responses (default to targets) at eout

; (which must be a specified output), with a relative

; weight of 2.5, are 0.0, 3.16, ...

.OPR eout 2.5 = 0.0 3.16 10.0 31.6

; and the four desired responses (a mix of targets,

; floors, and ceilings) at i33

; (which must be a specified output),

; with a relative weight of 0.5, are:

;    10.0, <3.16, >1.0, and 2.0

.OPR i33 0.5 = 10. < 3.16 > 1.0 2.0

Note that, since CCICAP processes floats independently of strings and integers,

.OPR i33 0.5 10. 3.16 1.0 2.0 = < >

results in exactly the same definition of the desired responses. If the value of the first desired response is a target a corresponding '=' sign must be used as a placeholder in order to define subsequent values as ceilings or floors.

; set a range for a signal

; assumes that eo1 and eo2 are defined outputs

; that measure the same signal in the circuit:

; .ckt

; ...

; vm eo1 3 6

; vm eo2 3 6

; ...

; .end

.opf 1.0MHz

.opr eo1 1.0 < 5.0

.opr eo2 1.0 > -4.0


next up previous contents
Next: .OPW Record Up: Circuit Optimization Control Records Previous: .OPF Record   Contents
Bob Smither 2008-11-19