Absolute Value of Voltage (Single-Ended Input)

www.kxcad.net Home > Electronic Index > Altium(Protel) Index


Your Ad Here

Model Kind

General

Model Sub-Kind

Spice Subcircuit

SPICE Prefix

X

Model Name

ABSV

SPICE Netlist Template Format

@DESIGNATOR %1 %2 @MODEL

Parameters (definable at component level)

None

Notes

The content of the sub-circuit file (ABSV.ckt) associated with this model is shown below. The formula/equation used to provide this function is declared as part of the netlist-specific entry, under the .SUBCKT line of the file.

*Absolute value of Voltage

.SUBCKT ABSV 1 2

BX 2 0 V=ABS(V(1))

.ENDS ABSV

Examples

Consider the circuit in the image above. With respect to the ABSV component, the entries in the SPICE netlist will be:

*Schematic Netlist:

XM1 IN OUT ABSV

.

.

*Models and Subcircuit:

.SUBCKT ABSV 1 2

BX 2 0 V=ABS(V(1))

.ENDS ABSV

The effect of the function can be seen in the resultant waveforms obtained by running a transient analysis of the circuit:

Links

Absolute Value of Current

Absolute Value of Voltage (Differential Input)

Math Functions

The Netlist Template - Explained

Sub-circuit based models

Simulation Models