Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
68
Добавлен:
06.06.2017
Размер:
3.31 Mб
Скачать

Example

.MODEL S1 VSWITCH (RON=1 ROFF=1K VON=1 VOFF=1.5)

Model parameters

 

 

Name

Parameter

Units

Default

RON

On resistance

Ohms

1

ROFF

Off resistance

Ohms

1E6

VON

Control voltage for On state

V

1

VOFF

Control voltage for Off state

V

0

Model Equations

 

 

VC =

Voltage across the control nodes

 

 

LM =

Log-mean of resistor values = ln((RONROFF)1/2)

LR =

Log-ratio of resistor values = ln(RON/ROFF)

 

VM=

Mean of control voltages = (VON+VOFF)/2

 

VD =

Difference of control voltages = VON-VOFF

 

k

=

Boltzmann's constant

 

 

T

=

Analysis temperature

 

 

RS =

Switch output resistance

 

 

If VON > VOFF If VC >= VON

RS = RON If VC <= VOFF RS = ROFF

If VOFF < VC < VON

RS = exp(LM + 3LR(VC-VM)/(2VD) - 2LR(VC-VM)3/VD3)

If VON < VOFF If VC <= VON

RS = RON If VC >= VOFF RS = ROFF

If VOFF > VC > VON

RS = exp(LM - 3LR(VC-VM)/(2VD) + 2LR(VC-VM)3/VD3)

Noise effects

Noise is modeled as a resistor equal to the resistance found during the DC operating point. The thermal noise current is calculated as follows:

I= sqrt(4kT/RS)

467

Sample and hold source

SPICE format

There is no equivalent Sample and Hold device in SPICE or PSpice.

Schematic format

PART attribute <name>

Examples

S1

S10

SA

INPUT EXPR attribute <input expression>

Examples

V(1,2)

V(10,20)*I(R1)

V(INPUT)

SAMPLE EXPR attribute <sample expression>

Examples

V(1,2)>1.2

V(5)>1.1 AND V(4) >1.2

I(RL)>1e-3

PERIOD attribute <sampling_period>

Examples 100ns tmax/100 1U

This device is an ideal sample and hold. It samples <input expression> when <sampling_period> is true or every sample period seconds. The behavioral modes are distinguished as follows:

468 Chapter 22: Analog Devices

If <sample expression> is specified:

<input expression> is sampled whenever <sample expression> is >= 1.0. <sample expression> is normally a Boolean expression. The output voltage of the source is set to the sampled value and remains constant until the next sample.

If <sample expression> is unspecified and <sampling_period> is specified:

The source samples and stores the numeric value of <input expression> once every <sampling period> seconds, starting at <tmin>. The output voltage of the source is set to the sampled value and remains constant until the next sample.

Neither <sample expression> nor <sampling_period> is specified: This will generate an error message. Either <sample expression> or <sampling_period> must be specified.

Both <sample expression> and <sampling_period> are specified: <input expression> is sampled whenever <sample expression> is >= 1.0. This is the same as the first case. The <sampling_period> is ignored.

Note that while <input expression> is usually a node voltage, the expression can involve circuit variables, as in the second example. <sampling_period> may include a non-time varying expression, as in the second example, where the <tmax> of the analysis run is used to calculate the sampling period.

See the sample file SH2.CIR for an example of how to use the sample and hold component.

469

Sine source

Schematic format

PART attribute <name>

Examples

S1

MODEL attribute <model name>

Example

Line60

The Sine source is similar to the SPICE SIN independent voltage source. Unlike the SPICE source, it uses a model statement.

Model statement form

.MODEL <model name> SIN ([model parameters])

Example

.MODEL V1 SIN (F=1Meg A=0.6 DC=1.5)

Model parameters

 

 

Name

Parameter

Units

Default

F

Frequency

Hz

1E6

A

Amplitude

V

1.0

DC

DC level

V

0.0

PH

Phase shift

Radians

0.0

RS

Source resistance

0.001

RP

Repetition period of exponential S

0.00

TAU

Exponential time constant

S

0.00

Model Equations

If TAU = 0 then

V = Asin (2π FTIME + PH) + DC

Else

V = Ae(-T/TAU)sin (2π FTIME + PH) + DC

where T = TIME mod RP.

470 Chapter 22: Analog Devices

Figure 22-20 Sample waveform for model parameters F=2Meg A=1 DC=1 RP=2U TAU=.4U

471

Subcircuit call

SPICE format

X<name> [node]* <subcircuit name>

+[PARAMS: <<parameter name>=<parameter value>>*]

+[TEXT: <<text name>=<text value>>*]

Examples

X1 10 20 AMP

XDIFF 100 200 DIFF PARAMS: GAIN=10

Schematic format

PART attribute <name>

Example

X1

NAME attribute <subcircuit name>

Example

FILTER

FILE attribute [<file name>]

Example

MYFILE.MOD

PARAMS: attribute

[<<parameter name>=<parameter value>>*]

Example

CENTER=10KHZ BW=1KHZ

TEXT: attribute

[<<text name>=<text value>>*]

Example

JEDEC="FILENAME"

472 Chapter 22: Analog Devices

[node]* are the numbers or names of the nodes specified in the .SUBCKT statement. The number of nodes in the subcircuit call must be the same as the number of nodes in the .SUBCKT statement. When the subcircuit is called, the nodes in the call are substituted for the nodes in the body of the subcircuit in the same order as they are listed in the .SUBCKT statement.

Any nodes defined in the .SUBCKT statement with the OPTIONAL: keyword may optionally follow the [node]* values. A subset of the optional nodes may be listed, and will be assigned to the internal subckt nodes in the order specified by the OPTIONAL statement. If you skip nodes, they must be skipped from the end of the list. OPTIONAL nodes are available only in a SPICE text circuit subcircuit call. Schematic subcircuits expect the exact number of pins defined for the subcircuit in the Component library. That is why there is no OPTIONAL attribute in the schematic format. This feature is used in the SPICE text file Digital Library to allow specifying optional power supply nodes.

The SPICE <subcircuit name> or schematic NAME attribute defines the subcircuit name. It must be the same as the name in the defining .SUBCKT statement.

The schematic FILE attribute defines the name of the file in which the .SUBCKT statement can be found. MC7 looks for the .SUBCKT statement in the following places in the order indicated.

If the circuit is a schematic:

In the Text area.

In the file named in the FILE attribute.

In one or more files named in a '.LIB' statement.

In one or more files named in the default '.LIB NOM.LIB' statement.

If the circuit is a SPICE text file:

In the circuit description text.

In one or more files named in a '.LIB' statement.

In one or more files named in the default '.LIB NOM.LIB' statement.

Subcircuits are used extensively in the Analog Library and Digital Library sections of the Component library. They are accessed via the default .LIB statement.

The SPICE keyword or schematic PARAMS: attribute lets you pass multiple numeric parameters to the subcircuit. <parameter name> is its name and <parameter value> defines the value it will assume if the parameter is not included in the subcircuit call. For example:

473

.SUBCKT CLIP 1 2

+ PARAMS: LOW=0 HIGH=10

Any of these calls are legal:

X1

1020CLIP

;RESULTSINLOW=0,HIGH=10

X2

1020CLIPPARAMS:LOW=1HIGH=2 ;RESULTSINLOW=1,HIGH=2

X31020CLIPPARAMS:HIGH=4

;RESULTSINLOW=0,HIGH=4

The SPICE keyword or schematic TEXT: attribute lets you pass text parameters to the subcircuit. <text name> is the name of the text parameter and <text value> defines the value it will assume if the parameter is not included in the subcircuit call. For example:

.SUBCKTSTIMULUS1234 +TEXT:FILE="T1.STM"

Either of these calls are legal:

X110203040STIMULUS

;RESULTSINFILE="T1.STM"

X210203040STIMULUSTEXT:FILE="P.STM"

;RESULTSINFILE="P.STM"

Using the subckt component in an MC7 schematic circuit file is easy. First, you must enter the subcircuit into the Component library using the Component editor. This requires entering:

Subckt Name: Use any unique name. To avoid confusion, it should be the same as the name used in the SUBCKT control statement, although this is not strictly necessary.

Shape Name: Use any suitable shape.

Definition: Use SUBCKT.

Once these items have been entered, the pin assignments must be defined. These define where the node numbers called out in the SUBCKT control statement go on the shape. Pins are assigned by clicking in the Shape drawing area and naming the pin with the subckt node number. The pin is then dragged to the desired position on the shape.

The subckt is then placed in the schematic in the usual way.

To see how subckts are called, see the sample circuit files SUBCKT1 and PLA2.

474 Chapter 22: Analog Devices

Switch

Schematic format

PART attribute <name>

Examples

S1

VALUE attribute

<[V | T | I]>,<n1,n2> [,<ron>[,<roff>]]

Examples

V,1,2

I,2ma,3ma

T,1ms,2ms,50,5Meg

This is the oldest of three types of switches. The newer S and W switches exhibit a slower, but smoother transition between the off and on states.

There are three types of dependent switches; current-controlled, voltage-con- trolled, and time-controlled.

The switch is a four-terminal device. A current sensing inductor must be connected across the two input nodes when the current-controlled switch option is used. Voltage-controlled switches are controlled by the voltage across the two input nodes. Time dependent switches use the transient analysis time variable to control the opening and closing of the switch.

The two controlling nodes for a time-controlled switch are not used and may be shorted to ground or to the two output nodes to reduce the node count by two.

In transient analysis, care must be taken in choosing the time step of the simulation. If the time step is too large, the switch might never turn on. There must be at least one time point within the specified window for the switch to close or open.

The switch parameter syntax provides for a normally-on or a normally-off switch. A normally-on switch is one that is on outside the specified window and off inside the window. A normally-off switch is one that is off outside the window and on inside the window.

475

The optional <ron> impedance defaults to 1E-3 ohm. The optional <roff> defaults to 1E9 ohms. When specifying <roff>, be careful that off switch resistances are not so low that they load your circuit, nor so high that they generate excessive voltage by blocking the current from an inductor or a current source.

Rules of operation

If n1 < n2 then

Switch is closed (ON) when n1 ≤ X ≤ n2

Switch is open (OFF) when X < n1 or X > n2

If n1 > n2 then

Switch is open (OFF) when n1 ≥ X ≥ n2

Switch is closed (ON) when X > n1 or X < n2

If the first character in the switch parameter is V: The switch is a voltage-controlled switch.

X = voltage across the input nodes. n1 and n2 are voltage values.

If the first character in the switch parameter is I: The switch is a current-controlled switch.

X = current through the inductor placed across the input nodes. n1 and n2 are current values.

If the first character in the switch parameter is T: The switch is a time-controlled switch.

X = TIME.

n1 and n2 are values of the TIME variable.

If the switch is closed, the switch has a resistance of <ron>. If the switch is open, the switch has a resistance of <roff>.

476 Chapter 22: Analog Devices

Соседние файлы в папке Micro-Cap v7.1.6
  • #
    06.06.20171.32 Кб60model.CNT
  • #
    06.06.201776.72 Кб62MODEL.HLP
  • #
    06.06.20173.72 Кб60NETHASP.INI
  • #
    06.06.2017450 б59os.dat
  • #
    06.06.2017545 б63READ.ME
  • #
    06.06.20173.31 Mб68RM.PDF
  • #
    06.06.2017226.69 Кб61setup.bmp
  • #
    06.06.201795 б59SETUP.INI
  • #
  • #
    06.06.201749 б60setup.lid
  • #
    06.06.20172.04 Mб60Standard.cmp