SimElectronics® Reference PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 801

SimElectronics®

Reference

R2014a
How to Contact MathWorks

www.mathworks.com Web
comp.soft-sys.matlab Newsgroup
www.mathworks.com/contact_TS.html Technical Support

[email protected] Product enhancement suggestions


[email protected] Bug reports
[email protected] Documentation error reports
[email protected] Order status, license renewals, passcodes
[email protected] Sales, pricing, and general information

508-647-7000 (Phone)

508-647-7001 (Fax)

The MathWorks, Inc.


3 Apple Hill Drive
Natick, MA 01760-2098
For contact information about worldwide offices, see the MathWorks Web site.
SimElectronics® Reference
© COPYRIGHT 2008–2014 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used
or copied only under the terms of the license agreement. No part of this manual may be photocopied or
reproduced in any form without prior written consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation
by, for, or through the federal government of the United States. By accepting delivery of the Program
or Documentation, the government hereby agrees that this software or documentation qualifies as
commercial computer software or commercial computer software documentation as such terms are used
or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and
conditions of this Agreement and only those rights specified in this Agreement, shall pertain to and govern
the use, modification, reproduction, release, performance, display, and disclosure of the Program and
Documentation by the federal government (or other entity acquiring for or through the federal government)
and shall supersede any conflicting contractual terms or conditions. If this License fails to meet the
government’s needs or is inconsistent in any respect with federal procurement law, the government agrees
to return the Program and Documentation, unused, to The MathWorks, Inc.

Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand
names may be trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see
www.mathworks.com/patents for more information.
Revision History
April 2008 Online only New for Version 1.0 (Release 2008a+)
October 2008 Online only Revised for Version 1.1 (Release 2008b)
March 2009 Online only Revised for Version 1.2 (Release 2009a)
September 2009 Online only Revised for Version 1.3 (Release 2009b)
March 2010 Online only Revised for Version 1.4 (Release 2010a)
September 2010 Online only Revised for Version 1.5 (Release 2010b)
April 2011 Online only Revised for Version 1.6 (Release 2011a)
September 2011 Online only Revised for Version 2.0 (Release 2011b)
March 2012 Online only Revised for Version 2.1 (Release 2012a)
September 2012 Online only Revised for Version 2.2 (Release 2012b)
March 2013 Online only Revised for Version 2.3 (Release 2013a)
September 2013 Online only Revised for Version 2.4 (Release 2013b)
March 2014 Online only Revised for Version 2.5 (Release 2014a)
Contents

Blocks — Alphabetical List


1

v
vi Contents
1

Blocks — Alphabetical List


Accelerometer

Purpose Behavioral model of MEMS accelerometer

Library Sensors

Description The Accelerometer block implements a behavioral model of a


MicroElectroMechanical Systems (MEMS) accelerometer. For the
default output type Voltage level, the accelerometer provides an
output voltage that is proportional to the acceleration rate presented
at the mechanical translational physical port R. The output voltage
is limited according to the values that you provide for maximum and
minimum output voltage.
The block also has an alternative output type, PWM duty cycle. With
this choice, the output of the block is a PWM signal with a duty cycle
that is proportional to the measured acceleration. You can limit the
variation in duty cycle to a specified range.
Optionally, you can model sensor dynamics by setting the Dynamics
parameter to Model sensor bandwidth. Including dynamics adds a
first-order lag between the angular rate presented at port R and the
corresponding voltage applied to the electrical + and - ports.
If running your simulation with a fixed-step solver, or generating code
for hardware-in-the-loop testing, MathWorks recommends that you
set the Dynamics parameter to No dynamics Suitable for HIL,
because this avoids the need for a small simulation time step if the
sensor bandwidth is high.

1-2
Accelerometer

Dialog
Box and
Parameters

Output type
Select one of the following options to define the block output type:
• Voltage level — The amplitude of the output voltage is
proportional to the measured acceleration. This is the default
option.
• PWM duty cycle — The duty cycle (on time divided by the
pulse total time) is proportional to the measured acceleration.
Sensitivity
The change in output voltage level per unit change in acceleration
when the output is not being limited. This parameter is only
visible when you select Voltage level for the Output type
parameter. The default value is 1000 mV/gee.
Output voltage for zero acceleration
The output voltage from the sensor when the acceleration is zero.
This parameter is only visible when you select Voltage level for
the Output type parameter. The default value is 2.5 V.

1-3
Accelerometer

Maximum output voltage


The maximum output voltage from the sensor, which determines
the sensor maximum measured positive acceleration. This
parameter is only visible when you select Voltage level for the
Output type parameter. The default value is 4 V.
Minimum output voltage
The minimum output voltage from the sensor, which determines
the sensor maximum measured negative acceleration. This
parameter is only visible when you select Voltage level for the
Output type parameter. The default value is 1 V.
Duty cycle sensitivity (percent per unit acceleration)
The change in duty cycle per unit acceleration. Duty cycle is
expressed as a percentage of the PWM period. This parameter
is only visible when you select PWM duty cycle for the Output
type parameter. The default value is 10 percent/gee.
Duty cycle for zero acceleration (percent)
The duty cycle output by the sensor when the acceleration is zero.
This parameter is only visible when you select PWM duty cycle
for the Output type parameter. The default value is 50%.
Maximum duty cycle (percent)
The maximum duty cycle output by the sensor. Increasing
acceleration levels beyond this point will not register an increase
in duty cycle. This parameter is only visible when you select PWM
duty cycle for the Output type parameter. The default value
is 75%.
Minimum duty cycle (percent)
The minimum duty cycle output by the sensor. Decreasing
acceleration levels beyond this point will not register a decrease
in duty cycle. This parameter is only visible when you select PWM
duty cycle for the Output type parameter. The default value
is 25%.

1-4
Accelerometer

PWM frequency
The frequency of the output pulse train. This parameter is only
visible when you select PWM duty cycle for the Output type
parameter. The default value is 1 kHz.
Output voltage amplitude
The amplitude of the output pulse train when high. This
parameter is only visible when you select PWM duty cycle for the
Output type parameter. The default value is 5 V.
Dynamics
Select one of the following options for modeling sensor dynamics:
• No dynamics Suitable for HIL — Do not model sensor
dynamics. Use this option when running your simulation
fixed step or generating code for hardware-in-the-loop testing,
because this avoids the need for a small simulation time step if
the sensor bandwidth is high. This is the default option.
• Model sensor bandwidth — Model sensor dynamics with a
first-order lag approximation, based on the Bandwidth and
the Initial angular rate parameter values.
Bandwidth
Specifies the 3dB bandwidth for the measured acceleration
assuming a first-order time constant. This parameter is only
visible when you select Model sensor bandwidth for the
Dynamics parameter. The default value is 3 kHz.
Initial acceleration
Determines the initial condition for the lag by specifying the
initial output for the sensor, expressed in units of acceleration.
This parameter is only visible when you select Model sensor
bandwidth for the Dynamics parameter. The default value is 0
gee.

Ports The block has the following ports:

R
Mechanical translational port

1-5
Accelerometer

+
Positive electrical port
-
Negative electrical port

1-6
Band-Limited Op-Amp

Purpose Model band-limited operational amplifier

Library Integrated Circuits

Description The Band-Limited Op-Amp block models a band-limited operational


amplifier. If the voltages at the positive and negative ports are Vp and
Vm, respectively, the output voltage is:

Vout =
(
A V p - Vm )−I * Rout
s out
+1
2πf
where:

• A is the gain.
• Rout is the output resistance.
• Iout is the output current.
• s is the Laplace operator.
• f is the 3-dB bandwidth.

The input current is:

V p - Vm
Rin
where Rin is the input resistance.
The block does not use the initial condition you specify using the Initial
output voltage, V0 parameter if you select the Start simulation from
steady state check box in the Simscape™ Solver Configuration block.

1-7
Band-Limited Op-Amp

Dialog
Box and
Parameters

Gain, A
The open-loop gain of the operational amplifier. The default value
is 1000.
Input resistance, Rin
The resistance at the input of the operational amplifier that the
block uses to calculate the input current. The default value is
1e+06 Ω.

1-8
Band-Limited Op-Amp

Output resistance, Rout


The resistance at the output of the operational amplifier that
the block uses to calculate the drop in output voltage due to the
output current. The default value is 100 Ω.
Minimum output, Vmin
The lower limit on the operational amplifier no-load output
voltage. The default value is -15 V.
Maximum output, Vmax
The upper limit on the operational amplifier no-load output
voltage. The default value is 15 V.
Maximum slew rate, Vdot
The maximum positive or negative rate of change of output
voltage magnitude. The default value is 1000 V/s.
Bandwidth, f
The open-loop bandwidth, that is, the frequency at which the gain
drops by 3 dB compared to the low-frequency gain, A. The default
value is 1e+05 Hz.
Initial output voltage, V0
The output voltage at the start of the simulation when the output
current is zero. The default value is 0 V.

Note This parameter value does not account for the voltage drop
across the output resistor.

Ports The block has the following ports:

+
Positive electrical voltage
-
Negative electrical voltage

1-9
Band-Limited Op-Amp

OUT
Output voltage

See Also Op-Amp | Finite-Gain Op-Amp | Fully Differential Op-Amp

1-10
CMOS AND

Purpose Model CMOS AND gate behaviorally

Library Logic

Description The CMOS AND block represents a CMOS AND logic gate behaviorally:

• The block output logic level is HIGH if the logic levels of both of the
gate inputs are 1.
• The block output logic level is LOW otherwise.

The block determines the logic levels of the gate inputs as follows:

• If the gate voltage is greater than the threshold voltage, the block
interprets the input as logic 1.
• Otherwise, the block interprets the input as logic 0.

The threshold voltage is the voltage value at midpoint between the


High level input voltage parameter value and the Low level input
voltage parameter value.

Note To improve simulation speed, the block does not model all the
internal individual MOSFET devices that make up the gate. See “Basic
Assumptions and Limitations” on page 1-12 for details.

The block models the gate as follows:

• The gate inputs have infinite resistance and finite or zero capacitance.
• The gate output offers a selection of two models: Linear and
Quadratic. For more information, see “Selecting the Output Model
for Logic Blocks”. Use the Output current-voltage relationship
parameter to specify the output model.
• You can specify propagation delay for both output models. For Linear
output, the block sets the value of the gate output capacitor such that

1-11
CMOS AND

the resistor-capacitor time constant equals the Propagation delay


parameter value. For Quadratic output, the gate input demand is
lagged to approximate the Propagation delay parameter value.

The block output voltage depends on the output model selected:

• For Linear model, output high is the High level output voltage
parameter value, and output low is the Low level output voltage
parameter value.
• For Quadratic model, the output voltage for High and Low states is
a function of the output current, as explained in “Quadratic Model
Output and Parameters”. For zero load current, output high is Vcc
(the Supply voltage parameter value), and output low is zero volts.

Basic The block does not model the internal individual MOSFET devices
Assumptions that make up the gate (except for the final MOSFET pair if you select
and the Quadratic option for the Output current-voltage relationship
parameter). This limitation has the following implications:
Limitations
• The block does not accurately model the gate’s response to input
noise and inputs that are around the logic threshold voltage.
• The block does not accurately model dynamic response.

Circuits that involve a feedback path around a set of logic gates may
require a nonzero propagation delay to be set on one or more gates.

1-12
CMOS AND

Dialog
Box and
Parameters

• “Inputs Tab” on page 1-13


• “Outputs Tab” on page 1-14
• “Initial Conditions Tab” on page 1-16

Inputs Tab

Low level input voltage


Voltage value below which the block interprets the input voltage
as logic LOW. The default value is 2 V.
High level input voltage
Voltage value above which the block interprets the input voltage
as logic HIGH. The default value is 3 V.
Average input capacitance
Fixed capacitance that approximates the input capacitance for
a MOSFET gate. The MOSFET capacitance depends on the
applied voltage. When you drive this block with another gate, the
Average input capacitance produces a rise time similar to that
of the MOSFET. You can usually find this capacitance value on a

1-13
CMOS AND

manufacturer datasheet. The default value is 5 pF. Setting this


value to zero may result in faster simulation times.

Outputs Tab

Output current-voltage relationship


Select the output model, Linear or Quadratic. The default value
is Linear.
Low level output voltage
Voltage value at the output when the output logic level is LOW. The
default value is 0 V. This parameter is available when you select
the Linear option for the Output current-voltage relationship
parameter.
High level output voltage
Voltage value at the output when the output logic level is HIGH.
The default value is 5 V. This parameter is available when
you select the Linear option for the Output current-voltage
relationship parameter.
Output resistance
Value of the series output resistor that is used to model the drop
in output voltage resulting from the output current. The default
value is 25 Ω. You can derive this value from a datasheet by
dividing the high-level output voltage by the maximum low-level
output current. This parameter is available when you select the
Linear option for the Output current-voltage relationship
parameter.
Supply voltage
Supply voltage value applied to the gate in your circuit. The
default value is 5 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.
Measurement voltage
The gate supply voltage for which mask data output resistances
and currents are defined. The default value is 5 V. This parameter

1-14
CMOS AND

is available when you select the Quadratic option for the Output
current-voltage relationship parameter.
Logic HIGH output resistance at zero current and at I_OH
A row vector [ R_OH1 R_OH2 ] of two resistance values. The
first value R_OH1 is the gradient of the output voltage-current
relationship when the gate is logic HIGH and there is no output
current. The second value R_OH2 is the gradient of the output
voltage-current relationship when the gate is logic HIGH and the
output current is I_OH. The default value is [ 25 250 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic HIGH output current I_OH when shorted to ground
The resulting current when the gate is in the logic HIGH state,
but the load forces the output voltage to zero. The default value is
63 mA. This parameter is available when you select the Quadratic
option for the Output current-voltage relationship parameter.
Logic LOW output resistance at zero current and at I_OL
A row vector [ R_OL1 R_OL2 ] of two resistance values. The
first value R_OL1 is the gradient of the output voltage-current
relationship when the gate is logic LOW and there is no output
current. The second value R_OL2 is the gradient of the output
voltage-current relationship when the gate is logic LOW and the
output current is I_OL. The default value is [ 30 800 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic LOW output current I_OL when shorted to Vcc
The resulting current when the gate is in the logic LOW state,
but the load forces the output voltage to the supply voltage Vcc.
The default value is -45 mA. This parameter is available when
you select the Quadratic option for the Output current-voltage
relationship parameter.
Propagation delay
Time it takes for the output to swing from LOW to HIGH or HIGH to
LOW after the input logic levels change. The default value is 25 ns.

1-15
CMOS AND

Protection diode on resistance


The gradient of the voltage-current relationship for the protection
diodes when forward biased. The default value is 5 Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Protection diode forward voltage
The voltage above which the protection diode is turned on. The
default value is 0.6 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.

Initial Conditions Tab

Output initial state


Specify whether the initial output state of the block is High
or Low. This parameter is used for both linear and quadratic
output states, provided that the Propagation delay parameter
is greater than zero and the Solver Configuration block does not
have the Start simulation from steady state option selected.
The default value is Low.

Ports The block has the following ports:

A
Electrical input port
B
Electrical input port
J
Electrical output port

1-16
CMOS Buffer

Purpose Model CMOS Buffer gate behaviorally

Library Logic

Description The CMOS Buffer block represents a CMOS Buffer logic gate
behaviorally:

• The block output logic level is HIGH if the logic level of the gate input
is 1.
• The block output logic level is LOW otherwise.

The block determines the logic levels of the gate inputs as follows:

• If the gate voltage is greater than the threshold voltage, the block
interprets the input as logic 1.
• Otherwise, the block interprets the input as logic 0.

The threshold voltage is the voltage value at midpoint between the


High level input voltage parameter value and the Low level input
voltage parameter value.

Note To improve simulation speed, the block does not model all the
internal individual MOSFET devices that make up the gate. See “Basic
Assumptions and Limitations” on page 1-18 for details.

The block models the gate as follows:

• The gate inputs have infinite resistance and finite or zero capacitance.
• The gate output offers a selection of two models: Linear and
Quadratic. For more information, see “Selecting the Output Model
for Logic Blocks”. Use the Output current-voltage relationship
parameter to specify the output model.

1-17
CMOS Buffer

• You can specify propagation delay for both output models. For Linear
output, the block sets the value of the gate output capacitor such that
the resistor-capacitor time constant equals the Propagation delay
parameter value. For Quadratic output, the gate input demand is
lagged to approximate the Propagation delay parameter value.

The block output voltage depends on the output model selected:

• For Linear model, output high is the High level output voltage
parameter value, and output low is the Low level output voltage
parameter value.
• For Quadratic model, the output voltage for High and Low states is
a function of the output current, as explained in “Quadratic Model
Output and Parameters”. For zero load current, output high is Vcc
(the Supply voltage parameter value), and output low is zero volts.

Basic The block does not model the internal individual MOSFET devices
Assumptions that make up the gate (except for the final MOSFET pair if you select
and the Quadratic option for the Output current-voltage relationship
parameter). This limitation has the following implications:
Limitations
• The block does not accurately model the gate’s response to input
noise and inputs that are around the logic threshold voltage.
• The block does not accurately model dynamic response.

Circuits that involve a feedback path around a set of logic gates may
require a nonzero propagation delay to be set on one or more gates.

1-18
CMOS Buffer

Dialog
Box and
Parameters

• “Inputs Tab” on page 1-19


• “Outputs Tab” on page 1-20
• “Initial Conditions Tab” on page 1-22

Inputs Tab

Low level input voltage


Voltage value below which the block interprets the input voltage
as logic LOW. The default value is 2 V.
High level input voltage
Voltage value above which the block interprets the input voltage
as logic HIGH. The default value is 3 V.
Average input capacitance
Fixed capacitance that approximates the input capacitance for
a MOSFET gate. The MOSFET capacitance depends on the
applied voltage. When you drive this block with another gate, the
Average input capacitance produces a rise time similar to that
of the MOSFET. You can usually find this capacitance value on a

1-19
CMOS Buffer

manufacturer datasheet. The default value is 5 pF. Setting this


value to zero may result in faster simulation times.

Outputs Tab

Output current-voltage relationship


Select the output model, Linear or Quadratic. The default value
is Linear.
Low level output voltage
Voltage value at the output when the output logic level is LOW. The
default value is 0 V. This parameter is available when you select
the Linear option for the Output current-voltage relationship
parameter.
High level output voltage
Voltage value at the output when the output logic level is HIGH.
The default value is 5 V. This parameter is available when
you select the Linear option for the Output current-voltage
relationship parameter.
Output resistance
Value of the series output resistor that is used to model the drop
in output voltage resulting from the output current. The default
value is 25 Ω. You can derive this value from a datasheet by
dividing the high-level output voltage by the maximum low-level
output current. This parameter is available when you select the
Linear option for the Output current-voltage relationship
parameter.
Supply voltage
Supply voltage value applied to the gate in your circuit. The
default value is 5 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.
Measurement voltage
The gate supply voltage for which mask data output resistances
and currents are defined. The default value is 5 V. This parameter

1-20
CMOS Buffer

is available when you select the Quadratic option for the Output
current-voltage relationship parameter.
Logic HIGH output resistance at zero current and at I_OH
A row vector [ R_OH1 R_OH2 ] of two resistance values. The
first value R_OH1 is the gradient of the output voltage-current
relationship when the gate is logic HIGH and there is no output
current. The second value R_OH2 is the gradient of the output
voltage-current relationship when the gate is logic HIGH and the
output current is I_OH. The default value is [ 25 250 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic HIGH output current I_OH when shorted to ground
The resulting current when the gate is in the logic HIGH state,
but the load forces the output voltage to zero. The default value is
63 mA. This parameter is available when you select the Quadratic
option for the Output current-voltage relationship parameter.
Logic LOW output resistance at zero current and at I_OL
A row vector [ R_OL1 R_OL2 ] of two resistance values. The
first value R_OL1 is the gradient of the output voltage-current
relationship when the gate is logic LOW and there is no output
current. The second value R_OL2 is the gradient of the output
voltage-current relationship when the gate is logic LOW and the
output current is I_OL. The default value is [ 30 800 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic LOW output current I_OL when shorted to Vcc
The resulting current when the gate is in the logic LOW state,
but the load forces the output voltage to the supply voltage Vcc.
The default value is -45 mA. This parameter is available when
you select the Quadratic option for the Output current-voltage
relationship parameter.
Propagation delay
Time it takes for the output to swing from LOW to HIGH or HIGH to
LOW after the input logic levels change. The default value is 25 ns.

1-21
CMOS Buffer

Protection diode on resistance


The gradient of the voltage-current relationship for the protection
diodes when forward biased. The default value is 5 Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Protection diode forward voltage
The voltage above which the protection diode is turned on. The
default value is 0.6 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.

Initial Conditions Tab

Output initial state


Specify whether the initial output state of the block is High
or Low. This parameter is used for both linear and quadratic
output states, provided that the Propagation delay parameter
is greater than zero and the Solver Configuration block does not
have the Start simulation from steady state option selected.
The default value is Low.

Ports The block has the following ports:

A
Electrical input port
J
Electrical output port

1-22
CMOS NAND

Purpose Model CMOS NAND gate behaviorally

Library Logic

Description The CMOS NAND block represents a CMOS NAND logic gate
behaviorally:

• The block output logic level is HIGH if the logic levels of both of the
gate inputs are 0.
• The block output logic level is LOW otherwise.

The block determines the logic levels of the gate inputs as follows:

• If the gate voltage is greater than the threshold voltage, the block
interprets the input as logic 1.
• Otherwise, the block interprets the input as logic 0.

The threshold voltage is the voltage value at midpoint between the


High level input voltage parameter value and the Low level input
voltage parameter value.

Note To improve simulation speed, the block does not model all the
internal individual MOSFET devices that make up the gate. See “Basic
Assumptions and Limitations” on page 1-24 for details.

The block models the gate as follows:

• The gate inputs have infinite resistance and finite or zero capacitance.
• The gate output offers a selection of two models: Linear and
Quadratic. For more information, see “Selecting the Output Model
for Logic Blocks”. Use the Output current-voltage relationship
parameter to specify the output model.

1-23
CMOS NAND

• You can specify propagation delay for both output models. For Linear
output, the block sets the value of the gate output capacitor such that
the resistor-capacitor time constant equals the Propagation delay
parameter value. For Quadratic output, the gate input demand is
lagged to approximate the Propagation delay parameter value.

The block output voltage depends on the output model selected:

• For Linear model, output high is the High level output voltage
parameter value, and output low is the Low level output voltage
parameter value.
• For Quadratic model, the output voltage for High and Low states is
a function of the output current, as explained in “Quadratic Model
Output and Parameters”. For zero load current, output high is Vcc
(the Supply voltage parameter value), and output low is zero volts.

Basic The block does not model the internal individual MOSFET devices
Assumptions that make up the gate (except for the final MOSFET pair if you select
and the Quadratic option for the Output current-voltage relationship
parameter). This limitation has the following implications:
Limitations
• The block does not accurately model the gate’s response to input
noise and inputs that are around the logic threshold voltage.
• The block does not accurately model dynamic response.

Circuits that involve a feedback path around a set of logic gates may
require a nonzero propagation delay to be set on one or more gates.

1-24
CMOS NAND

Dialog
Box and
Parameters

• “Inputs Tab” on page 1-25


• “Outputs Tab” on page 1-26
• “Initial Conditions Tab” on page 1-28

Inputs Tab

Low level input voltage


Voltage value below which the block interprets the input voltage
as logic LOW. The default value is 2 V.
High level input voltage
Voltage value above which the block interprets the input voltage
as logic HIGH. The default value is 3 V.
Average input capacitance
Fixed capacitance that approximates the input capacitance for
a MOSFET gate. The MOSFET capacitance depends on the
applied voltage. When you drive this block with another gate, the
Average input capacitance produces a rise time similar to that
of the MOSFET. You can usually find this capacitance value on a

1-25
CMOS NAND

manufacturer datasheet. The default value is 5 pF. Setting this


value to zero may result in faster simulation times.

Outputs Tab

Output current-voltage relationship


Select the output model, Linear or Quadratic. The default value
is Linear.
Low level output voltage
Voltage value at the output when the output logic level is LOW. The
default value is 0 V. This parameter is available when you select
the Linear option for the Output current-voltage relationship
parameter.
High level output voltage
Voltage value at the output when the output logic level is HIGH.
The default value is 5 V. This parameter is available when
you select the Linear option for the Output current-voltage
relationship parameter.
Output resistance
Value of the series output resistor that is used to model the drop
in output voltage resulting from the output current. The default
value is 25 Ω. You can derive this value from a datasheet by
dividing the high-level output voltage by the maximum low-level
output current. This parameter is available when you select the
Linear option for the Output current-voltage relationship
parameter.
Supply voltage
Supply voltage value applied to the gate in your circuit. The
default value is 5 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.
Measurement voltage
The gate supply voltage for which mask data output resistances
and currents are defined. The default value is 5 V. This parameter

1-26
CMOS NAND

is available when you select the Quadratic option for the Output
current-voltage relationship parameter.
Logic HIGH output resistance at zero current and at I_OH
A row vector [ R_OH1 R_OH2 ] of two resistance values. The
first value R_OH1 is the gradient of the output voltage-current
relationship when the gate is logic HIGH and there is no output
current. The second value R_OH2 is the gradient of the output
voltage-current relationship when the gate is logic HIGH and the
output current is I_OH. The default value is [ 25 250 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic HIGH output current I_OH when shorted to ground
The resulting current when the gate is in the logic HIGH state,
but the load forces the output voltage to zero. The default value is
63 mA. This parameter is available when you select the Quadratic
option for the Output current-voltage relationship parameter.
Logic LOW output resistance at zero current and at I_OL
A row vector [ R_OL1 R_OL2 ] of two resistance values. The
first value R_OL1 is the gradient of the output voltage-current
relationship when the gate is logic LOW and there is no output
current. The second value R_OL2 is the gradient of the output
voltage-current relationship when the gate is logic LOW and the
output current is I_OL. The default value is [ 30 800 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic LOW output current I_OL when shorted to Vcc
The resulting current when the gate is in the logic LOW state,
but the load forces the output voltage to the supply voltage Vcc.
The default value is -45 mA. This parameter is available when
you select the Quadratic option for the Output current-voltage
relationship parameter.
Propagation delay
Time it takes for the output to swing from LOW to HIGH or HIGH to
LOW after the input logic levels change. The default value is 25 ns.

1-27
CMOS NAND

Protection diode on resistance


The gradient of the voltage-current relationship for the protection
diodes when forward biased. The default value is 5 Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Protection diode forward voltage
The voltage above which the protection diode is turned on. The
default value is 0.6 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.

Initial Conditions Tab

Output initial state


Specify whether the initial output state of the block is High
or Low. This parameter is used for both linear and quadratic
output states, provided that the Propagation delay parameter
is greater than zero and the Solver Configuration block does not
have the Start simulation from steady state option selected.
The default value is Low.

Ports The block has the following ports:

A
Electrical input port
B
Electrical input port
J
Electrical output port

1-28
CMOS NOR

Purpose Model CMOS NOR gate behaviorally

Library Logic

Description The CMOS NOR block represents a CMOS NOR logic gate behaviorally:

• The block output logic level is LOW if the logic levels of any of the
gate inputs are 1.
• The block output logic level is HIGH otherwise.

The block determines the logic levels of the gate inputs as follows:

• If the gate voltage is greater than the threshold voltage, the block
interprets the input as logic 1.
• Otherwise, the block interprets the input as logic 0.

The threshold voltage is the voltage value at midpoint between the


High level input voltage parameter value and the Low level input
voltage parameter value.

Note To improve simulation speed, the block does not model all the
internal individual MOSFET devices that make up the gate. See “Basic
Assumptions and Limitations” on page 1-30 for details.

The block models the gate as follows:

• The gate inputs have infinite resistance and finite or zero capacitance.
• The gate output offers a selection of two models: Linear and
Quadratic. For more information, see “Selecting the Output Model
for Logic Blocks”. Use the Output current-voltage relationship
parameter to specify the output model.
• You can specify propagation delay for both output models. For Linear
output, the block sets the value of the gate output capacitor such that

1-29
CMOS NOR

the resistor-capacitor time constant equals the Propagation delay


parameter value. For Quadratic output, the gate input demand is
lagged to approximate the Propagation delay parameter value.

The block output voltage depends on the output model selected:

• For Linear model, output high is the High level output voltage
parameter value, and output low is the Low level output voltage
parameter value.
• For Quadratic model, the output voltage for High and Low states is
a function of the output current, as explained in “Quadratic Model
Output and Parameters”. For zero load current, output high is Vcc
(the Supply voltage parameter value), and output low is zero volts.

Basic The block does not model the internal individual MOSFET devices
Assumptions that make up the gate (except for the final MOSFET pair if you select
and the Quadratic option for the Output current-voltage relationship
parameter). This limitation has the following implications:
Limitations
• The block does not accurately model the gate’s response to input
noise and inputs that are around the logic threshold voltage.
• The block does not accurately model dynamic response.

Circuits that involve a feedback path around a set of logic gates may
require a nonzero propagation delay to be set on one or more gates.

1-30
CMOS NOR

Dialog
Box and
Parameters

• “Inputs Tab” on page 1-31


• “Outputs Tab” on page 1-32
• “Initial Conditions Tab” on page 1-34

Inputs Tab

Low level input voltage


Voltage value below which the block interprets the input voltage
as logic LOW. The default value is 2 V.
High level input voltage
Voltage value above which the block interprets the input voltage
as logic HIGH. The default value is 3 V.
Average input capacitance
Fixed capacitance that approximates the input capacitance for
a MOSFET gate. The MOSFET capacitance depends on the
applied voltage. When you drive this block with another gate, the
Average input capacitance produces a rise time similar to that
of the MOSFET. You can usually find this capacitance value on a

1-31
CMOS NOR

manufacturer datasheet. The default value is 5 pF. Setting this


value to zero may result in faster simulation times.

Outputs Tab

Output current-voltage relationship


Select the output model, Linear or Quadratic. The default value
is Linear.
Low level output voltage
Voltage value at the output when the output logic level is LOW. The
default value is 0 V. This parameter is available when you select
the Linear option for the Output current-voltage relationship
parameter.
High level output voltage
Voltage value at the output when the output logic level is HIGH.
The default value is 5 V. This parameter is available when
you select the Linear option for the Output current-voltage
relationship parameter.
Output resistance
Value of the series output resistor that is used to model the drop
in output voltage resulting from the output current. The default
value is 25 Ω. You can derive this value from a datasheet by
dividing the high-level output voltage by the maximum low-level
output current. This parameter is available when you select the
Linear option for the Output current-voltage relationship
parameter.
Supply voltage
Supply voltage value applied to the gate in your circuit. The
default value is 5 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.
Measurement voltage
The gate supply voltage for which mask data output resistances
and currents are defined. The default value is 5 V. This parameter

1-32
CMOS NOR

is available when you select the Quadratic option for the Output
current-voltage relationship parameter.
Logic HIGH output resistance at zero current and at I_OH
A row vector [ R_OH1 R_OH2 ] of two resistance values. The
first value R_OH1 is the gradient of the output voltage-current
relationship when the gate is logic HIGH and there is no output
current. The second value R_OH2 is the gradient of the output
voltage-current relationship when the gate is logic HIGH and the
output current is I_OH. The default value is [ 25 250 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic HIGH output current I_OH when shorted to ground
The resulting current when the gate is in the logic HIGH state,
but the load forces the output voltage to zero. The default value is
63 mA. This parameter is available when you select the Quadratic
option for the Output current-voltage relationship parameter.
Logic LOW output resistance at zero current and at I_OL
A row vector [ R_OL1 R_OL2 ] of two resistance values. The
first value R_OL1 is the gradient of the output voltage-current
relationship when the gate is logic LOW and there is no output
current. The second value R_OL2 is the gradient of the output
voltage-current relationship when the gate is logic LOW and the
output current is I_OL. The default value is [ 30 800 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic LOW output current I_OL when shorted to Vcc
The resulting current when the gate is in the logic LOW state,
but the load forces the output voltage to the supply voltage Vcc.
The default value is -45 mA. This parameter is available when
you select the Quadratic option for the Output current-voltage
relationship parameter.
Propagation delay
Time it takes for the output to swing from LOW to HIGH or HIGH to
LOW after the input logic levels change. The default value is 25 ns.

1-33
CMOS NOR

Protection diode on resistance


The gradient of the voltage-current relationship for the protection
diodes when forward biased. The default value is 5 Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Protection diode forward voltage
The voltage above which the protection diode is turned on. The
default value is 0.6 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.

Initial Conditions Tab

Output initial state


Specify whether the initial output state of the block is High
or Low. This parameter is used for both linear and quadratic
output states, provided that the Propagation delay parameter
is greater than zero and the Solver Configuration block does not
have the Start simulation from steady state option selected.
The default value is Low.

Ports The block has the following ports:

A
Electrical input port
B
Electrical input port
J
Electrical output port

1-34
CMOS NOT

Purpose Model CMOS NOT gate behaviorally

Library Logic

Description The CMOS NOT block represents a CMOS NOT logic gate behaviorally:

• The block output logic level is HIGH if the logic level of the gate input
is 0.
• The block output logic level is LOW otherwise.

The block determines the logic levels of the gate inputs as follows:

• If the gate voltage is greater than the threshold voltage, the block
interprets the input as logic 1.
• Otherwise, the block interprets the input as logic 0.

The threshold voltage is the voltage value at midpoint between the


High level input voltage parameter value and the Low level input
voltage parameter value.

Note To improve simulation speed, the block does not model all the
internal individual MOSFET devices that make up the gate. See “Basic
Assumptions and Limitations” on page 1-36 for details.

The block models the gate as follows:

• The gate inputs have infinite resistance and finite or zero capacitance.
• The gate output offers a selection of two models: Linear and
Quadratic. For more information, see “Selecting the Output Model
for Logic Blocks”. Use the Output current-voltage relationship
parameter to specify the output model.
• You can specify propagation delay for both output models. For Linear
output, the block sets the value of the gate output capacitor such that

1-35
CMOS NOT

the resistor-capacitor time constant equals the Propagation delay


parameter value. For Quadratic output, the gate input demand is
lagged to approximate the Propagation delay parameter value.

The block output voltage depends on the output model selected:

• For Linear model, output high is the High level output voltage
parameter value, and output low is the Low level output voltage
parameter value.
• For Quadratic model, the output voltage for High and Low states is
a function of the output current, as explained in “Quadratic Model
Output and Parameters”. For zero load current, output high is Vcc
(the Supply voltage parameter value), and output low is zero volts.

Basic The block does not model the internal individual MOSFET devices
Assumptions that make up the gate (except for the final MOSFET pair if you select
and the Quadratic option for the Output current-voltage relationship
parameter). This limitation has the following implications:
Limitations
• The block does not accurately model the gate’s response to input
noise and inputs that are around the logic threshold voltage.
• The block does not accurately model dynamic response.

Circuits that involve a feedback path around a set of logic gates may
require a nonzero propagation delay to be set on one or more gates.

1-36
CMOS NOT

Dialog
Box and
Parameters

• “Inputs Tab” on page 1-37


• “Outputs Tab” on page 1-38
• “Initial Conditions Tab” on page 1-40

Inputs Tab

Low level input voltage


Voltage value below which the block interprets the input voltage
as logic LOW. The default value is 2 V.
High level input voltage
Voltage value above which the block interprets the input voltage
as logic HIGH. The default value is 3 V.
Average input capacitance
Fixed capacitance that approximates the input capacitance for
a MOSFET gate. The MOSFET capacitance depends on the
applied voltage. When you drive this block with another gate, the
Average input capacitance produces a rise time similar to that
of the MOSFET. You can usually find this capacitance value on a

1-37
CMOS NOT

manufacturer datasheet. The default value is 5 pF. Setting this


value to zero may result in faster simulation times.

Outputs Tab

Output current-voltage relationship


Select the output model, Linear or Quadratic. The default value
is Linear.
Low level output voltage
Voltage value at the output when the output logic level is LOW. The
default value is 0 V. This parameter is available when you select
the Linear option for the Output current-voltage relationship
parameter.
High level output voltage
Voltage value at the output when the output logic level is HIGH.
The default value is 5 V. This parameter is available when
you select the Linear option for the Output current-voltage
relationship parameter.
Output resistance
Value of the series output resistor that is used to model the drop
in output voltage resulting from the output current. The default
value is 25 Ω. You can derive this value from a datasheet by
dividing the high-level output voltage by the maximum low-level
output current. This parameter is available when you select the
Linear option for the Output current-voltage relationship
parameter.
Supply voltage
Supply voltage value applied to the gate in your circuit. The
default value is 5 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.
Measurement voltage
The gate supply voltage for which mask data output resistances
and currents are defined. The default value is 5 V. This parameter

1-38
CMOS NOT

is available when you select the Quadratic option for the Output
current-voltage relationship parameter.
Logic HIGH output resistance at zero current and at I_OH
A row vector [ R_OH1 R_OH2 ] of two resistance values. The
first value R_OH1 is the gradient of the output voltage-current
relationship when the gate is logic HIGH and there is no output
current. The second value R_OH2 is the gradient of the output
voltage-current relationship when the gate is logic HIGH and the
output current is I_OH. The default value is [ 25 250 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic HIGH output current I_OH when shorted to ground
The resulting current when the gate is in the logic HIGH state,
but the load forces the output voltage to zero. The default value is
63 mA. This parameter is available when you select the Quadratic
option for the Output current-voltage relationship parameter.
Logic LOW output resistance at zero current and at I_OL
A row vector [ R_OL1 R_OL2 ] of two resistance values. The
first value R_OL1 is the gradient of the output voltage-current
relationship when the gate is logic LOW and there is no output
current. The second value R_OL2 is the gradient of the output
voltage-current relationship when the gate is logic LOW and the
output current is I_OL. The default value is [ 30 800 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic LOW output current I_OL when shorted to Vcc
The resulting current when the gate is in the logic LOW state,
but the load forces the output voltage to the supply voltage Vcc.
The default value is -45 mA. This parameter is available when
you select the Quadratic option for the Output current-voltage
relationship parameter.
Propagation delay
Time it takes for the output to swing from LOW to HIGH or HIGH to
LOW after the input logic levels change. The default value is 25 ns.

1-39
CMOS NOT

Protection diode on resistance


The gradient of the voltage-current relationship for the protection
diodes when forward biased. The default value is 5 Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Protection diode forward voltage
The voltage above which the protection diode is turned on. The
default value is 0.6 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.

Initial Conditions Tab

Output initial state


Specify whether the initial output state of the block is High
or Low. This parameter is used for both linear and quadratic
output states, provided that the Propagation delay parameter
is greater than zero and the Solver Configuration block does not
have the Start simulation from steady state option selected.
The default value is Low.

Ports The block has the following ports:

A
Electrical input port
J
Electrical output port

1-40
CMOS OR

Purpose Model CMOS OR gate behaviorally

Library Logic

Description The CMOS OR block represents a CMOS OR logic gate behaviorally:

• The block output logic level is HIGH if the logic levels of any of the
gate inputs are 1.
• The block output logic level is LOW otherwise.

The block determines the logic levels of the gate inputs as follows:

• If the gate voltage is greater than the threshold voltage, the block
interprets the input as logic 1.
• Otherwise, the block interprets the input as logic 0.

The threshold voltage is the voltage value at midpoint between the


High level input voltage parameter value and the Low level input
voltage parameter value.

Note To improve simulation speed, the block does not model all the
internal individual MOSFET devices that make up the gate. See “Basic
Assumptions and Limitations” on page 1-42 for details.

The block models the gate as follows:

• The gate inputs have infinite resistance and finite or zero capacitance.
• The gate output offers a selection of two models: Linear and
Quadratic. For more information, see “Selecting the Output Model
for Logic Blocks”. Use the Output current-voltage relationship
parameter to specify the output model.
• You can specify propagation delay for both output models. For Linear
output, the block sets the value of the gate output capacitor such that

1-41
CMOS OR

the resistor-capacitor time constant equals the Propagation delay


parameter value. For Quadratic output, the gate input demand is
lagged to approximate the Propagation delay parameter value.

The block output voltage depends on the output model selected:

• For Linear model, output high is the High level output voltage
parameter value, and output low is the Low level output voltage
parameter value.
• For Quadratic model, the output voltage for High and Low states is
a function of the output current, as explained in “Quadratic Model
Output and Parameters”. For zero load current, output high is Vcc
(the Supply voltage parameter value), and output low is zero volts.

Basic The block does not model the internal individual MOSFET devices
Assumptions that make up the gate (except for the final MOSFET pair if you select
and the Quadratic option for the Output current-voltage relationship
parameter). This limitation has the following implications:
Limitations
• The block does not accurately model the gate’s response to input
noise and inputs that are around the logic threshold voltage.
• The block does not accurately model dynamic response.

Circuits that involve a feedback path around a set of logic gates may
require a nonzero propagation delay to be set on one or more gates.

1-42
CMOS OR

Dialog
Box and
Parameters

• “Inputs Tab” on page 1-43


• “Outputs Tab” on page 1-44
• “Initial Conditions Tab” on page 1-46

Inputs Tab

Low level input voltage


Voltage value below which the block interprets the input voltage
as logic LOW. The default value is 2 V.
High level input voltage
Voltage value above which the block interprets the input voltage
as logic HIGH. The default value is 3 V.
Average input capacitance
Fixed capacitance that approximates the input capacitance for
a MOSFET gate. The MOSFET capacitance depends on the
applied voltage. When you drive this block with another gate, the
Average input capacitance produces a rise time similar to that
of the MOSFET. You can usually find this capacitance value on a

1-43
CMOS OR

manufacturer datasheet. The default value is 5 pF. Setting this


value to zero may result in faster simulation times.

Outputs Tab

Output current-voltage relationship


Select the output model, Linear or Quadratic. The default value
is Linear.
Low level output voltage
Voltage value at the output when the output logic level is LOW. The
default value is 0 V. This parameter is available when you select
the Linear option for the Output current-voltage relationship
parameter.
High level output voltage
Voltage value at the output when the output logic level is HIGH.
The default value is 5 V. This parameter is available when
you select the Linear option for the Output current-voltage
relationship parameter.
Output resistance
Value of the series output resistor that is used to model the drop
in output voltage resulting from the output current. The default
value is 25 Ω. You can derive this value from a datasheet by
dividing the high-level output voltage by the maximum low-level
output current. This parameter is available when you select the
Linear option for the Output current-voltage relationship
parameter.
Supply voltage
Supply voltage value applied to the gate in your circuit. The
default value is 5 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.
Measurement voltage
The gate supply voltage for which mask data output resistances
and currents are defined. The default value is 5 V. This parameter

1-44
CMOS OR

is available when you select the Quadratic option for the Output
current-voltage relationship parameter.
Logic HIGH output resistance at zero current and at I_OH
A row vector [ R_OH1 R_OH2 ] of two resistance values. The
first value R_OH1 is the gradient of the output voltage-current
relationship when the gate is logic HIGH and there is no output
current. The second value R_OH2 is the gradient of the output
voltage-current relationship when the gate is logic HIGH and the
output current is I_OH. The default value is [ 25 250 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic HIGH output current I_OH when shorted to ground
The resulting current when the gate is in the logic HIGH state,
but the load forces the output voltage to zero. The default value is
63 mA. This parameter is available when you select the Quadratic
option for the Output current-voltage relationship parameter.
Logic LOW output resistance at zero current and at I_OL
A row vector [ R_OL1 R_OL2 ] of two resistance values. The
first value R_OL1 is the gradient of the output voltage-current
relationship when the gate is logic LOW and there is no output
current. The second value R_OL2 is the gradient of the output
voltage-current relationship when the gate is logic LOW and the
output current is I_OL. The default value is [ 30 800 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic LOW output current I_OL when shorted to Vcc
The resulting current when the gate is in the logic LOW state,
but the load forces the output voltage to the supply voltage Vcc.
The default value is -45 mA. This parameter is available when
you select the Quadratic option for the Output current-voltage
relationship parameter.
Propagation delay
Time it takes for the output to swing from LOW to HIGH or HIGH to
LOW after the input logic levels change. The default value is 25 ns.

1-45
CMOS OR

Protection diode on resistance


The gradient of the voltage-current relationship for the protection
diodes when forward biased. The default value is 5 Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Protection diode forward voltage
The voltage above which the protection diode is turned on. The
default value is 0.6 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.

Initial Conditions Tab

Output initial state


Specify whether the initial output state of the block is High
or Low. This parameter is used for both linear and quadratic
output states, provided that the Propagation delay parameter
is greater than zero and the Solver Configuration block does not
have the Start simulation from steady state option selected.
The default value is Low.

Ports The block has the following ports:

A
Electrical input port
B
Electrical input port
J
Electrical output port

1-46
CMOS XOR

Purpose Model CMOS XOR gate behaviorally

Library Logic

Description The CMOS XOR block represents a CMOS XOR logic gate behaviorally:

• The block output logic level is HIGH if the logic level of exactly one of
the gate inputs is 1.
• The block output logic level is LOW otherwise.

The block determines the logic levels of the gate inputs as follows:

• If the gate voltage is greater than the threshold voltage, the block
interprets the input as logic 1.
• Otherwise, the block interprets the input as logic 0.

The threshold voltage is the voltage value at midpoint between the


High level input voltage parameter value and the Low level input
voltage parameter value.

Note To improve simulation speed, the block does not model all the
internal individual MOSFET devices that make up the gate. See “Basic
Assumptions and Limitations” on page 1-48 for details.

The block models the gate as follows:

• The gate inputs have infinite resistance and finite or zero capacitance.
• The gate output offers a selection of two models: Linear and
Quadratic. For more information, see “Selecting the Output Model
for Logic Blocks”. Use the Output current-voltage relationship
parameter to specify the output model.
• You can specify propagation delay for both output models. For Linear
output, the block sets the value of the gate output capacitor such that

1-47
CMOS XOR

the resistor-capacitor time constant equals the Propagation delay


parameter value. For Quadratic output, the gate input demand is
lagged to approximate the Propagation delay parameter value.

The block output voltage depends on the output model selected:

• For Linear model, output high is the High level output voltage
parameter value, and output low is the Low level output voltage
parameter value.
• For Quadratic model, the output voltage for High and Low states is
a function of the output current, as explained in “Quadratic Model
Output and Parameters”. For zero load current, output high is Vcc
(the Supply voltage parameter value), and output low is zero volts.

Basic The block does not model the internal individual MOSFET devices
Assumptions that make up the gate (except for the final MOSFET pair if you select
and the Quadratic option for the Output current-voltage relationship
parameter). This limitation has the following implications:
Limitations
• The block does not accurately model the gate’s response to input
noise and inputs that are around the logic threshold voltage.
• The block does not accurately model dynamic response.

Circuits that involve a feedback path around a set of logic gates may
require a nonzero propagation delay to be set on one or more gates.

1-48
CMOS XOR

Dialog
Box and
Parameters

• “Inputs Tab” on page 1-49


• “Outputs Tab” on page 1-50
• “Initial Conditions Tab” on page 1-52

Inputs Tab

Low level input voltage


Voltage value below which the block interprets the input voltage
as logic LOW. The default value is 2 V.
High level input voltage
Voltage value above which the block interprets the input voltage
as logic HIGH. The default value is 3 V.
Average input capacitance
Fixed capacitance that approximates the input capacitance for
a MOSFET gate. The MOSFET capacitance depends on the
applied voltage. When you drive this block with another gate, the
Average input capacitance produces a rise time similar to that
of the MOSFET. You can usually find this capacitance value on a

1-49
CMOS XOR

manufacturer datasheet. The default value is 5 pF. Setting this


value to zero may result in faster simulation times.

Outputs Tab

Output current-voltage relationship


Select the output model, Linear or Quadratic. The default value
is Linear.
Low level output voltage
Voltage value at the output when the output logic level is LOW. The
default value is 0 V. This parameter is available when you select
the Linear option for the Output current-voltage relationship
parameter.
High level output voltage
Voltage value at the output when the output logic level is HIGH.
The default value is 5 V. This parameter is available when
you select the Linear option for the Output current-voltage
relationship parameter.
Output resistance
Value of the series output resistor that is used to model the drop
in output voltage resulting from the output current. The default
value is 25 Ω. You can derive this value from a datasheet by
dividing the high-level output voltage by the maximum low-level
output current. This parameter is available when you select the
Linear option for the Output current-voltage relationship
parameter.
Supply voltage
Supply voltage value applied to the gate in your circuit. The
default value is 5 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.
Measurement voltage
The gate supply voltage for which mask data output resistances
and currents are defined. The default value is 5 V. This parameter

1-50
CMOS XOR

is available when you select the Quadratic option for the Output
current-voltage relationship parameter.
Logic HIGH output resistance at zero current and at I_OH
A row vector [ R_OH1 R_OH2 ] of two resistance values. The
first value R_OH1 is the gradient of the output voltage-current
relationship when the gate is logic HIGH and there is no output
current. The second value R_OH2 is the gradient of the output
voltage-current relationship when the gate is logic HIGH and the
output current is I_OH. The default value is [ 25 250 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic HIGH output current I_OH when shorted to ground
The resulting current when the gate is in the logic HIGH state,
but the load forces the output voltage to zero. The default value is
63 mA. This parameter is available when you select the Quadratic
option for the Output current-voltage relationship parameter.
Logic LOW output resistance at zero current and at I_OL
A row vector [ R_OL1 R_OL2 ] of two resistance values. The
first value R_OL1 is the gradient of the output voltage-current
relationship when the gate is logic LOW and there is no output
current. The second value R_OL2 is the gradient of the output
voltage-current relationship when the gate is logic LOW and the
output current is I_OL. The default value is [ 30 800 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic LOW output current I_OL when shorted to Vcc
The resulting current when the gate is in the logic LOW state,
but the load forces the output voltage to the supply voltage Vcc.
The default value is -45 mA. This parameter is available when
you select the Quadratic option for the Output current-voltage
relationship parameter.
Propagation delay
Time it takes for the output to swing from LOW to HIGH or HIGH to
LOW after the input logic levels change. The default value is 25 ns.

1-51
CMOS XOR

Protection diode on resistance


The gradient of the voltage-current relationship for the protection
diodes when forward biased. The default value is 5 Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Protection diode forward voltage
The voltage above which the protection diode is turned on. The
default value is 0.6 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.

Initial Conditions Tab

Output initial state


Specify whether the initial output state of the block is High
or Low. This parameter is used for both linear and quadratic
output states, provided that the Propagation delay parameter
is greater than zero and the Solver Configuration block does not
have the Start simulation from steady state option selected.
The default value is Low.

Ports The block has the following ports:

A
Electrical input port
B
Electrical input port
J
Electrical output port

1-52
Comparator

Purpose Model a comparator behaviorally

Library Integrated Circuits

Description The Comparator block is an abstracted behavioral model of a comparator


integrated circuit. It does not model an internal transistor-level
implementation. Therefore, the block runs quickly during simulation
but retains the correct I/O behavior. The block models differential
inputs electrically as having infinite resistance and a finite or zero
capacitance.
The block models the gate output as a voltage source driving a series
resistor and a capacitor that connects to ground. The output pin
connects to the resistor-capacitor connection node. If the difference in
the inputs is greater than the input threshold voltage, then the output
is equal to the High level output voltage ( VOL ). Otherwise, the
output is equal to the Low level output voltage ( VOH ).

The output model is shown in the following illustration.

1-53
Comparator

Basic Modeling of the output as a controlled voltage source is representative


Assumptions of a totem-pole or push-pull output stage. To model a device with an
and open-collector:
Limitations
1 Connect the output pin to the base of an NPN Bipolar Transistor
or PNP Bipolar Transistor block.

2 Set the Output resistance parameter to a suitable value.

1-54
Comparator

Dialog
Box and
Parameters

• “Inputs Tab” on page 1-55


• “Outputs Tab” on page 1-55

Inputs Tab

Input offset voltage


The voltage which the difference in the input voltages must be
greater than so that the comparator gives a logic output 1. The
default value is 5 mV.
Average input capacitance
You can usually find this capacitance value on a manufacturer
datasheet. The default value is 0 pF. Setting this value to zero can
result in faster simulation times.

Outputs Tab

Low level output voltage


The steady-state output voltage, VOL , when the voltage difference
across the inputs is less than or equal to the threshold voltage,
and the output current is zero. The default value is 0 V.

1-55
Comparator

High level output voltage


The steady-state output voltage, VOH , when the voltage
difference across the inputs is greater than the threshold voltage,
and the output current is zero. The default value is 5 V.
Output resistance
This parameter is the ratio of output voltage drop to output
current. Set this parameter to (VOH − VOH 1 ) / IOH 1 , where VOH1
is the reduced output high voltage when the output current is
IOH1 . The default value is 50 Ω.
Propagation delay
Set this value based on the high-to-low and low-to-high
propagation delays. The default value is 0 s.

Ports This block has the following ports:

+
Positive electrical input port
-
Negative electrical input port
OUT
Electrical output port

See Also CMOS Buffer

1-56
Controlled PWM Voltage

Purpose Model pulse-width modulated voltage source

Library Drivers

Description The Controlled PWM Voltage block represents a pulse-width modulated


(PWM) voltage source that depends on the reference voltage Vref across
its +ref and -ref ports. The demanded duty cycle is

Vref − Vmin
100 * percent
Vmax − Vmin
where:

• Vmin is the minimum reference voltage


• Vmax is the maximum reference voltage

The value of the Output voltage amplitude parameter determines


amplitude of the output voltage.
At time zero, the pulse is initialized as high, unless the Pulse delay
time parameter is greater than zero, or the demanded duty cycle is zero.
You can use parameters Pulse delay time and Pulse width offset
to add a small turn-on delay and a small turn-off advance. This can be
useful when fine-tuning switching times so as to minimize switching
losses.
In PWM mode, the block has two options for the type of switching event
when moving between output high and output low states:

• Asynchronous Best for variable-step solvers —


Asynchronous events are better suited to variable step solvers,
because they require fewer simulation steps for the same level of
accuracy. In asynchronous mode the PWM switching events generate
zero crossings, and therefore switching times are always determined
accurately, regardless of the simulation maximum step size.

1-57
Controlled PWM Voltage

• Discrete time Best for fixed-step solvers — Discrete-time


events are better suited to fixed-step operation, because then the
switching events are always synchronized with the simulation step.
Using an asynchronous implementation with fixed-step solvers may
sometimes result in events being up to one simulation step late. For
more information, see “Simulating with Fixed Time Step — Local
and Global Fixed-Step Solvers”.

If you use a fixed-step or local solver and the discrete-time switching


event type, the following restrictions apply to the Sample time
parameter value:

• The sample time must be a multiple of the simulation step size.


• The sample time must be small compared to the PWM period, to
ensure sufficient resolution.

Basic The model is based on the following assumptions:


Assumptions
and • The REF output of this block is floating, it is not tied to the Electrical
Reference. One consequence of this is that if you connect the PWM
Limitations
and REF electrical ports directly to the H-Bridge PWM and REF
electrical ports, you must attach an Electrical Reference block to
the REF connection line.
• Do not use the Controlled PWM block to drive a motor block directly.
A PWM motor driver goes open circuit in between pulses. Use the
H-Bridge block to drive a motor block.
• When driving a motor via the H-Bridge block, set the Simulation
mode parameter to Averaged to speed up simulations. You must
also set the Simulation mode parameter of the H-Bridge block
to Averaged mode. This applies the average of the demanded
PWM voltage to the motor. The Averaged mode assumes that
the impedance of the motor inductive term is small at the PWM
frequency. To verify this assumption, run the simulation using
the PWM mode and compare the results to those obtained from using
the Averaged mode.

1-58
Controlled PWM Voltage

• If you are linearizing your model, set the Simulation mode


parameter to Averaged and ensure that you have specified the
operating point of the block correctly. You can only linearize the
block for inputs corresponding to a duty cycle greater than zero and
less than 100 percent.
• When you use this block in PWM mode with the Use local solver
option selected in the Solver Configuration block, set the Switching
event type parameter to Discrete time Best for fixed-step
solvers. Using the Asynchronous Best for variable-step
solvers option in this situation may produce inaccuracies, because
simulation with the local solver implies fixed step, and the PWM
events will not always coincide precisely with the simulation steps.
This results in PWM events sometimes occurring one simulation
step late.

1-59
Controlled PWM Voltage

Dialog
Box and
Parameters

PWM frequency
Frequency of the PWM output signal. The default value is 1000
Hz.
Pulse delay time
The pulse train does not start until the simulation time is equal to
the Pulse delay time. You can specify a small value for Pulse
delay time to fine-tune switching times and ensure that an
off-going device is fully off before the on-going device starts to
turn on. You can also use larger delay times, for example, if you
need the pulse train to start only after a number of cycles. The
value you provide must be greater than or equal to zero. This

1-60
Controlled PWM Voltage

parameter is only visible when you select PWM for the Simulation
mode parameter. The default value is 0 s.
Pulse width offset
The demanded pulse width as defined by the product of the
demanded duty cycle and one over the pulse frequency can be
offset by the value you provide for Pulse width offset. A positive
value acts to lengthen the pulse by a fixed amount. A negative
value acts to shorten the pulse. You can use this parameter, along
with the Pulse delay time, to fine-tune switching times so as
to minimize switching losses in some circuits. This parameter
is only visible when you select PWM for the Simulation mode
parameter. The default value is 0 s.
Input value Vmin for 0% duty cycle
Value of the input voltage at which the PWM signal has a 0% duty
cycle. The default value is 0 V.
Input value Vmax for 100% duty cycle
Value of the input voltage at which the PWM signal has a 100%
duty cycle. The default value is 5 V.
Output voltage amplitude
Amplitude of the PWM signal when the output is high. The
default value is 5 V.
Simulation mode
The type of output voltage can be PWM or Averaged. The default
mode, PWM, produces a pulse-width modulated signal. In Averaged
mode, the output is a constant whose value is equal to the average
value of the PWM signal.
Switching event type
This parameter is only visible when you select PWM for the
Simulation mode parameter. Select the switching event type
when moving between output high and output low states:
• Asynchronous Best for variable-step solvers —
This option is more efficient for desktop simulation with

1-61
Controlled PWM Voltage

variable-step solvers, because it requires fewer simulation


steps for the same level of accuracy. This is the default.
• Discrete time Best for fixed-step solvers — Use
with fixed-step solvers, including the local solver. For more
information, see “Simulating with Fixed Time Step — Local
and Global Fixed-Step Solvers”.
Sample time
The time between updates of the block output state. The sample
time must be a multiple of the simulation step size. In order for
the PWM control to have sufficient resolution, set the sample
time to less than one hundredth of the PWM period. (The PWM
period is one over the PWM frequency.) This parameter is only
visible when you select Discrete time Best for fixed-step
solvers for the Switching event type parameter. The default
value is 1e-6 s.

Ports The block has the following ports:

+ref
Positive electrical reference voltage
-ref
Negative electrical reference voltage
PWM
Pulse-width modulated signal
REF
Floating zero volt reference

Examples See the Linear Electrical Actuator (System-Level Model) and Linear
Electrical Actuator (Implementation Model) examples.

See Also Stepper Motor Driver

1-62
Crystal

Purpose Model stable resonator

Library Passive Devices

Description The Crystal block represents the electrical characteristics of a crystal.


The following figure shows the equivalent circuit model of the Crystal
block.

C0

C1 L1 R1

You specify the equivalent circuit parameters for this model when
you set the Parameterization parameter to Equivalent circuit
parameters.

• The capacitor C0 corresponds to the capacitance you specify in the


Shunt capacitance, C0 parameter.
• The capacitor C1 corresponds to the capacitance you specify in the
Motional capacitance, C1 parameter.
• The inductor L1 corresponds to the inductance you specify in the
Motional inductance, L1 parameter.
• The resistor R1 corresponds to the resistance you specify in the
Equivalent series resistance, R1 parameter.

Most datasheets specify crystal frequency rather than inductance, so


the block optionally accepts frequency data.

1-63
Crystal

• When you set the Parameterization parameter to Series


resonance data, the block uses the following relationship to
calculate L1 from the series resonant frequency:

1
fs =
2 L1C1
Where fs is the Series resonance, fs parameter value.
• When you set the Parameterization parameter to Parallel
resonance data, the block uses the following relationship to
calculate L1 from the parallel resonant frequency:

1
fa =
2 L1C1 ( C0 + CL ) /(C1 + C0 + CL )
Where:
- fa is the Parallel resonance, fa parameter value.
- CL is the Load capacitance, CL parameter value.

Some datasheets specify quality factor rather than equivalent series


resistance, so the block optionally accepts quality factor data. When you
set the R1 parameterization parameter to Quality factor Q, the
block uses the following relationship to calculate R1 from the quality
factor:

2 fL1
Q=
R1
Where Q is the Quality factor, Q parameter value.

Note The R1 parameterization parameter is only visible when you


select Series resonance data or Parallel resonance data for the
Parameterization parameter.

1-64
Crystal

Basic The Crystal block models only the fundamental crystal vibration mode.
Assumptions
and
Limitations

Dialog
Box and
Parameters

Parameterization
Select one of the following methods for block parameterization:
• Series resonance data — Provide series resonant frequency
and capacitance data for the crystal. This method is the default.
• Parallel resonance data — Provide parallel resonant
frequency and capacitance data for the crystal.
• Equivalent circuit parameters — Provide electrical
parameters for an equivalent circuit model of the crystal.

1-65
Crystal

Series resonance, fs
Crystal series resonant frequency. This parameter is only
visible when you select Series resonance data for the
Parameterization parameter. The default value is 32.764 kHz.
Parallel resonance, fa
Crystal parallel resonant frequency that corresponds to
operating with a parallel load capacitance specified by the Load
capacitance, CL parameter. This parameter is only visible when
you select Parallel resonance data for the Parameterization
parameter. The default value is 32.768 kHz.
Motional inductance, L1
Inductance that represents the mechanical mass of the crystal.
This parameter is only visible when you select Equivalent
circuit parameters for the Parameterization parameter. The
default value is 6.742e+03 H.
R1 parameterization
Select one of the following methods for series resistance
parameterization:
• Equivalent series resistance R1 — Provide the resistance
value directly. This is the default method.
• Quality factor Q — Provide the quality factor that the block
uses to calculate the resistance value.
This parameter is only visible when you select Series resonance
data or Parallel resonance data for the Parameterization
parameter.
Quality factor, Q
Crystal quality factor. This parameter is only visible when you
make one of the following selections:
• Series resonance data for the Parameterization parameter
and Quality factor Q for the R1 parameterization
parameter

1-66
Crystal

• Parallel resonance data for the Parameterization


parameter and Quality factor Q for the R1
parameterization parameter
The default value is 9e+04.
Equivalent series resistance, R1
Motional damping term. This parameter is only visible when you
make one of the following selections:
• Series resonance data for the Parameterization
parameter and Equivalent series resistance R1 for the R1
parameterization parameter
• Parallel resonance data for the Parameterization
parameter and Equivalent series resistance R1 for the R1
parameterization parameter
• Equivalent circuit parameters for the Parameterization
parameter
The default value is 15 kΩ.
Motional capacitance, C1
Capacitance that represents crystal mechanical stiffness under
load. The default value is 0.0035 pF.
Load capacitance, CL
Load capacitance that corresponds to the Parallel resonance,
fa parameter value. This parameter is only visible when you
select Parallel resonance data for the Parameterization
parameter. The default value is 12.5 pF.
Shunt capacitance, C0
Electrical capacitance between the two crystal electrical
connections. The parameter value must be greater than zero. The
default value is 1.6 pF.
Initial voltage
The output voltage at the start of the simulation when the output
current is zero. The default value is 0 V.

Ports The block has the following ports:

1-67
Crystal

+
Positive electrical port
-
Negative electrical port

1-68
Current-Controlled Switch

Purpose Model current-controlled switch with hysteresis

Library SPICE-Compatible Components/Passive Devices

Description The Current-Controlled Switch block represents the electrical


characteristics of a switch whose state is controlled by the current
through the input ports (the controlling current):

• When the controlling current is greater than the sum of the


Threshold current, IT and Hysteresis current, IH parameter
values, the switch is closed and has a resistance equal to the On
resistance, RON parameter value.
• When the controlling current is less than the Threshold current,
IT parameter value minus the Hysteresis current, IH parameter
value, the switch is open and has a resistance equal to the Off
resistance, ROFF parameter value.
• When the controlling current is greater than or less than the
Threshold current, IT parameter value by an amount less than or
equal to the Hysteresis current, IH parameter value, the current is
in the crossover region and the state of the switch remains unchanged.

Basic The block output resistance model is discontinuous during switching.


Assumptions The discontinuity might cause numerical issues. Try the following
and actions to resolve the issues:
Limitations
• Set the On resistance, RON and Off resistance, ROFF parameter
values to keep the ratio RON/ROFF as small as possible, and less
than 1e+12.
• Increase the Hysteresis current, IH parameter value to reduce
switch chatter.
• Decrease the Max step size parameter value (in the Configuration
Parameters block dialog box).

1-69
Current-Controlled Switch

Note This increases the simulation time.

Dialog
Box and
Parameters

Threshold current, IT
The current above which the block interprets the controlling
current as HIGH. The default value is 0 A.

Note The controlling current must differ from the threshold


current by at least the Hysteresis current, IH parameter value
to change the state of the switch.

Hysteresis current, IH
The amount by which the controlling current must exceed or fall
below the Threshold current, IT parameter value to change the
state of the switch. The default value is 0 A.

1-70
Current-Controlled Switch

On resistance, RON
The resistance of the switch when it is closed. The default value
is 1 Ω.
Off resistance, ROFF
The resistance of the switch when it is open. The default value
is 1e+12 Ω.
Initial switch state
Select one of the following options for the state of the switch at
the start of the simulation:
• On — The switch is initially closed and its resistance value is
equal to the On resistance, RON parameter value. This is
the default option.
• Off — The switch is initially open and its resistance value is
equal to the Off resistance, ROFF parameter value.

Ports The block has the following ports:

+
Positive electrical input and output ports.
-
Negative electrical input and output ports.

1-71
Current Source

Purpose Simulate current source with DC, AC, and noise components

Library Sources

Description The Current Source block implements a current source with DC, AC,
and noise components. The current flowing through the source from the
– terminal to the + terminal is given by:

i  iDC  iAC sin  2ft     iN

where:

• iDC is the steady-state DC current component.


• iAC is the amplitude of the AC current component.
• f is the frequency of the AC component.
• ϕ is the phase offset of the AC component.
• iN is the noise current.

You can configure your source as DC-only, AC-only, or a combination of


both. By default, both AC and DC components are set to 0. Define the
AC/DC current by specifying nonzero parameter values after placing
the block in your model.
The noise component is also optional. If you set the Noise mode
parameter to Enabled, then the added noise current is given by:

N  0, 1
iN  Pi 2
h

where:

• Pi is the single-sided noise power spectral density for a 1 ohm load,


in A^2/Hz.

1-72
Current Source

• N is a Gaussian random number with zero mean and standard


deviation of one.
• h is the sampling interval.

By default, the Noise mode parameter is set to Disabled, and the


current source generates no thermal noise.

Noise Options
The block generates Gaussian noise by using the Random Number
source in the Simscape Foundation library. You can control the random
number seed by setting the Repeatability parameter:

• Not repeatable — Every time you simulate your model, the block
resets the random seed using the MATLAB® random number
generator:

seed = randi(2^32-1);

• Repeatable — The block uses a hidden parameter, called auto_seed,


to always start the simulation with the same random number. The
value of auto_seed is set whenever you copy the Resistor block
from the block library to the model, or when you make a new copy
of the Resistor block from an existing one in a model. The block sets
the value using the MATLAB random number generator command
shown above.
• Specify seed — If you select this option, the additional Seed
parameter lets you directly specify the random number seed value.

Basic Simulating with noise enabled slows down simulation. Choose the
Assumptions sample time (h) so that noise is generated only at frequencies of interest,
and and not higher.
Limitations

1-73
Current Source

Dialog
Box and
Parameters

• “DC & AC Components Tab” on page 1-74


• “Noise Tab” on page 1-75

DC & AC Components Tab

DC current
The DC component of the output current. The default value is 0
A. Enter a nonzero value to add a DC component to the current
source.
AC current peak amplitude
Amplitude of the AC component of the output current. The default
value is 0 A. Enter a nonzero value to add an AC component to
the current source.
AC current phase shift
Phase offset of the AC component of the output current. The
default value is 0 degrees.
AC current frequency
Frequency of the AC component of the output current. The default
value is 60 Hz.

1-74
Current Source

Noise Tab

Noise mode
Select the noise option:
• Disabled — No noise is produced by the current source. This
is the default.
• Enabled — The current source generates thermal noise, and
the associated parameters become visible on the Noise tab.
Power spectral density
The single-sided spectrum noise power. Strictly-speaking, this is a
density function for the square of the current, commonly thought
of as a power into a 1 ohm load, and therefore units are A^2/Hz.
To avoid this unit ambiguity, some datasheets quote noise current
as a noise density with units of A/√Hz. In this case, you should
enter the square of the noise density quoted in the datasheet as
the parameter value. The default value is 0 A^2/Hz.
Sample time
Defines the rate at which the noise source is sampled. Choose
it to reflect the frequencies of interest in your model. Making
the sample time too small will unnecessarily slow down your
simulation. The default value is 1e-3 s.
Repeatability
Select the noise control option:
• Not repeatable — The random sequence used for noise
generation is not repeatable. This is the default.
• Repeatable — The random sequence used for noise generation
is repeatable, with a system-generated seed.
• Specify seed — The random sequence used for noise
generation is repeatable, and you control the seed by using the
Seed parameter.

1-75
Current Source

Seed
Random number seed used by the noise random number
generator. This parameter is visible only if you select Specify
seed for the Repeatability parameter. The default value is 0.

Ports The block has the following ports:

+
Positive electrical port
-
Negative electrical port

See Also Resistor | Voltage Source

1-76
DC Current Source

Purpose Model constant current source

Library SPICE-Compatible Components/Sources

Description The DC Current Source block represents a constant current source


whose output current value is independent of the voltage across its
terminals.
The block uses a small conductance internally to prevent numerical
simulation issues. The conductance connects the + and - ports of the
device and has a conductance GMIN:

• By default, GMIN matches the Minimum conductance GMIN


parameter of the SPICE Environment Parameters block, whose
default value is 1e–12.
• To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

Dialog
Box and
Parameters

Constant value, DC
The value of the DC output current. The default value is 0 A.

Ports The block has the following ports:

1-77
DC Current Source

+
Positive electrical voltage.
-
Negative electrical voltage.

See Also DC Voltage Source

1-78
DC Motor

Purpose DC motor model with electrical and torque characteristics

Library Rotational Actuators

Description The DC Motor block represents the electrical and torque characteristics
of a DC motor using the following equivalent circuit model:

L R i

+
vb V

You specify the equivalent circuit parameters for this model when
you set the Model parameterization parameter to By equivalent
circuit parameters. The resistor R corresponds to the resistance
you specify in the Armature resistance parameter. The inductor L
corresponds to the inductance you specify in the Armature inductance
parameter. The permanent magnets in the motor induce the following
back emf vb in the armature:

vb = kv
where kv is the Back-emf constant and ω is the angular velocity.
The motor produces the following torque, which is proportional to the
motor current i:

TE  kt i
where kt is the Torque constant. The DC Motor block assumes that
there are no electromagnetic losses. This means that mechanical power
is equal to the electrical power dissipated by the back emf in the
armature. Equating these two terms gives:

1-79
DC Motor

TE  vbi
kt i  kvi
k v  kt
As a result, you specify either kv or kt in the block dialog box.
The torque-speed characteristic for the DC Motor block is related to
the parameters in the preceding figure. When you set the Model
parameterization parameter to By stall torque & no-load speed
or By rated power, rated speed & no-load speed, the block solves
for the equivalent circuit parameters as follows:

1 For the steady-state torque-speed relationship, L has no effect.

2 Sum the voltages around the loop and rearrange for i:

V − vb V − kv
i= =
R R

3 Substitute this value of i into the equation for torque:

kt
TE  V  kv 
R

When you set the Model parameterization parameter to By stall


torque & no-load speed, the block uses the preceding equation to
determine values for R and kt (and equivalently kv).

When you set the Model parameterization parameter to By rated


power, rated speed & no-load speed, the block uses the rated
speed and power to calculate the rated torque. The block uses the
rated torque and no-load speed values in the preceding equation to
determine values for R and kt.

1-80
DC Motor

The block models motor inertia J and damping λ for all values of the
Model parameterization parameter. The resulting torque across
the block is:

kt
T V  kv   J   
R
It is not always possible to measure rotor damping, and rotor damping
is not always provided on a manufacturer datasheet. An alternative is
to use the no-load current to infer a value for rotor damping.
For no-load, the electrically-generated mechanical torque must equal
the rotor damping torque:

kt inoload  noload
where inoload is the no-load current. If you select By no-load current
for the Rotor damping parameterization parameter, then this
equation is used in addition to the torque-speed equation to determine
values for λ and the other equation coefficients.
The value for rotor damping, whether specified directly or in terms of
no-load current, is taken into account when determining equivalent
circuit parameters for Model parameterization options By stall
torque and no-load speed and By rated power, rated speed and
no-load speed.
When a positive current flows from the electrical + to - ports, a positive
torque acts from the mechanical C to R ports.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from
the context menu select Simscape block choices > Show thermal
port. This action displays the thermal port H on the block icon, and
adds the Temperature Dependence and Thermal port tabs to the
block dialog box.

1-81
DC Motor

Use the thermal port to simulate the effects of copper resistance losses
that convert electrical power to heat. For more information on using
thermal ports and on the Temperature Dependence and Thermal
port tab parameters, see “Simulating Thermal Effects in Rotational
and Translational Actuators”.

Dialog
Box and
Parameters

• “Electrical Torque Tab” on page 1-82


• “Mechanical Tab” on page 1-85

Electrical Torque Tab

Model parameterization
Select one of the following methods for block parameterization:

1-82
DC Motor

• By equivalent circuit parameters — Provide electrical


parameters for an equivalent circuit model of the motor. This
is the default method.
• By stall torque & no-load speed — Provide torque and
speed parameters that the block converts to an equivalent
circuit model of the motor.
• By rated power, rated speed & no-load speed — Provide
power and speed parameters that the block converts to an
equivalent circuit model of the motor.
Armature resistance
Resistance of the conducting portion of the motor. This parameter
is only visible when you select By equivalent circuit
parameters for the Model parameterization parameter. The
default value is 3.9 Ω.
Armature inductance
Inductance of the conducting portion of the motor. If you do
not have information about this inductance, set the value of
this parameter to a small, nonzero number. The default value
is 1.2e-05 H.
Define back-emf or torque constant
Indicate whether you will specify the motor’s back-emf constant
or torque constant. When you specify them in SI units, these
constants have the same value, so you only specify one or the
other in the block dialog box. This parameter is only visible when
you select By equivalent circuit parameters for the Model
parameterization parameter. The default value is Specify
back-emf constant.
Back-emf constant
The ratio of the voltage generated by the motor to the speed at
which the motor is spinning. The default value is 7.2e-05 V/rpm.
This parameter is only visible when you select Specify back-emf
constant for the Define back-emf or torque constant
parameter.

1-83
DC Motor

Torque constant
The ratio of the torque generated by the motor to the current
delivered to it. This parameter is only visible when you select
Specify torque constant for the Define back-emf or torque
constant parameter. The default value is 6.876e-04 N*m/A.
Stall torque
The amount of torque generated by the motor when the speed
is approximately zero. This parameter is only visible when
you select By stall torque & no-load speed for the Model
parameterization parameter. The default value is 2.4e-04
N*m.
No-load speed
Speed of the motor when not driving a load. This parameter
is only visible when you select By stall torque & no-load
speed or By rated power, rated speed & no-load speed for
the Model parameterization parameter. The default value is
1.91e+04 rpm.
Rated speed (at rated load)
Motor speed at the rated mechanical power level. This parameter
is only visible when you select By rated power, rated speed
& no-load speed for the Model parameterization parameter.
The default value is 1.5e+04 rpm.
Rated load (mechanical power)
The mechanical power the motor is designed to deliver at the
rated speed. This parameter is only visible when you select By
rated power, rated speed & no-load speed for the Model
parameterization parameter. The default value is 0.08 W.
Rated DC supply voltage
The voltage at which the motor is rated to operate. This
parameter is only visible when you select By stall torque &
no-load speed or By rated power, rated speed & no-load
speed for the Model parameterization parameter. The default
value is 1.5 V.

1-84
DC Motor

Rotor damping parameterization


Select one of the following methods to specify rotor damping:
• By damping value — Specify a value for rotor damping
directly, by using the Rotor damping parameter on the
Mechanical tab. This is the default.
• By no-load current — The block calculates rotor damping
based on the values that you specify for the No-load current
and DC supply voltage when measuring no-load current
parameters. If you select this option, the Rotor damping
parameter is not available on the Mechanical tab.
No-load current
Specify the no-load current value, to be used for calculating the
rotor damping. This parameter is only visible when you select By
no-load current for the Rotor damping parameterization
parameter. The default value is 0 A.
DC supply voltage when measuring no-load current
Specify the DC supply voltage corresponding to the no-load
current value, to be used for calculating the rotor damping. This
parameter is only visible when you select By no-load current
for the Rotor damping parameterization parameter. The
default value is 1.5 V.

Mechanical Tab

Rotor inertia
Resistance of the rotor to change in motor motion. The default
value is 0.01 g*cm2. The value can be zero.
Rotor damping
Energy dissipated by the rotor. This parameter is only visible
when you select By damping value for the Rotor damping
parameterization parameter on the Electrical tab. The default
value is 1e-08 N*m/(rad/s). The value can be zero.

1-85
DC Motor

Initial rotor speed


Speed of the rotor at the start of the simulation. The default
value is 0 rpm.

Ports The block has the following ports:

+
Positive electrical input
-
Negative electrical input
C
Mechanical rotational conserving port
R
Mechanical rotational conserving port

Examples See the following DC motor examples:

• Linear Electrical Actuator (Motor Model)


• Linear Electrical Actuator (System-Level Model)
• Linear Electrical Actuator (Implementation Model)

References [1] Bolton, W. Mechatronics: Electronic Control Systems in Mechanical


and Electrical Engineering, 3rd edition Pearson Education, 2004.

See Also Induction Motor | Servomotor | Shunt Motor | Universal Motor

1-86
DC Voltage Source

Purpose Model constant voltage source

Library SPICE-Compatible Components/Sources

Description The DC Voltage Source block represents a constant voltage source whose
output voltage value is independent of the current through the source.

Dialog
Box and
Parameters

Constant value, DC
The value of the DC output voltage. The default value is 0 V.

Ports The block has the following ports:

+
Positive electrical voltage.
-
Negative electrical voltage.

See Also DC Current Source

1-87
DC-DC Converter

Purpose Behavioral model of power converter

Library Sources

Description The DC-DC Converter block represents a behavioral model of a power


converter. This power converter regulates voltage on the load side, and
the required amount of power is drawn from the supply side so as to
balance input power, output power, and losses. Optionally the converter
can support regenerative power flow from load to supply.
The following circuit illustrates the behavior of the converter.

The Pfixed component draws a constant power, and corresponds to


converter losses that are independent of load current. The power drawn
is set by the Fixed converter losses independent of loading
parameter value. The resistor Rout corresponds to losses that increase
with load current, and is determined from the value you specify for the
Percentage efficiency at rated output power parameter.
The voltage source is defined by the following equation:

v = vref – iloadD + iloadRout

1-88
DC-DC Converter

where:

• vref is the load side voltage set point, as defined by the value you
specify for the Output voltage reference demand parameter.
• D is the value you specify for the Output voltage droop with
output current parameter. Having a separate value for droop
makes control of how output voltage varies with load independent
of load-dependent losses.

The current source value i is calculated so that the power flowing in


to the converter equals the sum of the power flowing out plus the
converter losses.
If the voltage presented by the load is higher than the converter
output voltage reference demand, then power will flow from the
load to the converter. If you set the Power direction parameter to
Unidirectional power flow from supply to regulated side, then
the power is absorbed by the converter, and the current source current i
is zero. If you set the Power direction parameter to Bidirectional
power flow, then the power is transmitted to the supply side, and
i becomes negative.
Optionally the block can include voltage regulation dynamics. If
you select Specify voltage regulation time constant for the
Dynamics parameter, then a first-order lag is added to the equation
defining the voltage source value. With the dynamics enabled, a step
change in load results in a transient change in output voltage, the time
constant being defined by the Voltage regulation time constant
parameter.

Basic The model is based on the following assumptions:


Assumptions
and • The two electrical networks connected to the supply-side and
regulated-side terminals must each have their own Electrical
Limitations
Reference block.
• The supply-side equation defines a power constraint on the product
of the voltage (vs) and the current (is). For simulation, the solver

1-89
DC-DC Converter

must be able to uniquely determine vs. To ensure that the solution is


unique, the block implements two assertions:
- vs > 0
- is < imax
The first assertion ensures that the sign of vs is uniquely defined.
The second deals with the case when the voltage supply to the block
has a series resistance. When there is a series resistance, there
are two possible steady-state solutions for is that satisfy the power
constraint, the one with the smaller magnitude being the desired one.
You should set the value for the Maximum expected supply-side
current parameter (imax) to be larger than the expected maximum
current. This will ensure that when the model is initialized the initial
current does not start at the undesired solution.

Dialog
Box and
Parameters

• “Main Tab” on page 1-91

1-90
DC-DC Converter

• “Losses Tab” on page 1-91


• “Dynamics Tab” on page 1-92

Main Tab

Output voltage reference demand


The set point for the voltage regulator, and the output voltage
value when there is no output current. The default value is 10 V.
Output voltage droop with output current
The number of volts that the output voltage will drop from the set
point for an output current of 1 A. The default value is 0.1 V/A.
Power direction
Select one of the following methods for the direction of power
conversion:
• Unidirectional power flow from supply to regulated
side — Most small power regulators are unidirectional. This is
the default option.
• Bidirectional power flow — Larger power converters can be
bidirectional, for example, converters used in electric vehicles
to allow regenerative braking
Maximum expected supply-side current
Set this value to a value greater than the maximum expected
supply-side current in your model. Using twice the expected
maximum current is generally sufficient. For more information,
see “Basic Assumptions and Limitations” on page 1-89. The
default value is 2 A.

Losses Tab

Rated output power


The output power for which the percentage efficiency value is
given. The default value is 10 W.

1-91
DC-DC Converter

Percentage efficiency at rated output power


The efficiency as defined by 100 times the output load power
divided by the input supply power. The default value is 80 percent.
Fixed converter losses independent of loading
The power drawn by the Pfixed component in the equivalent
circuit diagram, which corresponds to converter losses that are
independent of load current. The default value is 1 W.

Dynamics Tab

Dynamics
Specify whether to include voltage regulation dynamics:
• No dynamics — Do not consider the voltage regulation
dynamics. This is the default option.
• Specify voltage regulation time constant — Add a
first-order lag to the equation defining the voltage source value.
With the dynamics enabled, a step change in load results in a
transient change in output voltage.
Voltage regulation time constant
The time constant associated with voltage transients when the
load current is stepped. This parameter is only visible when you
select Specify voltage regulation time constant for the
Dynamics parameter. The default value is 0.02 s.
Initial output voltage demand
This is the value of vref at time zero. Normally, vref is defined by
the Output voltage reference demand parameter. However,
if you want to initialize the model with no transients when
delivering a steady-state load current, you can set the initial vref
value by using this parameter, and increase it accordingly to
take account of output resistance and droop. This parameter is
only visible when you select Specify voltage regulation time
constant for the Dynamics parameter. The default value is 10 V.

Ports The block has four electrical conserving ports. Polarity is indicated
by the + and - signs.

1-92
Diode

Purpose Diode model; piecewise linear, piecewise linear zener, or exponential


diode

Library Semiconductor Devices

Description The Diode block represents one of the following types of diodes:

• “Piecewise Linear” on page 1-93


• “Piecewise Linear Zener” on page 1-93
• “Exponential” on page 1-94

Piecewise Linear
The piecewise linear diode model is the same model found in the
Simscape Diode block, with the addition of a fixed junction capacitance.
If the diode forward voltage exceeds the value specified in the Forward
voltage parameter, the diode behaves as a linear resistor with the
resistance specified in the On resistance parameter. Otherwise, the
diode behaves as a linear resistor with the small conductance specified
in the Off conductance parameter. Zero voltage across the diode
results in zero current flowing.

Piecewise Linear Zener


The piecewise linear zener diode model behaves like the piecewise
linear diode model for bias voltages above –Vz, where Vz is the Reverse
breakdown voltage Vz parameter value. For voltages less than –Vz,
the diode behaves as a linear resistor with the low Zener resistance
specified in the Zener resistance Rz parameter. This diode model also
includes a fixed junction capacitance.

Note The Reverse breakdown voltage Vz parameter is defined


as a positive number. The p-n voltage at breakdown is –Vz, which is
negative.

1-93
Diode

Exponential
The exponential diode model provides the following relationship
between the diode current I and the diode voltage V:

 qV 
I  IS   e NkTm1  1  V   BV
 
 
  q(V  Vz) qV 

I   IS   e kTm1
e NkTm1  V   BV

 
 
where:

• q is the elementary charge on an electron (1.602176e–19 Coulombs).


• k is the Boltzmann constant (1.3806503e–23 J/K).
• BV is the Reverse breakdown voltage BV parameter value.
• N is the emission coefficient.
• IS is the saturation current.
• Tm1 is the temperature at which the diode parameters are specified,
as defined by the Measurement temperature parameter value.

qV
When (qV / NkTm1) > 80, the block replaces e NkTm1with (qV / NkTm1 –
79)e80, which matches the gradient of the diode current at (qV / NkTm1)
= 80 and extrapolates linearly. When (qV / NkTm1) < –79, the block
qV
replaces e NkTm1 with (qV / NkTm1 + 80)e–79, which also matches the
gradient and extrapolates linearly. Typical electrical circuits do not
reach these extreme values. The block provides this linear extrapolation
to help convergence when solving for the constraints during simulation.
When you select Use parameters IS and N for the Parameterization
parameter, you specify the diode in terms of the Saturation current

1-94
Diode

IS and Emission coefficient N parameters. When you select Use I-V


curve data points for the Parameterization parameter, you specify
two voltage and current measurement points on the diode I-V curve
and the block derives the IS and N values. The block then calculates
IS and N as follows:

• N = ((V1 − V2 ) / Vt ) /(log( I1 ) − log( I 2 ))

• IS = ( I1 /(exp(V1 /( NVt )) − 1) + I 2 /(exp(V2 /( NVt )) − 1) ) / 2


where:

• Vt = kTm1 / q.
• V1 and V2 are the values in the Voltages [V1 V2] vector.
• I1 and I2 are the values in the Currents [I1 I2] vector.

When you select Use an I-V data point and IS for the
Parameterization parameter, then the block calculates N as follows:

⎛ ⎛I ⎞⎞
N = V1 / ⎜ Vt log ⎜ 1 + 1 ⎟ ⎟
⎝ ⎝ IS ⎠⎠

When you select Use an I-V data point and N for the
Parameterization parameter, then the block calculates IS as follows:

(
IS = I1 / exp ( V1 / ( NVt ) − 1) )
The exponential diode model provides the option to include a junction
capacitance:

• When you select Include fixed or zero junction capacitance


for the Junction capacitance parameter, the capacitance is fixed.
• When you select Use parameters CJO, VJ, M & FC for the
Junction capacitance parameter, the block uses the coefficients

1-95
Diode

CJO, VJ, M, and FC to calculate a junction capacitance that depends


on the junction voltage.
• When you select Use C-V curve data points for the Junction
capacitance parameter, the block uses three capacitance values
on the C-V capacitance curve to estimate CJO, VJ, and M and
uses these values with the specified value of FC to calculate a
junction capacitance that depends on the junction voltage. The block
calculates CJO, VJ, and M as follows:

- CJ 0 = C1 ((VR 2 − VR1 ) /(VR 2 − VR1 (C2 / C1 )−1/ M )) M


- VJ = −(−VR 2 (C1 / C2 )−1/ M + VR1 ) /(1 − (C1 / C2 )−1/ M )
- M = log(C3 / C2 ) / log(VR 2 / VR 3 )
where:
- VR1, VR2, and VR3 are the values in the Reverse bias voltages
[VR1 VR2 VR3] vector.
- C1, C2, and C3 are the values in the Corresponding capacitances
[C1 C2 C3] vector.
It is not possible to estimate FC reliably from tabulated data, so
you must specify its value using the Capacitance coefficient FC
parameter. In the absence of suitable data for this parameter, use a
typical value of 0.5.
The reverse bias voltages (defined as positive values) should satisfy
VR3 > VR2 > VR1. This means that the capacitances should satisfy
C1 > C2 > C3 as reverse bias widens the depletion region and hence
reduces capacitance. Violating these inequalities results in an error.
Voltages VR2 and VR3 should be well away from the Junction potential
VJ. Voltage VR1 should be less than the Junction potential VJ, with a
typical value for VR1 being 0.1 V.

The voltage-dependent junction is defined in terms of the capacitor


charge storage Qj as:

• For V < FC·VJ:

1-96
Diode

Q j  CJ 0  (VJ / ( M  1))  ((1  V / VJ )1 M  1)

• For V ≥ FC·VJ:

Q j  CJ 0  F1  (CJ 0 / F2 )  ( F3  (V  FC  VJ )  0.5( M / VJ )  (V 2  ( FC  VJ ) 2

where:

• F1  (VJ / (1  M ))  (1  (1  FC )1 M ))

• F2  (1  FC )1 M ))

• F3  1  FC  (1  M )

These equations are the same as used in [2], except that the temperature
dependence of VJ and FC is not modeled. This model does not include
the diffusion capacitance term that affects performance for high
frequency switching applications.
Modeling Charge
For applications such as commutation diodes it can be important to
model diode charge dynamics. When a forward-biased diode has a
reverse voltage applied across it, it takes time for the charge to dissipate
and hence for the diode to turn off. The time taken for the diode to
turn off is captured primarily by the transit time parameter. Once the
diode is off, any remaining charge then dissipates, the rate at which this
happens being determined by the carrier lifetime.
The Diode block uses the model of Lauritzen and Ma [3] to capture
these effects. The three defining equations are:

qE  qM
I
TT

1-97
Diode

dqM qM qE  qM
  0
dt  TT

  V  
qE     TT  IS  exp    1 

  N  Vt  

where:

• I is the diode current.


• V is the diode voltage.
• N is the emission coefficient.
• qE is the junction charge.
• qM is the total stored charge.
• TT is the transit time.
• τ is the carrier lifetime.

Datasheets do not typically provide values for TT and τ. Therefore the


Diode block provides an alternative parameterization in terms of Peak
reverse current, Irrm and Reverse recovery time, trr. Equivalent
values for TT and τ are calculated from these values, plus information
on the initial forward current and rate of change of current used in the
test circuit when measuring Irrm and trr. The test circuit can consist of
a series voltage source, resistor, inductor and the diode. The polarity
of the voltage source is switched so as to move the diode from forward
conduction to reverse biased. The following figure shows an idealized
diode current response.

1-98
Diode

The value of the series resistor and applied voltage value determine the
initial current IF. The value of the series inductance and the applied
reverse voltage value determine the current gradient, a.
The precise values of peak reverse current and reverse recovery time
depend on the test circuit used. Also, junction capacitance has some
effect on the current recovery characteristic. However, a junction
capacitor value that dominates the response is physically unrealistic.
Only the exponential diode supports modeling of the diode charge
dynamics. If you select the Exponential for the Diode model
parameter, then the Capacitance tab contains an additional parameter
called Charge dynamics. Select between the three options:

• Do not model charge dynamics


• Use peak reverse current and reverse recovery time
• Use transit time and carrier lifetime

1-99
Diode

Modeling Temperature Dependence


The default behavior for the Diode is that dependence on temperature
is not modeled, and the device is simulated at the temperature for
which you provide block parameters. The Exponential diode model
contains several options for modeling the dependence of the diode
current-voltage relationship on the temperature during simulation.
Temperature dependence of the junction capacitance is not modeled,
this being a much smaller effect.
When including temperature dependence, the diode defining equation
remains the same. The measurement temperature value, Tm1, is
replaced with the simulation temperature, Ts. The saturation current,
IS, becomes a function of temperature according to the following
equation:

 EG 
ISTs  ISTm1  (Ts / Tm1 ) XTI / N  exp   (1  Ts / Tm1 ) 
 NkTs 
where:

• Tm1 is the temperature at which the diode parameters are specified,


as defined by the Measurement temperature parameter value.
• Ts is the simulation temperature.
• ISTm1 is the saturation current at measurement temperature.
• ISTs is the saturation current at simulation temperature. This is the
saturation current value used in the standard diode equation when
temperature dependence is modeled.
• EG is the energy gap for the semiconductor type measured in Joules.
The value for silicon is usually taken to be 1.11 eV, where 1 eV is
1.602e-19 Joules.
• XTI is the saturation current temperature exponent. This is usually
set to 3.0 for pn-junction diodes, and 2.0 for Schottky barrier diodes.
• N is the emission coefficient.

1-100
Diode

• k is the Boltzmann constant (1.3806503e–23 J/K).

Appropriate values for XTI and EG depend on the type of diode and the
semiconductor material used. Default values for particular material
types and diode types capture approximate behavior with temperature.
The block provides default values for common types of diode.
In practice, the values of XTI and EG need tuning to model the exact
behavior of a particular diode. Some manufacturers quote these tuned
values in a SPICE Netlist, and you can read off the appropriate values.
Otherwise you can determine improved estimates for EG by using a
datasheet-defined current-voltage data point at a higher temperature.
The block provides a parameterization option for this. It also gives the
option of specifying the saturation current at a higher temperature
ISTm2 directly.
You can also tune the values of XTI and EG yourself, to match
lab data for your particular device. You can use Simulink® Design
Optimization™ software to help tune the values for XTI and EG.

Caution Device temperature behavior is also dependent on the


emission coefficient. An inappropriate value for the emission coefficient
can give incorrect temperature dependence, because saturation current
is a function of the ratio of EG to N.

If defining a finite reverse breakdown voltage BV, then the value of


the reverse breakdown voltage is modulated by the reverse breakdown
temperature coefficient TCV (specified using the Reverse breakdown
voltage temperature coefficient, dBV/dT parameter):

BVTs = BVTm1 – TCV· (Ts – Tm1)

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from the
context menu select Simscape block choices > Show thermal port.

1-101
Diode

This action displays the thermal port H on the block icon, and adds the
Thermal port tab to the block dialog box.
Use the thermal port to simulate the effects of generated heat and
device temperature. For more information on using thermal ports and
on the Thermal port tab parameters, see “Simulating Thermal Effects
in Semiconductors”.

Basic The Exponential diode model has the following limitations:


Assumptions
and • When you select Use I-V curve data points for the
Parameterization parameter, choose a pair of voltages near the
Limitations
diode turn-on voltage. Typically, this is in the range from 0.05 to
1 Volt. Using values outside of this region may lead to numerical
issues and poor estimates for IS and N.
• The block does not account for temperature-dependent effects on
the junction capacitance.
• You may need to use nonzero ohmic resistance and junction
capacitance values to prevent numerical simulation issues, but the
simulation may run faster with these values set to zero.

1-102
Diode

Dialog
Box and
Parameters

• “Main Tab” on page 1-103


• “Reverse Breakdown Tab” on page 1-106
• “Ohmic Resistance Tab” on page 1-107
• “Capacitance Tab” on page 1-107
• “Temperature Dependence Tab” on page 1-110

Main Tab

Diode model
Select one of the following diode models:

1-103
Diode

• Piecewise Linear (Foundation Library) — Use a piecewise


linear model for the diode, as described in “Piecewise Linear”
on page 1-93. This is the default method.
• Piecewise Linear Zener — Use a piecewise linear model with
reverse breakdown characteristics for the diode, as described in
“Piecewise Linear Zener” on page 1-93.
• Exponential — Use a standard exponential model for the
diode, as described in “Exponential” on page 1-94.
Forward voltage
Minimum voltage that needs to be applied for the diode to
become forward-biased. This parameter is only visible when you
select Piecewise Linear (Foundation Library) or Piecewise
Linear Zener for the Diode model parameter. The default
value is 0.6 V.
On resistance
The resistance of the diode when it is forward biased. This
parameter is only visible when you select Piecewise Linear
(Foundation Library) or Piecewise Linear Zener for the
Diode model parameter. The default value is 0.3 Ω.
Off conductance
The conductance of the diode when it is reverse biased. This
parameter is only visible when you select Piecewise Linear
(Foundation Library) or Piecewise Linear Zener for the
Diode model parameter. The default value is 1e-08 1/Ω.
Parameterization
Select one of the following methods for model parameterization:
• Use two I-V curve data points — Specify measured data at
two points on the diode I-V curve. This is the default method.
• Use parameters IS and N — Specify saturation current and
emission coefficient.

1-104
Diode

• Use an I-V data point and IS — Specify measured data at


a single point on the diode I-V curve in combination with the
saturation current.
• Use an I-V data point and N — Specify measured data at
a single point on the diode I-V curve in combination with the
emission coefficient.

This parameter is only visible when you select Exponential for


the Diode model parameter.
Currents [I1 I2]
A vector of the current values at the two points on the diode I-V
curve that the block uses to calculate IS and N. This parameter
is only visible when you select Exponential for the Diode
model parameter and Use two I-V curve data points for the
Parameterization parameter. The default value is [ 0.0137
0.545 ] A.
Voltages [V1 V2]
A vector of the voltage values at the two points on the diode I-V
curve that the block uses to calculate IS and N. This parameter
is only visible when you select Exponential for the Diode
model parameter and Use two I-V curve data points for the
Parameterization parameter. The default value is [ 0.6 0.7
] V.
Current I1
A current value at the point on the diode I-V curve that the block
uses for calculations. This parameter is only visible when you
select Exponential for the Diode model parameter and either
Use an I-V data point and IS or Use an I-V data point
and N for the Parameterization parameter. Depending on
the Parameterization value, the block uses this parameter to
calculate either N or IS. The default value is 0.07 A.
Voltage V1
A voltage value at the point on the diode I-V curve that the block
uses for calculations. This parameter is only visible when you

1-105
Diode

select Exponential for the Diode model parameter and either


Use an I-V data point and IS or Use an I-V data point
and N for the Parameterization parameter. Depending on
the Parameterization value, the block uses this parameter to
calculate either N or IS. The default value is 0.7 V.
Saturation current IS
The magnitude of the current that the ideal diode equation
approaches asymptotically for very large reverse bias levels. This
parameter is only visible when you select Exponential for the
Diode model parameter and either Use parameters IS and N
or Use an I-V data point and IS for the Parameterization
parameter. The default value is 1e-14 A.
Measurement temperature
The temperature Tm1 at which IS or the I-V curve was measured.
This parameter is only visible when you select Exponential for
the Diode model parameter. The default value is 25 °C.
Emission coefficient N
The diode emission coefficient or ideality factor. This parameter
is only visible when you select Exponential for the Diode model
parameter and either Use parameters IS and N or Use an I-V
data point and N for the Parameterization parameter. The
default value is 1.

Reverse Breakdown Tab

Zener resistance Rz
The resistance of the diode when the voltage is less than the
Reverse breakdown voltage Vz value. This parameter is only
visible when you select Piecewise Linear Zener for the Diode
model parameter. The default value is 0.3 Ω.
Reverse breakdown voltage Vz
The reverse voltage below which the diode resistance changes to
the Zener resistance Rz value. This parameter is only visible
when you select Piecewise Linear Zener for the Diode model
parameter. The default value is 50 V.

1-106
Diode

Reverse breakdown voltage BV


The reverse voltage below which to model the rapid increase in
conductance that occurs at diode breakdown. This parameter is
only visible when you select Exponential for the Diode model
parameter. The default value is Inf V, which effectively omits
reverse breakdown from the model.

Ohmic Resistance Tab

Ohmic resistance RS
The series diode connection resistance. This parameter is only
visible when you select Exponential for the Diode model
parameter. The default value is 0.01 Ω.

Capacitance Tab

Junction capacitance
• When you select Piecewise Linear (Foundation Library)
or Piecewise Linear Zener for the Diode model parameter,
the Junction capacitance parameter is the fixed junction
capacitance value. The default value is 5 pF.
• When you select Exponential for the Diode model parameter,
the Junction capacitance parameter lets you select one of
the following options for modeling the junction capacitance:
— Include fixed or zero junction capacitance — Model
the junction capacitance as a fixed value.
— Use C-V curve data points — Specify measured data at
three points on the diode C-V curve.
— Use parameters CJ0, VJ, M & FC — Specify zero-bias
junction capacitance, junction potential, grading coefficient,
and forward-bias depletion capacitance coefficient.
Zero-bias junction capacitance CJ0
The value of the capacitance placed in parallel with the
exponential diode term. This parameter is only visible when you
select Exponential for the Diode model parameter and Include

1-107
Diode

fixed or zero junction capacitance or Use parameters


CJ0, VJ, M & FC for the Junction capacitance parameter.
The default value is 5 pF.
Reverse bias voltages [VR1 VR2 VR3]
A vector of the reverse bias voltage values at the three points on
the diode C-V curve that the block uses to calculate CJ0, VJ, and
M. This parameter is only visible when you select Exponential for
the Diode model parameter and Use C-V curve data points
for the Junction capacitance parameter. The default value is [
0.1 10 100 ] V.
Corresponding capacitances [C1 C2 C3]
A vector of the capacitance values at the three points on the diode
C-V curve that the block uses to calculate CJ0, VJ, and M. This
parameter is only visible when you select Exponential for the
Diode model parameter and Use C-V curve data points for
the Junction capacitance parameter. The default value is [
3.5 1 0.4 ] pF.
Junction potential VJ
The junction potential. This parameter is only visible when you
select Exponential for the Diode model parameter and Use
parameters CJ0, VJ, M & FC for the Junction capacitance
parameter. The default value is 1 V.
Grading coefficient M
The grading coefficient. This parameter is only visible when you
select Exponential for the Diode model parameter and Use
parameters CJ0, VJ, M & FC for the Junction capacitance
parameter. The default value is 0.5.
Capacitance coefficient FC
Fitting coefficient that quantifies the decrease of the depletion
capacitance with applied voltage. This parameter is only visible
when you select Exponential for the Diode model parameter
and Use C-V curve data points or Use parameters CJ0, VJ,
M & FC for the Junction capacitance parameter. The default
value is 0.5.

1-108
Diode

Charge model
Select one of the following methods for charge dynamics
parameterization:
• Do not model charge dynamics — Do not include charge
dynamics modeling. This is the default method.
• Use peak reverse current and reverse recovery time —
Model charge dynamics by providing values for peak reverse
current, Irrm, and reverse recovery time, trr, plus information
on the initial forward current and rate of change of current
used in the test circuit when measuring Irrm and trr. Use this
option if the manufacturer datasheet does not provide values
for transit time, TT, and carrier lifetime, τ.
• Use transit time and carrier lifetime — Model charge
dynamics by providing values for transit time, TT, and carrier
lifetime, τ.
Peak reverse current, Irrm
The peak reverse current measured in a test circuit. This
parameter is only visible when you select Exponential for the
Diode model parameter and Use peak reverse current and
reverse recovery time for the Charge model parameter. The
default value is 7.15 A.
Starting forward current when measuring Irrm
The initial forward current when measuring peak reverse current.
This parameter is only visible when you select Exponential for
the Diode model parameter and Use peak reverse current
and reverse recovery time for the Charge model parameter.
The default value is 4 A.
Rate of change of current when measuring Irrm
The rate of change of current when measuring peak reverse
current. This parameter is only visible when you select
Exponential for the Diode model parameter and Use peak
reverse current and reverse recovery time for the Charge
model parameter. The default value is -750 A/us.

1-109
Diode

Reverse recovery time, trr


The time between the point where the current initially goes to
zero when the diode turns off, and the point where the current
falls to less than ten percent of the peak reverse current. This
parameter is only visible when you select Exponential for the
Diode model parameter and Use peak reverse current and
reverse recovery time for the Charge model parameter. The
default value is 115 ns.
Transit time, TT
A measure of how long it takes carriers to cross the diode junction.
This parameter is only visible when you select Exponential
for the Diode model parameter and Use transit time and
carrier lifetime for the Charge model parameter. The
default value is 50 ns.
Carrier lifetime, tau
A measure of how long it takes for the carriers to dissipate once
the diode is no longer conducting. This parameter is only visible
when you select Exponential for the Diode model parameter
and Use transit time and carrier lifetime for the Charge
model parameter. The default value is 100 ns.

Temperature Dependence Tab


This tab is applicable for Exponential diode models only.

Parameterization
Select one of the following methods for temperature dependence
parameterization:
• None Simulate at parameter measurement temperature
— Temperature dependence is not modeled, or the model is
simulated at the measurement temperature Tm1 (as specified
by the Measurement temperature parameter on the Main
tab). This is the default method.
• Use an I-V data point at second measurement
temperature — If you select this option, you specify a second
measurement temperature Tm2, and the current and voltage

1-110
Diode

values at this temperature. The model uses these values,


along with the parameter values at the first measurement
temperature Tm1, to calculate the energy gap value.
• Specify saturation current at second measurement
temperature — If you select this option, you specify a second
measurement temperature Tm2, and saturation current value
at this temperature. The model uses these values, along with
the parameter values at the first measurement temperature
Tm1, to calculate the energy gap value.
• Specify the energy gap, EG — Specify the energy gap value
directly.
Current I1 at second measurement temperature
Specify the diode current I1 value when the voltage is V1
at the second measurement temperature. This parameter
is only visible when you select Use an I-V data point at
second measurement temperature for the Parameterization
parameter. The default value is 0.245 A.
Voltage V1 at second measurement temperature
Specify the diode voltage V1 value when the current is I1
at the second measurement temperature. This parameter
is only visible when you select Use an I-V data point at
second measurement temperature for the Parameterization
parameter. The default value is 0.5 V.
Saturation current, IS, at second measurement temperature
Specify the saturation current IS value at the second measurement
temperature. This parameter is only visible when you select
Specify saturation current at second measurement
temperature for the Parameterization parameter. The default
value is 1.25e-7 A.
Second measurement temperature
Specify the value for the second measurement temperature. This
parameter is only visible when you select either Use an I-V
data point at second measurement temperature or Specify

1-111
Diode

saturation current at second measurement temperature for


the Parameterization parameter. The default value is 125 C.
Energy gap parameterization
This parameter is only visible when you select Specify the
energy gap, EG for the Parameterization parameter. It lets
you select a value for the energy gap from a list of predetermined
options, or specify a custom value:
• Use nominal value for silicon (EG=1.11eV) — This is
the default.
• Use nominal value for 4H-SiC silicon carbide
(EG=3.23eV)
• Use nominal value for 6H-SiC silicon carbide
(EG=3.00eV)
• Use nominal value for germanium (EG=0.67eV)
• Use nominal value for gallium arsenide (EG=1.43eV)
• Use nominal value for selenium (EG=1.74eV)
• Use nominal value for Schottky barrier diodes
(EG=0.69eV)
• Specify a custom value — If you select this option, the
Energy gap, EG parameter appears in the dialog box, to let
you specify a custom value for EG.
Energy gap, EG
Specify a custom value for the energy gap, EG. This parameter
is only visible when you select Specify a custom value for the
Energy gap parameterization parameter. The default value
is 1.11 eV.
Saturation current temperature exponent parameterization
Select one of the following options to specify the saturation
current temperature exponent value:
• Use nominal value for pn-junction diode (XTI=3) —
This is the default.

1-112
Diode

• Use nominal value for Schottky barrier diode (XTI=2)


• Specify a custom value — If you select this option, the
Saturation current temperature exponent, XTI parameter
appears in the dialog box, to let you specify a custom value
for XTI.
Saturation current temperature exponent, XTI
Specify a custom value for the saturation current temperature
exponent, XTI. This parameter is only visible when you
select Specify a custom value for the Saturation current
temperature exponent parameterization parameter. The
default value is 3.
Reverse breakdown voltage temperature coefficient, dBV/dT
This coefficient modulates the reverse breakdown voltage BV.
If you define the reverse breakdown voltage BV as a positive
quantity, a positive value for TCV implies that the magnitude of
the reverse breakdown voltage decreases with temperature. The
default value is 0 V/K.
Device simulation temperature
Specify the value for the temperature Ts, at which the device is
to be simulated. The default value is 25 C.

Ports The block has the following ports:

+
Electrical conserving port associated with the diode positive
terminal
-
Electrical conserving port associated with the diode negative
terminal

References [1] MH. Ahmed and P.J. Spreadbury. Analogue and digital electronics
for engineers. 2nd Edition, Cambridge University Press, 1984.

1-113
Diode

[2] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993.

[3] Lauritzen, P.O. and C.L. Ma. “A Simple Diode Model with Reverse
Recovery.” IEEE® Transactions on Power Electronics. Vol. 6, No. 2,
April 1991.

1-114
DPDT Switch

Purpose Model double-pole double-throw switch

Library Passive Devices/Switches

Description The DPDT Switch block models a double-pole double-throw switch:

• When the switch is closed, ports c1 and c2 are connected to ports


s12 and s22, respectively.
• When the switch is open, ports c1 and c2 are connected to ports s11
and s21, respectively.

Closed connections are modeled by a resistor with value equal to the


Closed resistance parameter value. Open connections are modeled by
a resistor with value equal to the reciprocal of the Open conductance
parameter value.
The switch is closed if the voltage presented at the vT control port
exceeds the value of the Threshold parameter.
Optionally, you can add a delay between the point at which the voltage
at vT passes the threshold and the switch opening or closing. To enable
the delay, on the Dynamics tab, set the Model dynamics parameter
to Model turn-on and turn-off times.

1-115
DPDT Switch

Dialog
Box and
Parameters

• “Main Tab” on page 1-116


• “Dynamics Tab” on page 1-116

Main Tab

Closed resistance
Resistance between the c and s electrical ports when the switch is
closed. The value must be greater than zero. The default value
is 0.01 Ω.
Open conductance
Conductance between the c and s electrical ports when the switch
is open. The value must be greater than zero. The default value
is 1e-6 S.
Threshold
The threshold voltage for the control physical signal input vT
above which the switch will turn on. The default value is 0 V.

Dynamics Tab

Model dynamics
Select whether the block models a switching delay:

1-116
DPDT Switch

• No dynamics — Do not model the delay. This is the default


option.
• Model turn-on and turn-off times — Use additional
parameters to model a delay between the point at which the
voltage at vT passes the threshold and the switch opening or
closing.
Turn-on delay
Time between the input voltage exceeding the threshold voltage
and the switch closing. This parameter is only visible when
you select Model turn-on and turn-off times for the Model
dynamics parameter. The value must be greater than zero. The
default value is 1e-3 seconds.
Turn-off delay
Time between the input voltage falling below the threshold
voltage and the switch opening. This parameter is only visible
when you select Model turn-on and turn-off times for the
Model dynamics parameter. The value must be greater than
zero. The default value is 1e-3 seconds.
Initial input value, vT
The value of the physical signal input vT at time zero. This
value is used to initialize the delayed control voltage parameter
internally. This parameter is only visible when you select
Model turn-on and turn-off times for the Model dynamics
parameter. The default value is 0 V.

Ports This block has the following ports:

vT
Physical signal that opens and closes the switch
c1, c2, s11, s12, s21, s22
Electrical conserving ports

See Also DPST Switch | SPDT Switch | SPST Switch | Switch

1-117
DPST Switch

Purpose Model double-pole single-throw switch

Library Passive Devices/Switches

Description The DPST Switch block models a double-pole single-throw switch.


When the switch is closed, ports c1 and c2 are connected to ports s1
and s2, respectively.
Closed connections are modeled by a resistor with value equal to the
Closed resistance parameter value. Open connections are modeled by
a resistor with value equal to the reciprocal of the Open conductance
parameter value.
The switch is closed if the voltage presented at the vT control port
exceeds the value of the Threshold parameter.
Optionally, you can add a delay between the point at which the voltage
at vT passes the threshold and the switch opening or closing. To enable
the delay, on the Dynamics tab, set the Model dynamics parameter
to Model turn-on and turn-off times.

Dialog
Box and
Parameters

• “Main Tab” on page 1-119


• “Dynamics Tab” on page 1-119

1-118
DPST Switch

Main Tab

Closed resistance
Resistance between the c and s electrical ports when the switch is
closed. The value must be greater than zero. The default value
is 0.01 Ω.
Open conductance
Conductance between the c and s electrical ports when the switch
is open. The value must be greater than zero. The default value
is 1e-6 S.
Threshold
The threshold voltage for the control physical signal input vT
above which the switch will turn on. The default value is 0 V.

Dynamics Tab

Model dynamics
Select whether the block models a switching delay:
• No dynamics — Do not model the delay. This is the default
option.
• Model turn-on and turn-off times — Use additional
parameters to model a delay between the point at which the
voltage at vT passes the threshold and the switch opening or
closing.
Turn-on delay
Time between the input voltage exceeding the threshold voltage
and the switch closing. This parameter is only visible when
you select Model turn-on and turn-off times for the Model
dynamics parameter. The value must be greater than zero. The
default value is 1e-3 seconds.
Turn-off delay
Time between the input voltage falling below the threshold
voltage and the switch opening. This parameter is only visible
when you select Model turn-on and turn-off times for the

1-119
DPST Switch

Model dynamics parameter. The value must be greater than


zero. The default value is 1e-3 seconds.
Initial input value, vT
The value of the physical signal input vT at time zero. This
value is used to initialize the delayed control voltage parameter
internally. This parameter is only visible when you select
Model turn-on and turn-off times for the Model dynamics
parameter. The default value is 0 V.

Ports This block has the following ports:

vT
Physical signal that opens and closes the switch
c1, c2, s1, s2
Electrical conserving ports

See Also DPDT Switch | SPDT Switch | SPST Switch | Switch

1-120
Exponential Current Source

Purpose Model exponential pulse current source

Library SPICE-Compatible Components/Sources

Description The Exponential Current Source block represents a current source


whose output current value is an exponential pulse as a function of time
and is independent of the voltage across the terminals of the source.
The following equations describe the current through the source as a
function of time:

I out ( 0 ≤ Time ≤ TDR ) ) = I1


I out (TDR < Time ≤ TDF ) = I1 + ( I 2 - I1) * (1 - e-(Time-TDR)/TR )
I out (TDF < Time ) = I1 + ( I 2 - I1) * ( e-(Time-TDF)/TF - e-(Time-TDR)/TR )
where:

• I1 is the Initial value, I1 parameter value.


• I2 is the Pulse value, I2 parameter value.
• TDR is the Rise delay time, TDR parameter value.
• TR is the Rise time, TR parameter value.
• TDF is the Fall delay time, TDF parameter value.
• TF is the Fall time, TF parameter value.

The block uses a small conductance internally to prevent numerical


simulation issues. The conductance connects the + and - ports of the
device and has a conductance GMIN:

• By default, GMIN matches the Minimum conductance GMIN


parameter of the SPICE Environment Parameters block, whose
default value is 1e–12.

1-121
Exponential Current Source

• To change GMIN, add a SPICE Environment Parameters block to


your model and set the Minimum conductance GMIN parameter
to the desired value.

Dialog
Box and
Parameters

Initial value, I1
The value of the output current at time zero. The default value
is 0 A.

1-122
Exponential Current Source

Pulse value, I2
The asymptotic value of the output current when the output is
high. The default value is 0 A.
Rise delay time, TDR
The rise time delay. The default value is 0 s.
Rise time, TR
The time it takes the output current to rise from the Initial
Value, I1 value to the Pulse Value, I2 value. The default value
is 1e-09 s. The value must be greater than 0.
Fall delay time, TDR
The fall time delay. The default value is 0 s, which differs from
the SPICE default value.
Fall time, TF
The time it takes the output current to fall from the Pulse value,
I2 value to the Initial value, I1 value. The default value is 1e-09
s. The value must be greater than 0.

Ports The block has the following ports:

+
Positive electrical voltage.
-
Negative electrical voltage.

See Also Exponential Voltage Source

1-123
Exponential Voltage Source

Purpose Model exponential pulse voltage source

Library SPICE-Compatible Components/Sources

Description The Exponential Voltage Source block represents a voltage source


whose output voltage value is an exponential pulse as a function of time
and is independent of the current through the source. The following
equations describe the output current as a function of time:

Vout ( 0 ≤ Time ≤ TDR ) ) = V 1


Vout (TDR < Time ≤ TDF ) = V 1 + (V 2 -V 1) * (1 - e-(Time-TDR)/TR )
Vout (TDF < Time ) = V 1 + (V 2 -V 1) * ( e-(Time-TDF)/TF - e-(Time-TDR)/TR )
where:

• V1 is the Initial value, V1 parameter value.


• V2 is the Pulse value, V2 parameter value.
• TDR is the Rise delay time, TDR parameter value.
• TR is the Rise time, TR parameter value.
• TDF is the Fall delay time, TDF parameter value.
• TF is the Fall time, TF parameter value.

1-124
Exponential Voltage Source

Dialog
Box and
Parameters

Initial value, V1
The value of the output voltage at time zero. The default value
is 0 V.
Pulse value, V2
The asymptotic value of the output voltage when the output is
high. The default value is 0 V.

1-125
Exponential Voltage Source

Rise delay time, TDR


The rise time delay. The default value is 0 s.
Rise time, TR
The time it takes the output voltage to rise from the Initial
value, I1 value to the Pulse value, I2 value. The default value is
1e-09 s. The value must be greater than 0.
Fall delay time, TDR
The fall time delay. The default value is 0 s.
Fall Time, TF
The time it takes the output voltage to fall from the Pulse value,
I2 value to the Initial value, I1 value. The default value is 1e-09
s. The value must be greater than 0.

Ports The block has the following ports:

+
Positive electrical voltage.
-
Negative electrical voltage.

See Also Exponential Current Source

1-126
FEM-Parameterized Linear Actuator

Purpose Model linear actuator defined in terms of magnetic flux

Library Translational Actuators

Description

The FEM-Parameterized Linear Actuator block implements a model of


a linear actuator defined in terms of magnetic flux. Use this block to
model custom solenoids and linear motors where magnetic flux depends
on both distance and current. You parameterize the block using data
from a third party Finite Element Magnetic (FEM) package.
The block has two options for the electrical equation. The first, Define
in terms of dPhi(i,x)/dx and dPhi(i,x)/di, defines the current
in terms of partial derivatives of the magnetic flux (Φ) with respect to
distance (x) and current (i), the equations for which are:

di ⎛ ∂Φ dx ⎞ ∂Φ
= ⎜ v − iR − ⎟/
dt ⎝ ∂x dt ⎠ ∂i

The second option, Define in terms of Phi(i,x), defines the voltage


across the component directly in terms of the flux, the equation for
which is:

d
v = iR + Φ ( x, i )
dt

Numerically, defining the electrical equation in terms of flux partial


derivatives is better because the back-emf is piecewise continuous. If
using the flux directly, using a finer grid size for current and position
will improve results, as will selecting cubic or spline interpolation.

1-127
FEM-Parameterized Linear Actuator

In both cases, you specify the force as a function of current and position.
If the finite element package does not provide force, then you can
calculate it from the flux using the following equation:

∂Φ ( x, i )
i
F= ∫ ∂x
di
0

See the Finite Element Parameterized Solenoid example for more


information on how to use this and other parameterization options.
You can define Φ and its partial derivatives for just positive, or positive
and negative currents. If defining for just positive currents, then the
block assumes that Φ(–i,x) = –Φ(i,x). Therefore, if the current vector
is positive only:

• The first current value must be zero.


• The flux corresponding to zero current must be zero.
• The partial derivative of flux with respect to displacement must be
zero for zero current.

To model a linear motor with a repeated flux pattern, set the Flux
dependence on displacement parameter to Cyclic. When selecting
this option, the force and flux (or force and flux partial derivatives
depending on the option chosen) must have identical first and last
columns.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from
the context menu select Simscape block choices > Show thermal
port. This action displays the thermal port H on the block icon, and
adds the Temperature Dependence and Thermal port tabs to the
block dialog box.
Use the thermal port to simulate the effects of copper resistance losses
that convert electrical power to heat. For more information on using

1-128
FEM-Parameterized Linear Actuator

thermal ports and on the Temperature Dependence and Thermal


port tab parameters, see “Simulating Thermal Effects in Rotational
and Translational Actuators”.

Basic This block has the following limitations:


Assumptions
and • It is imperative that you supply a consistent set of force and flux
data. There is no checking that the force matrix is consistent with
Limitations
the flux data.
• When driving the FEM-Parameterized Linear Actuator block via a
series inductor, you may need to include a parallel conductance in
the inductor component.

1-129
FEM-Parameterized Linear Actuator

Dialog
Box and
Parameters

• “Magnetic Force Tab” on page 1-130


• “Mechanical Tab” on page 1-134

Magnetic Force Tab

Electrical model
Select one of the following parameterization options, based on
the underlying electrical model:

1-130
FEM-Parameterized Linear Actuator

• Define in terms of dPhi(i,x)/dx and dPhi(i,x)/di


— Define the current through the block in terms of partial
derivatives of the magnetic flux with respect to distance and
current. This is the default method.
• Define in terms of Phi(i,x) — Define the voltage across
the block terminals directly in terms of the flux.
Current vector, i
Specify a vector of monotonically increasing current values
corresponding to your force-flux data. If you specify positive
currents only, the first element must be zero. The default value is
[ 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 ] A.
Displacement vector, x
Specify a vector of monotonically increasing displacement values
corresponding to your force-flux data. The default value is [ 0
0.05 0.1 0.15 0.2 ] m/m.
Flux partial derivative wrt current, Phi(i,x)/di
Specify a matrix of the flux partial derivatives with respect to
current. This parameter is used if Electrical model is set to
Define in terms of dPhi(i,x)/dx and dPhi(i,x)/di. The
default value, in Wb/A, is:

[ 0.104 0.098 0.091 0.085 0.078;


0.095 0.089 0.084 0.079 0.073;
0.085 0.081 0.077 0.073 0.069;
0.076 0.073 0.07 0.067 0.064;
0.067 0.065 0.063 0.061 0.06;
0.057 0.057 0.056 0.056 0.055;
0.048 0.049 0.049 0.05 0.05;
0.038 0.04 0.042 0.044 0.046;
0.029 0.032 0.035 0.038 0.041;
0.02 0.024 0.028 0.033 0.037;
0.01 0.016 0.021 0.027 0.032 ]

1-131
FEM-Parameterized Linear Actuator

Flux partial derivative wrt displacement, Phi(i,x)/dx


Specify a matrix of the flux partial derivatives with respect to
displacement. This parameter is used if Electrical model is set
to Define in terms of dPhi(i,x)/dx and dPhi(i,x)/di. The
default value, in Wb/m, is:

[ 0 0 0 0 0;
-11.94 -10.57 -9.19 -7.81 -6.43;
-21.17 -19.92 -18.67 -17.42 -16.16;
-27.99 -26.87 -25.75 -24.62 -23.5;
-32.42 -31.43 -30.43 -29.43 -28.44;
-34.46 -33.59 -32.72 -31.85 -30.98;
-34.09 -33.35 -32.61 -31.87 -31.12;
-31.33 -30.72 -30.1 -29.49 -28.87;
-26.17 -25.68 -25.2 -24.71 -24.22;
-18.62 -18.26 -17.9 -17.54 -17.18;
-8.66 -8.43 -8.2 -7.97 -7.73 ]

Flux linkage matrix, Phi(i,x)


Specify a matrix of the total flux linkage, that is, flux times the
number of turns. This parameter is used if Electrical model
is set to Define in terms of Phi(i,x). The default value, in
Wb, is:

[ 0 0 0 0 0;
0.0085 0.0079 0.0075 0.0071 0.0067;
0.0171 0.016 0.0151 0.0143 0.0137;
0.0254 0.0239 0.0226 0.0215 0.0206;
0.033 0.0312 0.0297 0.0283 0.0271;
0.0396 0.0377 0.036 0.0345 0.0331;
0.0452 0.0433 0.0415 0.0399 0.0384;
0.0495 0.0478 0.0461 0.0446 0.0431;
0.0526 0.0512 0.0498 0.0485 0.0472;
0.0545 0.0537 0.0528 0.0519 0.0508;
0.0554 0.0553 0.0551 0.0548 0.0542 ]

1-132
FEM-Parameterized Linear Actuator

Force matrix, F(i,x)


Specify a matrix of the electromagnetic force applied to the
plunger or moving part. The default value, in N, is:

[ 0 0 0 0 0;
-0.6 -0.5 -0.4 -0.3 -0.3;
-2.3 -2 -1.7 -1.4 -1.2;
-4.9 -4.3 -3.7 -3.2 -2.7;
-8.3 -7.3 -6.4 -5.5 -4.7;
-12.2 -10.7 -9.4 -8.2 -7.2;
-16.2 -14.4 -12.7 -11.3 -10;
-20 -17.9 -15.9 -14.3 -12.9;
-23.3 -20.9 -18.8 -17.1 -15.7;
-25.7 -23.1 -21.1 -19.4 -18.2;
-26.5 -24.1 -22.2 -20.9 -20.1 ]

Flux dependence on displacement


Specify the flux pattern:
• Unique — No flux pattern present. This is the default option.
• Cyclic — Select this option to model a linear motor with a
repeated flux pattern. The force and flux (or force and flux
partial derivatives, depending on the Electrical model option
chosen) must have identical first and last columns.
Interpolation method
Select one of the following interpolation methods for
approximating the output value when the input value is between
two consecutive grid points:
• Linear — Uses a bilinear interpolation algorithm, which is an
extension of linear interpolation for functions in two variables.
• Cubic — Uses the bicubic interpolation algorithm.
• Spline — Uses the bicubic spline interpolation algorithm.

For more information on interpolation algorithms, see the PS


Lookup Table (2D) block reference page.

1-133
FEM-Parameterized Linear Actuator

Extrapolation method
Select one of the following extrapolation methods for determining
the output value when the input value is outside the range
specified in the argument list:
• From last 2 points — Extrapolates using the linear method
(regardless of the interpolation method specified), based on
the last two output values at the appropriate end of the range.
That is, the block uses the first and second specified output
values if the input value is below the specified range, and the
two last specified output values if the input value is above the
specified range.
• From last point — Uses the last specified output value at the
appropriate end of the range. That is, the block uses the last
specified output value for all input values greater than the last
specified input argument, and the first specified output value
for all input values less than the first specified input argument.

For more information on extrapolation algorithms, see the PS


Lookup Table (2D) block reference page.

This parameter is not available if you set the Flux dependence


on displacement parameter to Cyclic.
Winding resistance
Total resistance of the electrical winding. The default value is
14 Ohm.

Mechanical Tab

Damping
Linear damping. The default value is 1 N/(m/s). The value can
be zero.
Plunger mass
Mass of the moving part, which corresponds to mechanical
translational port R. The default value is 0.05 kg. The value can
be zero.

1-134
FEM-Parameterized Linear Actuator

Minimum stroke
The stroke at which the lower mechanical end stop is applied. The
default value is 0. The value can be -Inf.
Maximum stroke
The stroke at which the upper mechanical end stop is applied.
The default value is 0.2 mm. The value can be Inf.
Initial plunger position
Position of the plunger at the start of the simulation. The default
value is 0 mm.
Initial plunger velocity
Speed of the plunger at the start of the simulation. The default
value is 0 mm/s.
Contact stiffness
Contact stiffness between plunger and end stops. The default
value is 1e8 N/m.
Contact damping
Contact damping between plunger and end stops. The default
value is 1e4 N/(m/s).

Ports This block has the following ports:

+
Positive electrical conserving port
-
Negative electrical conserving port
C
Mechanical translational conserving port connected to the
actuator case
R
Mechanical translational conserving port connected to the plunger

Examples The Finite Element Parameterized Solenoid example illustrates the use
and parameterization options of this block.

1-135
FEM-Parameterized Linear Actuator

See Also FEM-Parameterized Rotary Actuator | Solenoid

1-136
FEM-Parameterized Rotary Actuator

Purpose Model rotary actuator defined in terms of magnetic flux

Library Rotational Actuators

Description

The FEM-Parameterized Rotary Actuator block implements a model of


a rotary actuator defined in terms of magnetic flux. Use this block to
model custom rotary actuators and motors where magnetic flux depends
on both rotor angle and current. You parameterize the block using data
from a third party Finite Element Magnetic (FEM) package.
The block has two options for the electrical equation. The first, Define
in terms of dPhi(i,theta)/dtheta and dPhi(i,theta)/di, defines
the current in terms of partial derivatives of the magnetic flux (Φ) with
respect to rotor angle (θ) and current (i), the equations for which are:

di ⎛ ∂Φ dθ ⎞ ∂Φ
= ⎜ v − iR − ⎟/
dt ⎝ ∂θ dt ⎠ ∂i

The second option, Define in terms of Phi(i,theta), defines the


voltage across the component directly in terms of the flux, the equation
for which is:

d
v = iR + Φ ( θ, i )
dt

Numerically, defining the electrical equation in terms of flux partial


derivatives is better because the back-emf is piecewise continuous. If
using the flux directly, using a finer grid size for current and position
will improve results, as will selecting cubic or spline interpolation.

1-137
FEM-Parameterized Rotary Actuator

In both cases, you specify the torque as a function of current and rotor
angle. If the finite element package does not provide torque, then you
can calculate it from the flux using the following equation:

∂Φ ( θ, i )
i
T= ∫ ∂θ
di
0

See the Finite Element Parameterized Solenoid example model and its
initialization file elec_fem_solenoid_ini.m for an example of how to
implement this type of integration in MATLAB.
You can define Φ and its partial derivatives for just positive, or positive
and negative currents. If defining for just positive currents, then the
block assumes that Φ(–i,x) = –Φ(i,x). Therefore, if the current vector
is positive only:

• The first current value must be zero.


• The flux corresponding to zero current must be zero.
• The partial derivative of flux with respect to rotor angle must be
zero for zero current.

To model a rotary motor with a repeated flux pattern, set the Flux
dependence on displacement parameter to Cyclic. When selecting
this option, the torque and flux (or torque and flux partial derivatives
depending on the option chosen) must have identical first and last
columns.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from
the context menu select Simscape block choices > Show thermal
port. This action displays the thermal port H on the block icon, and
adds the Temperature Dependence and Thermal port tabs to the
block dialog box.

1-138
FEM-Parameterized Rotary Actuator

Use the thermal port to simulate the effects of copper resistance losses
that convert electrical power to heat. For more information on using
thermal ports and on the Temperature Dependence and Thermal
port tab parameters, see “Simulating Thermal Effects in Rotational
and Translational Actuators”.

Basic This block has the following limitations:


Assumptions
and • It is imperative that you supply a consistent set of torque and flux
data. There is no checking that the torque matrix is consistent with
Limitations
the flux data.
• When driving the FEM-Parameterized Rotary Actuator block via a
series inductor, you may need to include a parallel conductance in
the inductor component.

1-139
FEM-Parameterized Rotary Actuator

Dialog
Box and
Parameters

• “Magnetic Force Tab” on page 1-140


• “Mechanical Tab” on page 1-144

Magnetic Force Tab

Electrical model
Select one of the following parameterization options, based on
the underlying electrical model:
• Define in terms of dPhi(i,theta)/dtheta and
dPhi(i,theta)/di — Define the current through the block in

1-140
FEM-Parameterized Rotary Actuator

terms of partial derivatives of the magnetic flux with respect to


rotor angle and current. This is the default method.
• Define in terms of Phi(i,theta) — Define the voltage
across the block terminals directly in terms of the flux.
Current vector, i
Specify a vector of monotonically increasing current values
corresponding to your torque-flux data. If you specify positive
currents only, the first element must be zero. The default value is
[ 0 0.2 0.4 0.6 0.8 1 ] A.
Angle vector, theta
Specify a vector of monotonically increasing rotor angle values
corresponding to your torque-flux data. The default value is [ 0
10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160
170 180 ] deg.
Flux partial derivative wrt current, Phi(i,theta)/di
Specify a matrix of the flux partial derivatives with respect
to current. This parameter is used if Electrical model is
set to Define in terms of dPhi(i,theta)/dtheta and
dPhi(i,theta)/di. The default value, in Wb/A, is:

[ 0.002 0.0024 0.0035 0.0052 0.0074 0.0096 0.0118 0.0135 0.0146 ...
0.015 0.0146 0.0135 0.0118 0.0096 0.0074 0.0052 0.0035 0.0024 0.002;
0.002 0.0024 0.0035 0.0052 0.0074 0.0096 0.0118 0.0135 0.0146 ...
0.015 0.0146 0.0135 0.0118 0.0096 0.0074 0.0052 0.0035 0.0024 0.002;
0.002 0.0024 0.0035 0.0052 0.0074 0.0096 0.0118 0.0135 0.0146 ...
0.015 0.0146 0.0135 0.0118 0.0096 0.0074 0.0052 0.0035 0.0024 0.002;
0.002 0.0024 0.0035 0.0052 0.0074 0.0096 0.0118 0.0135 0.0146 ...
0.015 0.0146 0.0135 0.0118 0.0096 0.0074 0.0052 0.0035 0.0024 0.002;
0.002 0.0024 0.0035 0.0052 0.0074 0.0096 0.0118 0.0135 0.0146 ...
0.015 0.0146 0.0135 0.0118 0.0096 0.0074 0.0052 0.0035 0.0024 0.002;
0.002 0.0024 0.0035 0.0052 0.0074 0.0096 0.0118 0.0135 0.0146 ...
0.015 0.0146 0.0135 0.0118 0.0096 0.0074 0.0052 0.0035 0.0024 0.002; ]

1-141
FEM-Parameterized Rotary Actuator

Flux partial derivative wrt angle, Phi(i,theta)/dtheta


Specify a matrix of the flux partial derivatives with respect
to rotor angle. This parameter is used if Electrical model
is set to Define in terms of dPhi(i,theta)/dtheta and
dPhi(i,theta)/di. The default value, in Wb/rad, is:

[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
0 9e-4 0.0017 0.0023 0.0026 0.0026 0.0023 0.0017 9e-4 ...
0 -9e-4 -0.0017 -0.0023 -0.0026 -0.0026 -0.0023 -0.0017 -9e-4 0;
0 0.0018 0.0033 0.0045 0.0051 0.0051 0.0045 0.0033 0.0018 ...
0 -0.0018 -0.0033 -0.0045 -0.0051 -0.0051 -0.0045 -0.0033 -0.0018 0;
0 0.0027 0.005 0.0068 0.0077 0.0077 0.0068 0.005 0.0027 ...
0 -0.0027 -0.005 -0.0068 -0.0077 -0.0077 -0.0068 -0.005 -0.0027 0;
0 0.0036 0.0067 0.009 0.0102 0.0102 0.009 0.0067 0.0036 ...
0 -0.0036 -0.0067 -0.009 -0.0102 -0.0102 -0.009 -0.0067 -0.0036 0;
0 0.0044 0.0084 0.0113 0.0128 0.0128 0.0113 0.0084 0.0044 ...
0 -0.0044 -0.0084 -0.0113 -0.0128 -0.0128 -0.0113 -0.0084 -0.0044 0 ]

Flux linkage matrix, Phi(i,theta)


Specify a matrix of the total flux linkage, that is, flux times the
number of turns. This parameter is used if Electrical model is
set to Define in terms of Phi(i,theta). The default value,
in Wb, is:

[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
4e-4 4.8e-4 7e-4 0.00105 0.00147 0.00193 0.00235 0.0027 0.00292 ...
0.003 0.00292 0.0027 0.00235 0.00193 0.00147 0.00105 7e-4 4.8e-4 4e-4;
8e-4 9.6e-4 0.00141 0.0021 0.00295 0.00385 0.0047 0.00539 0.00584 ...
0.006 0.00584 0.00539 0.0047 0.00385 0.00295 0.0021 0.00141 9.6e-4 8e-4;
0.0012 0.00144 0.00211 0.00315 0.00442 0.00578 0.00705 0.00809 0.00876 ...
0.009 0.00876 0.00809 0.00705 0.00578 0.00442 0.00315 0.00211 0.00144 0.0012;
0.0016 0.00191 0.00282 0.0042 0.0059 0.0077 0.0094 0.01078 0.01169 ...
0.012 0.01169 0.01078 0.0094 0.0077 0.0059 0.0042 0.00282 0.00191 0.0016;
0.002 0.00239 0.00352 0.00525 0.00737 0.00963 0.01175 0.01348 0.01461 ...
0.015 0.01461 0.01348 0.01175 0.00963 0.00737 0.00525 0.00352 0.00239 0.002 ]

1-142
FEM-Parameterized Rotary Actuator

Torque matrix, T(i,theta)


Specify a matrix of the electromagnetic torque applied to the
rotor. The default value, in mN*m, is:

[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
0 0.0889 0.1671 0.2252 0.2561 0.2561 0.2252 0.1671 0.0889 ...
0 -0.0889 -0.1671 -0.2252 -0.2561 -0.2561 -0.2252 -0.1671 -0.0889 0;
0 0.3557 0.6685 0.9007 1.0242 1.0242 0.9007 0.6685 0.3557 ...
0 -0.3557 -0.6685 -0.9007 -1.0242 -1.0242 -0.9007 -0.6685 -0.3557 0;
0 0.8003 1.5041 2.0265 2.3045 2.3045 2.0265 1.5041 0.8003 ...
0 -0.8003 -1.5041 -2.0265 -2.3045 -2.3045 -2.0265 -1.5041 -0.8003 0;
0 1.4228 2.674 3.6027 4.0968 4.0968 3.6027 2.674 1.4228 ...
0 -1.4228 -2.674 -3.6027 -4.0968 -4.0968 -3.6027 -2.674 -1.4228 0;
0 2.2231 4.1781 5.6292 6.4013 6.4013 5.6292 4.1781 2.2231 ...
0 -2.2231 -4.1781 -5.6292 -6.4013 -6.4013 -5.6292 -4.1781 -2.2231 0 ]

Flux dependence on displacement


Specify the flux pattern:
• Unique — No flux pattern present. This is the default option.
• Cyclic — Select this option to model a rotary motor with a
repeated flux pattern. The torque and flux (or torque and flux
partial derivatives, depending on the Electrical model option
chosen) must have identical first and last columns.
Interpolation method
Select one of the following interpolation methods for
approximating the output value when the input value is between
two consecutive grid points:
• Linear — Uses a bilinear interpolation algorithm, which is an
extension of linear interpolation for functions in two variables.
• Cubic — Uses the bicubic interpolation algorithm.
• Spline — Uses the bicubic spline interpolation algorithm.

For more information on interpolation algorithms, see the PS


Lookup Table (2D) block reference page.

1-143
FEM-Parameterized Rotary Actuator

Extrapolation method
Select one of the following extrapolation methods for determining
the output value when the input value is outside the range
specified in the argument list:
• From last 2 points — Extrapolates using the linear method
(regardless of the interpolation method specified), based on
the last two output values at the appropriate end of the range.
That is, the block uses the first and second specified output
values if the input value is below the specified range, and the
two last specified output values if the input value is above the
specified range.
• From last point — Uses the last specified output value at the
appropriate end of the range. That is, the block uses the last
specified output value for all input values greater than the last
specified input argument, and the first specified output value
for all input values less than the first specified input argument.

For more information on extrapolation algorithms, see the PS


Lookup Table (2D) block reference page.

This parameter is not available if you set the Flux dependence


on displacement parameter to Cyclic.
Winding resistance
Total resistance of the electrical winding. The default value is
10 Ohm.

Mechanical Tab

Damping
Rotary damping. The default value is 1e-4 N*m/(rad/s). The
value can be zero.
Rotor inertia
Inertia of the rotor attached to mechanical translational port R.
The default value is 5e-5 kg*m^2. The value can be zero.

1-144
FEM-Parameterized Rotary Actuator

Minimum rotor angle


The rotor angle at which the lower mechanical end stop is applied.
The default value is -Inf.
Maximum rotor angle
The rotor angle at which the upper mechanical end stop is applied.
The default value is Inf.
Initial rotor position
Position of the rotor at the start of the simulation. The default
value is 0 deg.
Initial rotor velocity
Angular velocity of the rotor at the start of the simulation. The
default value is 0 deg/s.
Contact stiffness
Contact stiffness between rotor and end stops. The default value
is 1e8 N*m/rad.
Contact damping
Contact damping between rotor and end stops. The default value
is 1e4 N*m/(rad/s).

Ports This block has the following ports:

+
Positive electrical conserving port
-
Negative electrical conserving port
C
Mechanical rotational conserving port connected to the actuator
case
R
Mechanical rotational conserving port connected to the rotor

See Also FEM-Parameterized Linear Actuator | Solenoid

1-145
Finite-Gain Op-Amp

Purpose Model gain-limited operational amplifier

Library Integrated Circuits

Description The Finite-Gain Op-Amp block models a gain-limited operational


amplifier. If the voltages at the positive and negative ports are Vp and
Vm, respectively, the output voltage is:

( )
Vout = A V p - Vm − Iout * Rout
where:

• A is the gain.
• Rout is the output resistance.
• Iout is the output current.

The input current is:

V p - Vm
Rin
where Rin is the input resistance.
The output voltage is limited by the minimum and maximum output
values you specify in the block dialog box.

1-146
Finite-Gain Op-Amp

Dialog
Box and
Parameters

Gain, A
The open-loop gain of the operational amplifier. The default value
is 1000.
Input resistance, Rin
The resistance at the input of the operational amplifier that the
block uses to calculate the input current. The default value is
1e+06 Ω.
Output resistance, Rout
The resistance at the output of the operational amplifier that the
block uses to calculate the drop in output voltage due to output
current. The default value is 100 Ω.
Minimum output, Vmin
The lower limit on the operational amplifier output voltage. The
default value is -15 V.
Maximum output, Vmax
The upper limit on the operational amplifier output voltage. The
default value is 15 V.

1-147
Finite-Gain Op-Amp

Ports The block has the following ports:

+
Positive electrical voltage
-
Negative electrical voltage
OUT
Output voltage

See Also Op-Amp | Band-Limited Op-Amp | Fully Differential Op-Amp

1-148
Fully Differential Op-Amp

Purpose Model operational amplifier with fully differential output, that is, not
referenced to ground

Library Integrated Circuits

Description The Fully Differential Op-Amp block models a fully differential


operational amplifier. Differential signal transmission is better than
single-ended transmission due to reduced susceptibility to external
noise sources. Applications include data acquisition where inputs are
differential, for example, sigma-delta converters.
The following diagram shows the internal representation of the
amplifier.

Parameters for the circuit components are derived from the block
parameters that you provide. The gain of the two voltage-controlled
voltage sources (VCVS1 and VCVS2) is set to half of the differential

1-149
Fully Differential Op-Amp

gain value. Similarly the slew rate of each of the voltage sources is set
to half of the differential maximum slew rate value. The voltages of the
two output ports Vout+ and Vout- are both limited to be within the
minimum and maximum output voltages that you specify.
The output voltage for zero differential input voltage is controlled by
the common-mode port, cm. If no current is drawn from the cm port by
the external circuit, then the output voltage is set to be the average
of the positive and negative supply voltages by the resistor ladder
of R3a and R3b. Note that the negative supply voltage can be zero,
which corresponds to operation when a split supply is not available.
The values for the minimum and maximum output voltages that you
provide must be consistent with the values for the supply voltages that
you provide. So, for example, the maximum output high voltage will be
less than the positive supply voltage, the difference corresponding to
the number of p-n junction voltage drops in the circuit.

Note Physical Network block diagrams do not allow unconnected


Conserving ports. If you want to leave pin cm open-circuit, connect it to
an Open Circuit block from the Simscape Foundation library.

Basic This block provides a behavioral model of a fully differential operational


Assumptions amplifier. It does not represent nonlinear effects, such as variation in
and gain with output voltage amplitude, and the nonlinear nature of the
output voltage-current relationship for large load currents.
Limitations

1-150
Fully Differential Op-Amp

Dialog
Box and
Parameters

• “Gain Tab” on page 1-151


• “Input Impedance Tab” on page 1-152
• “Output Limits Tab” on page 1-152
• “Output Bias Tab” on page 1-153
• “Initial Conditions Tab” on page 1-153

Gain Tab

Differential gain
The gain applied to a voltage difference between the + and –
inputs. The default value is 1000.
Bandwidth
The frequency at which the differential voltage gain drops by 3 dB
from its dc value. The default value is 1.5 GHz.

1-151
Fully Differential Op-Amp

Input Impedance Tab

Differential input resistance


The input resistance seen by a voltage source applied across the +
and – inputs. The default value is 1.3 MOhm.
Differential input capacitance
The input capacitance seen by a current source applied across the
+ and – inputs. The default value is 1.8 pF.
Common-mode input resistance
The input resistance seen by a voltage source applied between
ground and the + input, or between ground and the – input. The
default value is 1 MOhm.
Common-mode input capacitance
The input capacitance seen by a current source applied between
ground and the + input, or between ground and the – input. The
default value is 2.3 pF.

Output Limits Tab

Output resistance
The output resistance of either of the outputs with respect to the
common-mode voltage reference. Differential output resistance
is therefore twice the value of the output resistance R_out. The
default value is 1 Ohm.
Minimum output voltage low
The minimum output voltage for either of the two output pins
with respect to ground. The default value is -1.4 V.
Maximum output voltage low
The maximum output voltage for either of the two output pins
with respect to ground. The default value is 1.4 V.
Differential maximum slew rate
The maximum slew rate of the differential output voltage. The
default value is 5000 V/μs.

1-152
Fully Differential Op-Amp

Output Bias Tab

Common-mode port input resistance


The input resistance seen by a voltage source applied between
ground and the common mode port. The default value is 23 kOhm.
Negative supply voltage
The value of the negative supply voltage connected to
common-mode bias resistor R3b (see diagram). The default value
is -5 V.
Positive supply voltage
The value of the positive supply voltage connected to
common-mode bias resistor R3a (see diagram). The default value
is 5 V.

Initial Conditions Tab

Initial differential output voltage


The initial differential voltage across the two outputs if the output
current is zero. The default value is 0 V.

Ports The block has the following ports:

+
Noninverting input.
-
Inverting input.
cm
Common-mode port. If you want to leave this pin open-circuit,
connect a voltage sensor between the cm port and a reference port.
Vout+
Noninverting output.
Vout-
Inverting output.

1-153
Fully Differential Op-Amp

See Also Op-Amp | Band-Limited Op-Amp | Finite-Gain Op-Amp

1-154
Fuse

Purpose Model fuse that protects against excessive current

Library Passive Devices

Description The Fuse block breaks the circuit in which it is connected. It does so
when the current through the device exceeds the rated current at which
the fuse is designed to blow and continues to exceed it for a specified
amount of time.

Dialog
Box and
Parameters

Rated current
The current value at which the fuse blows when exceeded for a
specified amount of time. The default value is 1 A.
Time to fuse
The time for which the current must exceed the rated current for
the fuse to blow. The default value is 0 s.
Fuse resistance R
The fuse resistance. The parameter value must be greater than
zero. The default value is 0.01 Ω.

1-155
Fuse

Open-circuit conductance G
The open-circuit fuse conductance when the fuse has blown. The
parameter value must be greater than zero. The default value
is 1e-08 1/Ω.

Ports The block has the following ports:

+
Positive electrical port
-
Negative electrical port

1-156
Generic Battery

Purpose Simple battery model

Library Sources

Description The Generic Battery block represents a simple battery model. If you
select Infinite for the Battery charge capacity parameter, the block
models the battery as a series resistor and a constant voltage source.
If you select Finite for the Battery charge capacity parameter, the
block models the battery as a series resistor and a charge-dependent
voltage source whose voltage as a function of charge has the following
reciprocal relationship:

⎡ ⎛  (1 − x) ⎞ ⎤
V = V0 ⎢1 − ⎜ ⎟⎥
⎣ ⎝ 1 −  (1 − x) ⎠ ⎦
where:

• x is the ratio of the ampere-hours left to the number of ampere-hours,


AH, for which the battery is rated.
• V0 is the voltage when the battery is fully charged, as defined by the
Nominal voltage, V_nominal parameter.
• The block calculates the constants α and β to satisfy the following
battery conditions:
- The battery voltage is zero when the charge is zero, that is, when x
= 0.
- The battery voltage is V1 (the Voltage V1 < V_nominal when
charge is AH1 parameter value) when the charge is the Charge
AH1 when no-load volts are V1 parameter value, that is, when
x = AH1/AH.

The equation defines a reciprocal relationship between voltage and


remaining charge. It is an approximation to what happens in a real
battery, but it does replicate the increasing rate of voltage drop at low
charge values. It also ensures that the battery voltage becomes zero

1-157
Generic Battery

when the charge level is zero. This simple model has the advantage
of requiring very few parameters, and these are parameters that are
readily available on most datasheets.

Dialog
Box and
Parameters

Nominal voltage, V_nominal


The voltage at the output port when the battery is fully charged.
The default value is 12 V.
Internal resistance, R1
Internal connection resistance. The default value is 2 Ω.
Battery charge capacity
Select one of the following options for modeling the charge
capacity of the battery:
• Infinite — The battery voltage is independent of charge
drawn from the battery. This is the default option.
• Finite — The battery voltage decreases as charge decreases.

1-158
Generic Battery

Ampere-Hour rating, AH
The maximum battery charge in ampere-hours. This parameter
is only visible when you select Finite for the Battery charge
capacity parameter. The default value is 50 hr*A.
Initial charge
The battery charge at the start of the simulation. This parameter
is only visible when you select Finite for the Battery charge
capacity parameter. The default value is 50 hr*A.
Voltage V1 < V_nominal when charge is AH1
The battery output voltage when the charge level is AH1 hr*A.
This parameter is only visible when you select Finite for the
Battery charge capacity parameter. The default value is 11.5
V.
Charge AH1 when no-load volts are V1
The battery charge level in hr*A when the no-load output voltage
is V1. This parameter is only visible when you select Finite for
the Battery charge capacity parameter. The default value is
25 hr*A.
Self-discharge resistance, R2
Select one of the following options for modeling the self-discharge
resistance of the battery:
• Omit — Do not include resistance across the battery output
terminals in the model.
• Include — Include resistance R2 across the battery output
terminals in the model.
R2
The resistance across the battery output terminals that represents
battery self-discharge. This parameter is only visible when you
select Include for the Self-discharge resistance, R2 parameter.
The default value is 2e+03 Ω.

Ports The block has the following ports:

1-159
Generic Battery

+
Positive electrical voltage
-
Negative electrical voltage

Examples For an example of how you can create a detailed battery model, see the
Simscape Lead-Acid Battery example.

See Also DC Voltage Source | Controlled Voltage Source

1-160
Generic Linear Actuator

Purpose Model generic linear actuator driven from DC voltage source or PWM
driver

Library Translational Actuators

Description

The Generic Linear Actuator block implements a model of a generic


linear actuator designed to be driven from a DC voltage source or a
PWM driver. Define force-speed characteristics in terms of tabulated
values for powering the motor at the rated voltage. This functionality
enables you to model a motor without referencing an equivalent circuit.
The motor or actuator architecture determines the way in which
electrical losses depend on force. For example, a DC motor has
losses that are proportional to the square of the current. As force is
proportional to current, losses are also proportional to mechanical
force. Most motors have an electrical loss term that is proportional
to the square of mechanical force. The Generic Linear Actuator block
calculates this loss term using the Motor efficiency (percent) and
Speed at which efficiency is measured parameters that you provide.
Some motors also have a loss term that is independent of force. An
example is a shunt motor where the field winding draws a constant
current regardless of load. The Force-independent electrical losses
parameter accounts for this effect.
The motor efficiency is the mechanical power divided by the sum of the
mechanical power and both electrical loss terms. The block assumes
that the speed at which the motor efficiency is defined is in the motoring
quadrant and, therefore, positive.

1-161
Generic Linear Actuator

You can operate the block in the reverse direction by changing the sign
of the voltage applied. The H-Bridge block, for example, reverses motor
direction if the voltage at the REV port is greater than the Reverse
threshold voltage parameter. However, if you are using the block in
reverse, specify the force-speed data for forward operation:

• Positive forces and positive speeds in the motoring quadrant.


• Positive force and negative speeds in the generating counterclockwise
quadrant.
• Negative force and positive speed in the generating clockwise
quadrant.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from
the context menu select Simscape block choices > Show thermal
port. This action displays the thermal port H on the block icon, and
adds the Temperature Dependence and Thermal port tabs to the
block dialog box.
Use the thermal port to simulate the effects of copper resistance losses
that convert electrical power to heat. For more information on using
thermal ports and on the Temperature Dependence and Thermal
port tab parameters, see “Simulating Thermal Effects in Rotational
and Translational Actuators”.

Basic This block has the following limitations:


Assumptions
and • The force-speed curve data corresponds only to the rated voltage,
so the block produces accurate results only when driven by plus or
Limitations
minus the rated voltage.
• The block requires you to provide force-speed data for the full
range over which you use the actuator. To use the actuator in the
generating and braking regions, provide additional data outside of
the normal motoring region.

1-162
Generic Linear Actuator

• Model behavior is sensitive to force-speed data. For example, no-load


speed is correctly defined and finite only when the data crosses the
speed axis.
• To drive the block from the H-Bridge block:
- Do not place any other blocks between the H-Bridge and the
Generic Linear Actuator blocks.
- In the H-Bridge block dialog box, set the Freewheeling mode to
Via one semiconductor switch and one freewheeling diode
. Selecting Via two freewheeling diodes does not set the bridge
output voltage to zero when the PWM input signal is low.
- In the H-Bridge, Generic Linear Actuator, and Controlled PWM
Voltage block dialog boxes, ensure that the Simulation mode
is the same for all three blocks.

1-163
Generic Linear Actuator

Dialog
Box and
Parameters

• “Electrical Force Tab” on page 1-164


• “Mechanical Tab” on page 1-166

Electrical Force Tab

Speed values
Specify a vector of speeds, including their units, for your
force-speed data. The default value is [ -15 -10 -5 0 5 10 15
20 25 30 ] m/s.

1-164
Generic Linear Actuator

Force values
Specify a vector of forces, including their units, for your
force-speed data. The default value is [ 4 3.5 3 2.5 2 1.5 1
0.5 0 -0.5 ] N.
Rated voltage
Indicate the voltage for which the device you are modeling is
rated. The default value is 12 V.
Motor efficiency (percent)
Efficiency that the block uses to calculate force-dependent
electrical losses. The default value is 70.
Speed at which efficiency is measured
Speed that the block uses to calculate force-dependent electrical
losses. The default value is 20 m/s.
Force-independent electrical losses
Fixed electrical loss associated with the actuator when the force is
zero. The default value is 2 W.
Simulation mode
If you set the Simulation mode parameter to PWM, apply a
PWM waveform switching between zero and rated volts to the
block electrical terminals. The current drawn from the electrical
supply is equal to the amount required to deliver the mechanical
power and to compensate for electrical losses. If the applied
voltage exceeds the rated voltage, the resultant force scales
proportionately. However, applying anything other than the rated
voltage can provide unrepresentative results. PWM is the default
setting.

If you set the Simulation mode parameter to Averaged, the force


generated in response to an applied voltage Vav is

Vav
× F (v)
Vrated

1-165
Generic Linear Actuator

where F (v) is the force value at speed v . The current drawn from
the supply is such that the product of the current and Vav is
equal to the average power that is consumed.

Mechanical Tab

Plunger mass
Mass of the moving part of the motor. The default value is 0.1 kg.
The value can be zero.
Linear damping
Linear damping. The default value is 1e-05 N/(m/s). The value
can be zero.
Initial plunger speed
Speed of the plunger at the start of the simulation. The default
value is 0 m/s.

Ports This block has the following ports:

+
Positive electrical conserving port
-
Negative electrical conserving port
C
Mechanical translational conserving port connected to the
actuator case
R
Mechanical translational conserving port connected to the plunger

See Also Generic Rotary Actuator | H-Bridge

1-166
Generic Rotary Actuator

Purpose Model generic rotary actuator driven from DC voltage source or PWM
driver

Library Rotational Actuators

Description

The Generic Rotary Actuator block implements a model of a generic


rotary actuator designed to be driven from a DC voltage source or PWM
driver. You define torque-speed characteristics in terms of tabulated
values for powering the motor at the rated voltage. This functionality
allows you to model a motor without referencing an equivalent circuit.
The motor or actuator architecture determines the way in which
electrical losses depend on torque. For example, a DC motor has
losses that are proportional to the square of the current. As torque
is proportional to current, losses are also proportional to mechanical
torque. Most motors have an electrical loss term that is proportional to
the square of mechanical torque. The Generic Rotary Actuator block
calculates this loss term using the Motor efficiency (percent) and
Speed at which efficiency is measured parameters that you provide.
Some motors also have a loss term that is independent of torque. An
example is a shunt motor where the field winding draws a constant
current regardless of load. The Torque-independent electrical
losses parameter accounts for this effect.
The motor efficiency is the mechanical power divided by the sum of the
mechanical power and both electrical loss terms. The block assumes
that the speed at which the motor efficiency is defined is in the motoring
quadrant and, therefore, positive.

1-167
Generic Rotary Actuator

You can operate the block in the reverse direction by changing the sign
of the voltage that you apply. The H-Bridge block, for example, reverses
motor direction if the voltage at the REV port is greater than the
Reverse threshold voltage parameter. However, if you are using the
block in reverse, specify the torque-speed data for forward operation:

• Positive torques and positive speeds in the motoring quadrant.


• Positive torque and negative speeds in the generating
counterclockwise quadrant.
• Negative torque and positive speed in the generating clockwise
quadrant.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from
the context menu select Simscape block choices > Show thermal
port. This action displays the thermal port H on the block icon, and
adds the Temperature Dependence and Thermal port tabs to the
block dialog box.
Use the thermal port to simulate the effects of copper resistance losses
that convert electrical power to heat. For more information on using
thermal ports and on the Temperature Dependence and Thermal
port tab parameters, see “Simulating Thermal Effects in Rotational
and Translational Actuators”.

Basic This block has the following limitations:


Assumptions
and • The torque-speed curve data corresponds only to the rated voltage,
so the block produces accurate results only when driven by plus or
Limitations
minus the rated voltage.
• In this block requires, you must provide torque-speed data for the
full range over which you use the actuator. To use the actuator in
the generating and braking regions, provide additional data outside
of the normal motoring region.

1-168
Generic Rotary Actuator

• Model behavior is sensitive to torque-speed data. For example,


no-load speed is correctly defined and finite only when the data
crosses the speed axis.
• To drive the block from the H-Bridge block:
- Do not place any other blocks between the H-Bridge and the
Generic Rotary Actuator blocks.
- In the H-Bridge block dialog box, set the Freewheeling mode to
Via one semiconductor switch and one freewheeling diode.
Selecting Via two freewheeling diodes does not set the bridge
output voltage to zero when the PWM input signal is low.
- In the H-Bridge, Generic Rotary Actuator, and Controlled PWM
Voltage block dialog boxes, ensure that the Simulation mode
is the same for all three blocks.

1-169
Generic Rotary Actuator

Dialog
Box and
Parameters

• “Electrical Torque Tab” on page 1-170


• “Mechanical Tab” on page 1-172

Electrical Torque Tab

Speed values
Specify a vector of speeds, including their units, for your
torque-speed data. The default value is [ -1.5e+03 -1000 -500
0 500 1000 1.5e+03 2e+03 2.5e+03 3e+03 ] rpm.

1-170
Generic Rotary Actuator

Torque values
Specify a vector of torques, including their units, for your
torque-speed data. The default value is [ 0.04 0.035 0.03
0.025 0.02 0.015 0.01 0.005 0 -0.005 ] Nm.
Rated voltage
Indicate the voltage for which the device you are modeling is
rated. The default value is 12 V.
Motor efficiency (percent)
The efficiency that the block uses to calculate torque-dependent
electrical losses. The default value is 80.
Speed at which efficiency is measured
The speed that the block uses to calculate torque-dependent
electrical losses. The default value is 2e+03 rpm.
Torque-independent electrical losses
Fixed electrical loss associated with the actuator when the torque
is zero. The default value is 0.1 W.
Simulation mode
If you set the Simulation mode parameter to PWM, apply a
PWM waveform switching between zero and rated volts to the
block electrical terminals. The current drawn from the electrical
supply is equal to the amount required to deliver the mechanical
power and to compensate for electrical losses. If the applied
voltage exceeds the rated voltage, the resultant torque scales
proportionately. However, applying anything other than the rated
voltage can provide unrepresentative results. PWM is the default
setting.

If you set the Simulation mode parameter to Averaged, the


torque generated in response to an applied voltage Vav is

Vav
× T ( )
Vrated

1-171
Generic Rotary Actuator

where T ( ) is the torque value at speed  . The current drawn


from the supply is such that the product of the current and Vav is
equal to the average power that is consumed.

Mechanical Tab

Rotor inertia
Rotor resistance to change in motor motion. The default value is
1e-04 kg*m2. The value can be zero.
Rotor damping
Rotor damping. The default value is 1e-08 N*m/(rad/s). The
value can be zero.
Initial rotor speed
Speed of the rotor at the start of the simulation. The default
value is 0 rpm.

Ports This block has the following ports:

+
Positive electrical conserving port
-
Negative electrical conserving port
C
Mechanical rotational conserving port
R
Mechanical rotational conserving port

See Also Generic Linear Actuator | H-Bridge

1-172
Gyro

Purpose Behavioral model of MEMS gyro

Library Sensors

Description The Gyro block implements a behavioral model of a


MicroElectroMechanical Systems (MEMS) gyro. The gyro
provides an output voltage that is proportional to the angular rotation
rate presented at the mechanical rotational physical port R. The output
voltage is limited according to the values that you provide for maximum
and minimum output voltage.
Optionally, you can model sensor dynamics by setting the Dynamics
parameter to Model sensor bandwidth. Including dynamics adds a
first-order lag between the angular rate presented at port R and the
corresponding voltage applied to the electrical + and - ports.
If running your simulation with a fixed-step solver, or generating code
for hardware-in-the-loop testing, MathWorks recommends that you
set the Dynamics parameter to No dynamics Suitable for HIL,
because this avoids the need for a small simulation time step if the
sensor bandwidth is high.

1-173
Gyro

Dialog
Box and
Parameters

Sensitivity
The change in output voltage level per unit change in rotation
rate when the output is not being limited. The default value
is 12.5 mV/(deg/s).
Output voltage for zero rotation
The output voltage from the sensor when the rotation rate is zero.
The default value is 2.5 V.
Maximum output voltage
The maximum output voltage from the sensor, which determines
the sensor maximum measured rotational rate. The default value
is 4 V.
Minimum output voltage
The minimum output voltage from the sensor, which determines
the sensor minimum measured rotational rate. The default value
is 1 V.
Dynamics
Select one of the following options for modeling sensor dynamics:

1-174
Gyro

• No dynamics Suitable for HIL — Do not model sensor


dynamics. Use this option when running your simulation
fixed step or generating code for hardware-in-the-loop testing,
because this avoids the need for a small simulation time step if
the sensor bandwidth is high. This is the default option.
• Model sensor bandwidth — Model sensor dynamics with a
first-order lag approximation, based on the Bandwidth and
the Initial angular rate parameter values.
Bandwidth
Specifies the 3dB bandwidth for the measured rotational rate
assuming a first-order time constant. This parameter is only
visible when you select Model sensor bandwidth for the
Dynamics parameter. The default value is 3 kHz.
Initial angular rate
Determines the initial condition for the lag by specifying the
initial output for the sensor, expressed in units of angular
rotation rate. This parameter is only visible when you select
Model sensor bandwidth for the Dynamics parameter. The
default value is 0 deg/s.

Ports The block has the following ports:

R
Mechanical rotational port
+
Positive electrical port
-
Negative electrical port

1-175
H-Bridge

Purpose Model H-bridge motor driver

Library Drivers

Description The H-Bridge block represents an H-bridge motor driver. The block has
the following two Simulation mode options:

• PWM — The H-Bridge output is a controlled voltage that depends


on the input signal at the PWM port. If the input signal has a
value greater than the Enable threshold voltage parameter
value, the H-Bridge output is on and has a value equal to the value
of the Output voltage amplitude parameter. If it has a value
less than the Enable threshold voltage parameter value, the
block maintains the load circuit using one of the following three
Freewheeling mode options:
- Via one semiconductor switch and one freewheeling diode
- Via two freewheeling diodes
- Via two semiconductor switches and one freewheeling
diode
The first and third options are sometimes referred to as synchronous
operation.
The signal at the REV port determines the polarity of the output. If
the value of the signal at the REV port is less than the value of the
Reverse threshold voltage parameter, the output has positive
polarity; otherwise, it has negative polarity.
• Averaged — This mode has two Load current characteristics
options:
- Smoothed
- Unsmoothed or discontinuous
The Smoothed option assumes that the current is practically
continuous due to load inductance. In this case, the H-Bridge output
is:

1-176
H-Bridge

VO VPWM
− IOUT RON
APWM

where:
- VO is the value of the Output voltage amplitude parameter.
- VPWM is the value of the voltage at the PWM port.
- APWM is the value of the PWM signal amplitude parameter.
- IOUT is the value of the output current.
- RON is the Bridge on resistance parameter.
The current will be smooth if the PWM frequency is large enough.
Synchronous operation where freewheeling is via a bridge arm back
to the supply also helps smooth the current. For cases where the
current is not smooth, or possibly discontinuous (that is, it goes to
zero between PWM cycles), use the Unsmoothed or discontinuous
option. For this option, you must also provide values for the Total
load series resistance, Total load series inductance and PWM
frequency. During simulation, the block uses these values to
calculate a more accurate value for H-bridge output voltage that
achieves the same average current as would be present if simulating
in PWM mode.

Set the Simulation mode parameter to Averaged to speed up


simulations when driving the H-Bridge block with a Controlled PWM
Voltage block. You must also set the Simulation mode parameter of
the Controlled PWM Voltage block to Averaged mode. This applies the
average of the demanded PWM voltage to the motor. The accuracy
of the Averaged mode simulation results relies on the validity of
your assumption about the load current. If you specify that the
current is Unsmoothed or discontinuous, then the accuracy also
depends on the values you provide for load resistance and inductance
being representative. This mode also makes some simplifying
assumptions about the underlying equations for the case when current
is discontinuous. For typical motor and bridge parameters, accuracy
should be within a few percent. To verify Averaged mode accuracy, run

1-177
H-Bridge

the simulation using the PWM mode and compare the results to those
obtained from using the Averaged mode.
Braking mode is invoked when the voltage presented at the BRK port is
larger than the Braking threshold voltage. Regardless of whether in
PWM or Averaged mode, when in braking mode the H-bridge is modeled
by a series combination of two resistances R1 and R2 where:

• R1 is the resistance of a single bridge arm, that is, half the value of
the Total bridge on resistance parameter.
• R2 is the resistance of a single bridge arm in parallel with a diode
resistance, that is, R1 · Rd / ( R1 + Rd ), where Rd is the diode
resistance.

Basic The model has the following limitations:


Assumptions
and • If you are linearizing your model, set the Simulation mode
parameter to Averaged and ensure that you have specified the
Limitations
operating point correctly. You can only linearize the H-Bridge block
for inputs that are greater than zero and less than the PWM signal
amplitude.
• No forward voltage is modeled for the freewheeling diodes. They
are approximated as ideal resistances when forward biased,
with resistance equal to the Freewheeling diode on resistance
parameter value.
• In Averaged mode, and with the Unsmoothed or discontinuous
choice for Load current characteristics, you must provide
representative values for load inductance and resistance. If driving
a DC Motor, then the resistance is the armature resistance, and
the inductance is the sum of the armature inductance plus series
smoothing inductor (if present). For a Universal Motor, total
resistance is the sum of the armature and field windings, and
total inductance is the sum of armature and field inductances plus
any series smoothing inductance. For a Shunt Motor, MathWorks
recommends that you draw a Thévenin equivalent circuit to
determine appropriate values.

1-178
H-Bridge

Dialog
Box and
Parameters

• “Simulation Mode & Load Assumptions Tab” on page 1-179


• “Input Thresholds Tab” on page 1-182
• “Bridge Parameters Tab” on page 1-182

Simulation Mode & Load Assumptions Tab

Simulation mode
Select one of the following options for the type of output voltage:
• PWM — The output voltage is a pulse-width modulated signal.
This is the default option.
• Averaged — The output voltage is a constant whose value is
equal to the average value of the PWM signal.

1-179
H-Bridge

Freewheeling mode
Select one of the following options for the type of H-Bridge
dissipation circuit:
• Via one semiconductor switch and one freewheeling
diode — In this mode, the block controls the load by
maintaining one high-side bridge arm permanently on and
using the PWM signal to modulate the corresponding low-side
bridge arm. This means that the block uses only one of the
freewheeling diodes in completing the dissipation circuit when
the bridge turns off. This option is the default.
• Via two freewheeling diodes — In this mode, all bridge
arms are off during the bridge off-state. This means that the
block dissipates the load current across the power supply by
two freewheeling diodes.
• Via two semiconductor switches and one freewheeling
diode — In this mode, the block controls the load by
maintaining one high-side bridge arm permanently on
and using the PWM signal to toggle between enabling the
corresponding low-side bridge arm and the opposite high-side
bridge arm. This means that the block uses a freewheeling
diode in parallel with a bridge arm, plus another series bridge
arm, to complete the dissipation circuit when the bridge turns
off.
This parameter is only visible when you select PWM for the
Simulation mode parameter, or when you select Averaged
for the Simulation mode parameter and Unsmoothed or
discontinuous for the Load current characteristics
parameter.
Load current characteristics
Select one of the following options for the type of load current:
• Smoothed — Assumes that the current is practically continuous
due to load inductance. This option is the default.
• Unsmoothed or discontinuous — Use this option for cases
where the current is not smooth, or possibly discontinuous (that

1-180
H-Bridge

is, it goes to zero between PWM cycles). For this option, you
must also provide values for the Total load series resistance,
Total load series inductance, and PWM frequency
parameters. During simulation, the block uses these values to
calculate a more accurate value for H-bridge output voltage
that achieves the same average current as would be present
if simulating in PWM mode.
This parameter is only visible when you select Averaged for the
Simulation mode parameter.
Load total series resistance
The total load series resistance seen by the H-bridge. The default
value is 10 Ω.

This parameter is only visible when you select Averaged


for the Simulation mode parameter and Unsmoothed or
discontinuous for the Load current characteristics
parameter.
Load total series inductance
The total load series inductance seen by the H-bridge. As well
as motor inductance, you should include any series inductance
added external to the motor to smooth current. The default value
is 1e-5 H.

This parameter is only visible when you select Averaged


for the Simulation mode parameter and Unsmoothed or
discontinuous for the Load current characteristics
parameter.
PWM frequency
The PWM frequency at which the H-bridge is driven. For
consistency, this should be the same value as the PWM frequency
specified by the Controlled PWM Voltage block driving the
H-Bridge. The default value is 10 kHz.

This parameter is only visible when you select Averaged


for the Simulation mode parameter and Unsmoothed or

1-181
H-Bridge

discontinuous for the Load current characteristics


parameter.

Input Thresholds Tab

Enable threshold voltage


Threshold above which the voltage at the PWM port must rise to
enable the H-Bridge output. This parameter is used only when
the Simulation mode parameter on the Simulation Mode &
Load Assumptions tab is set to PWM. The default value is 2.5 V.
PWM signal amplitude
The amplitude of the signal at the PWM input. The H-Bridge
block uses this parameter only when the Simulation mode
parameter on the Simulation Mode & Load Assumptions tab
is set to Averaged. The default value is 5 V.
Reverse threshold voltage
When the voltage at the REV port is greater than this threshold,
the output polarity becomes negative. The default value is 2.5 V.
Braking threshold voltage
When the voltage at the BRK port is greater than this threshold,
the H-Bridge output terminals are short-circuited via the
following series of devices:
• One bridge arm
• One bridge arm in parallel with a conducting freewheeling
diode
The default value is 2.5 V.

Bridge Parameters Tab

Output voltage amplitude


The amplitude of the voltage across the H-Bridge output ports
when the output is on. The default value is 12 V.
Total bridge on resistance
The total effective resistance of the two semiconductor switches
that connect the load to the two power rails when the voltage at

1-182
H-Bridge

the PWM port is greater than the value of the Enable threshold
voltage parameter on the Input Thresholds tab. The default
value is 0.1 Ω.
Freewheeling diode on resistance
The total resistance in the freewheeling diodes that dissipate the
current that flows through the motor when the voltage at the
PWM port is less than the value of the Enable threshold voltage
parameter on the Input Thresholds tab. This parameter is only
visible when you select PWM for the Simulation mode parameter
on the Simulation Mode & Load Assumptions tab. The
default value is 0.1 Ω.

Ports The block has the following ports:

+ref
Positive electrical output voltage.
-ref
Negative electrical output voltage.
PWM
Pulse-width modulated signal. The voltage is defined relative to
the REF port.
REF
Floating zero volt reference.
REV
Voltage that controls when to reverse the polarity of the H-Bridge
output. The voltage is defined relative to the REF port.
BRK
Voltage that controls when to short circuit the H-Bridge output.
The voltage is defined relative to the REF port.

Examples See the Controlled DC Motor, Linear Electrical Actuator (System-Level


Model) and Linear Electrical Actuator (Implementation Model)
examples.

1-183
Incandescent Lamp

Purpose Model incandescent lamp, with resistance depending on temperature

Library Passive Devices

Description The Incandescent Lamp block models an incandescent lamp, the key
characteristic of which is that the resistance increases as the filament
warms up.
Under the simplifying assumption that the rate of heat loss from the
filament is proportional to temperature difference to ambient, the
temperature of the filament is governed by

dT
ktc  i 2 R  kT
dt
and the filament resistance is governed by the following equation

R  R0 1   T 

where:

• R0 is the initial resistance at turn-on (when filament is at ambient


temperature).
• T is the filament temperature relative to ambient temperature.
• α is the resistance temperature coefficient.
• tc is the thermal time constant.
• k is the heat transfer coefficient.
• R is the filament resistance.
• i is the filament current.

There are two parameterization options:

1-184
Incandescent Lamp

• If you select Specify resistance values directly, the block uses


values that you provide for filament resistance when on and at
turn-on to determine the value for the heat transfer coefficient.
• If you select Specify currents, the block uses values that you
provide for filament current when on and at turn-on to determine the
value for the heat transfer coefficient.

Optionally you can specify a simulation time at which the lamp


fails by providing a finite value for the Time at which lamp goes
open circuit parameter on the Faults tab. When in the open-circuit
state, the lamp resistance is set to be the value of the Open-circuit
resistance parameter.

Dialog
Box and
Parameters

• “Resistance Tab” on page 1-186


• “Dynamics Tab” on page 1-187
• “Faults Tab” on page 1-187

1-185
Incandescent Lamp

Resistance Tab

Parameterization
Select one of the following methods for block parameterization:
• Specify resistance values directly — Provide the values
for filament resistance at turn-on and when on in steady state.
The block determines the value for the heat transfer coefficient
based on these values. This is the default option.
• Specify currents — Provide the values for filament current
at turn-on and when on in steady state. The block determines
the value for the heat transfer coefficient based on these values.
Initial resistance at turn-on
The resistance seen by the external circuit when the lamp
is initially turned on. This parameter is only visible when
you select Specify resistance values directly for the
Parameterization parameter. The default value is 0.15 Ω.
Steady-state resistance when on
The resistance seen by the external circuit when the lamp is
on and in steady state. This parameter is only visible when
you select Specify resistance values directly for the
Parameterization parameter. This resistance should be greater
than the Initial resistance at turn-on. The default value is 1 Ω.
Inrush current at turn-on
The current through the lamp when it is initially turned on. This
parameter is only visible when you select Specify currents for
the Parameterization parameter. The default value is 70 A.
Steady-state current when on
The current through the lamp when it is on and in steady state.
This parameter is only visible when you select Specify currents
for the Parameterization parameter. This current should be less
than the Inrush current at turn-on. The default value is 10 A.

1-186
Incandescent Lamp

Rated voltage
The rated voltage for the lamp, and the voltage value for which
the resistance or current values are provided in the on and
turn-on states. The default value is 12 V.
Resistance temperature coefficient
The fractional increase in resistance per unit increase in
temperature. The default value is 0.004 1/K.

Dynamics Tab

Thermal time constant


The first-order thermal time constant for filament temperature
when the lamp is turned on or off. The default value is 25 ms.
Initial lamp state
Select between On and Off. The default is Off.

Faults Tab

Time at which lamp goes open circuit


For simulation times greater than this parameter value
the filament resistance becomes equal to the Open-circuit
resistance. The default value is inf seconds. Specifying a finite
value for this parameter lets you simulate the fault dynamics
when the bulb burns out.
Open-circuit resistance
The value of the filament resistance used when the lamp goes
open-circuit. The default value is 1e6 Ω.

Ports The block has the following ports:

+
Positive electrical port
-
Negative electrical port

1-187
Incremental Shaft Encoder

Purpose Model device that converts information about angular shaft position
into electrical pulses

Library Sensors

Description The Incremental Shaft Encoder block represents a device that converts
information about the angular position of a shaft into electrical pulses.
The block produces N pulses on ports A and B per shaft revolution,
where N is the value you specify for the Pulses per revolution
parameter. Pulses A and B are 90 degrees out of phase. If the shaft
rotates in a positive direction, then A leads B. The block produces a
single index pulse on port Z once per revolution. The Z pulse positive
transition always coincides with an A pulse positive transition. The
voltages at output ports A, B, and Z are defined relative to the REF
reference port voltage.
Use this block if you need to model the shaft encoder signals, either
to support development of a decoding algorithm, or to include the
quantization effects. Otherwise, use the Simscape Ideal Rotational
Motion Sensor block.

Basic The Incremental Shaft Encoder block has the following limitations:
Assumptions
and • The Incremental Shaft Encoder block is not linearizable. Use the
Simscape Ideal Rotational Motion Sensor block for control design
Limitations
studies where you need to linearize your model.

1-188
Incremental Shaft Encoder

Dialog
Box and
Parameters

Pulses per revolution


The number of pulses produced on each of the A and B phases per
revolution of the shaft. The default value is 2.
Output voltage amplitude
The amplitude of the shaft encoder output voltage when the
output is high. The default value is 5 V.
Index pulse offset relative to shaft initial angle
The offset of the index pulse Z relative to the angle of the shaft at
the start of the simulation. This parameter lets you set the initial
location of the index pulse. The default value is 0°.

Ports The block has the following ports:

R
Mechanical rotational conserving port associated with the sensor
positive probe
C
Mechanical rotational conserving port associated with the sensor
negative (reference) probe

1-189
Incremental Shaft Encoder

A
Encoded electrical output
B
Encoded electrical output
Z
Index, or synchronization, electrical output
REF
Floating zero volt reference

See Also Ideal Rotational Motion Sensor

1-190
Induction Motor

Purpose Model induction motor powered by ideal AC supply

Library Rotational Actuators

Description

The Induction Motor block represents the electrical and torque


characteristics of an induction motor powered by an ideal AC supply.
The following figure shows the equivalent circuit model of the Induction
Motor block.

I R1 jX1 = jω L1 jX 2 = jω L2 I2 R2

Rotor back emf


V 1− s
jX m = jω Lm R2
s

In the figure:

• R1 is the stator resistance.


• R2 is the rotor resistance with respect to the stator.
• L1 is the stator inductance.

1-191
Induction Motor

• L2 is the rotor inductance with respect to the stator.


• Lm is magnetizing inductance.
• s is the rotor slip.

• V and I are the sinusoidal supply voltage and current phasors.

Rotor slip s is defined in terms of the mechanical rotational speed m ,


the number of pole pairs p, and the electrical supply frequency ω by

pm
s =1−

This means that the slip is one when starting, and zero when running
synchronously with the supply frequency.
For an n-phase induction motor the torque-speed relationship is given
by:

npR2 Vrms 2
T=
s ⎛ 1− s ⎞
2

2 ⎟ + ( X1 + X 2 )
2
⎜ 1
R + R2 + R
⎝ s ⎠
where:

• Vrms is the line-neutral supply voltage for a star-configuration


induction motor, and the line-to-line voltage for a delta-configuration
induction motor.
• n is the number of phases.

You can parameterize this block in terms of the preceding equivalent


circuit model parameters or in terms of the motor ratings the block
uses to derive these parameters.
This block produces a positive torque acting from the mechanical C
to R ports.

1-192
Induction Motor

Thermal Ports
The block has two optional thermal ports, one per winding, hidden by
default. To expose the thermal ports, right-click the block in your model,
and then from the context menu select Simscape block choices >
Show thermal port. This action displays the thermal ports on the
block icon, and adds the Temperature Dependence and Thermal
port tabs to the block dialog box. These tabs are described further on
this reference page.
Use the thermal ports to simulate the effects of copper resistance losses
that convert electrical power to heat. For more information on using
thermal ports in actuator blocks, see “Simulating Thermal Effects in
Rotational and Translational Actuators”.

Basic The model is based on the following assumptions:


Assumptions
and • The block does not model the starting mechanism for a single-phase
induction motor.
Limitations
• When you parameterize the block by motor ratings, the block derives
the equivalent circuit model parameters by assuming that the effect
of the magnetizing inductance Lm is negligible, and the magnetizing
inductance is not included in the simulated component.

1-193
Induction Motor

Dialog
Box and
Parameters

• “Electrical Torque Tab” on page 1-195


• “Power Supply Tab” on page 1-198
• “Mechanical Tab” on page 1-198
• “Temperature Dependence Tab” on page 1-198
• “Thermal Port Tab” on page 1-199

1-194
Induction Motor

Electrical Torque Tab

Model parameterization
Select one of the following methods for block parameterization:
• By motor ratings — Provide electrical torque parameters
that the block converts to an equivalent circuit model of the
motor assuming that the effect of the magnetizing inductance
Lm is negligible. This is the default method.
• By equivalent circuit parameters — Provide electrical
parameters for an equivalent circuit model of the motor.
Stator resistance R1
Resistance of the stator winding. The default value is 1 Ω.
This parameter is only visible when you select By equivalent
circuit parameters for the Model parameterization
parameter.
Rotor resistance R2
Resistance of the rotor, specified with respect to the stator.
The default value is 1 Ω. This parameter is only visible when
you select By equivalent circuit parameters for the Model
parameterization parameter.
Stator inductance L1
Inductance of the stator winding. The default value is 0.02 H.
This parameter is only visible when you select By equivalent
circuit parameters for the Model parameterization
parameter.
Rotor inductance L2
Inductance of the rotor, specified with respect to the stator. The
default value is 0.02 H. This parameter is only visible when
you select By equivalent circuit parameters for the Model
parameterization parameter.
Magnetizing inductance Lm
Magnetizing inductance of the stator. This parameter is only
visible when you select By equivalent circuit parameters for

1-195
Induction Motor

the Model parameterization parameter. Its value is hard to


estimate from motor parameters, but the effect is usually small.
If you do not know its value, use a typical value of 25 times the
Stator inductance L1 value. The default value is 0.5 H.
Rated mechanical power
Mechanical power the motor delivers when running at the
rated speed. The default value is 825 W. This parameter is
only visible when you select By motor ratings for the Model
parameterization parameter.
Rated speed
Speed at which the motor delivers the specified Rated
mechanical power value. The default value is 3.5e+03 rpm.
This parameter is only visible when you select By motor ratings
for the Model parameterization parameter.
Rated RMS line-to-line voltage
Line-to-line voltage at which the motor ratings are specified.
The default value is 200 V. This parameter is only visible when
you select By motor ratings for the Model parameterization
parameter.
Rated supply frequency
Frequency of the AC supply voltage at which the motor ratings
are specified. The default value is 60 hertz. This parameter is
only visible when you select By motor ratings for the Model
parameterization parameter.
Rated RMS line current
Line current at which the motor delivers the specified Rated
mechanical power value. The default value is 2.7 A. This
parameter is only visible when you select By motor ratings for
the Model parameterization parameter.
R1 parameterization
Select one of the following parameterizations for the equivalent
circuit resistance, R1, of the motor:

1-196
Induction Motor

• From motor efficiency — Calculate R1 from the motor


efficiency. This is the default method.
• From power factor — Calculate R1 from the motor power
factor.
• Use measured stator resistance R1 — Measure R1 directly.
This parameter is only visible when you select By motor ratings
for the Model parameterization parameter.
Motor efficiency (percent)
the percentage of input power to the motor that gets delivered to
the mechanical load when running at the Rated speed value. The
default value is 95. This parameter is only visible when you select
By motor ratings for the Model parameterization parameter
and From motor efficiency for the R1 parameterization
parameter.
Motor power factor
The cosine of the angle by which the supply current lags
the supply voltage when running at the Rated mechanical
power value. The default value is 0.93. This parameter is
only visible when you select By motor ratings for the Model
parameterization parameter and From power factor for the
R1 parameterization parameter.
Measured stator resistance R1
the measured stator resistance. The default value is 1 Ω.
This parameter is only visible when you select By motor
ratings for the Model parameterization parameter and Use
measured stator resistance R1 for the R1 parameterization
parameter.
Number of pole pairs
Total number of pole pairs for the motor. The default value is 1.
Number of phases
Number of supply phases. The default value is 3.
Stator connections
Select one of the following motor configurations:

1-197
Induction Motor

• Delta configuration — Connect the motor stator windings in


delta configuration. This is the default method.
• Star configuration — Connect the motor stator windings in
star configuration.

Power Supply Tab

Supply RMS line-to-line voltage


The line-to-line voltage that supplies the motor. The default value
is 200 V.
Supply frequency
Frequency of the AC supply voltage. The default value is 60 hertz.

Mechanical Tab

Rotor inertia
Rotor inertia. The default value is 0.1 kg*m2. The value can be
zero.
Rotor damping
Rotor damping. The default value is 2e-06 N*m/(rad/s). The
value can be zero.
Initial rotor speed
Speed of the rotor at the start of the simulation. The default
value is 0 rpm.

Temperature Dependence Tab


This tab appears only for blocks with exposed thermal ports. For more
information, see “Thermal Ports” on page 1-193.

Resistance temperature coefficients, [alpha_1 alpha_2]


A 1 by 2 row vector defining the coefficient α in the equation
relating resistance to temperature, as described in “Thermal
Model for Actuator Blocks”. The first element corresponds to the
stator, and the second to rotor. The default value is for copper,
and is [ 0.00393 0.00393 ] 1/K.

1-198
Induction Motor

Measurement temperature
The temperature for which motor parameters are defined. The
default value is 25 C.

Thermal Port Tab


This tab appears only for blocks with exposed thermal ports. For more
information, see “Thermal Ports” on page 1-193.

Thermal masses, [M_1 M_2]


A 1 by 2 row vector defining the thermal mass for the stator and
rotor windings. The thermal mass is the energy required to raise
the temperature by one degree. The default value is [ 100 100
] J/K.
Initial temperatures, [T_A T_B]
A 1 by 2 row vector defining the temperature of the stator and
rotor thermal ports at the start of simulation. The default value is
[ 25 25 ] C.

Ports The block has the following ports:

W
Real power.
wm
Mechanical speed.
VAR
Imaginary power.
s
Motor slip.
C
Mechanical rotational conserving port.
R
Mechanical rotational conserving port.

1-199
Induction Motor

H1
Stator thermal port. For more information, see “Thermal Ports”
on page 1-193.
H2
Rotor thermal port. For more information, see “Thermal Ports”
on page 1-193.

References [1] S.E. Lyshevski. Electromechanical Systems, Electric Machines, and


Applied Mechatronics, CRC, 1999.

See Also DC Motor | Servomotor | Shunt Motor | Universal Motor

1-200
Light-Emitting Diode

Purpose Model light-emitting diode as exponential diode and current sensor


in series

Library Sensors

Description The Light-Emitting Diode block represents a light-emitting diode as an


exponential diode in series with a current sensor. The optical power
presented at the signal port W is equal to the product of the current
flowing through the diode and the Optical power per unit current
parameter value.
The exponential diode model provides the following relationship
between the diode current I and the diode voltage V:

 qV 
I  IS   e NkTm1  1 
 
 
where:

• q is the elementary charge on an electron (1.602176e–19 Coulombs).


• k is the Boltzmann constant (1.3806503e–23 J/K).
• N is the emission coefficient.
• IS is the saturation current.
• Tm1 is the temperature at which the diode parameters are specified,
as defined by the Measurement temperature parameter value.

qV
When (qV / NkTm1) > 80, the block replaces e NkTm1 with (qV / NkTm1 –
79)e80, which matches the gradient of the diode current at (qV / NkTm1)
= 80 and extrapolates linearly. When (qV / NkTm1) < –79, the block
qV
replaces e NkTm1 with (qV / NkTm1 + 80)e–79, which also matches the
gradient and extrapolates linearly. Typical electrical circuits do not

1-201
Light-Emitting Diode

reach these extreme values. The block provides this linear extrapolation
to help convergence when solving for the constraints during simulation.
When you select Use parameters IS and N for the Parameterization
parameter, you specify the diode in terms of the Saturation current
IS and Emission coefficient N parameters. When you select Use I-V
curve data points for the Parameterization parameter, you specify
two voltage and current measurement points on the diode I-V curve and
the block derives the IS and N values. When you specify current and
voltage measurements, the block calculates IS and N as follows:

• N = ((V1 − V2 ) / Vt ) /(log( I1 ) − log( I 2 ))

• IS = ( I1 /(exp(V1 /( NVt )) − 1) + I 2 /(exp(V2 /( NVt )) − 1) ) / 2


where:

• Vt = kTm1 / q.
• V1 and V2 are the values in the Voltages [V1 V2] vector.
• I1 and I2 are the values in the Currents [I1 I2] vector.

The exponential diode model provides the option to include a junction


capacitance:

• When you select Fixed or zero junction capacitance for the


Junction capacitance parameter, the capacitance is fixed.
• When you select Use parameters CJO, VJ, M & FC for the
Junction capacitance parameter, the block uses the coefficients
CJO, VJ, M, and FC to calculate a junction capacitance that depends
on the junction voltage.
• When you select Use C-V curve data points for the Junction
capacitance parameter, the block uses three capacitance values
on the C-V capacitance curve to estimate CJO, VJ, and M and
uses these values with the specified value of FC to calculate a

1-202
Light-Emitting Diode

junction capacitance that depends on the junction voltage. The block


calculates CJO, VJ, and M as follows:

- CJ 0 = C1 ((VR 2 − VR1 ) /(VR 2 − VR1 (C2 / C1 )−1/ M )) M


- VJ = −(−VR 2 (C1 / C2 )−1/ M + VR1 ) /(1 − (C1 / C2 )−1/ M )
- M = log(C3 / C2 ) / log(VR 2 / VR 3 )
where:
- VR1, VR2, and VR3 are the values in the Reverse bias voltages
[VR1 VR2 VR3] vector.
- C1, C2, and C3 are the values in the Corresponding capacitances
[C1 C2 C3] vector.
It is not possible to estimate FC reliably from tabulated data, so
you must specify its value using the Capacitance coefficient FC
parameter. In the absence of suitable data for this parameter, use a
typical value of 0.5.
The reverse bias voltages (defined as positive values) should satisfy
VR3 > VR2 > VR1. This means that the capacitances should satisfy
C1 > C2 > C3 as reverse bias widens the depletion region and hence
reduces capacitance. Violating these inequalities results in an error.
Voltages VR2 and VR3 should be well away from the Junction potential
VJ. Voltage VR1 should be less than the Junction potential VJ, with a
typical value for VR1 being 0.1 V.

The voltage-dependent junction is defined in terms of the capacitor


charge storage Qj as:

• For V < FC·VJ:

Q j  CJ 0  (VJ / ( M  1))  ((1  V / VJ )1 M  1)

• For V ≥ FC·VJ:

1-203
Light-Emitting Diode

Q j  CJ 0  F1  (CJ 0 / F2 )  ( F3  (V  FC  VJ )  0.5( M / VJ )  (V 2  ( FC  VJ ) 2 ))

where:

• F1  (VJ / (1  M ))  (1  (1  FC )1 M ))

• F2  (1  FC )1 M ))
• F3  1  FC  (1  M )
These equations are the same as used in [2], except that the temperature
dependence of VJ and FC is not modeled. This model does not include
the diffusion capacitance term that affects performance for high
frequency switching applications.
The Light-Emitting Diode block contains several options for modeling
the dependence of the diode current-voltage relationship on the
temperature during simulation. Temperature dependence of the
junction capacitance is not modeled, this being a much smaller effect.
For details, see the Diode reference page.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from the
context menu select Simscape block choices > Show thermal port.
This action displays the thermal port H on the block icon, and adds the
Thermal port tab to the block dialog box.
Use the thermal port to simulate the effects of generated heat and
device temperature. For more information on using thermal ports and
on the Thermal port tab parameters, see “Simulating Thermal Effects
in Semiconductors”.

1-204
Light-Emitting Diode

Basic The Light-Emitting Diode block has the following limitations:


Assumptions
and • When you select Use I-V curve data points for the
Parameterization parameter, choose a pair of voltages near the
Limitations
diode turn-on voltage. Typically this is in the range from 0.05 to
1 Volt. Using values outside of this region may lead to numerical
issues and poor estimates for IS and N.
• You may need to use nonzero ohmic resistance and junction
capacitance values to prevent numerical simulation issues, but the
simulation may run faster with these values set to zero.

Dialog
Box and
Parameters

• “Main Tab” on page 1-206


• “Ohmic Resistance Tab” on page 1-207
• “Junction Capacitance Tab” on page 1-207
• “Temperature Dependence Tab” on page 1-208

1-205
Light-Emitting Diode

Main Tab

Optical power per unit current


The amount of optical power the light-emitting diode generates
per unit of current flowing through the diode. The default value
is 0.005 W/A.
Parameterization
Select one of the following methods for model parameterization:
• Use I-V curve data points — Specify measured data at two
points on the diode I-V curve. This is the default method.
• Use parameters IS and N — Specify saturation current and
emission coefficient.
Currents [I1 I2]
A vector of the current values at the two points on the diode I-V
curve that the block uses to calculate IS and N. This parameter is
only visible when you select Use I-V curve data points for the
Parameterization parameter. The default value is [ 0.0017
0.003 ] A.
Voltages [V1 V2]
A vector of the voltage values at the two points on the diode I-V
curve that the block uses to calculate IS and N. This parameter
is only visible when you select Use I-V curve data points for
the Parameterization parameter. The default value is [ 0.9
1.05 ] V.
Saturation current IS
The magnitude of the current that the ideal diode equation
approaches asymptotically for very large reverse bias levels. This
parameter is only visible when you select Use parameters IS
and N for the Parameterization parameter. The default value
is 5e-5 A.
Measurement temperature
The temperature at which IS or the I-V curve was measured. The
default value is 25 C.

1-206
Light-Emitting Diode

Emission coefficient N
The diode emission coefficient or ideality factor. This parameter
is only visible when you select Use parameters IS and N for the
Parameterization parameter. The default value is 10.

Ohmic Resistance Tab

Ohmic resistance RS
The series diode connection resistance. The default value is 0.1 Ω.

Junction Capacitance Tab

Junction capacitance
Select one of the following options for modeling the junction
capacitance:
• Fixed or zero junction capacitance — Model the junction
capacitance as a fixed value.
• Use C-V curve data points — Specify measured data at
three points on the diode C-V curve.
• Use parameters CJ0, VJ, M & FC — Specify zero-bias
junction capacitance, junction potential, grading coefficient,
and forward-bias depletion capacitance coefficient.
Zero-bias junction capacitance CJ0
The value of the capacitance placed in parallel with the
exponential diode term. This parameter is only visible when
you select Fixed or zero junction capacitance or Use
parameters CJ0, VJ, M & FC for the Junction capacitance
parameter. The default value is 20 pF.
Reverse bias voltages [VR1 VR2 VR3]
A vector of the reverse bias voltage values at the three points on
the diode C-V curve that the block uses to calculate CJ0, VJ, and
M. This parameter is only visible when you select Use C-V curve
data points for the Junction capacitance parameter. The
default value is [ 0.1 10 100 ] V.

1-207
Light-Emitting Diode

Corresponding capacitances [C1 C2 C3]


A vector of the capacitance values at the three points on the diode
C-V curve that the block uses to calculate CJ0, VJ, and M. This
parameter is only visible when you select Use C-V curve data
points for the Junction capacitance parameter. The default
value is [ 15 10 2 ] pF.
Junction potential VJ
The junction potential. This parameter is only visible when you
select Use parameters CJ0, VJ, M & FC for the Junction
capacitance parameter. The default value is 1 V.
Grading coefficient M
The grading coefficient. This parameter is only visible when
you select Use parameters CJ0, VJ, M & FC for the Junction
capacitance parameter. The default value is 0.5.
Capacitance coefficient FC
Fitting coefficient that quantifies the decrease of the depletion
capacitance with applied voltage. This parameter is only visible
when you select Use C-V curve data points or Use parameters
CJ0, VJ, M & FC for the Junction capacitance parameter.
The default value is 0.5.

Temperature Dependence Tab

Parameterization
Select one of the following methods for temperature dependence
parameterization:
• None Simulate at parameter measurement temperature
— Temperature dependence is not modeled, or the model is
simulated at the measurement temperature Tm1 (as specified
by the Measurement temperature parameter on the Main
tab). This is the default method.
• Use an I-V data point at second measurement
temperature T2 — If you select this option, you specify
a second measurement temperature Tm2, and the current
and voltage values at this temperature. The model uses

1-208
Light-Emitting Diode

these values, along with the parameter values at the first


measurement temperature Tm1, to calculate the energy gap
value.
• Specify saturation current at second measurement
temperature T2 — If you select this option, you specify a
second measurement temperature Tm2, and saturation current
value at this temperature. The model uses these values,
along with the parameter values at the first measurement
temperature Tm1, to calculate the energy gap value.
• Specify the energy gap EG — Specify the energy gap value
directly.
Current I1 at second measurement temperature
Specify the diode current I1 value when the voltage is V1 at
the second measurement temperature. This parameter is only
visible when you select Use an I-V data point at second
measurement temperature T2 for the Parameterization
parameter. The default value is 0.0034 A.
Voltage V1 at second measurement temperature
Specify the diode voltage V1 value when the current is I1 at
the second measurement temperature. This parameter is only
visible when you select Use an I-V data point at second
measurement temperature T2 for the Parameterization
parameter. The default value is 1.05 V.
Saturation current, IS, at second measurement temperature
Specify the saturation current IS value at the second
measurement temperature. This parameter is only visible
when you select Specify saturation current at second
measurement temperature T2 for the Parameterization
parameter. The default value is 1.8e-4 A.
Second measurement temperature
Specify the value for the second measurement temperature.
This parameter is only visible when you select either Use an
I-V data point at second measurement temperature T2
or Specify saturation current at second measurement

1-209
Light-Emitting Diode

temperature T2 for the Parameterization parameter. The


default value is 125 C.
Energy gap parameterization
This parameter is only visible when you select Specify the
energy gap EG for the Parameterization parameter. It lets
you select a value for the energy gap from a list of predetermined
options, or specify a custom value:
• Use nominal value for silicon (EG=1.11eV) — This is
the default.
• Use nominal value for 4H-SiC silicon carbide
(EG=3.23eV)
• Use nominal value for 6H-SiC silicon carbide
(EG=3.00eV)
• Use nominal value for germanium (EG=0.67eV)
• Use nominal value for gallium arsenide (EG=1.43eV)
• Use nominal value for selenium (EG=1.74eV)
• Use nominal value for Schottky barrier diodes
(EG=0.69eV)
• Specify a custom value — If you select this option, the
Energy gap, EG parameter appears in the dialog box, to let
you specify a custom value for EG.
Energy gap, EG
Specify a custom value for the energy gap, EG. This parameter
is only visible when you select Specify a custom value for the
Energy gap parameterization parameter. The default value
is 1.11 eV.
Saturation current temperature exponent parameterization
Select one of the following options to specify the saturation
current temperature exponent value:
• Use nominal value for pn-junction diode (XTI=3) —
This is the default.

1-210
Light-Emitting Diode

• Use nominal value for Schottky barrier diode (XTI=2)


• Specify a custom value — If you select this option, the
Saturation current temperature exponent, XTI parameter
appears in the dialog box, to let you specify a custom value
for XTI.
Saturation current temperature exponent, XTI
Specify a custom value for the saturation current temperature
exponent, XTI. This parameter is only visible when you
select Specify a custom value for the Saturation current
temperature exponent parameterization parameter. The
default value is 3.
Device simulation temperature
Specify the value for the temperature Ts, at which the device is
to be simulated. The default value is 25 C.

Ports The block has the following ports:

W
Optical output power
+
Electrical conserving port associated with the diode positive
terminal
-
Electrical conserving port associated with the diode negative
terminal

References [1] H. Ahmed and P.J. Spreadbury. Analogue and digital electronics for
engineers. 2nd Edition, Cambridge University Press, 1984.

[2] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993.

See Also Diode | Optocoupler | Photodiode

1-211
Multiplier

Purpose Model integrated circuit multiplier

Library Integrated Circuits

Description The Multiplier block models an integrated circuit multiplier. The block
implements the following equation, which defines the voltage applied
to the output port:

⎛ ( X − X 2 ) ( Y1 − Y2 ) ⎞
Vout = A ⎜ 1 − ( Z1 − Z2 ) ⎟
⎝ K ⎠

where X1, X2, Y1, Y2, Z1, Z2 are the voltages presented at the input ports,
A is the gain, and K is the scale factor.

In a typical multiplication circuit, the output is fed back into input Z1,
which results in the following gain (assuming that A is large):

⎛ ( X − X 2 ) ( Y1 − Y2 ) ⎞
Vout = ⎜ 1 + Z2 ⎟
⎝ K ⎠

The value of the scale factor K is usually altered by an external resistor


bias network. The Multiplier block implements K as an internal gain,
and the external bias network is not necessary for system simulation. A
typical value for K is 10, with a typical adjustment down to 3.
You can use the Multiplier block to implement a number of other
functions, as well as multiplication. Examples include division,
squares, and square roots. For example circuits, consult manufacturer
datasheets.
The following figure shows the internal model structure of the
Multiplier block. It includes the Band-Limited Op-Amp block to model
finite bandwidth and slew-rate limiting.

1-212
Multiplier

The next figure shows one of the differential subsystem blocks. All
three differential subsystem blocks are identical in structure.

Basic The Multiplier block has the following limitations:


Assumptions
and • Only differential limiting of the inputs is implemented. You must
ensure that the absolute values of the inputs you use keep the actual
Limitations
device operating in its linear region.

1-213
Multiplier

• Output current is such that the integrated circuit is operating in the


linear I-V region, which can be approximated by a voltage source
plus a series output resistance.
• Input offset voltage is not modeled, and the input voltage-current
relationship is treated as linear within the differential signal voltage
range.

Dialog
Box and
Parameters

• “Main Tab” on page 1-215


• “Inputs Tab” on page 1-215
• “Outputs Tab” on page 1-215

1-214
Multiplier

Main Tab

Scaling factor, K
The scaling factor K in the equation that defines output voltage.
Datasheets sometimes refer to it as the scale factor, or SF. The
default value is 10 V.
Gain, A
The gain of the internal operational amplifier, corresponding
to the gain A in the equation that defines output voltage. The
default value is 3e3.

Inputs Tab

Differential resistance, Rin


Each of the differential inputs is approximated as a linear
resistor with value Rin. Set this value to the datasheet value for
differential resistance. The default value is 1e7 Ω.
Differential signal voltage range
This value, Vdiff_max, is used to limit the magnitude of each
of the three differential input voltages. Set this value to the
datasheet value for differential signal voltage range. The default
value is 10 V.

Outputs Tab

Output resistance, Rout


The multiplier output stage is modeled as a voltage source plus
series resistor inside the Band-Limited Op-Amp block. This
parameter specifies the value of this series resistor. The default
value is 0.1 Ω.
Minimum output, Vmin
The lower limit of the output voltage. The default value is -11 V.
Maximum output, Vmax
The upper limit of the output voltage. The default value is 11 V.

1-215
Multiplier

Maximum slew rate, Vdot


The maximum positive or negative rate of change of output
voltage magnitude. The default value is 20 V/μs.
Bandwidth, f
The bandwidth of the Band-Limited Op-Amp block. The default
value is 1 MHz.
Initial output voltage, V0
The value of the initial Multiplier block output if the Start
simulation from steady-state option is not selected in the
Solver block. The default value is 0 V.

Ports The block has six electrical conserving ports that serve as signal input
ports and one electrical conserving port that outputs the multiplied
signal.

1-216
N-Channel IGBT

Purpose Model N-Channel IGBT

Library Semiconductor Devices

Description The N-Channel IGBT block provides two ways of modeling an IGBT:

• As an equivalent circuit based on a PNP bipolar transistor and


N-channel MOSFET
• By a lookup table approximation to the I-V (current-voltage) curve
Representation by Equivalent Circuit
The equivalent circuit consists of a PNP Bipolar Transistor block driven
by an N-Channel MOSFET block, as shown in the following figure:

The MOSFET source is connected to the bipolar transistor collector,


and the MOSFET drain is connected to the bipolar transistor base. The
MOSFET uses the equations shown in the N-Channel MOSFET block
reference page. The bipolar transistor uses the equations shown in the
PNP Bipolar Transistor block reference page, but with the addition of
an emission coefficient parameter N that scales kT/q.
The N-Channel IGBT block uses the on and off characteristics you
specify in the block dialog box to estimate the parameter values for the
underlying N-Channel MOSFET and PNP bipolar transistor.

1-217
N-Channel IGBT

The block uses the off characteristics to calculate the base-emitter


voltage, Vbe, and the saturation current, IS.
When the transistor is off, the gate-emitter voltage is zero and the IGBT
base-collector voltage is large, so the PNP base and collector current
equations simplify to:

 1 1 
I b  0   I s  (e  qVbe /( NkT )  1)  
 F R 
  V  1 
I c   I s e  qVbe /( NkT ) 1  bc   
  VAF   R 
where N is the Emission coefficient, N parameter value, VAF is the
forward Early voltage, and Ic and Ib are defined as positive flowing into
the collector and base, respectively. See the PNP Bipolar Transistor
reference page for definitions of the remaining variables. The first
equation can be solved for Vbe.
The base current is zero in the off-condition, and hence Ic = –Ices, where
Ices is the Zero gate voltage collector current. The base-collector voltage,
Vbc, is given by Vbc = Vces + Vces, where Vces is the voltage at which Ices is
measured. Hence we can rewrite the second equation as follows:

  V V  1 
I ces  I s e  qVbe /( NkT ) 1  ces be   
  VAF   R 

The block sets βR and βF to typical values of 1 and 50, so these two
equations can be used to solve for Vbe and IS:

1-218
N-Channel IGBT

− NkT ⎛  ⎞
Vbe = log ⎜1 + F ⎟
q ⎝ R ⎠
Ic
Is =
1
e− qVbe /( NkT ) +
R

Note The block does not require an exact value for βF because it can
adjust the MOSFET gain K to ensure the overall device gain is correct.

The block parameters Collector-emitter saturation voltage,


Vce(sat) and Collector current at which Vce(sat) is defined are
used to determine Vbe(sat) by solving the following equation:

  qV /( NkT )  Vce ( sat )  Vbe ( sat )  1 


I ce ( sat )  I s e be ( sat ) 1   
  VAF  R 
Given this value, the block calculates the MOSFET gain, K, using the
following equation:

⎡ V 2⎤
I ds = I b = K ⎢(VGE ( sat ) − Vth )Vds − ds ⎥
⎣ 2 ⎦

where Vth is the Gate-emitter threshold voltage, Vge(th) parameter


value and VGE(sat) is the Gate-emitter voltage at which Vce(sat) is
defined parameter value.
Vds is related to the transistor voltages as Vds = Vce – Vbe. The block
substitutes this relationship for Vds, sets the base-emitter voltage and
base current to their saturated values, and rearranges the MOSFET
equation to give

1-219
N-Channel IGBT

I b ( sat )
K
 Vbe ( sat )  Vce ( sat )  
2

(VGE ( sat )  Vth ) Vbe ( sat )  Vce ( sat )   


 2 
 
where Vce(sat) is the Collector-emitter saturation voltage, Vce(sat)
parameter value.
These calculations ensure the zero gate voltage collector current and
collector-emitter saturation voltage are exactly met at these two
specified conditions. However, the current-voltage plots are very
sensitive to the emission coefficient N and the precise value of Vth. If
the manufacturer datasheet gives current-voltage plots for different VGE
values, then the N and Vth can be tuned by hand to improve the match.
Representation by Lookup Table
If using the lookup table representation, you provide tabulated
values for collector current as a function of gate-emitter voltage and
collector-emitter voltage. The main advantage of using this option
is simulation speed. It also lets you parameterize the device from
either measured data or from data obtained from another simulation
environment. To generate your own data from the equivalent circuit
representation, you can use a test harness, such as shown in the IGBT
Characteristics example.
The lookup table representation combines all of the equivalent circuit
components (PNP transistor, N-channel MOSFET, collector resistor and
emitter resistor) into one equivalent lookup table. Therefore, if you use
this option, the Advanced tab has no parameters.
Charge Model
The block models gate junction capacitance as a fixed gate-emitter
capacitance CGE and either a fixed or a nonlinear gate-collector
capacitance CGC.
If you select Specify using equation parameters directly for the
Parameterization parameter in the Junction Capacitance tab, you
specify the Gate-emitter junction capacitance and Gate-collector

1-220
N-Channel IGBT

junction capacitance parameters directly. Otherwise, the block


derives them from the Input capacitance, Cies and Reverse transfer
capacitance, Cres parameter values. The two parameterizations are
related as follows:

• CGE = Cres
• CGC = Cies – Cres

If you select the Gate-collector charge function is nonlinear


option for the Charge-voltage linearity parameter, then the
gate-collector charge relationship is defined by the piecewise-linear
function shown in the following figure.

1-221
N-Channel IGBT

With this nonlinear capacitance, the gate-emitter and collector-emitter


voltage profiles take the form shown in the next figure, where the
collector-emitter voltage fall has two regions (labeled 2 and 3) and
the gate-emitter voltage has two time-constants (before and after the
threshold voltage Vth):

1-222
N-Channel IGBT

You can determine the capacitor values for Cies, Cres, and Cox as
follows, assuming that the IGBT gate is driven through an external
resistance RG:

1 Set Cies to get correct time-constant for VGE in Region 1. The time
constant is defined by the product of Cies and RG. Alternatively, you
can use a datasheet value for Cies.

2 Set Cres so as to achieve the correct VCE gradient in Region 2. The


gradient is given by (VGE – Vth)/(Cres · RG).

1-223
N-Channel IGBT

3 Set VCox to the voltage at which the VCE gradient changes minus the
threshold voltage Vth.

4 Set Cox to get correct Miller length and time constant in Region 4.

Because the underlying model is a simplification of an actual charge


distribution, some iteration of these four steps may be required to get a
best overall fit to measured data. The collector current tail when the
IGBT is turned off is determined by the Total forward transit time
parameter.
Fine-Tuning the Current-Voltage Characteristics
For the equivalent circuit representation, use the parameters on
the Advanced tab to fine-tune the current-voltage characteristics of
the modeled device. To use these additional parameters effectively,
you will need a manufacturer datasheet that provides plots of the
collector current versus collector-emitter voltage for different values of
gate-emitter voltage. The parameters on the Advanced tab have the
following effects:

• The Emission coefficient, N parameter controls the shape of the


current-voltage curves around the origin.
• The Collector resistance, RC and Emitter resistance, RE
parameters affect the slope of the current-voltage curve at higher
currents, and when fully turned on by a high gate-emitter voltage.
• The Forward Early voltage, VAF parameter affects the shape
of the current-voltage curves for gate-emitter voltages around the
Gate-emitter threshold voltage, Vge(th).
Modeling Temperature Dependence
For the lookup table representation, the electrical equations do
not depend on temperature. However, you can model temperature
dependence if using the equivalent circuit representation.
The default behavior is that dependence on temperature is not modeled,
and the device is simulated at the temperature for which you provide
block parameters. You can optionally include modeling the dependence

1-224
N-Channel IGBT

of the transistor static behavior on temperature during simulation.


Temperature dependence of the junction capacitances is not modeled,
this being a much smaller effect.
Temperature dependence is modeled by the temperature dependence
of the constituent components. See the N-Channel MOSFET and PNP
Bipolar Transistor block reference pages for further information on the
defining equations.
Some datasheets do not provide information on the zero gate voltage
collector current, Ices, at a higher measurement temperature. In this
case, you can alternatively specify the energy gap, EG, for the device,
using a typical value for the semiconductor type. For silicon, the energy
gap is usually 1.11 eV.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from the
context menu select Simscape block choices > Show thermal port.
This action displays the thermal port H on the block icon, and adds the
Thermal port tab to the block dialog box.
Use the thermal port to simulate the effects of generated heat and
device temperature. For more information on using thermal ports and
on the Thermal port tab parameters, see “Simulating Thermal Effects
in Semiconductors”.

Basic The model is based on the following assumptions:


Assumptions
and • This block does not allow you to specify initial conditions on the
junction capacitances. If you select the Start simulation from
Limitations
steady state option in the Solver Configuration block, the block
solves the initial voltages to be consistent with the calculated steady
state. Otherwise, voltages are zero at the start of the simulation.
• You may need to use nonzero junction capacitance values to prevent
numerical simulation issues, but the simulation may run faster with
these values set to zero.

1-225
N-Channel IGBT

• The block does not account for temperature-dependent effects on


the junction capacitances.

Dialog
Box and
Parameters

• “Main Tab” on page 1-226


• “Junction Capacitance Tab” on page 1-229
• “Advanced Tab” on page 1-231
• “Temperature Dependence Tab” on page 1-231

Main Tab

I-V characteristics defined by


Select the IGBT representation:

1-226
N-Channel IGBT

• Fundamental nonlinear equations — Use an equivalent


circuit based on a PNP bipolar transistor and N-channel
MOSFET. This is the default.
• Lookup table — Use a lookup table approximation to the I-V
curve.
Zero gate voltage collector current, Ices
The collector current that flows when the gate-emitter voltage
is set to zero, and a large collector-emitter voltage is applied,
that is, the device is in the off-state. The value of the large
collector-emitter voltage is defined by the parameter Voltage
at which Ices is defined. The default value is 2 mA.
This parameter is only visible when you select Fundamental
nonlinear equations for the I-V characteristics defined by
parameter.
Voltage at which Ices is defined
The voltage used when measuring the Zero gate voltage
collector current, Ices. The default value is 600 V. This
parameter is only visible when you select Fundamental nonlinear
equations for the I-V characteristics defined by parameter.
Gate-emitter threshold voltage, Vge(th)
The threshold voltage used in the MOSFET equations. The
default value is 6 V. This parameter is only visible when you select
Fundamental nonlinear equations for the I-V characteristics
defined by parameter.
Collector-emitter saturation voltage, Vce(sat)
The collector-emitter voltage for a typical on-state as specified by
the manufacturer. The default value is 2.8 V. This parameter is
only visible when you select Fundamental nonlinear equations
for the I-V characteristics defined by parameter.
Collector current at which Vce(sat) is defined
The collector-emitter current when the gate-emitter voltage
is Vge(sat) and collector-emitter voltage is Vce(sat). The default
value is 400 A. This parameter is only visible when you select

1-227
N-Channel IGBT

Fundamental nonlinear equations for the I-V characteristics


defined by parameter.
Gate-emitter voltage at which Vce(sat) is defined
The gate voltage used when measuring Vce(sat) and Ice(sat). The
default value is 10 V. This parameter is only visible when
you select Fundamental nonlinear equations for the I-V
characteristics defined by parameter.
Measurement temperature
The temperature for which the parameters are quoted. The
default value is 25 C. This parameter is only visible when
you select Fundamental nonlinear equations for the I-V
characteristics defined by parameter.
Vector of gate-emitter voltages, Vge
The vector of gate-emitter voltages, to be used for table lookup.
The vector values must be strictly increasing. The values can be
nonuniformly spaced. The default values, in V, are [-2 6 7 8 10
12 15 20]. This parameter is only visible when you select Lookup
table for the I-V characteristics defined by parameter.
Vector of collector-emitter voltages, Vce
The vector of collector-emitter voltages, to be used for table
lookup. The vector values must be strictly increasing. The values
can be nonuniformly spaced. The default values, in V, are [-1 0
0.5 1 1.5 2 2.5 3 3.5 4]. This parameter is only visible when
you select Lookup table for the I-V characteristics defined
by parameter.
Tabulated collector currents, Ic=fcn(Vge,Vce)
Tabulated values for collector current as a function of gate-emitter
voltage and collector-emitter voltage, to be used for 2D table
lookup. Each value in the matrix specifies the collector current for
a specific combination of gate-emitter voltage and collector-emitter
voltage. The matrix size must match the dimensions defined by
the gate-emitter voltage and collector-emitter voltage vectors.
The default values, in A, are:

[-1.015e-5 1.35e-8 4.7135e-4 5.092e-4 5.105e-4 5.117500000000001e-4 5.1299e-4 5.1423e-4 5.1548e-4

1-228
N-Channel IGBT

-9.986899999999999e-6 1.35e-8 4.7135e-4 5.092e-4 5.105e-4 5.117500000000001e-4 5.1299e-4 5.1


-9.955e-6 1.35e-8 0.0065225 3.3324 48.154 93.661 105.52 105.72 105.93 106.14;
-9.955e-6 1.35e-8 0.0065235 3.5783 70.264 166.33 252.4 317.67 353.38 357.39;
-9.955e-6 1.35e-8 0.006524 3.7206 89.17100000000001 228.09 371.63 511.02 642.6900000000001 7
-9.9549e-6 1.35e-8 0.0065242 3.7716 97.79300000000001 256.21 424.27 592.92 759.2 921.52;
-9.9549e-6 1.35e-8 0.0065243 3.8067 104.52 278.11 464.6 654.37 844.5700000000001 1.0339e+3;
-9.9549e-6 1.35e-8 0.0065244 3.8324 109.92 295.67 496.54 702.28 909.96 1.1183e+3]

This parameter is only visible when you select Lookup table for
the I-V characteristics defined by parameter.

Junction Capacitance Tab

Parameterization
Select one of the following methods for block parameterization:
• Specify from a datasheet — Provide parameters that the
block converts to junction capacitance values. This is the
default method.
• Specify using equation parameters directly — Provide
junction capacitance parameters directly.
Input capacitance, Cies
The gate-emitter capacitance with the collector shorted to the
source. This parameter is only visible when you select Specify
from a datasheet for the Model junction capacitance
parameter. The default value is 26.4 nF.
Reverse transfer capacitance, Cres
The collector-gate capacitance with the emitter connected to
ground. This parameter is only visible when you select Specify
from a datasheet for the Model junction capacitance
parameter. The default value is 2.7 nF.
Gate-emitter junction capacitance
The value of the capacitance placed between the gate and the
emitter. This parameter is only visible when you select Specify
using equation parameters directly for the Model junction
capacitance parameter. The default value is 23.7 nF.

1-229
N-Channel IGBT

Gate-collector junction capacitance


The value of the capacitance placed between the gate and the
collector. This parameter is only visible when you select Specify
using equation parameters directly for the Model junction
capacitance parameter. The default value is 2.7 nF.
Output capacitance, Coes
The output capacitance applied across the collector-emitter ports.
The default value is 0 nF.
Charge-voltage linearity
Select whether gate-drain capacitance is fixed or nonlinear:
• Gate-collector capacitance is constant — The
capacitance value is constant and defined according to the
selected parameterization option, either directly or derived
from a datasheet. This is the default method.
• Gate-collector charge function is nonlinear — The
gate-collector charge relationship is defined according to the
piecewise-nonlinear function described in “Charge Model” on
page 1-220. Two additional parameters appear to let you define
the gate-collector charge function.
Gate-collector oxide capacitance
The gate-collector capacitance when the device is on and the
collector-gate voltage is small. This parameter is only visible when
you select Gate-collector charge function is nonlinear for
the Charge-voltage linearity parameter. The default value is
20 nF.
Collector-gate voltage below which oxide capacitance becomes
active
The collector-gate voltage at which the collector-gate capacitance
switches between off-state (CGC) and on-state (Cox) capacitance
values. This parameter is only visible when you select
Gate-collector charge function is nonlinear for the
Charge-voltage linearity parameter. The default value is -5 V.

1-230
N-Channel IGBT

Total forward transit time


The forward transit time for the PNP transistor used as part
of the underlying IGBT model. It affects how quickly charge is
removed from the channel when the IGBT is turned off. The
default value is 0 μs.

Advanced Tab
The lookup table representation combines all the equivalent circuit
components into one lookup table, and therefore this tab is empty. If
you use the equivalent circuit representation, this tab has the following
parameters.

Emission coefficient, N
The emission coefficient or ideality factor of the bipolar transistor.
The default value is 1.
Forward Early voltage, VAF
The forward Early voltage for the PNP transistor used in the
IGBT model. See the PNP Bipolar Transistor block reference page
for more information. The default value is 200 V.
Collector resistance, RC
Resistance at the collector. The default value is 0.001 Ohm.
Emitter resistance, RE
Resistance at the emitter. The default value is 0.001 Ohm.
Forward current transfer ratio, BF
Ideal maximum forward current gain for the PNP transistor
used in the IGBT model. See the PNP Bipolar Transistor block
reference page for more information. The default value is 50.

Temperature Dependence Tab


For the lookup table representation, the electrical equations do not
depend on temperature and therefore this tab is empty. If you use the
equivalent circuit representation, this tab has the following parameters.

1-231
N-Channel IGBT

Parameterization
Select one of the following methods for temperature dependence
parameterization:
• None Simulate at parameter measurement temperature
— Temperature dependence is not modeled, and none of the
other parameters on this tab are visible. This is the default
method.
• Specify Ices and Vce(sat) at second measurement
temperature — Model temperature-dependent effects by
providing values for the zero gate voltage collector current,
Ices, and collector-emitter voltage, Vce(sat), at the second
measurement temperature.
• Specify Vce(sat) at second measurement temperature
plus the energy gap, EG — Use this option when the
datasheet does not provide information on the zero gate voltage
collector current, Ices, at a higher measurement temperature.
Energy gap, EG
Energy gap value. This parameter is only visible when you select
Specify Vce(sat) at second measurement temperature plus
the energy gap, EG for the Parameterization parameter. The
default value is 1.11 eV.
Zero gate voltage collector current, Ices, at second measurement
temperature
The zero gate collector current value at the second measurement
temperature. This parameter is only visible when you select
Specify Ices and Vce(sat) at second measurement
temperature for the Parameterization parameter. The default
value is 100 mA.
Collector-emitter saturation voltage, Vce(sat), at second
measurement temperature
The collector-emitter saturation voltage value at the second
measurement temperature, and when the collector current
and gate-emitter voltage are as defined by the corresponding
parameters on the Main tab. The default value is 3 V.

1-232
N-Channel IGBT

Second measurement temperature


Second temperature Tm2 at which Zero gate voltage collector
current, Ices, at second measurement temperature and
Collector-emitter saturation voltage, Vce(sat), at second
measurement temperature are measured. The default value is
125 C.
Saturation current temperature exponent, XTI
The saturation current exponent value for your device type. If
you have graphical data for the value of Ices as a function of
temperature, you can use it to fine-tune the value of XTI. The
default value is 3.
Mobility temperature exponent, BEX
Mobility temperature coefficient value. You can use the default
value for most devices. If you have graphical data for Vce(sat) at
different temperatures, you can use it to fine-tune the value of
BEX. The default value is -1.5.
Device simulation temperature
Temperature Ts at which the device is simulated. The default
value is 25 C.

Ports The block has the following ports:

C
Electrical conserving port associated with the PNP emitter
terminal

G
Electrical conserving port associated with the MOSFET gate
terminal
E
Electrical conserving port associated with the PNP collector
terminal

1-233
N-Channel JFET

Purpose Model N-Channel JFET

Library Semiconductor Devices

Description The N-Channel JFET block uses the Shichman and Hodges equations
to represent an N-Channel JFET using a model with the following
structure:

G is the transistor gate, D is the transistor drain, and S is the transistor


source. The drain current, ID, depends on the region of operation and
whether the transistor is operating in normal or inverse mode.

• In normal mode (VDS ≥ 0), the block provides the following


relationship between the drain current ID and the drain-source
voltage VDS.

Region Applicable Corresponding ID Equation


Range of VGS
and VDS Values
Off VGS – Vt0 ≤ 0 ID = 0
Linear 0 < VDS < VGS – Vt0 ID = βVDS(2(VGS – Vt0) – VDS)(1 + λVDS)
Saturated 0 < VGS – Vt0 ≤ VDS ID = β (VGS – Vt0)2 (1 + λVDS)

1-234
N-Channel JFET

• In inverse mode (VDS < 0), the block provides the following
relationship between the drain current ID and the drain-source
voltage VDS.

Region Applicable Corresponding ID Equation


Range of VGS
and VDS Values
Off VGS – Vt0 ≤ 0 ID = 0
Linear 0 < –VDS < VGS – ID = βVDS(2(VGD – Vt0) + VDS)(1 – λVDS)
Vt0
Saturated 0 < VGS – Vt0 ≤ –VDS ID = β (VGD – Vt0)2 (1 – λVDS)

In the preceding equations:

• VGS is the gate-source voltage.


• VGD is the gate-drain voltage.
• Vt0 is the threshold voltage. If you select Specify using equation
parameters directly for the Parameterization parameter, Vt0
is the Threshold voltage parameter value. Otherwise, the block
calculates Vt0 from the datasheet parameters you specify.
• β is the transconductance parameter. If you select Specify using
equation parameters directly for the Parameterization
parameter, β is the Transconductance parameter parameter
value. Otherwise, the block calculates β from the datasheet
parameters you specify.
• λ is the channel-length modulation parameter. If you select Specify
using equation parameters directly for the Parameterization
parameter, λ is the Channel-length modulation parameter value.
Otherwise, the block calculates λ from the datasheet parameters
you specify.

The currents in each of the diodes satisfy the exponential diode equation

1-235
N-Channel JFET

 qVGD 
IGD  IS   e kTm1  1 
 
 

 qVGS 
IGS 
 IS   e kTm1
 1 
 
 

where:

• IS is the saturation current. If you select Specify using equation


parameters directly for the Parameterization parameter, IS is
the Saturation current parameter value. Otherwise, the block
calculates IS from the datasheet parameters you specify.
• q is the elementary charge on an electron (1.602176e–19 Coulombs).
• k is the Boltzmann constant (1.3806503e–23 J/K).
• Tm1 is the measurement temperature. The value comes from the
Measurement temperature parameter.

The block models gate junction capacitance as a fixed gate-drain


capacitance CGD and a fixed gate-source capacitance CGS. If you
select Specify using equation parameters directly for the
Parameterization parameter, you specify these values directly using
the Gate-drain junction capacitance and Gate-source junction
capacitance parameters. Otherwise, the block derives them from the
Input capacitance Ciss and Reverse transfer capacitance Crss
parameter values. The two parameterizations are related as follows:

• CGD = Crss
• CGS = Ciss – Crss

1-236
N-Channel JFET

Modeling Temperature Dependence


The default behavior is that dependence on temperature is not modeled,
and the device is simulated at the temperature for which you provide
block parameters. You can optionally include modeling the dependence
of the transistor static behavior on temperature during simulation.
Temperature dependence of the junction capacitances is not modeled,
this being a much smaller effect.
When including temperature dependence, the transistor defining
equations remain the same. The measurement temperature value, Tm1,
is replaced with the simulation temperature, Ts. The transconductance,
β, and the threshold voltage, Vt0, become a function of temperature
according to the following equations:

BEX
 T 
Ts  Tm1  s 
 Tm1 

Vt0s = Vt01 + α ( Ts – Tm1)

where:

• Tm1 is the temperature at which the transistor parameters are


specified, as defined by the Measurement temperature parameter
value.
• Ts is the simulation temperature.
• βTm1 is JFET transconductance at the measurement temperature.
• βTs is JFET transconductance at the simulation temperature. This
is the transconductance value used in the JFET equations when
temperature dependence is modeled.
• Vt01 is the threshold voltage at measurement temperature.
• Vt0s is the threshold voltage at simulation temperature. This is
the threshold voltage value used in the JFET equations when
temperature dependence is modeled.

1-237
N-Channel JFET

• BEX is the mobility temperature exponent. A typical value of BEX


is -1.5.
• α is the gate threshold voltage temperature coefficient, dVth/dT.

For most JFETS, you can use the default value of -1.5 for BEX. Some
datasheets quote the value for α, but most typically they provide
the temperature dependence for the saturated drain current, I_dss.
Depending on the block parameterization method, you have two ways
of specifying α:

• If you parameterize the block from a datasheet, you have to provide


I_dss at a second measurement temperature. The block then
calculates the value for α based on this data.
• If you parameterize by specifying equation parameters, you have to
provide the value for α directly.

If you have more data comprising drain current as a function of


gate-source voltage for fixed drain-source voltage plotted at more than
one temperature, then you can also use Simulink Design Optimization
software to help tune the values for α and BEX.
In addition, the saturation current term, IS, in the gate-drain and
gate-source current equations depends on temperature

 EG 
ISTs  ISTm1  (Ts / Tm1 ) XTI  exp   (1  Ts / Tm1 ) 
 kTs 
where:

• ISTm1 is the saturation current at the measurement temperature.


• ISTs is the saturation current at the simulation temperature. This is
the saturation current value used in the bipolar transistor equations
when temperature dependence is modeled.
• EG is the energy gap.

1-238
N-Channel JFET

• k is the Boltzmann constant (1.3806503e–23 J/K).


• XTI is the saturation current temperature exponent.

Similar to α, you have two ways of specifying EG and XTI:

• If you parameterize the block from a datasheet, you have to


specify the gate reverse current, I_gss, at a second measurement
temperature. The block then calculates the value for EG based on
this data and assuming a p-n junction nominal value of 3 for XTI.
• If you parameterize by specifying equation parameters, you have to
provide the values for EG and XTI directly. This option gives you
most flexibility to match device behavior, for example, if you have a
graph of I_gss as a function of temperature. With this data you can
use Simulink Design Optimization software to help tune the values
for EG and XTI.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from the
context menu select Simscape block choices > Show thermal port.
This action displays the thermal port H on the block icon, and adds the
Thermal port tab to the block dialog box.
Use the thermal port to simulate the effects of generated heat and
device temperature. For more information on using thermal ports and
on the Thermal port tab parameters, see “Simulating Thermal Effects
in Semiconductors”.

Basic The model is based on the following assumptions:


Assumptions
and • This block does not allow you to specify initial conditions on the
junction capacitances. If you select the Start simulation from
Limitations
steady state option in the Solver Configuration block, the block
solves the initial voltages to be consistent with the calculated steady
state. Otherwise, voltages are zero at the start of the simulation.

1-239
N-Channel JFET

• You may need to use nonzero ohmic resistance and junction


capacitance values to prevent numerical simulation issues, but the
simulation may run faster with these values set to zero.
• The block does not account for temperature-dependent effects on
the junction capacitances.
• When you specify I_dss at a second measurement temperature, it
must be quoted for the same working point (that is, the same drain
current and gate-source voltage) as for the I_dss value on the Main
tab. Inconsistent values for I_dss at the higher temperature will
result in unphysical values for α and unrepresentative simulation
results.
• You may need to tune the value of BEX to replicate the ID-VGS
relationship (if available) for a given device. The value of BEX affects
whether the ID-VGS curves for different temperatures cross each
other, or not, for the ranges of ID and VGS considered.

1-240
N-Channel JFET

Dialog
Box and
Parameters

• “Main Tab” on page 1-241


• “Ohmic Resistance Tab” on page 1-244
• “Junction Capacitance Tab” on page 1-244
• “Temperature Dependence Tab” on page 1-245

Main Tab

Parameterization
Select one of the following methods for block parameterization:

1-241
N-Channel JFET

• Specify from a datasheet — Provide parameters that the


block converts to equations that describe the transistor. This
is the default method.
• Specify using equation parameters directly — Provide
equation parameters β, IS, Vt0, and λ.
Gate reverse current, I_gss
The reverse current that flows in the diode when the drain and
source are short-circuited and a large negative gate-source voltage
is applied. This parameter is only visible when you select Specify
from a datasheet for the Parameterization parameter. The
default value is -1 nA.
Saturated drain current, I_dss
The current that flows when a large positive drain-source voltage
is applied for a specified gate-source voltage. For a depletion-mode
device, this gate-source voltage may be zero, in which case I_dss
may be referred to as the zero-gate voltage drain current. This
parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is 3 mA.
I_dss measurement point, [V_gs V_ds]
A vector of the values of VGS and VDS at which I_dss is measured.
Normally VGS is zero. VDS should be greater than zero. This
parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is [ 0 15 ] V.
Small-signal parameters, [g_fs g_os]
A vector of the values of g_fs and g_os. g_fs is the forward
transfer conductance, that is, the conductance for a fixed
drain-source voltage. g_os is the output conductance, that is, the
conductance for a fixed gate-source voltage. This parameter is
only visible when you select Specify from a datasheet for the
Parameterization parameter. The default value is [ 3e+03 10
] uS.

1-242
N-Channel JFET

Small-signal measurement point, [V_gs V_ds]


A vector of the values of VGS and VDS at which g_fs and
g_os are measured. VDS should be greater than zero. For
depletion-mode devices, VGS is typically zero. This parameter is
only visible when you select Specify from a datasheet for the
Parameterization parameter. The default value is [ 0 15 ] V.
Transconductance parameter
The derivative of drain current with respect to gate voltage.
This parameter is only visible when you select Specify using
equation parameters directly for the Parameterization
parameter. The default value is 1e-04 A/V2.
Saturation current
The magnitude of the current that the ideal diode equation
approaches asymptotically for very large reverse bias levels.
This parameter is only visible when you select Specify using
equation parameters directly for the Parameterization
parameter. The default value is 1e-14 A.
Threshold voltage
The gate-source voltage above which the transistor produces a
nonzero drain current. For an enhancement device, Vt0 should
be positive. For a depletion mode device, Vt0 should be negative.
This parameter is only visible when you select Specify using
equation parameters directly for the Parameterization
parameter. The default value is -2 V.
Channel-length modulation
The channel-length modulation. This parameter is only
visible when you select Specify using equation parameters
directly for the Parameterization parameter. The default
value is 0 1/V.
Measurement temperature
The temperature for which the datasheet parameters are quoted.
The default value is 25 C.

1-243
N-Channel JFET

Ohmic Resistance Tab

Source ohmic resistance


The transistor source resistance. The default value is 1e-4 Ω. The
value must be greater than or equal to 0.
Drain ohmic resistance
The transistor drain resistance. The default value is 0.01 Ω. The
value must be greater than or equal to 0.

Junction Capacitance Tab

Parameterization
Select one of the following methods for block parameterization:
• Specify from a datasheet — Provide parameters that the
block converts to junction capacitance values. This is the
default method.
• Specify using equation parameters directly — Provide
junction capacitance parameters directly.
Input capacitance, Ciss
The gate-source capacitance with the drain shorted to the source.
This parameter is only visible when you select Specify from a
datasheet for the Model junction capacitance parameter. The
default value is 4.5 pF.
Reverse transfer capacitance, Crss
The drain-gate capacitance with the source connected to ground.
This parameter is only visible when you select Specify from a
datasheet for the Model junction capacitance parameter. The
default value is 1.5 pF.
Gate-source junction capacitance
The value of the capacitance placed between the gate and the
source. This parameter is only visible when you select Specify
using equation parameters directly for the Model junction
capacitance parameter. The default value is 3 pF.

1-244
N-Channel JFET

Gate-drain junction capacitance


The value of the capacitance placed between the gate and the
drain. This parameter is only visible when you select Specify
using equation parameters directly for the Model junction
capacitance parameter. The default value is 1.5 pF.

Temperature Dependence Tab

Parameterization
Select one of the following methods for temperature dependence
parameterization:
• None Simulate at parameter measurement temperature
— Temperature dependence is not modeled. This is the default
method.
• Model temperature dependence — Model
temperature-dependent effects. You also have to
provide a set of additional parameters depending on the block
parameterization method. If you parameterize the block from
a datasheet, you have to provide values for I_gss and I_dss
at second measurement temperature. If you parameterize
by directly specifying equation parameters, you have to
provide the values for EG, XTI, and the gate threshold voltage
temperature coefficient, dVt0/dT. Regardless of the block
parameterization method, you also have to provide values for
BEX and for the simulation temperature, Ts.
Gate reverse current, I_gss, at second measurement temperature
The value of the gate reverse current, I_gss, at the second
measurement temperature. This parameter is only visible
when you select Specify from a datasheet for the
Parameterization parameter on the Main tab. It must be
quoted for the same working point (drain current and gate-source
voltage) as the Drain-source on resistance, R_DS(on)
parameter on the Main tab. The default value is -200 nA.

1-245
N-Channel JFET

Saturated drain current, I_dss, at second measurement


temperature
The value of the saturated drain current, I_dss, at the second
measurement temperature, and when the I_dss measurement
point is the same as defined by the I_dss measurement point,
[V_gs V_ds] parameter on the Main tab. This parameter is
only visible when you select Specify from a datasheet for the
Parameterization parameter on the Main tab. The default
value is 2.5 mA.
Second measurement temperature
Second temperature Tm2 at which Gate reverse current, I_gss,
at second measurement temperature and Saturated drain
current, I_dss, at second measurement temperature are
measured. This parameter is only visible when you select Specify
from a datasheet for the Parameterization parameter on the
Main tab. The default value is 125 C.
Energy gap, EG
Energy gap value. This parameter is only visible when you
select Specify using equation parameters directly for the
Parameterization parameter on the Main tab. The default
value is 1.11 eV.
Saturation current temperature exponent, XTI
Saturation current temperature coefficient value. This parameter
is only visible when you select Specify using equation
parameters directly for the Parameterization parameter on
the Main tab. The default value is 3.
Gate threshold voltage temperature coefficient, dVt0/dT
The rate of change of gate threshold voltage with temperature.
This parameter is only visible when you select Specify using
equation parameters directly for the Parameterization
parameter on the Main tab. The default value is -6 mV/K.
Mobility temperature exponent, BEX
Mobility temperature coefficient value. You can use the
default value for most JFETs. See the “Basic Assumptions and

1-246
N-Channel JFET

Limitations” on page 1-239 section for additional considerations.


The default value is -1.5.
Device simulation temperature
Temperature Ts at which the device is simulated. The default
value is 25 C.

Ports The block has the following ports:

G
Electrical conserving port associated with the transistor gate
terminal
D
Electrical conserving port associated with the transistor drain
terminal
S
Electrical conserving port associated with the transistor source
terminal

References [1] H. Shichman and D. A. Hodges, Modeling and simulation of


insulated-gate field-effect transistor switching circuits. IEEE J. Solid
State Circuits, SC-3, 1968.

[2] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993. Chapter 2.

See Also P-Channel JFET

1-247
N-Channel MOSFET

Purpose Model N-Channel MOSFET using Shichman-Hodges equation

Library Semiconductor Devices

Description The N-Channel MOSFET block uses the Shichman and Hodges
equations [1] for an insulated-gate field-effect transistor to represent
an N-Channel MOSFET.
The drain-source current, IDS, depends on the region of operation:

• In the off region (VGS < Vth) the drain-source current is:

I DS = 0
• In the linear region (0 < VDS < VGS –Vth) the drain-source current is:

I DS = K ( (VGS − Vth )VDS − VDS 2 / 2 ) (1 +  | VDS |)

• In the saturated region (0 < VGS –Vth < VDS) the drain-source current
is:

I DS = ( K / 2)(VGS − Vth ) 2 (1 +  | VDS |)

In the preceding equations:

• K is the transistor gain.


• VDS is the positive drain-source voltage.
• VGS is the gate-source voltage.
• Vth is the threshold voltage.
• λ is the channel modulation.

1-248
N-Channel MOSFET

Charge Model
The block models gate junction capacitance as a fixed gate-source
capacitance CGS and either a fixed or a nonlinear gate-drain capacitance
CGD.
If you select Specify using equation parameters directly for the
Parameterization parameter in the Junction Capacitance tab,
you specify the Gate-drain junction capacitance and Gate-source
junction capacitance parameters directly. Otherwise, the block
derives them from the Input capacitance, Ciss and Reverse transfer
capacitance, Crss parameter values. The two parameterizations are
related as follows:

• CGD = Crss
• CGS = Ciss – Crss

If you select the Gate-drain charge function is nonlinear option


for the Charge-voltage linearity parameter, then the gate-drain
charge relationship is defined by the piecewise-linear function shown in
the following figure.

1-249
N-Channel MOSFET

For instructions on how to map a time response to device capacitance


values, see the N-Channel IGBT block reference page. However, this
mapping is only approximate because the Miller voltage typically varies
more from the threshold voltage than in the case for the IGBT.

Modeling Temperature Dependence


The default behavior is that dependence on temperature is not modeled,
and the device is simulated at the temperature for which you provide

1-250
N-Channel MOSFET

block parameters. You can optionally include modeling the dependence


of the transistor static behavior on temperature during simulation.
Temperature dependence of the junction capacitances is not modeled,
this being a much smaller effect.
When including temperature dependence, the transistor defining
equations remain the same. The gain, K, and the threshold voltage, Vth,
become a function of temperature according to the following equations:

BEX
 T 
K Ts  K Tm1  s 
 Tm1 

Vths = Vth1 + α ( Ts – Tm1)

where:

• Tm1 is the temperature at which the transistor parameters are


specified, as defined by the Measurement temperature parameter
value.
• Ts is the simulation temperature.
• KTm1 is the transistor gain at the measurement temperature.
• KTs is the transistor gain at the simulation temperature. This is
the transistor gain value used in the MOSFET equations when
temperature dependence is modeled.
• Vth1 is the threshold voltage at the measurement temperature.
• Vths is the threshold voltage at the simulation temperature. This is
the threshold voltage value used in the MOSFET equations when
temperature dependence is modeled.
• BEX is the mobility temperature exponent. A typical value of BEX
is -1.5.
• α is the gate threshold voltage temperature coefficient, dVth/dT.

1-251
N-Channel MOSFET

For most MOSFETS, you can use the default value of -1.5 for BEX.
Some datasheets quote the value for α, but most typically they provide
the temperature dependence for drain-source on resistance, RDS(on).
Depending on the block parameterization method, you have two ways
of specifying α:

• If you parameterize the block from a datasheet, you have to provide


RDS(on) at a second measurement temperature. The block then
calculates the value for α based on this data.
• If you parameterize by specifying equation parameters, you have to
provide the value for α directly.

If you have more data comprising drain current as a function of


gate-source voltage for more than one temperature, then you can also
use Simulink Design Optimization software to help tune the values
for α and BEX.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from the
context menu select Simscape block choices > Show thermal port.
This action displays the thermal port H on the block icon, and adds the
Thermal port tab to the block dialog box.
Use the thermal port to simulate the effects of generated heat and
device temperature. For more information on using thermal ports and
on the Thermal port tab parameters, see “Simulating Thermal Effects
in Semiconductors”.

Basic When modeling temperature dependence, consider the following:


Assumptions
and • The block does not account for temperature-dependent effects on
the junction capacitances.
Limitations
• When you specify RDS(on) at a second measurement temperature,
it must be quoted for the same working point (that is, the same
drain current and gate-source voltage) as for the other RDS(on) value.

1-252
N-Channel MOSFET

Inconsistent values for RDS(on) at the higher temperature will result


in unphysical values for α and unrepresentative simulation results.
Typically RDS(on) increases by a factor of about 1.5 for a hundred
degree increase in temperature.
• You may need to tune the values of BEX and threshold voltage,
Vth, to replicate the VDS-VGS relationship (if available) for a given
device. Increasing Vth moves the VDS-VGS plots to the right. The
value of BEX affects whether the VDS-VGS curves for different
temperatures cross each other, or not, for the ranges of VDS and
VGS considered. Therefore, an inappropriate value can result in the
different temperature curves appearing to be reordered. Quoting
RDS(on) values for higher currents, preferably close to the current at
which it will operate in your circuit, will reduce sensitivity to the
precise value of BEX.

1-253
N-Channel MOSFET

Dialog
Box and
Parameters

• “Main Tab” on page 1-254


• “Ohmic Resistance Tab” on page 1-256
• “Junction Capacitance Tab” on page 1-256
• “Temperature Dependence Tab” on page 1-258

Main Tab

Parameterization
Select one of the following methods for block parameterization:
• Specify from a datasheet — Provide the drain-source on
resistance and the corresponding drain current and gate-source

1-254
N-Channel MOSFET

voltage. The block calculates the transistor gain for the


Shichman and Hodges equations from this information. This
is the default method.
• Specify using equation parameters directly — Provide
the transistor gain.
Drain-source on resistance, R_DS(on)
The ratio of the drain-source voltage to the drain current for
specified values of drain current and gate-source voltage.
RDS(on) should have a positive value. This parameter is only
visible when you select Specify from a datasheet for the
Parameterization parameter. The default value is 0.025 Ω.
Drain current, Ids, for R_DS(on)
The drain current the block uses to calculate the value of the
drain-source resistance. IDS should have a positive value. This
parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is 6 A.
Gate-source voltage, Vgs, for R_DS(on)
The gate-source voltage the block uses to calculate the value of
the drain-source resistance. VGS should have a positive value.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is 10 V.
Gain, K
Positive constant gain coefficient for the Shichman and Hodges
equations. This parameter is only visible when you select
Specify using equation parameters directly for the
Parameterization parameter. The default value is 5 A/V2.
Gate-source threshold voltage, Vth
Gate-source threshold voltage Vth in the Shichman and Hodges
equations. For an enhancement device, Vth should be positive.
For a depletion mode device, Vth should be negative. The default
value is 1.7 V.

1-255
N-Channel MOSFET

Channel modulation, L
The channel-length modulation, usually denoted by the
mathematical symbol λ. When in the saturated region, it is
the rate of change of drain current with drain-source voltage.
The effect on drain current is typically small, and the effect
is neglected if calculating transistor gain K from drain-source
on-resistance, RDS(on). A typical value is 0.02, but the effect can
be ignored in most circuit simulations. However, in some circuits
a small nonzero value may help numerical convergence. The
default value is 0 1/V.
Measurement temperature
Temperature Tm1 at which Drain-source on resistance,
R_DS(on) is measured. This parameter is only visible
when you select Model temperature dependence for
the Parameterization parameter on the Temperature
Dependence tab. The default value is 25 C.

Ohmic Resistance Tab

Source ohmic resistance


The transistor source resistance. The default value is 1e-4 Ω. The
value must be greater than or equal to 0.
Drain ohmic resistance
The transistor drain resistance. The default value is 0.001 Ω.
The value must be greater than or equal to 0.

Junction Capacitance Tab

Parameterization
Select one of the following methods for capacitance
parameterization:
• Specify from a datasheet — Provide parameters that the
block converts to junction capacitance values. This is the
default method.
• Specify using equation parameters directly — Provide
junction capacitance parameters directly.

1-256
N-Channel MOSFET

Input capacitance, Ciss


The gate-source capacitance with the drain shorted to the source.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is 350 pF.
Reverse transfer capacitance, Crss
The drain-gate capacitance with the source connected to ground.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is 80 pF.
Gate-source junction capacitance
The value of the capacitance placed between the gate and
the source. This parameter is only visible when you select
Specify using equation parameters directly for the
Parameterization parameter. The default value is 270 pF.
Gate-drain junction capacitance
The value of the capacitance placed between the gate and
the drain. This parameter is only visible when you select
Specify using equation parameters directly for the
Parameterization parameter. The default value is 80 pF.
Output capacitance, Coss
The output capacitance applied across the drain-source ports.
The default value is 0 pF.
Charge-voltage linearity
Select whether gate-drain capacitance is fixed or nonlinear:
• Gate-drain capacitance is constant — The capacitance
value is constant and defined according to the selected
parameterization option, either directly or derived from a
datasheet. This is the default method.
• Gate-drain charge function is nonlinear — The
gate-drain charge relationship is defined according to the
piecewise-nonlinear function described in “Charge Model” on

1-257
N-Channel MOSFET

page 1-249. Two additional parameters appear to let you define


the gate-drain charge function.
Gate-drain oxide capacitance
The gate-drain capacitance when the device is on and the
drain-gate voltage is small. This parameter is only visible when
you select Gate-drain charge function is nonlinear for the
Charge-voltage linearity parameter. The default value is 200
pF.
Drain-gate voltage at which oxide capacitance becomes active
The drain-gate voltage at which the drain-gate capacitance
switches between off-state (CGD) and on-state (Cox) capacitance
values. This parameter is only visible when you select Gate-drain
charge function is nonlinear for the Charge-voltage
linearity parameter. The default value is -0.5 V.

Temperature Dependence Tab

Parameterization
Select one of the following methods for temperature dependence
parameterization:
• None Simulate at parameter measurement temperature
— Temperature dependence is not modeled. This is the default
method.
• Model temperature dependence — Model
temperature-dependent effects. Provide a value for
simulation temperature, Ts, a value for BEX, and a value for
the measurement temperature Tm1 (using the Measurement
temperature parameter on the Main tab). You also have to
provide a value for α using one of two methods, depending on
the value of the Parameterization parameter on the Main
tab. If you parameterize the block from a datasheet, you have
to provide RDS(on) at a second measurement temperature, and
the block will calculate α based on that. If you parameterize by
specifying equation parameters, you have to provide the value
for α directly.

1-258
N-Channel MOSFET

Drain-source on resistance, R_DS(on), at second measurement


temperature
The ratio of the drain-source voltage to the drain current for
specified values of drain current and gate-source voltage at
second measurement temperature. This parameter is only
visible when you select Specify from a datasheet for the
Parameterization parameter on the Main tab. It must be
quoted for the same working point (drain current and gate-source
voltage) as the Drain-source on resistance, R_DS(on)
parameter on the Main tab. The default value is 0.037 Ω.
Second measurement temperature
Second temperature Tm2 at which Drain-source on resistance,
R_DS(on), at second measurement temperature is measured.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter on the Main
tab. The default value is 125 C.
Gate threshold voltage temperature coefficient, dVth/dT
The rate of change of gate threshold voltage with temperature.
This parameter is only visible when you select Specify using
equation parameters directly for the Parameterization
parameter on the Main tab. The default value is -6 mV/K.
Mobility temperature exponent, BEX
Mobility temperature coefficient value. You can use the default
value for most MOSFETs. See the “Basic Assumptions and
Limitations” on page 1-252 section for additional considerations.
The default value is -1.5.
Device simulation temperature
Temperature Ts at which the device is simulated. The default
value is 25 C.

Ports The block has the following ports:

G
Electrical conserving port associated with the transistor gate
terminal

1-259
N-Channel MOSFET

D
Electrical conserving port associated with the transistor drain
terminal
S
Electrical conserving port associated with the transistor source
terminal

References [1] H. Shichman and D. A. Hodges. “Modeling and simulation of


insulated-gate field-effect transistor switching circuits.” IEEE J. Solid
State Circuits, SC-3, 1968.

See Also P-Channel MOSFET

1-260
Negative Supply Rail

Purpose Model ideal negative supply rail

Library Sources

Description The Negative Supply Rail block represents an ideal negative supply
rail. Use this block instead of the Simscape DC Voltage Source block to
define the output voltage relative to the Simscape Electrical Reference
block that must appear in each model.

Note Do not attach more than one Negative Supply Rail block to any
connected line.

Dialog
Box and
Parameters

Constant voltage
The voltage at the output port relative to the Electrical Reference
block ground port. The default value is -1 V.

Ports The block has the following ports:

-
Negative electrical voltage

See Also DC Voltage Source | Positive Supply Rail

1-261
Nonlinear Inductor

Purpose Model inductor with nonideal core

Library Passive Devices

Description The Nonlinear Inductor block represents an inductor with a nonideal


core. A core may be nonideal due to its magnetic properties and
dimensions. The block provides the following parameterization options:

• Single inductance (linear)


• Single saturation point
• Magnetic flux versus current characteristic
• Magnetic flux density versus magnetic field strength characteristic

Single Inductance (Linear)


The relationships between voltage, current and flux are defined by the
following equations:

i  iL  vG p

d
v  Nw
dt

L
 iL
Nw

where:

• v is the terminal voltage.


• i is the terminal current.
• iL is the current through inductor.
• Gp is the parasitic parallel conductance.
• Nw is the number of winding turns.

1-262
Nonlinear Inductor

• Φ is the magnetic flux.


• L is the unsaturated inductance.

Single Saturation Point


The relationships between voltage, current and flux are defined by the
following equations:

i  iL  vG p

d
v  Nw
dt

L
 iL (for unsaturated)
Nw

Lsat
 iL   offset (for saturated)
Nw

where:

• v is the terminal voltage.


• i is the terminal current.
• iL is the current through inductor.
• Gp is the parasitic parallel conductance.
• Nw is the number of winding turns.
• Φ is the magnetic flux.
• Φoffset is the magnetic flux saturation offset.
• L is the unsaturated inductance.
• Lsat is the saturated inductance.

1-263
Nonlinear Inductor

Magnetic Flux Versus Current Characteristic


The relationships between voltage, current and flux are defined by the
following equations:

i  iL  vG p

d
v  Nw
dt

  f  iL 

where:

• v is the terminal voltage.


• i is the terminal current.
• iL is the current through inductor.
• Gp is the parasitic parallel conductance.
• Nw is the number of winding turns.
• Φ is the magnetic flux.

Magnetic flux is determined by one-dimensional table lookup, based on


the vector of current values and the vector of corresponding magnetic
flux values that you provide. You can construct these vectors using
either negative and positive data, or positive data only. If using positive
data only, the vector must start at 0, and the negative data will be
automatically calculated by rotation about (0,0).

Magnetic Flux Density Versus Magnetic Field Strength


Characteristic
The relationships between voltage, current and flux are defined by the
following equations:

1-264
Nonlinear Inductor

i  iL  vG p

d
v  Nw
dt

  B  Ae

B  f H

Nw
H iL
le

where:

• v is the terminal voltage.


• i is the terminal current.
• iL is the current through inductor.
• Gp is the parasitic parallel conductance.
• Nw is the number of winding turns.
• Φ is the magnetic flux.
• H is the magnetic field strength.
• B is the magnetic flux density.
• le is the effective core length.
• Ae is the effective core cross-sectional area.

Magnetic flux density is determined by one-dimensional table lookup,


based on the vector of magnetic field strength values and the vector
of corresponding magnetic flux density values that you provide. You
can construct these vectors using either negative and positive data, or
positive data only. If using positive data only, the vector must start at

1-265
Nonlinear Inductor

0, and the negative data will be automatically calculated by rotation


about (0,0).

Dialog
Box and
Parameters

• “Main Tab” on page 1-266


• “Initial Conditions Tab” on page 1-269

Main Tab

Parameterized by
Select one of the following methods for block parameterization:
• Single inductance (linear) — Provide the values for
number of turns, unsaturated inductance, and parasitic
parallel conductance.

1-266
Nonlinear Inductor

• Single saturation point — Provide the values for number


of turns, unsaturated and saturated inductances, saturation
magnetic flux, and parasitic parallel conductance. This is the
default option.
• Magnetic flux versus current characteristic — In
addition to the number of turns and the parasitic parallel
conductance value, provide the current vector and the magnetic
flux vector, to populate the magnetic flux versus current lookup
table.
• Magnetic flux density versus magnetic field strength
characteristic — In addition to the number of turns and the
parasitic parallel conductance value, provide the values for
effective core length and cross-sectional area, as well as the
magnetic field strength vector and the magnetic flux density
vector, to populate the magnetic flux density versus magnetic
field strength lookup table.
Number of turns
The total number of turns of wire wound around the inductor
core. The default value is 10.
Unsaturated inductance
The value of inductance used when the inductor is operating in
its linear region. This parameter is only visible when you select
Single inductance (linear) or Single saturation point for
the Parameterized by parameter. The default value is 2e-4 H.
Saturated inductance
The value of inductance used when the inductor is operating
beyond its saturation point. This parameter is only visible when
you select Single saturation point for the Parameterized by
parameter. The default value is 1e-4 H.
Saturation magnetic flux
The value of magnetic flux at which the inductor saturates. This
parameter is only visible when you select Single saturation
point for the Parameterized by parameter. The default value
is 1.3e-5 Wb.

1-267
Nonlinear Inductor

Current, i
The current data used to populate the magnetic flux versus
current lookup table. This parameter is only visible when you
select Magnetic flux versus current characteristic for the
Parameterized by parameter. The default value is [ 0 0.64
1.28 1.92 2.56 3.20 ] A.
Magnetic flux vector, phi
The magnetic flux data used to populate the magnetic flux versus
current lookup table. This parameter is only visible when you
select Magnetic flux versus current characteristic for the
Parameterized by parameter. The default value is [0 1.29
2.00 2.27 2.36 2.39 ].*1e-5 Wb.
Magnetic field strength vector, H
The magnetic field strength data used to populate the magnetic
flux density versus magnetic field strength lookup table. This
parameter is only visible when you select Magnetic flux
density versus magnetic field strength characteristic
for the Parameterized by parameter. The default value is [ 0
200 400 600 800 1000 ] A/m.
Magnetic flux density vector, B
The magnetic flux density data used to populate the magnetic
flux density versus magnetic field strength lookup table. This
parameter is only visible when you select Magnetic flux
density versus magnetic field strength characteristic
for the Parameterized by parameter. The default value is [ 0
0.81 1.25 1.42 1.48 1.49 ] T.
Effective length
The effective core length, that is, the average distance of the
magnetic path. This parameter is only visible when you select
Magnetic flux density versus magnetic field strength
characteristic for the Parameterized by parameter. The
default value is 0.032 m.

1-268
Nonlinear Inductor

Effective cross-sectional area


The effective core cross-sectional area, that is, the average area of
the magnetic path. This parameter is only visible when you select
Magnetic flux density versus magnetic field strength
characteristic for the Parameterized by parameter. The
default value is 1.6e-5 m^2.
Parasitic parallel conductance
Use this parameter to represent small parasitic effects. A small
parallel conductance may be required for the simulation of some
circuit topologies. The default value is 1e-9 1/Ω.
Interpolation option
The lookup table interpolation option. This parameter is
only visible when you select Magnetic flux versus current
characteristic or Magnetic flux density versus magnetic
field strength characteristic for the Parameterized by
parameter. Select one of the following interpolation methods:
• Linear — Uses a linear interpolation function.
• Cubic — Uses the Piecewise Cubic Hermite Interpolation
Polinomial (PCHIP).

For more information on interpolation algorithms, see the PS


Lookup Table (1D) block reference page.

Initial Conditions Tab

Specify initial state by


Select the appropriate initial state specification option:
• Current — Specify the initial state of the inductor by the initial
current through the inductor (iL). This is the default option.
• Magnetic flux — Specify the initial state of the inductor by
the magnetic flux.
Initial current
The initial current value used to calculate the value of magnetic
flux at time zero. This is the current passing through the

1-269
Nonlinear Inductor

inductor. Component current consists of current passing through


the inductor and current passing through the parasitic parallel
conductance. This parameter is only visible when you select
Current for the Specify initial state by parameter. The default
value is 0 A.
Initial magnetic flux
The value of magnetic flux at time zero. This parameter is only
visible when you select Magnetic flux for the Specify initial
state by parameter. The default is 0 Wb.

Examples For comparison of nonlinear inductor behavior with different


parameterization options, see the Nonlinear Inductor Characteristics
example.

Ports The block has the following ports:

+
Positive electrical port
-
Negative electrical port

See Also Inductor

1-270
Nonlinear Transformer

Purpose Model transformer with nonideal core

Library Passive Devices

Description The Nonlinear Transformer block represents a transformer with a


nonideal core. A core may be nonideal due to its magnetic properties
and dimensions. The equivalent circuit topology depends upon which of
the two winding leakage parameterization options you select:

• Combined primary and secondary values

• Separate primary and secondary values

1-271
Nonlinear Transformer

where:

• Req is the combined leakage resistance.


• Leq is the combined leakage inductance.
• R1 is the primary leakage resistance.
• L1 is the primary leakage inductance.
• R2 is the secondary leakage resistance.
• L2 is the secondary leakage inductance.
• Rm is the magnetization resistance.
• Lm is the magnetization inductance.

The block provides the following parameterization options for the


nonlinear magnetization inductance:

• Single inductance (linear)


• Single saturation point
• Magnetic flux versus current characteristic

1-272
Nonlinear Transformer

• Magnetic flux density versus magnetic field strength


characteristic

For more information, see the Nonlinear Inductor block reference page.

Dialog
Box and
Parameters

• “Main Tab” on page 1-274


• “Magnetization Tab” on page 1-275
• “Initial Conditions Tab” on page 1-278
• “Parasitics Tab” on page 1-279

1-273
Nonlinear Transformer

Main Tab

Primary number of turns


The number of turns of wire on the primary winding of the
transformer. The default value is 100.
Secondary number of turns
The number of turns of wire on the secondary winding of the
transformer. The default value is 200.
Winding parameterized by
Select one of the following methods for the winding leakage
parameterization:
• Combined primary and secondary values — Use the lumped
resistance and inductance values representing the combined
leakage in the primary and secondary windings. This is the
default option.
• Separate primary and secondary values — Use separate
resistances and inductances to represent leakages in the
primary and secondary windings.
Combined leakage resistance
The lumped equivalent resistance Req, which represents the
combined power loss of the primary and secondary windings. This
parameter is only visible when you select Combined primary
and secondary values for the Winding parameterized by
parameter. The default value is 0.01 Ω.
Combined leakage inductance
The lumped equivalent inductance Leq, which represents the
combined magnetic flux loss of the primary and secondary
windings. This parameter is only visible when you select
Combined primary and secondary values for the Winding
parameterized by parameter. The default value is 1e-4 H.
Primary leakage resistance
The resistance R1, which represents the power loss of the
primary winding. This parameter is only visible when you select

1-274
Nonlinear Transformer

Separate primary and secondary values for the Winding


parameterized by parameter. The default value is 0.01 Ω.
Primary leakage inductance
The inductance L1, which represents the magnetic flux loss of the
primary winding. This parameter is only visible when you select
Separate primary and secondary values for the Winding
parameterized by parameter. The default value is 1e-4 H.
Secondary leakage resistance
The resistance R2, which represents the power loss of the
secondary winding. This parameter is only visible when you select
Separate primary and secondary values for the Winding
parameterized by parameter. The default value is 0.01 Ω.
Secondary leakage inductance
The inductance L2, which represents the magnetic flux loss of the
secondary winding. This parameter is only visible when you select
Separate primary and secondary values for the Winding
parameterized by parameter. The default value is 1e-4 H.

Magnetization Tab

Magnetization resistance
The resistance Rm, which represents the magnetic losses in the
transformer core. The default value is 100 Ω.
Magnetization inductance parameterized by
Select one of the following methods for the nonlinear
magnetization inductance parameterization:
• Single inductance (linear) — Provide the unsaturated
inductance value.
• Single saturation point — Provide the values for the
unsaturated and saturated inductances, as well as saturation
magnetic flux. This is the default option.
• Magnetic flux versus current characteristic — Provide
the current vector and the magnetic flux vector, to populate the
magnetic flux versus current lookup table.

1-275
Nonlinear Transformer

• Magnetic flux density versus magnetic field strength


characteristic — Provide the values for effective core length
and cross-sectional area, as well as the magnetic field strength
vector and the magnetic flux density vector, to populate the
magnetic flux density versus magnetic field strength lookup
table.
Unsaturated inductance
The value of inductance used when the magnetization inductance
Lm is operating in its linear region. This parameter is only
visible when you select Single inductance (linear) or
Single saturation point for the Magnetization inductance
parameterized by parameter. The default value is 0.04 H.
Saturated inductance
The value of inductance used when the magnetization inductance
Lm is operating beyond its saturation point. This parameter is
only visible when you select Single saturation point for the
Magnetization inductance parameterized by parameter. The
default value is 0.01 H.
Saturation magnetic flux
The value of magnetic flux at which the magnetization inductance
Lm saturates. This parameter is only visible when you select
Single saturation point for the Magnetization inductance
parameterized by parameter. The default value is 1.6e-4 Wb.
Current, i
The current data used to populate the magnetic flux versus
current lookup table. This parameter is only visible when you
select Magnetic flux versus current characteristic for the
Magnetization inductance parameterized by parameter. The
default value is [ 0 0.4 0.8 1.2 1.6 2.0 ] A.
Magnetic flux vector, phi
The magnetic flux data used to populate the magnetic flux versus
current lookup table. This parameter is only visible when you
select Magnetic flux versus current characteristic for the
Magnetization inductance parameterized by parameter. The

1-276
Nonlinear Transformer

default value is [0 0 0.161 0.25 0.284 0.295 0.299 ].*1e-3


Wb.
Magnetic field strength vector, H
The magnetic field strength data used to populate the magnetic
flux density versus magnetic field strength lookup table. This
parameter is only visible when you select Magnetic flux
density versus magnetic field strength characteristic
for the Magnetization inductance parameterized by
parameter. The default value is [ 0 200 400 600 800 1000 ]
A/m.
Magnetic flux density vector, B
The magnetic flux density data used to populate the magnetic
flux density versus magnetic field strength lookup table. This
parameter is only visible when you select Magnetic flux
density versus magnetic field strength characteristic
for the Magnetization inductance parameterized by
parameter. The default value is [ 0 0.81 1.25 1.42 1.48 1.49
] T.
Effective length
The effective core length, that is, the average distance of the
magnetic path around the transformer core. This parameter
is only visible when you select Magnetic flux density
versus magnetic field strength characteristic for the
Magnetization inductance parameterized by parameter. The
default value is 0.2 m.
Effective cross-sectional area
The effective core cross-sectional area, that is, the average area of
the magnetic path around the transformer core. This parameter
is only visible when you select Magnetic flux density
versus magnetic field strength characteristic for the
Magnetization inductance parameterized by parameter. The
default value is 2e-4 m^2.

1-277
Nonlinear Transformer

Interpolation option
The lookup table interpolation option. This parameter is
only visible when you select Magnetic flux versus current
characteristic or Magnetic flux density versus magnetic
field strength characteristic for the Magnetization
inductance parameterized by parameter. Select one of the
following interpolation methods:
• Linear — Uses a linear interpolation function.
• Cubic — Uses the Piecewise Cubic Hermite Interpolation
Polinomial (PCHIP).

For more information on interpolation algorithms, see the PS


Lookup Table (1D) block reference page.

Initial Conditions Tab

Combined leakage inductance initial current


The value of current through the combined leakage inductance
Leq at time zero. This parameter is only visible when you select
Combined primary and secondary values for the Winding
parameterized by parameter on the Main tab. The default
value is 0 A.
Primary leakage inductance initial current
The value of current through the primary leakage inductance
L1 at time zero. This parameter is only visible when you select
Separate primary and secondary values for the Winding
parameterized by parameter on the Main tab. The default
value is 0 A.
Secondary leakage inductance initial current
The value of current through the secondary leakage inductance
L2 at time zero. This parameter is only visible when you select
Separate primary and secondary values for the Winding
parameterized by parameter on the Main tab. The default
value is 0 A.

1-278
Nonlinear Transformer

Specify magnetization inductance initial state by


Select the appropriate initial state specification option:
• Current — Specify the initial state of the magnetization
inductance Lm by the initial current. This is the default option.
• Magnetic flux — Specify the initial state of the magnetization
inductance Lm by the magnetic flux.
Magnetization inductance initial current
The initial current value used to calculate the value of magnetic
flux within the magnetization inductance Lm at time zero. This
is the current passing through the magnetization inductance
Lm. Total magnetization current consists of current passing
through the magnetization resistance Rm and current passing
through the magnetization inductance Lm. This parameter is only
visible when you select Current for the Specify magnetization
inductance initial state by parameter. The default value is 0 A.
Magnetization inductance initial magnetic flux
The value of the magnetic flux in the magnetization inductance
Lm at time zero. This parameter is only visible when you select
Magnetic flux for the Specify magnetization inductance
initial state by parameter. The default is 0 Wb.

Parasitics Tab

Combined leakage inductance parasitic parallel conductance


Use this parameter to represent small parasitic effects in parallel
to the combined leakage inductance Leq. A small parallel
conductance may be required for the simulation of some circuit
topologies. This parameter is only visible when you select
Combined primary and secondary values for the Winding
parameterized by parameter on the Main tab. The default
value is 1e-9 1/Ω.
Primary leakage inductance parasitic parallel conductance
Use this parameter to represent small parasitic effects in
parallel to the primary leakage inductance L1. A small parallel
conductance may be required for the simulation of some circuit

1-279
Nonlinear Transformer

topologies. This parameter is only visible when you select


Separate primary and secondary values for the Winding
parameterized by parameter on the Main tab. The default
value is 1e-9 1/Ω.
Secondary leakage inductance parasitic parallel conductance
Use this parameter to represent small parasitic effects in parallel
to the secondary leakage inductance L2. A small parallel
conductance may be required for the simulation of some circuit
topologies. This parameter is only visible when you select
Separate primary and secondary values for the Winding
parameterized by parameter on the Main tab. The default
value is 1e-9 1/Ω.

Examples For comparison of nonlinear transformer behavior with different


parameterization options, see the Nonlinear Transformer
Characteristics example.

Ports The block has four electrical conserving ports. Polarity is indicated
by the + and - signs.

See Also Ideal Transformer | Nonlinear Inductor

1-280
NPN Bipolar Transistor

Purpose Model NPN bipolar transistor using enhanced Ebers-Moll equations

Library Semiconductor Devices

Description The NPN Bipolar Transistor block uses a variant of the


Ebers-Moll equations to represent an NPN bipolar transistor. The
Ebers-Moll equations are based on two exponential diodes plus two
current-controlled current sources. The NPN Bipolar Transistor block
provides the following enhancements to that model:

• Early voltage effect


• Optional base, collector, and emitter resistances.
• Optional fixed base-emitter and base-collector capacitances.

The collector and base currents are:

  V  1 qVBC /( kTm1 ) 
 
I C  IS  e qVBE /( kTm1 )  e qVBC /( kTm1 ) 1  BC  
VA   R
e 
1 
  
 1 qVBE /( kTm1 ) 
I B  IS  
e 
1  e 
1 qVBC /( kTm1 )
1 
 F R 
Where:

• IB and IC are base and collector currents, defined as positive into


the device.
• IS is the saturation current.
• VBE is the base-emitter voltage and VBC is the base-collector voltage.
• βF is the ideal maximum forward current gain BF
• βR is the ideal maximum reverse current gain BR
• VA is the forward Early voltage VAF
• q is the elementary charge on an electron (1.602176e–19 Coulombs).

1-281
NPN Bipolar Transistor

• k is the Boltzmann constant (1.3806503e–23 J/K).


• Tm1 is the transistor temperature, as defined by the Measurement
temperature parameter value.

You can specify the transistor behavior using datasheet parameters


that the block uses to calculate the parameters for these equations, or
you can specify the equation parameters directly.
If qVBC / (kTm1) > 40 or qVBE / (kTm1) > 40, the corresponding exponential
terms in the equations are replaced with (qVBC / (kTm1) – 39)e40 and
(qVBE / (kTm1) – 39)e40, respectively. This helps prevent numerical issues
associated with the steep gradient of the exponential function ex at large
values of x. Similarly, if qVBC / (kTm1) < –39 or qVBE / (kTm1) < –39 then
the corresponding exponential terms in the equations are replaced with
(qVBC / (kTm1) + 40)e–39 and (qVBE / (kTm1) + 40)e–39, respectively.
Optionally, you can specify parasitic fixed capacitances across the
base-emitter and base-collector junctions. You also have the option to
specify base, collector, and emitter connection resistances.

Modeling Temperature Dependence


The default behavior is that dependence on temperature is not modeled,
and the device is simulated at the temperature for which you provide
block parameters. You can optionally include modeling the dependence
of the transistor static behavior on temperature during simulation.
Temperature dependence of the junction capacitances is not modeled,
this being a much smaller effect.
When including temperature dependence, the transistor defining
equations remain the same. The measurement temperature value,
Tm1, is replaced with the simulation temperature, Ts. The saturation
current, IS, and the forward and reverse gains (βF and βR) become a
function of temperature according to the following equations:

 EG 
ISTs  ISTm1  (Ts / Tm1 ) XTI  exp   (1  Ts / Tm1 ) 
 kTs 

1-282
NPN Bipolar Transistor

XTB
 T 
 Fs   Fm1  s 
 Tm1 

XTB
 T 
 Rs   Rm1  s 
 Tm1 

where:

• Tm1 is the temperature at which the transistor parameters are


specified, as defined by the Measurement temperature parameter
value.
• Ts is the simulation temperature.
• ISTm1 is the saturation current at the measurement temperature.
• ISTs is the saturation current at the simulation temperature. This is
the saturation current value used in the bipolar transistor equations
when temperature dependence is modeled.
• βFm1 and βRm1 are the forward and reverse gains at the measurement
temperature.
• βFs and βRs are the forward and reverse gains at the simulation
temperature. These are the values used in the bipolar transistor
equations when temperature dependence is modeled.
• EG is the energy gap for the semiconductor type measured in Joules.
The value for silicon is usually taken to be 1.11 eV, where 1 eV is
1.602e-19 Joules.
• XTI is the saturation current temperature exponent.
• XTB is the forward and reverse gain temperature coefficient.
• k is the Boltzmann constant (1.3806503e–23 J/K).

Appropriate values for XTI and EG depend on the type of transistor


and the semiconductor material used. In practice, the values of XTI,
EG, and XTB need tuning to model the exact behavior of a particular

1-283
NPN Bipolar Transistor

transistor. Some manufacturers quote these tuned values in a SPICE


Netlist, and you can read off the appropriate values. Otherwise you can
determine values for XTI, EG, and XTB by using a datasheet-defined
data at a higher temperature Tm2. The block provides a datasheet
parameterization option for this.
You can also tune the values of XTI, EG, and XTB yourself, to match
lab data for your particular device. You can use Simulink Design
Optimization software to help tune the values.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from the
context menu select Simscape block choices > Show thermal port.
This action displays the thermal port H on the block icon, and adds the
Thermal port tab to the block dialog box.
Use the thermal port to simulate the effects of generated heat and
device temperature. For more information on using thermal ports and
on the Thermal port tab parameters, see “Simulating Thermal Effects
in Semiconductors”.

Basic The NPN Bipolar Transistor model has the following limitations:
Assumptions
and • The block does not account for temperature-dependent effects on
the junction capacitances.
Limitations
• You may need to use nonzero ohmic resistance and junction
capacitance values to prevent numerical simulation issues, but the
simulation may run faster with these values set to zero.

1-284
NPN Bipolar Transistor

Dialog
Box and
Parameters

• “Main Tab” on page 1-285


• “Ohmic Resistance Tab” on page 1-288
• “Capacitance Tab” on page 1-288
• “Temperature Dependence Tab” on page 1-289

Main Tab

Parameterization
Select one of the following methods for block parameterization:

1-285
NPN Bipolar Transistor

• Specify from a datasheet — Provide parameters that the


block converts to equations that describe the transistor. The
block calculates the forward Early voltage VAF as Ic/h_oe,
where Ic is the Collector current at which h-parameters
are defined parameter value, and h_oe is the Output
admittance h_oe parameter value [1]. The block sets BF
to the small-signal Forward current transfer ratio h_fe
value. The block calculates the saturation current IS from the
specified Voltage Vbe value and the corresponding Current
Ib for voltage Vbe value when Ic is zero. This is the default
method.
• Specify using equation parameters directly — Provide
equation parameters IS, BF, and VAF.
Forward current transfer ratio h_fe
Small-signal current gain. This parameter is only visible when you
select Specify from a datasheet for the Parameterization
parameter. The default value is 100.
Output admittance h_oe
Derivative of the collector current with respect to the
collector-emitter voltage for a fixed base current. This parameter
is only visible when you select Specify from a datasheet for the
Parameterization parameter. The default value is 5e-05 1/Ω.
Collector current at which h-parameters are defined
The h-parameters vary with operating point, and are defined
for this value of the collector current. This parameter is only
visible when you select Specify from a datasheet for the
Parameterization parameter. The default value is 1 mA.
Collector-emitter voltage at which h-parameters are defined
The h-parameters vary with operating point, and are defined
for this value of the collector-emitter voltage. This parameter is
only visible when you select Specify from a datasheet for the
Parameterization parameter. The default value is 5 V.

1-286
NPN Bipolar Transistor

Voltage Vbe
Base-emitter voltage when the base current is Ib. The [ Vbe Ib ]
data pair must be quoted for when the transistor is in the normal
active region, that is, not in the saturated region. This parameter
is only visible when you select Specify from a datasheet for
the Parameterization parameter. The default value is 0.55 V.
Current Ib for voltage Vbe
Base current when the base-emitter voltage is Vbe. The [ Vbe Ib ]
data pair must be quoted for when the transistor is in the normal
active region, that is, not in the saturated region. This parameter
is only visible when you select Specify from a datasheet for
the Parameterization parameter. The default value is 0.5 mA.
Forward current transfer ratio BF
Ideal maximum forward current gain. This parameter is only
visible when you select Specify using equation parameters
directly for the Parameterization parameter. The default
value is 100.
Saturation current IS
Transistor saturation current. This parameter is only visible when
you select Specify using equation parameters directly for
the Parameterization parameter. The default value is 1e-14 A.
Forward Early voltage VAF
In the standard Ebers-Moll equations, the gradient of the
Ic versus Vce curve is zero in the normal active region. The
additional forward Early voltage term increases this gradient.
The intercept on the Vce-axis is equal to –VAF when the linear
region is extrapolated. This parameter is only visible when you
select Specify using equation parameters directly for the
Parameterization parameter. The default value is 200 V.
Reverse current transfer ratio BR
Ideal maximum reverse current gain. This value is often not
quoted in manufacturer datasheets, because it is not significant
when the transistor is biased to operate in the normal active

1-287
NPN Bipolar Transistor

region. When the value is not known and the transistor is not to
be operated on the inverse region, use the default value of 1.
Measurement temperature
Temperature Tm1 at which Vbe and Ib, or IS, are measured. The
default value is 25 C.

Ohmic Resistance Tab

Collector resistance RC
Resistance at the collector. The default value is 0.01 Ω.
Emitter resistance RE
Resistance at the emitter. The default value is 1e-4 Ω.
Zero bias base resistance RB
Resistance at the base at zero bias. The default value is 1 Ω.

Capacitance Tab

Base-collector junction capacitance


Parasitic capacitance across the base-collector junction. The
default value is 5 pF.
Base-emitter junction capacitance
Parasitic capacitance across the base-emitter junction. The
default value is 5 pF.
Total forward transit time
Represents the mean time for the minority carriers to cross the
base region from the emitter to the collector, and is often denoted
by the parameter TF [1]. The default value is 0 μs.
Total reverse transit time
Represents the mean time for the minority carriers to cross the
base region from the collector to the emitter, and is often denoted
by the parameter TR [1]. The default value is 0μs.

1-288
NPN Bipolar Transistor

Temperature Dependence Tab

Parameterization
Select one of the following methods for temperature dependence
parameterization:
• None Simulate at parameter measurement temperature
— Temperature dependence is not modeled, or the model is
simulated at the measurement temperature Tm1 (as specified
by the Measurement temperature parameter on the Main
tab). This is the default method.
• Model temperature dependence — Provide a value for
simulation temperature, to model temperature-dependent
effects. You also have to provide a set of additional parameters
depending on the block parameterization method. If you
parameterize the block from a datasheet, you have to provide
values for a second [ Vbe Ib ] data pair and h_fe at second
measurement temperature. If you parameterize by directly
specifying equation parameters, you have to provide the values
for XTI, EG, and XTB.
Forward current transfer ratio, h_fe, at second measurement
temperature
Small-signal current gain at the second measurement
temperature. This parameter is only visible when you select
Specify from a datasheet for the Parameterization
parameter on the Main tab. It must be quoted at the same
collector-emitter voltage and collector current as for the Forward
current transfer ratio h_fe parameter on the Main tab. The
default value is 125.
Voltage Vbe at second measurement temperature
Base-emitter voltage when the base current is Ib and the
temperature is set to the second measurement temperature. The
[Vbe Ib] data pair must be quoted for when the transistor is in
the normal active region, that is, not in the saturated region.
This parameter is only visible when you select Specify from a

1-289
NPN Bipolar Transistor

datasheet for the Parameterization parameter on the Main


tab. The default value is 0.45 V.
Current Ib for voltage Vbe at second measurement temperature
Base current when the base-emitter voltage is Vbe and the
temperature is set to the second measurement temperature. The
[ Vbe Ib ] data pair must be quoted for when the transistor is in
the normal active region, that is, not in the saturated region.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter on the Main
tab. The default value is 0.5 mA.
Second measurement temperature
Second temperature Tm2 at which h_fe,Vbe, and Ib are measured.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter on the Main
tab. The default value is 125 C.
Current gain temperature coefficient, XTB
Current gain temperature coefficient value. This parameter
is only visible when you select Specify using equation
parameters directly for the Parameterization parameter on
the Main tab. The default value is 0.
Energy gap, EG
Energy gap value. This parameter is only visible when you
select Specify using equation parameters directly for the
Parameterization parameter on the Main tab. The default
value is 1.11 eV.
Saturation current temperature exponent, XTI
Saturation current temperature coefficient value. This parameter
is only visible when you select Specify using equation
parameters directly for the Parameterization parameter on
the Main tab. The default value is 3.
Device simulation temperature
Temperature Ts at which the device is simulated. The default
value is 25 C.

1-290
NPN Bipolar Transistor

Ports The block has the following ports:

B
Electrical conserving port associated with the transistor base
terminal
C
Electrical conserving port associated with the transistor collector
terminal
E
Electrical conserving port associated with the transistor emitter
terminal

Examples See the NPN Bipolar Transistor Characteristics example.

References [1] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993.

[2] H. Ahmed and P.J. Spreadbury. Analogue and digital electronics for
engineers. 2nd Edition, Cambridge University Press, 1984.

See Also Diode | PNP Bipolar Transistor

1-291
Operational Transconductance Amplifier

Purpose Model behavioral representation of operational transconductance


amplifier

Library Integrated Circuits

Description The Operational Transconductance Amplifier block provides a


behavioral representation of an operational transconductance amplifier.
A transconductance amplifier converts an input voltage into an output
current. Applications include variable frequency oscillators, variable
gain amplifiers and current-controlled filters. These applications exploit
the fact that the transconductance gain is a function of current flowing
into the control current pin.
To support faster simulation, the behavioral representation does not
model the detailed transistor implementation. Therefore, the model
is only valid when operating in the linear region, that is, where the
device input resistance, output resistance, and transconductance gain
all depend linearly on the control current, and are independent of input
signal amplitude. The dynamics are approximated by a first-order lag,
based on the value you specify for the block parameter Bandwidth.

Control Current
The control current pin C is maintained at the voltage that you specify
for the Minimum output voltage. In practice, the Minimum
output voltage equals the negative supply voltage plus the transistor
collector-emitter voltage drop. For example, if the Minimum output
voltage for a supply voltage of +-15V is -14.5, then to achieve a control
current of 500μA, a resistor connected between the +15V rail and the
control current pin must have a value of (15 - (-14.5)) / 500e-6 = 59kOhm.

Transconductance
The relationship between input voltage, v, and transconductance
current, igm, is:

1-292
Operational Transconductance Amplifier

v  v  v
igm  gm  v
gm0  ic
gm 
ic0

where:

• v+ is the voltage presented at the block + pin.


• v– is the voltage presented at the block - pin.
• gm is the transconductance.
• ic is the control current flowing into the control current pin C.
• ic0 is the reference control current, that is, the control current at
which transconductance is quoted on the datasheet.
• gm0 is the transconductance measured at the reference control
current ic0.

Therefore, increasing control current increases the transconductance.

Output Resistance and Determining Output Current


The output resistance, Rout, is defined by:

vo
igm  io 
Rout
Rout0  ic0
Rout 
ic

where:

• igm is the transconductance current.


• io is the output current, defined as positive if flowing into the
transconductance amplifier output pin.
• ic is the control current flowing into the control current pin C.

1-293
Operational Transconductance Amplifier

• ic0 is the reference control current, that is, the control current at
which output resistance is quoted on the datasheet.
• Rout0 is the output resistance measured at the reference control
current ic0.

Therefore, increasing control current reduces output resistance.

Input Resistance
The relationship between input voltage, v, across the + and - pins and
the current flowing, i, is:

v
 Rin
i
R i
Rin  in0 c0
ic

where:

• ic is the control current flowing into the control current pin C.


• Rin is the input resistance for the current control current value, ic.
• ic0 is the reference control current, that is, the control current at
which input resistance is quoted on the datasheet.
• Rin0 is the input resistance measured at the reference control current
ic0.

Therefore, increasing control current reduces input resistance.

Limits
Because of the physical construction of an operational transconductance
amplifier based on current mirrors, the transconductance current igm
cannot exceed the control current. Hence the value of igm is limited by:

–ic ≤ igm ≤ ic

1-294
Operational Transconductance Amplifier

The output voltage is also limited by the supply voltage:

Vmin ≤ vo ≤ Vmax

where Vmin is the Minimum output voltage, and Vmax is the


Maximum output voltage. Output voltage limiting is implemented
by adding a low resistance to the output when the voltage limit is
exceeded. The value of this resistance is set by the Additional output
resistance at voltage swing limits parameter.
The transconductance current is also slew-rate limited, a value for slew
rate limiting typically being given on datasheets:

digm
  
dt

where μ is the Maximum current slew rate.

Dialog
Box and
Parameters

• “Nominal Measurements Tab” on page 1-296

1-295
Operational Transconductance Amplifier

• “Dynamics Tab” on page 1-296


• “Limits Tab” on page 1-297

Nominal Measurements Tab

Transconductance
The transconductance, gm, when the control current is equal
to the Reference control current. This is the ratio of the
transconductance current, igm, to the voltage difference, v, across
the + and - pins. The default value is 9600 μS.
Input resistance
The input resistance, Rin, when the control current is equal to the
Reference control current. The input resistance is the ratio
of the voltage difference, v, across the + and - pins to the current
flowing from the + to the - pin. The default value is 25 kOhm.
Output resistance
The output resistance, Rout, when the control current is equal
to the Reference control current. See above for the equation
defining output resistance. The default value is 3 MOhm.
Reference control current
The control current at which the Transconductance, Input
resistance, and Output resistance are quoted. The default
value is 500 μA.

Dynamics Tab

Dynamics
Select one of the following options:
• No lag — Do not model the dynamics of the relationship
between output current and input voltage. This is the default.
• Finite bandwidth with slew rate limiting — Model the
dynamics of the relationship between output current and input
voltage using a first-order lag. If you select this option, the
Bandwidth, Maximum current slew rate, and Initial
current parameters appear on the Dynamics tab.

1-296
Operational Transconductance Amplifier

Bandwidth
The bandwidth of the first-order lag used to model the dynamics
of the relationship between output current and input voltage. The
default value is 2 MHz.
Maximum current slew rate
The maximum rate-of-change of transconductance current when
there is no feedback around the device. Note that datasheets
sometimes quote slew rate as a maximum rate of change of
voltage. In this case, the value depends on the particular test
circuit. To get an accurate value for Maximum current slew
rate, reproduce the test circuit in a SimElectronics® model, and
tune the parameter value to match the datasheet value. If the
test circuit is open-loop, and the load resistance is quoted, you can
obtain an approximate value for the Maximum current slew
rate by dividing the voltage slew rate by the load resistance. The
default value is 2 A/μs.
Initial current
The initial transconductance current (note, not the initial output
current). This is the transconductance current sinking to both the
internal output resistance, Rout, and the output pin. The default
value is 0 A.

Limits Tab

Minimum output voltage


The output voltage is limited to be greater than the value of this
parameter. The default value is -15 V.
Maximum output voltage
The output voltage is limited to be less than the value of this
parameter. The default value is 15 V.
Additional output resistance at voltage swing limits
To limit the output voltage swing, an additional output resistance
is applied between output and the power rail when the output
voltage exceeds the limit. The value of this resistance should be

1-297
Operational Transconductance Amplifier

low compared to the output resistance and circuit load resistance.


The default value is 1 Ohm.
Minimum control current for simulation
The control current measured at the control current pin C is
limited to be greater than the value of this parameter. This
prevents a potential divide-by-zero when calculating input and
output resistance values based on the value of the control current.
The default value is 0.001 μA.

Ports The block has the following ports:

+
Positive electrical voltage
-
Negative electrical voltage
C
Control current
OUT
Output current

See Also Op-Amp | Band-Limited Op-Amp | Finite-Gain Op-Amp

1-298
Optocoupler

Purpose Model optocoupler as LED, current sensor, and controlled current source

Library Semiconductor Devices

Description This block represents an optocoupler using a model that consists of


the following components:

• An exponential light-emitting diode in series with a current sensor


on the input side
• A controlled current source on the output side

The output-side current flows from the collector junction to the emitter
junction. It has a value of CTR·Id, where CTR is the Current transfer
ratio parameter value and Id is the diode current.
Use the Optocoupler block to interface two electrical circuits without
making a direct electrical connection. A common reason for doing this is
that the two circuits work at very different voltage levels.

Note Each electrical circuit must have its own Electrical Reference
block.

If the output circuit is a phototransistor, typical values for the Current


transfer ratio parameter are 0.1 to 0.5. If the output stage consists of
a Darlington pair, the parameter value can be much higher than this.
The Current transfer ratio value also varies with the light-emitting
diode current, but this effect is not modeled by the Photodiode block.
Some manufacturers provide a maximum data rate for optocouplers. In
practice, the maximum data rate depends on the following factors:

• The capacitance of the photodiode and the type of the driving circuit
• The construction of the phototransistor and its associated capacitance

1-299
Optocoupler

The Optocoupler block only lets you define the capacitance on the
light-emitting diode. You can use the Junction capacitance
parameter to add your own capacitance across the collector and emitter
connections.
The Optocoupler block lets you model temperature dependence of the
underlying diode. For details, see the Diode reference page.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from the
context menu select Simscape block choices > Show thermal port.
This action displays the thermal port H on the block icon, and adds the
Thermal port tab to the block dialog box.
Use the thermal port to simulate the effects of generated heat and
device temperature. For more information on using thermal ports and
on the Thermal port tab parameters, see “Simulating Thermal Effects
in Semiconductors”.

Basic The Optocoupler block has the following limitations:


Assumptions
and • The output side is modeled as a controlled current source. As such,
it only correctly approximates a bipolar transistor operating in its
Limitations
normal active region. To create a more detailed model, connect the
Optocoupler output directly to the base of an NPN Bipolar Transistor
block, and set the parameters to maintain a correct overall value for
the current transfer ratio. If you need to connect optocouplers in
series, use this approach to avoid the invalid topology of two current
sources in series.
• The temperature dependence of the forward current transfer ratio is
not modeled. Typically the temperature dependence of this parameter
is much less than that of the optical diode I-V characteristic.
• You may need to use nonzero ohmic resistance and junction
capacitance values to prevent numerical simulation issues, but the
simulation may run faster with these values set to zero.

1-300
Optocoupler

Dialog
Box and
Parameters

• “Main Tab” on page 1-301


• “Ohmic Resistance Tab” on page 1-302
• “Junction Capacitance Tab” on page 1-303
• “Temperature Dependence Tab” on page 1-304

Main Tab

Current transfer ratio


The output current flowing from the transistor collector to emitter
junctions is equal to the product of the current transfer ratio and
the current flowing the light-emitting diode. The default value
is 0.2.
Diode parameterization
Select one of the following methods for model parameterization:
• Use I-V curve data points — Specify measured data at two
points on the diode I-V curve. This is the default method.

1-301
Optocoupler

• Use parameters IS and N — Specify saturation current and


emission coefficient.
Currents [I1 I2]
A vector of the current values at the two points on the diode I-V
curve that the block uses to calculate IS and N. This parameter
is only visible when you select Use I-V curve data points for
the Diode parameterization parameter. The default value is [
0.001 0.015 ] A.
Voltages [V1 V2]
A vector of the voltage values at the two points on the diode I-V
curve that the block uses to calculate IS and N. This parameter
is only visible when you select Use I-V curve data points for
the Diode parameterization parameter. The default value is
[ 0.9 1.05 ] V.
Saturation current IS
The magnitude of the current that the ideal diode equation
approaches asymptotically for very large reverse bias levels. This
parameter is only visible when you select Use parameters IS
and N for the Diode parameterization parameter. The default
value is 1e-10 A.
Measurement temperature
The temperature at which IS or the I-V curve was measured. The
default value is 25 °C.
Emission coefficient N
The diode emission coefficient or ideality factor. This parameter
is only visible when you select Use parameters IS and N for the
Diode parameterization parameter. The default value is 2.

Ohmic Resistance Tab

Ohmic resistance RS
The series diode connection resistance. The default value is 0.1 Ω.

1-302
Optocoupler

Junction Capacitance Tab

Junction capacitance
Select one of the following options for modeling the diode junction
capacitance:
• Fixed or zero junction capacitance — Model the junction
capacitance as a fixed value.
• Use C-V curve data points — Specify measured data at
three points on the diode C-V curve.
• Use parameters CJ0, VJ, M & FC — Specify zero-bias
junction capacitance, junction potential, grading coefficient,
and forward-bias depletion capacitance coefficient.
Zero-bias junction capacitance CJ0
The value of the capacitance placed in parallel with the
exponential diode term. This parameter is only visible when
you select Fixed or zero junction capacitance or Use
parameters CJ0, VJ, M & FC for the Junction capacitance
parameter. The default value is 5 pF.
Junction potential VJ
The junction potential. This parameter is only visible when you
select Use parameters CJ0, VJ, M & FC for the Junction
capacitance parameter. The default value is 1 V.
Grading coefficient M
The coefficient that quantifies the grading of the junction. This
parameter is only visible when you select Use parameters CJ0,
VJ, M & FC for the Junction capacitance parameter. The
default value is 0.5.
Reverse bias voltages [VR1 VR2 VR3]
A vector of the reverse bias voltage values at the three points on
the diode C-V curve that the block uses to calculate CJ0, VJ, and
M. This parameter is only visible when you select Use C-V curve
data points for the Junction capacitance parameter. The
default value is [ 0.1 10 100 ] V.

1-303
Optocoupler

Corresponding capacitances [C1 C2 C3]


A vector of the capacitance values at the three points on the diode
C-V curve that the block uses to calculate CJ0, VJ, and M. This
parameter is only visible when you select Use C-V curve data
points for the Junction capacitance parameter. The default
value is [ 3.5 1 0.4 ] pF.
Capacitance coefficient FC
Fitting coefficient that quantifies the decrease of the depletion
capacitance with applied voltage. This parameter is only visible
when you select Use C-V curve data points or Use parameters
CJ0, VJ, M & FC for the Junction capacitance parameter.
The default value is 0.5.

Temperature Dependence Tab

Parameterization
Select one of the following methods for temperature dependence
parameterization:
• None Simulate at parameter measurement temperature
— Temperature dependence is not modeled, or the model is
simulated at the measurement temperature Tm1 (as specified
by the Measurement temperature parameter on the Main
tab). This is the default method.
• Use an I-V data point at second measurement
temperature T2 — If you select this option, you specify
a second measurement temperature Tm2, and the current
and voltage values at this temperature. The model uses
these values, along with the parameter values at the first
measurement temperature Tm1, to calculate the energy gap
value.
• Specify saturation current at second measurement
temperature T2 — If you select this option, you specify a
second measurement temperature Tm2, and saturation current
value at this temperature. The model uses these values,

1-304
Optocoupler

along with the parameter values at the first measurement


temperature Tm1, to calculate the energy gap value.
• Specify the energy gap EG — Specify the energy gap value
directly.
Current I1 at second measurement temperature
Specify the diode current I1 value when the voltage is V1 at
the second measurement temperature. This parameter is only
visible when you select Use an I-V data point at second
measurement temperature T2 for the Parameterization
parameter. The default value is 0.029 A.
Voltage V1 at second measurement temperature
Specify the diode voltage V1 value when the current is I1 at
the second measurement temperature. This parameter is only
visible when you select Use an I-V data point at second
measurement temperature T2 for the Parameterization
parameter. The default value is 1.05 V.
Saturation current, IS, at second measurement temperature
Specify the saturation current IS value at the second
measurement temperature. This parameter is only visible
when you select Specify saturation current at second
measurement temperature T2 for the Parameterization
parameter. The default value is 1.8e-8 A.
Second measurement temperature
Specify the value for the second measurement temperature.
This parameter is only visible when you select either Use an
I-V data point at second measurement temperature T2
or Specify saturation current at second measurement
temperature T2 for the Parameterization parameter. The
default value is 125 C.
Energy gap parameterization
This parameter is only visible when you select Specify the
energy gap EG for the Parameterization parameter. It lets
you select a value for the energy gap from a list of predetermined
options, or specify a custom value:

1-305
Optocoupler

• Use nominal value for silicon (EG=1.11eV) — This is


the default.
• Use nominal value for 4H-SiC silicon carbide
(EG=3.23eV)
• Use nominal value for 6H-SiC silicon carbide
(EG=3.00eV)
• Use nominal value for germanium (EG=0.67eV)
• Use nominal value for gallium arsenide (EG=1.43eV)
• Use nominal value for selenium (EG=1.74eV)
• Use nominal value for Schottky barrier diodes
(EG=0.69eV)
• Specify a custom value — If you select this option, the
Energy gap, EG parameter appears in the dialog box, to let
you specify a custom value for EG.
Energy gap, EG
Specify a custom value for the energy gap, EG. This parameter
is only visible when you select Specify a custom value for the
Energy gap parameterization parameter. The default value
is 1.11 eV.
Saturation current temperature exponent parameterization
Select one of the following options to specify the saturation
current temperature exponent value:
• Use nominal value for pn-junction diode (XTI=3) —
This is the default.
• Use nominal value for Schottky barrier diode (XTI=2)
• Specify a custom value — If you select this option, the
Saturation current temperature exponent, XTI parameter
appears in the dialog box, to let you specify a custom value
for XTI.

1-306
Optocoupler

Saturation current temperature exponent, XTI


Specify a custom value for the saturation current temperature
exponent, XTI. This parameter is only visible when you
select Specify a custom value for the Saturation current
temperature exponent parameterization parameter. The
default value is 3.
Device simulation temperature
Specify the value for the temperature Ts, at which the device is
to be simulated. The default value is 25 C.

Ports The block has the following ports:

+
Electrical conserving port associated with the diode positive
terminal
-
Electrical conserving port associated with the diode negative
terminal
C
Electrical conserving port associated with the transistor collector
terminal
E
Electrical conserving port associated with the transistor emitter
terminal

References [1] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993.

[2] H. Ahmed and P.J. Spreadbury. Analogue and digital electronics for
engineers. 2nd Edition, Cambridge University Press, 1984.

See Also Diode | NPN Bipolar Transistor | Controlled Current Source

1-307
P-Channel JFET

Purpose Model P-Channel JFET

Library Semiconductor Devices

Description The P-Channel JFET block uses the Shichman and Hodges equations to
represent a P-Channel JFET using a model with the following structure:

G is the transistor gate, D is the transistor drain and S is the transistor


source. The drain current, ID, depends on the region of operation and
whether the transistor is operating in normal or inverse mode.

• In normal mode (–VDS ≥ 0), the block provides the following


relationship between the drain current ID and the drain-source
voltage VDS.

1-308
P-Channel JFET

Region Applicable Corresponding ID Equation


Range of VGS
and VDS Values
Off –VGS < –Vt0 ID = 0

Linear 0 < –VDS < –VGS +


Vt0 I ds = Vds ( 2(−Vgs + Vt 0 ) + Vds ) (1 − Vds ) ID =
βVDS(2(–VGS + Vt0) + VDS)(1 – λVDS)
Saturated 0 < –VGS + Vt0 <
–VDS I ds = −  (−Vgs + Vt 0 ) 2 (1 − Vds ) ID = –β (–VGS +
Vt0)2 (1 – λVDS)

• In inverse mode (–VDS < 0), the block provides the following
relationship between the drain current ID and the drain-source
voltage VDS.

Region Applicable Corresponding ID Equation


Range of VGS
and VDS Values
Off –VGD < –Vt0 ID = 0
Linear 0 < VDS < – VGD + ID = βVDS(2(–VGD + Vt0) – VDS)(1 + λVDS)
Vt0
Saturated 0 < –VGD + Vt0 < ID = β (–VGD + Vt0)2 (1 + λVDS)
VDS

In the preceding equations:

• VGS is the gate-source voltage.


• VGD is the gate-drain voltage.
• Vt0 is the threshold voltage. If you select Specify using equation
parameters directly for the Parameterization parameter, Vt0

1-309
P-Channel JFET

is the Threshold voltage parameter value. Otherwise, the block


calculates Vt0 from the datasheet parameters you specify.
• β is the transconductance parameter. If you select Specify using
equation parameters directly for the Parameterization
parameter, β is the Transconductance parameter parameter
value. Otherwise, the block calculates β from the datasheet
parameters you specify.
• λ is the channel-length modulation parameter. If you select Specify
using equation parameters directly for the Parameterization
parameter, λ is the Channel-length modulation parameter value.
Otherwise, the block calculates λ from the datasheet parameters
you specify.

The currents in each of the diodes satisfy the exponential diode equation


IGD   IS  e qVGD kTm1
1 

IGS   IS  e qVGS kTm1
1 
where:

• IS is the saturation current. If you select Specify using equation


parameters directly for the Parameterization parameter, IS is
the Saturation current parameter value. Otherwise, the block
calculates IS from the datasheet parameters you specify.
• q is the elementary charge on an electron (1.602176e–19 Coulombs).
• k is the Boltzmann constant (1.3806503e–23 J/K).
• Tm1 is the measurement temperature. The value comes from the
Measurement temperature parameter.

The block models gate junction capacitance as a fixed gate-drain


capacitance CGD and a fixed gate-source capacitance CGS. If you
select Specify using equation parameters directly for the

1-310
P-Channel JFET

Parameterization parameter, you specify these values directly using


the Gate-drain junction capacitance and Gate-source junction
capacitance parameters. Otherwise, the block derives them from the
Input capacitance Ciss and Reverse transfer capacitance Crss
parameter values. The two parameterizations are related as follows:

• CGD = Crss
• CGS = Ciss – Crss

Modeling Temperature Dependence


The default behavior is that dependence on temperature is not modeled,
and the device is simulated at the temperature for which you provide
block parameters. You can optionally include modeling the dependence
of the transistor static behavior on temperature during simulation.
Temperature dependence of the junction capacitances is not modeled,
this being a much smaller effect.
When including temperature dependence, the transistor defining
equations remain the same. The measurement temperature value, Tm1,
is replaced with the simulation temperature, Ts. The transconductance,
β, and the threshold voltage, Vt0, become a function of temperature
according to the following equations:

BEX
 T 
Ts  Tm1  s 
 Tm1 

Vt0s = Vt01 + α ( Ts – Tm1)

where:

• Tm1 is the temperature at which the transistor parameters are


specified, as defined by the Measurement temperature parameter
value.
• Ts is the simulation temperature.
• βTm1 is JFET transconductance at the measurement temperature.

1-311
P-Channel JFET

• βTs is JFET transconductance at the simulation temperature. This


is the transconductance value used in the JFET equations when
temperature dependence is modeled.
• Vt01 is the threshold voltage at measurement temperature.
• Vt0s is the threshold voltage at simulation temperature. This is
the threshold voltage value used in the JFET equations when
temperature dependence is modeled.
• BEX is the mobility temperature exponent. A typical value of BEX
is -1.5.
• α is the gate threshold voltage temperature coefficient, dVth/dT.

For most JFETS, you can use the default value of -1.5 for BEX. Some
datasheets quote the value for α, but most typically they provide
the temperature dependence for the saturated drain current, I_dss.
Depending on the block parameterization method, you have two ways
of specifying α:

• If you parameterize the block from a datasheet, you have to provide


I_dss at a second measurement temperature. The block then
calculates the value for α based on this data.
• If you parameterize by specifying equation parameters, you have to
provide the value for α directly.

If you have more data comprising drain current as a function of


gate-source voltage for fixed drain-source voltage plotted at more than
one temperature, then you can also use Simulink Design Optimization
software to help tune the values for α and BEX.
In addition, the saturation current term, IS, in the gate-drain and
gate-source current equations depends on temperature

 EG 
ISTs  ISTm1  (Ts / Tm1 ) XTI  exp   (1  Ts / Tm1 ) 
 kTs 

1-312
P-Channel JFET

where:

• ISTm1 is the saturation current at the measurement temperature.


• ISTs is the saturation current at the simulation temperature. This is
the saturation current value used in the bipolar transistor equations
when temperature dependence is modeled.
• EG is the energy gap.
• k is the Boltzmann constant (1.3806503e–23 J/K).
• XTI is the saturation current temperature exponent.

Similar to α, you have two ways of specifying EG and XTI:

• If you parameterize the block from a datasheet, you have to


specify the gate reverse current, I_gss, at a second measurement
temperature. The block then calculates the value for EG based on
this data and assuming a p-n junction nominal value of 3 for XTI.
• If you parameterize by specifying equation parameters, you have to
provide the values for EG and XTI directly. This option gives you
most flexibility to match device behavior, for example, if you have a
graph of I_gss as a function of temperature. With this data you can
use Simulink Design Optimization software to help tune the values
for EG and XTI.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from the
context menu select Simscape block choices > Show thermal port.
This action displays the thermal port H on the block icon, and adds the
Thermal port tab to the block dialog box.
Use the thermal port to simulate the effects of generated heat and
device temperature. For more information on using thermal ports and
on the Thermal port tab parameters, see “Simulating Thermal Effects
in Semiconductors”.

1-313
P-Channel JFET

Basic The model is based on the following assumptions:


Assumptions
and • This block does not allow you to specify initial conditions on the
junction capacitances. If you select the Start simulation from
Limitations
steady state option in the Solver Configuration block, the block
solves the initial voltages to be consistent with the calculated steady
state. Otherwise, voltages are zero at the start of the simulation.
• You may need to use nonzero ohmic resistance and junction
capacitance values to prevent numerical simulation issues, but the
simulation may run faster with these values set to zero.
• The block does not account for temperature-dependent effects on
the junction capacitances.
• When you specify I_dss at a second measurement temperature, it
must be quoted for the same working point (that is, the same drain
current and gate-source voltage) as for the I_dss value on the Main
tab. Inconsistent values for I_dss at the higher temperature will
result in unphysical values for α and unrepresentative simulation
results.
• You may need to tune the value of BEX to replicate the ID-VGS
relationship (if available) for a given device. The value of BEX affects
whether the ID-VGS curves for different temperatures cross each
other, or not, for the ranges of ID and VGS considered.

1-314
P-Channel JFET

Dialog
Box and
Parameters

• “Main Tab” on page 1-315


• “Ohmic Resistance Tab” on page 1-318
• “Junction Capacitance Tab” on page 1-318
• “Temperature Dependence Tab” on page 1-319

Main Tab

Parameterization
Select one of the following methods for block parameterization:

1-315
P-Channel JFET

• Specify from a datasheet — Provide parameters that the


block converts to equations that describe the transistor. This
is the default method.
• Specify using equation parameters directly — Provide
equation parameters β, IS, Vt0, and λ.
Gate reverse current, I_gss
The reverse current that flows in the diode when the drain and
source are short-circuited and a large positive gate-source voltage
is applied. This parameter is only visible when you select Specify
from a datasheet for the Parameterization parameter. The
default value is 5 nA.
Saturated drain current, I_dss
The current that flows when a large negative drain-source
voltage is applied for a specified gate-source voltage. For a
depletion-mode device, this gate-source voltage may be zero, in
which case I_dss may be referred to as the zero-gate voltage drain
current. This parameter is only visible when you select Specify
from a datasheet for the Parameterization parameter. The
default value is -3 mA.
I_dss measurement point, [V_gs V_ds]
A vector of the values of VGS and VDS at which I_dss is measured.
Normally VGS is zero. VDS should be greater than zero. This
parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is [ 0 -15 ] V.
Small-signal parameters, [g_fs g_os]
A vector of the values of g_fs and g_os. g_fs is the forward
transfer conductance, that is, the conductance for a fixed
drain-source voltage. g_os is the output conductance, that is, the
conductance for a fixed gate-source voltage. This parameter is
only visible when you select Specify from a datasheet for the
Parameterization parameter. The default value is [ 2.5e+3
75 ] uS.

1-316
P-Channel JFET

Small-signal measurement point [V_gs V_ds]


A vector of the values of VGS and VDS at which g_fs and
g_os are measured. VDS should be greater than zero. For
depletion-mode devices, VGS is typically zero. This parameter is
only visible when you select Specify from a datasheet for the
Parameterization parameter. The default value is [ 0 -15 ] V.
Transconductance parameter
The derivative of drain current with respect to gate voltage.
This parameter is only visible when you select Specify using
equation parameters directly for the Parameterization
parameter. The default value is 1e-04 A/V2.
Saturation current
The magnitude of the current that the ideal diode equation
approaches asymptotically for very large reverse bias levels.
This parameter is only visible when you select Specify using
equation parameters directly for the Parameterization
parameter. The default value is 1e-14 A.
Threshold voltage
The gate-source voltage above which the transistor produces a
nonzero drain current. For an enhancement device, Vt0 should
be negative. For a depletion mode device, Vt0 should be positive.
This parameter is only visible when you select Specify using
equation parameters directly for the Parameterization
parameter. The default value is 2 V.
Channel-length modulation
The channel-length modulation. This parameter is only
visible when you select Specify using equation parameters
directly for the Parameterization parameter. The default
value is 0 1/V.
Measurement temperature
The temperature for which the datasheet parameters are quoted.
The default value is 25 C.

1-317
P-Channel JFET

Ohmic Resistance Tab

Source ohmic resistance


The transistor source resistance. The default value is 1e-4 Ω. The
value must be greater than or equal to 0.
Drain ohmic resistance
The transistor drain resistance. The default value is 0.01 Ω. The
value must be greater than or equal to 0.

Junction Capacitance Tab

Parameterization
Select one of the following methods for block parameterization:
• Specify from a datasheet — Provide parameters that the
block converts to junction capacitance values. This is the
default method.
• Specify using equation parameters directly — Provide
junction capacitance parameters directly.
Input capacitance, Ciss
The gate-source capacitance with the drain shorted to the source.
This parameter is only visible when you select Specify from a
datasheet for the Model junction capacitance parameter. The
default value is 4.5 pF.
Reverse transfer capacitance, Crss
The drain-gate capacitance with the source connected to ground.
This parameter is only visible when you select Specify from a
datasheet for the Model junction capacitance parameter. The
default value is 1.5 pF.
Gate-source junction capacitance
The value of the capacitance placed between the gate and the
source. This parameter is only visible when you select Specify
using equation parameters directly for the Model junction
capacitance parameter. The default value is 3 pF.

1-318
P-Channel JFET

Gate-drain junction capacitance


The value of the capacitance placed between the gate and the
drain. This parameter is only visible when you select Specify
using equation parameters directly for the Model junction
capacitance parameter. The default value is 1.5 pF.

Temperature Dependence Tab

Parameterization
Select one of the following methods for temperature dependence
parameterization:
• None Simulate at parameter measurement temperature
— Temperature dependence is not modeled. This is the default
method.
• Model temperature dependence — Model
temperature-dependent effects. You also have to
provide a set of additional parameters depending on the block
parameterization method. If you parameterize the block from
a datasheet, you have to provide values for I_gss and I_dss
at second measurement temperature. If you parameterize
by directly specifying equation parameters, you have to
provide the values for EG, XTI, and the gate threshold voltage
temperature coefficient, dVt0/dT. Regardless of the block
parameterization method, you also have to provide values for
BEX and for the simulation temperature, Ts.
Gate reverse current, I_gss, at second measurement temperature
The value of the gate reverse current, I_gss, at the second
measurement temperature. This parameter is only visible
when you select Specify from a datasheet for the
Parameterization parameter on the Main tab. It must be
quoted for the same working point (drain current and gate-source
voltage) as the Drain-source on resistance, R_DS(on)
parameter on the Main tab. The default value is 950 nA.

1-319
P-Channel JFET

Saturated drain current, I_dss, at second measurement


temperature
The value of the saturated drain current, I_dss, at the second
measurement temperature, and when the I_dss measurement
point is the same as defined by the I_dss measurement point,
[V_gs V_ds] parameter on the Main tab. This parameter is
only visible when you select Specify from a datasheet for the
Parameterization parameter on the Main tab. The default
value is -2.3 mA.
Second measurement temperature
Second temperature Tm2 at which Gate reverse current, I_gss,
at second measurement temperature and Saturated drain
current, I_dss, at second measurement temperature are
measured. This parameter is only visible when you select Specify
from a datasheet for the Parameterization parameter on the
Main tab. The default value is 125 C.
Energy gap, EG
Energy gap value. This parameter is only visible when you
select Specify using equation parameters directly for the
Parameterization parameter on the Main tab. The default
value is 1.11 eV.
Saturation current temperature exponent, XTI
Saturation current temperature coefficient value. This parameter
is only visible when you select Specify using equation
parameters directly for the Parameterization parameter on
the Main tab. The default value is 3.
Gate threshold voltage temperature coefficient, dVt0/dT
The rate of change of gate threshold voltage with temperature.
This parameter is only visible when you select Specify using
equation parameters directly for the Parameterization
parameter on the Main tab. The default value is 1 mV/K.
Mobility temperature exponent, BEX
Mobility temperature coefficient value. You can use the
default value for most JFETs. See the “Basic Assumptions and

1-320
P-Channel JFET

Limitations” on page 1-314 section for additional considerations.


The default value is -1.5.
Device simulation temperature
Temperature Ts at which the device is simulated. The default
value is 25 C.

Ports The block has the following ports:

G
Electrical conserving port associated with the transistor gate
terminal
D
Electrical conserving port associated with the transistor drain
terminal
S
Electrical conserving port associated with the transistor source
terminal

References [1] H. Shichman and D. A. Hodges, Modeling and simulation of


insulated-gate field-effect transistor switching circuits. IEEE J. Solid
State Circuits, SC-3, 1968.

[2] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993. Chapter 2.

See Also N-Channel JFET

1-321
P-Channel MOSFET

Purpose Model P-Channel MOSFET using Shichman-Hodges equation

Library Semiconductor Devices

Description The P-Channel MOSFET block uses the Shichman and Hodges
equations [1] for an insulated-gate field-effect transistor to represent a
P-Channel MOSFET.
The drain-source current, IDS, depends on the region of operation:

• In the off region (–VGS < –Vth) the drain-source current is:

I DS = 0
• In the linear region (0 < –VDS < –VGS +Vth) the drain-source current is:

I DS = − K ( (VGS − Vth )VDS − VDS 2 / 2 ) (1 +  | VDS |)

• In the saturated region (0 < –VGS +Vth < –VDS) the drain-source
current is:

I DS = −( K / 2)(VGS − Vth ) 2 (1 +  | VDS |)

In the preceding equations:

• K is the transistor gain.


• VDS is the positive drain-source voltage.
• VGS is the gate-source voltage.
• Vth is the threshold voltage.
• λ is the channel modulation.

1-322
P-Channel MOSFET

Charge Model
The block models gate junction capacitance as a fixed gate-source
capacitance CGS and either a fixed or a nonlinear gate-drain capacitance
CGD.
If you select Specify using equation parameters directly for the
Parameterization parameter in the Junction Capacitance tab,
you specify the Gate-drain junction capacitance and Gate-source
junction capacitance parameters directly. Otherwise, the block
derives them from the Input capacitance, Ciss and Reverse transfer
capacitance, Crss parameter values. The two parameterizations are
related as follows:

• CGD = Crss
• CGS = Ciss – Crss

If you select the Gate-drain charge function is nonlinear option


for the Charge-voltage linearity parameter, then the gate-drain
charge relationship is defined by the piecewise-linear function shown in
the following figure.

1-323
P-Channel MOSFET

For instructions on how to map a time response to device capacitance


values, see the N-Channel IGBT block reference page. However, this
mapping is only approximate because the Miller voltage typically varies
more from the threshold voltage than in the case for the IGBT.

Modeling Temperature Dependence


The default behavior is that dependence on temperature is not modeled,
and the device is simulated at the temperature for which you provide

1-324
P-Channel MOSFET

block parameters. You can optionally include modeling the dependence


of the transistor static behavior on temperature during simulation.
Temperature dependence of the junction capacitances is not modeled,
this being a much smaller effect.
When including temperature dependence, the transistor defining
equations remain the same. The gain, K, and the threshold voltage, Vth,
become a function of temperature according to the following equations:

BEX
 T 
K Ts  K Tm1  s 
 Tm1 

Vths = Vth1 + α ( Ts – Tm1)

where:

• Tm1 is the temperature at which the transistor parameters are


specified, as defined by the Measurement temperature parameter
value.
• Ts is the simulation temperature.
• KTm1 is the transistor gain at the measurement temperature.
• KTs is the transistor gain at the simulation temperature. This is
the transistor gain value used in the MOSFET equations when
temperature dependence is modeled.
• Vth1 is the threshold voltage at the measurement temperature.
• Vths is the threshold voltage at the simulation temperature. This is
the threshold voltage value used in the MOSFET equations when
temperature dependence is modeled.
• BEX is the mobility temperature exponent. A typical value of BEX
is -1.5.
• α is the gate threshold voltage temperature coefficient, dVth/dT.

1-325
P-Channel MOSFET

For most MOSFETS, you can use the default value of -1.5 for BEX.
Some datasheets quote the value for α, but most typically they provide
the temperature dependence for drain-source on resistance, RDS(on).
Depending on the block parameterization method, you have two ways
of specifying α:

• If you parameterize the block from a datasheet, you have to provide


RDS(on) at a second measurement temperature. The block then
calculates the value for α based on this data.
• If you parameterize by specifying equation parameters, you have to
provide the value for α directly.

If you have more data comprising drain current as a function of


gate-source voltage for more than one temperature, then you can also
use Simulink Design Optimization software to help tune the values
for α and BEX.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from the
context menu select Simscape block choices > Show thermal port.
This action displays the thermal port H on the block icon, and adds the
Thermal port tab to the block dialog box.
Use the thermal port to simulate the effects of generated heat and
device temperature. For more information on using thermal ports and
on the Thermal port tab parameters, see “Simulating Thermal Effects
in Semiconductors”.

Basic When modeling temperature dependence, consider the following:


Assumptions
and • The block does not account for temperature-dependent effects on
the junction capacitances.
Limitations
• When you specify RDS(on) at a second measurement temperature,
it must be quoted for the same working point (that is, the same
drain current and gate-source voltage) as for the other RDS(on) value.

1-326
P-Channel MOSFET

Inconsistent values for RDS(on) at the higher temperature will result


in unphysical values for α and unrepresentative simulation results.
Typically RDS(on) increases by a factor of about 1.5 for a hundred
degree increase in temperature.
• You may need to tune the values of BEX and threshold voltage,
Vth, to replicate the VDS-VGS relationship (if available) for a given
device. Increasing Vth moves the VDS-VGS plots to the right. The
value of BEX affects whether the VDS-VGS curves for different
temperatures cross each other, or not, for the ranges of VDS and
VGS considered. Therefore, an inappropriate value can result in the
different temperature curves appearing to be reordered. Quoting
RDS(on) values for higher currents, preferably close to the current at
which it will operate in your circuit, will reduce sensitivity to the
precise value of BEX.

1-327
P-Channel MOSFET

Dialog
Box and
Parameters

• “Main Tab” on page 1-328


• “Ohmic Resistance Tab” on page 1-330
• “Junction Capacitance Tab” on page 1-330
• “Temperature Dependence Tab” on page 1-332

Main Tab

Parameterization
Select one of the following methods for block parameterization:
• Specify from a datasheet — Provide the drain-source on
resistance and the corresponding drain current and gate-source

1-328
P-Channel MOSFET

voltage. The block calculates the transistor gain for the


Shichman and Hodges equations from this information. This
is the default method.
• Specify using equation parameters directly — Provide
the transistor gain.
Drain-source on resistance, R_DS(on)
The ratio of the drain-source voltage to the drain current for
specified values of drain current and gate-source voltage.
RDS(on) should have a positive value. This parameter is only
visible when you select Specify from a datasheet for the
Parameterization parameter. The default value is 0.167 Ω.
Drain current, Ids, for R_DS(on)
The drain current the block uses to calculate the value of the
drain-source resistance. IDS should have a negative value. This
parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is -2.5 A.
Gate-source voltage, Vgs, for R_DS(on)
The gate-source voltage the block uses to calculate the value of
the drain-source resistance. VGS should have a negative value.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is -4.5 V.
Gain, K
Positive constant gain coefficient for the Shichman and Hodges
equations. This parameter is only visible when you select
Specify using equation parameters directly for the
Parameterization parameter. The default value is 2 A/V2.
Gate-source threshold voltage, Vth
Gate-source threshold voltage Vth in the Shichman and Hodges
equations. For an enhancement device, Vth should be negative.
For a depletion mode device, Vth should be positive. The default
value is -1.4 V.

1-329
P-Channel MOSFET

Channel modulation, L
The channel-length modulation, usually denoted by the
mathematical symbol λ. When in the saturated region, it is minus
the rate of change of drain current with drain-source voltage.
The effect on drain current is typically small, and the effect
is neglected if calculating transistor gain K from drain-source
on-resistance, RDS(on). A typical value is 0.02, but the effect can
be ignored in most circuit simulations. However, in some circuits
a small nonzero value may help numerical convergence. The
default value is 0 1/V.
Measurement temperature
Temperature Tm1 at which Drain-source on resistance,
R_DS(on) is measured. This parameter is only visible
when you select Model temperature dependence for
the Parameterization parameter on the Temperature
Dependence tab. The default value is 25 C.

Ohmic Resistance Tab

Source ohmic resistance


The transistor source resistance. The default value is 1e-4 Ω. The
value must be greater than or equal to 0.
Drain ohmic resistance
The transistor drain resistance. The default value is 0.001 Ω.
The value must be greater than or equal to 0.

Junction Capacitance Tab

Parameterization
Select one of the following methods for capacitance
parameterization:
• Specify from a datasheet — Provide parameters that the
block converts to junction capacitance values. This is the
default method.
• Specify using equation parameters directly — Provide
junction capacitance parameters directly.

1-330
P-Channel MOSFET

Input capacitance, Ciss


The gate-source capacitance with the drain shorted to the source.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is 270 pF.
Reverse transfer capacitance, Crss
The drain-gate capacitance with the source connected to ground.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is 45 pF.
Gate-source junction capacitance
The value of the capacitance placed between the gate and
the source. This parameter is only visible when you select
Specify using equation parameters directly for the
Parameterization parameter. The default value is 225 pF.
Gate-drain junction capacitance
The value of the capacitance placed between the gate and
the drain. This parameter is only visible when you select
Specify using equation parameters directly for the
Parameterization parameter. The default value is 45 pF.
Output capacitance, Coss
The output capacitance applied across the drain-source ports.
The default value is 0 pF.
Charge-voltage linearity
Select whether gate-drain capacitance is fixed or nonlinear:
• Gate-drain capacitance is constant — The capacitance
value is constant and defined according to the selected
parameterization option, either directly or derived from a
datasheet. This is the default method.
• Gate-drain charge function is nonlinear — The
gate-drain charge relationship is defined according to the
piecewise-nonlinear function described in “Charge Model” on

1-331
P-Channel MOSFET

page 1-323. Two additional parameters appear to let you define


the gate-drain charge function.
Gate-drain oxide capacitance
The gate-drain capacitance when the device is on and the
drain-gate voltage is small. This parameter is only visible when
you select Gate-drain charge function is nonlinear for the
Charge-voltage linearity parameter. The default value is 200
pF.
Drain-gate voltage at which oxide capacitance becomes active
The drain-gate voltage at which the drain-gate capacitance
switches between off-state (CGD) and on-state (Cox) capacitance
values. This parameter is only visible when you select Gate-drain
charge function is nonlinear for the Charge-voltage
linearity parameter. The default value is -0.5 V.

Temperature Dependence Tab

Parameterization
Select one of the following methods for temperature dependence
parameterization:
• None Simulate at parameter measurement temperature
— Temperature dependence is not modeled. This is the default
method.
• Model temperature dependence — Model
temperature-dependent effects. Provide a value for
simulation temperature, Ts, a value for BEX, and a value for
the measurement temperature Tm1 (using the Measurement
temperature parameter on the Main tab). You also have to
provide a value for α using one of two methods, depending on
the value of the Parameterization parameter on the Main
tab. If you parameterize the block from a datasheet, you have
to provide RDS(on) at a second measurement temperature, and
the block will calculate α based on that. If you parameterize by
specifying equation parameters, you have to provide the value
for α directly.

1-332
P-Channel MOSFET

Drain-source on resistance, R_DS(on), at second measurement


temperature
The ratio of the drain-source voltage to the drain current for
specified values of drain current and gate-source voltage at
second measurement temperature. This parameter is only
visible when you select Specify from a datasheet for the
Parameterization parameter on the Main tab. It must be
quoted for the same working point (drain current and gate-source
voltage) as the Drain-source on resistance, R_DS(on)
parameter on the Main tab. The default value is 0.25 Ω.
Second measurement temperature
Second temperature Tm2 at which Drain-source on resistance,
R_DS(on), at second measurement temperature is measured.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter on the Main
tab. The default value is 125 C.
Gate threshold voltage temperature coefficient, dVth/dT
The rate of change of gate threshold voltage with temperature.
This parameter is only visible when you select Specify using
equation parameters directly for the Parameterization
parameter on the Main tab. The default value is 2 mV/K.
Mobility temperature exponent, BEX
Mobility temperature coefficient value. You can use the default
value for most MOSFETs. See the “Basic Assumptions and
Limitations” on page 1-326 section for additional considerations.
The default value is -1.5.
Device simulation temperature
Temperature Ts at which the device is simulated. The default
value is 25 C.

Ports The block has the following ports:

G
Electrical conserving port associated with the transistor gate
terminal

1-333
P-Channel MOSFET

D
Electrical conserving port associated with the transistor drain
terminal
S
Electrical conserving port associated with the transistor source
terminal

References [1] H. Shichman and D. A. Hodges. “Modeling and simulation of


insulated-gate field-effect transistor switching circuits.” IEEE J. Solid
State Circuits, SC-3, 1968.

See Also N-Channel MOSFET

1-334
PCCCS

Purpose Model polynomial current-controlled current source

Library SPICE-Compatible Components/Sources

Description The PCCCS (Polynomial Current-Controlled Current Source) block


represents a current source whose output current value is a polynomial
function of the current through the input ports. The following equations
describe the current through the source as a function of time:

• If you specify an n-element vector of polynomial coefficients for the


Polynomial coefficients parameter:

n −1 n
Iout = p(0) + p(1) * Iin + ... + p(n − 1) * Iin + p(n) * Iin

• If you specify a scalar coefficient for the Polynomial coefficients


parameter:

Iout = p * Iin

where:

• Iin is the current through the input ports.


• p is the Polynomial coefficients parameter value.

The block uses a small conductance internally to prevent numerical


simulation issues. The conductance connects the output ports of the
device and has a conductance GMIN:

• By default, GMIN matches the Minimum conductance GMIN


parameter of the SPICE Environment Parameters block, whose
default value is 1e–12.
• To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

1-335
PCCCS

Dialog
Box and
Parameters

Polynomial coefficients
The polynomial coefficients that relate the input current to the
output current, as described in the preceding section. The default
value is [ 0 1 ].

Ports The block has the following ports:

+
Positive electrical input voltage.
-
Negative electrical input voltage.
N+
Positive electrical output voltage.

1-336
PCCCS

N-
Negative electrical output voltage.

See Also , PCCCS2PCCVS, PVCCS, and PVCVS

1-337
PCCCS2

Purpose Model polynomial current-controlled current source with two controlling


inputs

Library SPICE-Compatible Components/Sources

Description The PCCCS2 (Two-Input Polynomial Current-Controlled Current


Source) block represents a current source whose output current value is
a polynomial function of the currents through the pairs of controlling
input ports. The following equations describes the current through
the source as a function of time:

I out = p1 + p2 * I in1 + p3 * I in 2 + p4 * I in2 1 + p5 I in1 * I in 2 + p6 * I in2 2 + 


where:

• Iin1 is the current across the first pair of input ports.


• Iin2 is the current across the second pair of input ports.
• p is the Polynomial coefficients parameter value.

The block uses a small conductance internally to prevent numerical


simulation issues. The conductance connects the output ports of the
device and has a conductance GMIN:

• By default, GMIN matches the Minimum conductance GMIN


parameter of the SPICE Environment Parameters block, whose
default value is 1e–12.
• To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

1-338
PCCCS2

Dialog
Box and
Parameters

Polynomial coefficients
The polynomial coefficients that relate the input current to the
output current, as described in the preceding section. The default
value is [ 0 1 1 ].

Ports The block has the following ports:

+1
Positive electrical input voltage of first controlling source.
-1
Negative electrical input voltage of first controlling source.
+2
Positive electrical input voltage of second controlling source.
-2
Negative electrical input voltage of second controlling source.
N+
Positive electrical output voltage.
N-
Negative electrical output voltage.

See Also PCCCS, PCCVS2, PVCCS2, and PVCVS2

1-339
PCCVS

Purpose Model polynomial current-controlled voltage source

Library SPICE-Compatible Components/Sources

Description The PCCVS (Polynomial Current-Controlled Voltage Source) block


represents a voltage source whose output voltage value is a polynomial
function of the current through the input ports. The following equations
describe the voltage across the source as a function of time:

• If you specify an n-element vector of polynomial coefficients for the


Polynomial coefficients parameter:

n −1 n
Vout = p(0) + p(1) * Iin + ... + p(n − 1) * Iin + p(n) * Iin

• If you specify a scalar coefficient for the Polynomial coefficients


parameter:

Vout = p * Iin

where:

• Iin is the current through the input ports.


• p is the Polynomial coefficients parameter value.

1-340
PCCVS

Dialog
Box and
Parameters

Polynomial coefficients
The polynomial coefficients that relate the input current to the
output voltage, as described in the preceding section. The default
value is [ 0 1 ].

Ports The block has the following ports:

+
Positive electrical input voltage.
-
Negative electrical input voltage.
N+
Positive electrical output voltage.
N-
Negative electrical output voltage.

1-341
PCCVS

See Also PCCCS, PCCVS2, PVCCS, and PVCVS

1-342
PCCVS2

Purpose Model polynomial current-controlled voltage source with two controlling


inputs

Library SPICE-Compatible Components/Sources

Description The PCCVS2 (Two-Input Polynomial Current-Controlled Voltage


Source) block represents a voltage source whose output voltage value is
a polynomial function of the currents through the pairs of controlling
input ports. The following equations describes the voltage across the
source as a function of time:

Vout = p1 + p2 * I in1 + p3 * I in 2 + p4 * I in2 1 + p5 I in1 * I in 2 + p6 * I in2 2 + 


where:

• Iin1 is the current across the first pair of input ports.


• Iin2 is the current across the second pair of input ports.
• p is the Polynomial coefficients parameter value.

The block uses a small conductance internally to prevent numerical


simulation issues. The conductance connects the output ports of the
device and has a conductance GMIN:

• By default, GMIN matches the Minimum conductance GMIN


parameter of the SPICE Environment Parameters block, whose
default value is 1e–12.
• To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

1-343
PCCVS2

Dialog
Box and
Parameters

Polynomial coefficients
The polynomial coefficients that relate the input current to the
output voltage, as described in the preceding section. The default
value is [ 0 1 1 ].

Ports The block has the following ports:

+1
Positive electrical input voltage of first controlling source.
-1
Negative electrical input voltage of first controlling source.
+2
Positive electrical input voltage of second controlling source.
-2
Negative electrical input voltage of second controlling source.
N+
Positive electrical output voltage.
N-
Negative electrical output voltage.

See Also PCCCS2, PCCVS, PVCCS2, and PVCVS2

1-344
Photodiode

Purpose Model photodiode as parallel controlled current source and exponential


diode

Library Sensors

Description The Photodiode block represents a photodiode as a controlled current


source and an exponential diode connected in parallel. The controlled
current source produces a current Ip that is proportional to the radiant
flux density:

Ip = DeviceSensitivity · RadiantFluxDensity

where:

• DeviceSensitivity is the ratio of the current produced to the incident


radiant flux density.
- If you select Specify measured current for given flux
density for the Sensitivity parameterization parameter,
the block calculates this variable by converting the Measured
current parameter value to units of amps and dividing it by the
Flux density parameter values.
- If you select Specify current per unit flux density for
the Sensitivity parameterization parameter, this variable is
defined by the Device sensitivity parameter value.
• RadiantFluxDensity is the incident radiant flux density.

To model dynamic response time, use the Junction capacitance


parameter to include the diode junction capacitance in the model.
The exponential diode model provides the following relationship
between the diode current I and the diode voltage V:

 qV 

I  IS   e NkTm1
 1 
 
 

1-345
Photodiode

where:

• q is the elementary charge on an electron (1.602176e–19 Coulombs).


• k is the Boltzmann constant (1.3806503e–23 J/K).
• N is the emission coefficient.
• IS is the saturation current, which is equal to the Dark current
parameter value.
• Tm1 is the temperature at which the diode parameters are specified,
as defined by the Measurement temperature parameter value.

qV
When (qV / NkTm1) > 80, the block replaces e NkTm1 with (qV / NkTm1 –
79)e80, which matches the gradient of the diode current at (qV / NkTm1)
= 80 and extrapolates linearly. When (qV / NkTm1) < –79, the block
qV
replaces e NkTm1 with (qV / NkTm1 + 80)e–79, which also matches the
gradient and extrapolates linearly. Typical electrical circuits do not
reach these extreme values. The block provides this linear extrapolation
to help convergence when solving for the constraints during simulation.
When you select Use dark current and N for the Diode
parameterization parameter, you specify the diode in terms of the
Dark current and Emission coefficient N parameters. When you
select Use dark current plus a forward bias I-V data point
for the Diode parameterization parameter, you specify the Dark
current parameter and a voltage and current measurement point on
the diode I-V curve. The block calculates N from these values as follows:

N = VF /(Vt log( I F / IS + 1))


where:

• VF is the Forward voltage VF parameter value.


• Vt = kTm1 / q.

1-346
Photodiode

• IF is the Current IF at forward voltage VF parameter value.

The exponential diode model provides the option to include a junction


capacitance:

• When you select Fixed or zero junction capacitance for the


Junction capacitance parameter, the capacitance is fixed.
• When you select Use parameters CJO, VJ, M & FC for the
Junction capacitance parameter, the block uses the coefficients
CJO, VJ, M, and FC to calculate a junction capacitance that depends
on the junction voltage.
• When you select Use C-V curve data points for the Junction
capacitance parameter, the block uses three capacitance values
on the C-V capacitance curve to estimate CJO, VJ, and M and
uses these values with the specified value of FC to calculate a
junction capacitance that depends on the junction voltage. The block
calculates CJO, VJ, and M as follows:

- CJ 0 = C1 ((VR 2 − VR1 ) /(VR 2 − VR1 (C2 / C1 )−1/ M )) M


- VJ = −(−VR 2 (C1 / C2 )−1/ M + VR1 ) /(1 − (C1 / C2 )−1/ M )
- M = log(C3 / C2 ) / log(VR 2 / VR 3 )
where:
- VR1, VR2, and VR3 are the values in the Reverse bias voltages
[VR1 VR2 VR3] vector.
- C1, C2, and C3 are the values in the Corresponding capacitances
[C1 C2 C3] vector.
It is not possible to estimate FC reliably from tabulated data, so
you must specify its value using the Capacitance coefficient FC
parameter. In the absence of suitable data for this parameter, use a
typical value of 0.5.
The reverse bias voltages (defined as positive values) should satisfy
VR3 > VR2 > VR1. This means that the capacitances should satisfy

1-347
Photodiode

C1 > C2 > C3 as reverse bias widens the depletion region and hence
reduces capacitance. Violating these inequalities results in an error.
Voltages VR2 and VR3 should be well away from the Junction potential
VJ. Voltage VR1 should be less than the Junction potential VJ, with a
typical value for VR1 being 0.1 V.

The voltage-dependent junction is defined in terms of the capacitor


charge storage Qj as:

• For V < FC·VJ:

Q j  CJ 0  (VJ / ( M  1))  ((1  V / VJ )1 M  1)

• For V ≥ FC·VJ:

Q j  CJ 0  F1  (CJ 0 / F2 )  ( F3  (V  FC  VJ )  0.5( M / VJ )  (V 2  ( FC  VJ ) 2 ))

where:

• F1  (VJ / (1  M ))  (1  (1  FC )1 M ))

• F2  (1  FC )1 M ))

• F3  1  FC  (1  M )

These equations are the same as used in [2], except that the temperature
dependence of VJ and FC is not modeled. This model does not include
the diffusion capacitance term that affects performance for high
frequency switching applications.
The Photodiode block contains several options for modeling the
dependence of the diode current-voltage relationship on the temperature
during simulation. Temperature dependence of the junction capacitance
is not modeled, this being a much smaller effect. For details, see the
Diode reference page.

1-348
Photodiode

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from the
context menu select Simscape block choices > Show thermal port.
This action displays the thermal port H on the block icon, and adds the
Thermal port tab to the block dialog box.
Use the thermal port to simulate the effects of generated heat and
device temperature. For more information on using thermal ports and
on the Thermal port tab parameters, see “Simulating Thermal Effects
in Semiconductors”.

Basic The Photodiode block has the following limitations:


Assumptions
and • When you select Use dark current plus a forward bias I-V
curve data point for the Diode parameterization parameter,
Limitations
choose a voltage near the diode turn-on voltage. Typically this will be
in the range from 0.05 to 1 Volt. Using a value outside of this region
may lead to a poor estimate for N.
• You may need to use nonzero ohmic resistance and junction
capacitance values to prevent numerical simulation issues, but the
simulation may run faster with these values set to zero.

1-349
Photodiode

Dialog
Box and
Parameters

• “Main Tab” on page 1-350


• “Ohmic Resistance Tab” on page 1-352
• “Junction Capacitance Tab” on page 1-352
• “Temperature Dependence Tab” on page 1-354

Main Tab

Sensitivity parameterization
Select one of the following methods for sensitivity
parameterization:

1-350
Photodiode

• Specify measured current for given flux density —


Specify the measured current and the corresponding flux
density. This is the default method.
• Specify current per unit flux density — Specify the
device sensitivity directly.
Measured current
The current the block uses to calculate the device sensitivity. This
parameter is only visible when you select Specify measured
current for given flux density for the Sensitivity
parameterization parameter. The default value is 25 µA.
Flux density
The flux density the block uses to calculate the device sensitivity.
This parameter is only visible when you select Specify measured
current for given flux density for the Sensitivity
parameterization parameter. The default value is 5 W/m2.
Device sensitivity
The current per unit flux density. This parameter is only visible
when you select Specify current per unit flux density for
the Sensitivity parameterization parameter. The default
value is 5e-06 m2*A/W.
Diode parameterization
Select one of the following methods for diode model
parameterization:
• Use dark current plus a forward bias I-V data point
— Specify the dark current and a point on the diode I-V curve.
This is the default method.
• Use dark current and N — Specify dark current and
emission coefficient.
Current IF at forward voltage VF
The current at the forward-biased point on the diode I-V curve
that the block uses to calculate IS and N. This parameter is only
visible when you select Use dark current plus a forward

1-351
Photodiode

bias I-V data point for the Diode parameterization


parameter. The default value is 0.1 A.
Forward voltage VF
The corresponding voltage at the forward-biased point on the
diode I-V curve that the block uses to calculate IS and N.
This parameter is only visible when you select and Use dark
current plus a forward bias I-V data point for the Diode
parameterization parameter. The default value is 1.3 V.
Dark current
The current through the diode when it is not exposed to light. The
default value is 5e-9 A.
Measurement temperature
The temperature at which the I-V curve or dark current was
measured. The default value is 25 °C.
Emission coefficient N
The diode emission coefficient or ideality factor. This parameter
is only visible when you select Use dark current and N for the
Diode parameterization parameter. The default value is 3.

Ohmic Resistance Tab

Ohmic resistance RS
The series diode connection resistance. The default value is 0.1 Ω.

Junction Capacitance Tab

Junction capacitance
Select one of the following options for modeling the junction
capacitance:
• Fixed or zero junction capacitance — Model the junction
capacitance as a fixed value.
• Use C-V curve data points — Specify measured data at
three points on the diode C-V curve.

1-352
Photodiode

• Use parameters CJ0, VJ, M & FC — Specify zero-bias


junction capacitance, junction potential, grading coefficient,
and forward-bias depletion capacitance coefficient.
Zero-bias junction capacitance CJ0
The value of the capacitance placed in parallel with the
exponential diode term. This parameter is only visible when
you select Fixed or zero junction capacitance or Use
parameters CJ0, VJ, M & FC for the Junction capacitance
parameter. The default value is 60 pF. When you select Fixed or
zero junction capacitance for the Junction capacitance
parameter, a value of zero omits junction capacitance.
Reverse bias voltages [VR1 VR2 VR3]
A vector of the reverse bias voltage values at the three points on
the diode C-V curve that the block uses to calculate CJ0, VJ, and
M. This parameter is only visible when you select Use C-V curve
data points for the Junction capacitance parameter. The
default value is [ 0.1 10 100 ] V.
Corresponding capacitances [C1 C2 C3]
A vector of the capacitance values at the three points on the diode
C-V curve that the block uses to calculate CJ0, VJ, and M. This
parameter is only visible when you select Use C-V curve data
points for the Junction capacitance parameter. The default
value is [ 45 30 6 ] pF.
Junction potential VJ
The junction potential. This parameter is only visible when you
select Use parameters CJ0, VJ, M & FC for the Junction
capacitance parameter. The default value is 1 V.
Grading coefficient M
The grading coefficient. This parameter is only visible when
you select Use parameters CJ0, VJ, M & FC for the Junction
capacitance parameter. The default value is 0.5.
Capacitance coefficient FC
Fitting coefficient that quantifies the decrease of the depletion
capacitance with applied voltage. This parameter is only visible

1-353
Photodiode

when you select Use C-V curve data points or Use parameters
CJ0, VJ, M & FC for the Junction capacitance parameter.
The default value is 0.5.

Temperature Dependence Tab

Parameterization
Select one of the following methods for temperature dependence
parameterization:
• None Simulate at parameter measurement temperature
— Temperature dependence is not modeled, or the model is
simulated at the measurement temperature Tm1 (as specified
by the Measurement temperature parameter on the Main
tab). This is the default method.
• Use an I-V data point at second measurement
temperature T2 — If you select this option, you specify
a second measurement temperature Tm2, and the current
and voltage values at this temperature. The model uses
these values, along with the parameter values at the first
measurement temperature Tm1, to calculate the energy gap
value.
• Specify saturation current at second measurement
temperature T2 — If you select this option, you specify a
second measurement temperature Tm2, and saturation current
value at this temperature. The model uses these values,
along with the parameter values at the first measurement
temperature Tm1, to calculate the energy gap value.
• Specify the energy gap EG — Specify the energy gap value
directly.
Current I1 at second measurement temperature
Specify the diode current I1 value when the voltage is V1 at
the second measurement temperature. This parameter is only
visible when you select Use an I-V data point at second
measurement temperature T2 for the Parameterization
parameter. The default value is 0.07 A.

1-354
Photodiode

Voltage V1 at second measurement temperature


Specify the diode voltage V1 value when the current is I1 at
the second measurement temperature. This parameter is only
visible when you select Use an I-V data point at second
measurement temperature T2 for the Parameterization
parameter. The default value is 1.3 V.
Saturation current, IS, at second measurement temperature
Specify the saturation current IS value at the second
measurement temperature. This parameter is only visible
when you select Specify saturation current at second
measurement temperature T2 for the Parameterization
parameter. The default value is 2.5e-7 A.
Second measurement temperature
Specify the value for the second measurement temperature.
This parameter is only visible when you select either Use an
I-V data point at second measurement temperature T2
or Specify saturation current at second measurement
temperature T2 for the Parameterization parameter. The
default value is 125 C.
Energy gap parameterization
This parameter is only visible when you select Specify the
energy gap EG for the Parameterization parameter. It lets
you select a value for the energy gap from a list of predetermined
options, or specify a custom value:
• Use nominal value for silicon (EG=1.11eV) — This is
the default.
• Use nominal value for 4H-SiC silicon carbide
(EG=3.23eV)
• Use nominal value for 6H-SiC silicon carbide
(EG=3.00eV)
• Use nominal value for germanium (EG=0.67eV)
• Use nominal value for gallium arsenide (EG=1.43eV)

1-355
Photodiode

• Use nominal value for selenium (EG=1.74eV)


• Use nominal value for Schottky barrier diodes
(EG=0.69eV)
• Specify a custom value — If you select this option, the
Energy gap, EG parameter appears in the dialog box, to let
you specify a custom value for EG.
Energy gap, EG
Specify a custom value for the energy gap, EG. This parameter
is only visible when you select Specify a custom value for the
Energy gap parameterization parameter. The default value
is 1.11 eV.
Saturation current temperature exponent parameterization
Select one of the following options to specify the saturation
current temperature exponent value:
• Use nominal value for pn-junction diode (XTI=3) —
This is the default.
• Use nominal value for Schottky barrier diode (XTI=2)
• Specify a custom value — If you select this option, the
Saturation current temperature exponent, XTI parameter
appears in the dialog box, to let you specify a custom value
for XTI.
Saturation current temperature exponent, XTI
Specify a custom value for the saturation current temperature
exponent, XTI. This parameter is only visible when you
select Specify a custom value for the Saturation current
temperature exponent parameterization parameter. The
default value is 3.
Device simulation temperature
Specify the value for the temperature Ts, at which the device is
to be simulated. The default value is 25 C.

Ports The block has the following ports:

1-356
Photodiode

D
Physical port representing incident flux
+
Electrical conserving port associated with the diode positive
terminal
-
Electrical conserving port associated with the diode negative
terminal

References [1] MH. Ahmed and P.J. Spreadbury. Analogue and digital electronics
for engineers. 2nd Edition, Cambridge University Press, 1984.

[2] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993.

See Also Diode | Light-Emitting Diode | Optocoupler

1-357
Piezo Linear Motor

Purpose Model force-speed characteristics of linear piezoelectric traveling wave


motor

Library Translational Actuators

Description The Piezo Linear Motor block represents the force-speed characteristics
of a linear piezoelectric traveling wave motor. The block represents
the force-speed relationship of the motor at a level that is suitable
for system-level modeling. To simulate the motor, the block uses the
following models:

• “Mass and Friction Model for Unpowered Motor” on page 1-358


• “Resonant Circuit Model for Powered Motor” on page 1-358

Mass and Friction Model for Unpowered Motor


The motor is unpowered when the physical signal input v is zero. This
corresponds to applying zero RMS volts to the motor. In this scenario,
the block models the motor using the following elements:

• An mass whose value is the Plunger mass parameter value.


• A friction whose characteristics you specify using the parameter
values in the Motor-Off Friction tab.
The block uses a Simscape Translational Friction block to model
the friction component. For detailed information about the friction
model, see the Translational Friction block reference page.

Resonant Circuit Model for Powered Motor


When the motor is active, Piezo Linear Motor block represents the
motor characteristics using the following equivalent circuit model.

1-358
Piezo Linear Motor

In the preceding figure:

• The AC voltage source represents the block’s physical signal input


of frequency f and magnitude v.
• The resistor R provides the main electrical and mechanical damping
term.
• The inductor L represents the rotor vibration inertia.
• The capacitor C represents the piezo crystal stiffness.
• The capacitor Cp represents the phase capacitance. This is the
electrical capacitance associated with each of the two motor phases.
• The force constant kf relates the RMS current i to the resulting
mechanical force.

• The quadratic mechanical damping term,  x 2 , shapes the force-speed


curve predominantly at speeds close to maximum RPM. x is the
linear speed.

• The term Mx represents the plunger inertia.

1-359
Piezo Linear Motor

At model initialization, the block calculates the model parameters R, L,


C, kt and λ to ensure that the steady-state force-speed curve matches
the values for the following user-specified parameters:

• Rated force
• Rated speed
• No-load maximum speed
• Maximum (stall) force

These parameter values are defined for the Rated RMS voltage and
Motor natural frequency (or rated frequency) parameter values.
The quadratic mechanical damping term produces a quadratic
force-speed curve. Piezoelectric motors force-speed curves can typically
be approximated more accurately using a quadratic function than a
linear one because the force-speed gradient becomes steeper as the
motor approaches the maximum speed.
If the plunger mass M is not specified on the datasheet, you can select
a value that provides a good match to the quoted response time.
The response time is often defined as the time for the rotor to reach
maximum speed when starting from rest, under no-load conditions.
The quality factor that you specify using the Resonance quality
factor parameter relates to the equivalent circuit model parameters
as follows:

1 L
Q=
R C
This term is not usually provided on a datasheet. You can calculate its
value by matching the sensitivity of force to driving frequency.
To reverse the motor direction of operation, make the physical signal
input v negative.

1-360
Piezo Linear Motor

Basic The block has the following limitations:


Assumptions
and • When the motor is powered, the model is valid only between zero and
maximum speed, for the following reasons:
Limitations
- Datasheets do not provide information for operation outside of
normal range.
- Piezoelectric motors are not designed to operate in the powered
braking and generating regions.
The block behaves as follows outside the valid operating region:
- Below zero speed, the model maintains a constant force with a
zero speed value. The zero speed value is the Maximum (stall)
force parameter value if the RMS input voltage equals the Rated
RMS voltage parameter value, and the frequency input equals
the Motor natural frequency parameter value.
- Above maximum speed, the model produces the negative force
predicted by the equivalent circuit model, but limits the absolute
value of the force to the zero-speed maximum force.
• The force-speed characteristics are most representative when
operating the model close to the rated voltage and resonant frequency.

1-361
Piezo Linear Motor

Dialog
Box and
Parameters

• “Electrical Force Tab” on page 1-362


• “Mechanical Tab” on page 1-364
• “Motor-Off Friction Tab” on page 1-364

Electrical Force Tab

Motor natural frequency


Frequency at which the piezoelectric crystal naturally resonates.
For most applications, set the input signal at port f to this
frequency. To slow down the motor, for example in a closed-loop
speed control, use a frequency slightly less than the motor natural
frequency. The default value is 92 kHz.

1-362
Piezo Linear Motor

Rated RMS voltage


Voltage at which the motor is designed to operate. The default
value is 5.7 V.
Rated force
Force the motor delivers at the rated RMS voltage. The default
value is 0.1 N.
Rated speed
Motor speed when the motor drives a load at the rated force. The
default value is 50 mm/s.
No-load maximum speed
Motor speed when driving no load and powered at the rated
voltage and driving frequency. The default value is 150 mm/s.
Maximum (stall) force
Maximum force the motor delivers when actively driving a load
and powered at the rated voltage and frequency. The default
value is 0.15 N.

Note The Holding force parameter value, the load force the
motor holds when stationary, may be greater than the Maximum
(stall) force parameter value.

Resonance quality factor


Quality factor Q that specifies how force varies as a function of
driving frequency. Increasing the quality factor results in a much
more rapid decrease in force as driving frequency is moved away
from the natural frequency. The default value is 100.
Capacitance per phase
Electrical capacitance associated with each of the two motor
phases. The default value is 5 nF.

1-363
Piezo Linear Motor

Mechanical Tab

Plunger mass
Mass of the moving part of the motor. The default value is 0.3 g.
Initial rotor speed
Rotor speed at the start of the simulation. The default value is 0
mm/s.

Motor-Off Friction Tab

Holding force
The sum of the Coulomb and the static frictions. It must be
greater than or equal to the Coulomb friction force parameter
value. The default value is 0.3 N.
Coulomb friction force
The friction that opposes rotation with a constant force at any
velocity. The default value is 0.15 N.
Viscous friction coefficient
Proportionality coefficient between the friction force and the
relative velocity. The parameter value must be greater than or
equal to zero. The default value is 1e-05 s*N/mm.
Transition approximation coefficient
The parameter sets the coefficient value that is used to
approximate the transition between the static and the Coulomb
frictions. For detailed information about the coefficient, cv, see the
Simscape Translational Friction block reference page. The default
value is 0.1 s/mm.
Linear region velocity threshold
The parameter sets the small vicinity near zero velocity, within
which friction force is considered to be linearly proportional to the
relative velocity. MathWorks recommends that you use values
between 1e-6 and 1e-4 mm/s. The default value is 0.1 mm/s.

Ports The block has the following ports:

1-364
Piezo Linear Motor

f
Physical signal input value specifying the motor driving frequency
in Hz.
v
Physical signal input magnitude specifying the RMS supply
voltage, and sign specifying the direction of rotation. If v is
positive, then a positive force acts from port C to port R.
i
Physical signal output value that is the RMS phase current.
vel
Physical signal output value that is the linear speed of the rotor.
C
Mechanical translational conserving port.
R
Mechanical translational conserving port.

1-365
Piezo Rotary Motor

Purpose Model torque-speed characteristics of rotary piezoelectric traveling


wave motor

Library Rotational Actuators

Description The Piezo Rotary Motor block represents the torque-speed


characteristics of a piezoelectric traveling wave motor. The block
represents the torque-speed relationship of the motor at a level that is
suitable for system-level modeling. To simulate the motor, the block
uses the following models:

• “Inertia and Friction Model for Unpowered Motor” on page 1-366


• “Resonant Circuit Model for Powered Motor” on page 1-366

Inertia and Friction Model for Unpowered Motor


The motor is unpowered when the physical signal input v is zero. This
corresponds to applying zero RMS volts to the motor. In this scenario,
the block models the motor using the following elements:

• An inertia whose value is the Rotor inertia parameter value.


• A friction whose characteristics are determined by the parameter
values in the Motor-Off Friction tab.
The block uses a Simscape Rotational Friction block to model the
friction component. For detailed information about the friction
model, see the Rotational Friction block reference page.

Resonant Circuit Model for Powered Motor


When the motor is active, Piezo Rotary Motor block represents the
motor characteristics using the following equivalent circuit model.

1-366
Piezo Rotary Motor

In the preceding figure:

• The AC voltage source represents the block’s physical signal input


of frequency f and magnitude v.
• The resistor R provides the main electrical and mechanical damping
term.
• The inductor L represents the rotor vibration inertia.
• The capacitor C represents the piezo crystal stiffness.
• The capacitor Cp represents the phase capacitance. This is the
electrical capacitance associated with each of the two motor phases.
• The torque constant kt relates the RMS current i to the resulting
mechanical torque.
• The quadratic mechanical damping term, λωm2, shapes the
torque-speed curve predominantly at speeds close to maximum RPM.
ωm is the mechanical rotational speed.

• The term J m represents the rotor inertia.

1-367
Piezo Rotary Motor

At model initialization, the block calculates the model parameters R, L,


C, kt and λ to ensure that the steady-state torque-speed curve matches
the values of the following user-specified parameter values:

• Rated torque
• Rated rotational speed
• No-load maximum rotational speed
• Maximum torque

These parameter values are defined for the Rated RMS voltage and
Motor natural frequency (or rated frequency) parameter values.
The quadratic mechanical damping term produces a quadratic
torque-speed curve. Piezoelectric motors torque-speed curves can
typically be approximated more accurately using a quadratic function
than a linear one because the torque-speed gradient becomes steeper
as the motor approaches the maximum speed.
If the rotor inertia J is not specified on the datasheet, you can select
a value that provides a good match to the quoted response time.
The response time is often defined as the time for the rotor to reach
maximum speed when starting from rest, under no-load conditions.
The quality factor that you specify using the Resonance quality
factor parameter relates to the equivalent circuit model parameters
as follows:

1 L
Q=
R C
This term is not usually provided on a datasheet. You can calculate its
value by matching the sensitivity of torque to driving frequency.
To reverse the motor direction of operation, make the physical signal
input v negative.

1-368
Piezo Rotary Motor

Basic The block has the following limitations:


Assumptions
and • When the motor is powered, the model is valid only between zero and
maximum speed, for the following reasons:
Limitations
- Datasheets do not provide information for operation outside of
normal range.
- Piezoelectric motors are not designed to operate in the powered
braking and generating regions.
The block behaves as follows outside the valid operating region:
- Below zero speed, the model maintains a constant torque that
is the zero rpm torque value. The zero rpm torque value is the
Maximum torque parameter value if the RMS input voltage
equals the Rated RMS voltage parameter value, and the
frequency input equals the Motor natural frequency parameter
value.
- Above maximum speed, the model produces the negative torque
predicted by the equivalent circuit model, but limits the absolute
value of the torque to the zero-speed maximum torque.
• The torque-speed characteristics are most representative when
operating the model close to the rated voltage and resonant frequency.

1-369
Piezo Rotary Motor

Dialog
Box and
Parameters

• “Electrical Torque Tab” on page 1-370


• “Mechanical Tab” on page 1-372
• “Motor-Off Friction Tab” on page 1-372

Electrical Torque Tab

Motor natural frequency


Frequency at which the piezoelectric crystal naturally resonates.
For most applications, set the input signal at port f to this
frequency. To slow down the motor, for example in a closed-loop
speed control, use a frequency slightly less than the motor natural
frequency. The default value is 40 kHz.

1-370
Piezo Rotary Motor

Rated RMS voltage


Voltage at which the motor is designed to operate. The default
value is 130 V.
Rated torque
Torque the motor delivers at the rated RMS voltage. The default
value is 0.5 N*m.
Rated rotational speed
Motor speed when the motor drives a load at the rated torque.
The default value is 100 rpm.
No-load maximum rotational speed
Motor rotational speed when driving no load and powered at the
rated voltage and driving frequency. The default value is 160 rpm.
Maximum torque
Maximum torque that the motor delivers when actively driving a
load and powered at the rated voltage and frequency. The default
value is 1 N*m.

Note The Holding torque parameter value, the load torque the
motor holds when stationary, may be greater than the Maximum
torque parameter value.

Resonance quality factor


Quality factor Q that specifies how torque varies as a function of
driving frequency. Increasing the quality factor results in a much
more rapid decrease in torque as driving frequency is moved away
from the natural frequency. The default value is 100.
Capacitance per phase
Electrical capacitance associated with each of the two motor
phases. The default value is 5 nF.

1-371
Piezo Rotary Motor

Mechanical Tab

Rotor inertia
Rotor resistance to change in motor motion. The default value
is 200 g*cm2.
Initial rotor speed
Rotor speed at the start of the simulation. The default value is
0 rpm.

Motor-Off Friction Tab

Holding torque
The sum of the Coulomb and the static frictions. It must be
greater than or equal to the Coulomb friction torque parameter
value. The default value is 1.5 N*m.
Coulomb friction torque
The friction that opposes rotation with a constant torque at any
velocity. The default value is 1 N*m.
Viscous friction coefficient
Proportionality coefficient between the friction torque and the
relative angular velocity. The parameter value must be greater
than or equal to zero. The default value is 0.001 N*m/(rad*s).
Transition approximation coefficient
The parameter sets the coefficient value that is used to
approximate the transition between the static and the Coulomb
frictions. For detailed information about the coefficient, cv, see the
Simscape Rotational Friction block reference page. The default
value is 10 s/rad.
Linear region velocity threshold
The parameter sets the small vicinity near zero velocity, within
which friction torque is considered to be linearly proportional to
the relative velocity. MathWorks recommends that you use values
in the range between 1e-5 and 1e-3 rad/s. The default value is
1e-04 rad/s.

1-372
Piezo Rotary Motor

Ports The block has the following ports:

f
Physical signal input value specifying the motor driving frequency
in Hz.
v
Physical signal input magnitude specifying the RMS supply
voltage, and sign specifying the direction of rotation. If v is
positive, then a positive torque acts from port C to port R.
i
Physical signal output value that is the RMS phase current.
wm
Physical signal output value that is the rotational speed of the
rotor.
C
Mechanical rotational conserving port.
R
Mechanical rotational conserving port.

1-373
Piezo Stack

Purpose Model electrical and force characteristics of piezoelectric stacked


actuator

Library Translational Actuators

Description The Piezo Stack block represents the electrical and force characteristics
of a piezoelectric stacked actuator using the following equations:

S = s ET + d ’E
D = dT +  T E
where

• S is the strain tensor.


• T is the stress tensor.
• E is the electric field vector.
• D is the electric displacement vector.
• sE is the elastic compliance matrix when subjected to a constant
electric field.
• d is the piezoelectric constant matrix.
• εT is the permittivity measured at a constant stress.

Note The block models one-dimensional lumped parameter behavior,


so S, T, E and D are all scalar values.

You can specify the block parameters that determine static force using
either datasheet parameters or material properties, as determined by
the value of the Parameterization parameter on the Static Force
tab of the block dialog box.
The Dynamic Forces tab of the block dialog box lets you include
optional effective mass and mechanical damping effects.

1-374
Piezo Stack

• If you specify a nonzero value for the Effective mass parameter


or a finite value for the Resonant frequency at constant field
parameter, the block attaches a lumped mass to the mechanical
R port. When you specify a finite resonant frequency, the block
calculates the effective mass to achieve the correct resonant
frequency.
• If you specify a nonzero value for the Damping parameter or a finite
value for the Mechanical quality factor parameter, the block adds
a damping term across the R and C mechanical ports. When you
specify a mechanical quality factor, Qm, the block calculates the

damping from this parameter value as Mk Qm , where k is the


short-circuit device stiffness, or equivalently the stiffness at constant
field.

A positive voltage across the electrical + to – ports creates a positive


displacement acting from the mechanical C to R ports.

Basic The model does not include hysteresis effects.


Assumptions
and
Limitations

1-375
Piezo Stack

Dialog
Box and
Parameters

• “Static Force Tab” on page 1-376


• “Dynamic Forces Tab” on page 1-378
• “Initial Conditions Tab” on page 1-379
Static Force Tab

Parameterization
Select one of the following methods for static force
parameterization:
• Specify from a datasheet — Provide datasheet parameters
that the block converts to static force values. This is the default
method.
• Specify material properties — Provide material properties
that the block converts to static force values.

1-376
Piezo Stack

Stack area
Cross-sectional area of the stack. The default value is 100 mm2.
Stack length
Stack length when no load and no electrical potential are applied.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is 36 mm.
No-load displacement at V0 volts
Unconstrained displacement of the stack when a voltage of
V0 volts is applied. This parameter is only visible when you
select Specify from a datasheet for the Parameterization
parameter. The default value is 0.038 mm.
Blocking force at V0 volts
Force the stack produces when a voltage of V0 volts is applied and
the stack is physically prevented from expanding. This parameter
is only visible when you select Specify from a datasheet for the
Parameterization parameter. The default value is 3.8e+03 N.
Test voltage V0
Voltage used to determine the no-load displacement and blocking
force. This parameter is only visible when you select Specify
from a datasheet for the Parameterization parameter. The
default value is 120 V.
Capacitance
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is 13 uF.
Piezo layer thickness
Thickness of each layer in the piezo stack. This parameter is only
visible when you select Specify material properties for the
Parameterization parameter. The default value is 0.3 mm.

1-377
Piezo Stack

Number of layers
Number of layers in the piezo stack. This parameter is only
visible when you select Specify material properties for the
Parameterization parameter. The default value is 50.
Piezoelectric charge constant
Mechanical strain per unit electric field applied. This parameter
is only visible when you select Specify material properties
for the Parameterization parameter. The default value is 5e-10
m/V.
Dielectric constant
Permittivity or dielectric displacement per unit electric field
measured at constant stress. This parameter is only visible
when you select Specify material properties for the
Parameterization parameter. The default value is 2.124e-08
F/m.
Elastic compliance
Strain produced in a piezoelectric material per unit of stress
applied. This parameter is only visible when you select Specify
material properties for the Parameterization parameter.
The default value is 1.9e-11 m2/N.

Dynamic Forces Tab

Parameterization
Select one of the following methods for dynamic force
parameterization:
• Specify from a datasheet — Provide datasheet parameters
that the block converts to dynamic force values. This is the
default method.
• Specify material properties — Provide material properties
that the block converts to dynamic force values.

1-378
Piezo Stack

Resonant frequency at constant field


Frequency at which the actuator naturally resonates if
mechanically perturbed with the electrical ports shorted. This
parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter. The default
value is Inf kHz.
Mechanical quality factor
Factor that affects the damping across the R and C mechanical
ports. This parameter is only visible when you select Specify
from a datasheet for the Parameterization parameter. The
default value is Inf.
Damping
Translational damping term. This parameter is only visible
when you select Specify material properties for the
Parameterization parameter. The default value is 0 N/(m/s).
Effective mass
Mass that approximates the distributed dynamics of the device
and causes the stack to resonate at the correct frequency when
attached to the mechanical R port. This mass is usually about
one third of the actual stack mass. This parameter is only
visible when you select Specify material properties for the
Parameterization parameter. The default value is 0 g.

Initial Conditions Tab

Initial stack deflection


Stack deflection at time zero. If you have an external Ideal
Translational Motion Sensor block attached across the Piezo
Stack block, you must use the same initial deflection parameter
for both blocks. The default value is 0 mm.
Initial voltage
Stack voltage at time zero. The default value is 0 V.

Ports The block has the following ports:

1-379
Piezo Stack

+
Positive electrical port
-
Negative electrical port
C
Mechanical translational conserving port
R
Mechanical translational conserving port

1-380
PNP Bipolar Transistor

Purpose Model PNP bipolar transistor using enhanced Ebers-Moll equations

Library Semiconductor Devices

Description The PNP Bipolar Transistor block uses a variant of the Ebers-Moll
equations to represent an PNP bipolar transistor. The Ebers-Moll
equations are based on two exponential diodes plus two
current-controlled current sources. The PNP Bipolar Transistor block
provides the following enhancements to that model:

• Early voltage effect


• Optional base, collector, and emitter resistances.
• Optional fixed base-emitter and base-collector capacitances.

The collector and base currents are [1]:

  V  1  qVBC / ( kTm1 ) 
 
I C   IS  e  qVBE /( kTm1 )  e  qVBC /( kTm1 ) 1  BC  e  
1 
  VA  R 
 1  qVBE /( kTm1 ) 
I B   IS  e  1  e 
1  qVBC /( kTm1 )
1  
 F R 
Where:

• IB and IC are base and collector currents, defined as positive into


the device.
• IS is the saturation current.
• VBE is the base-emitter voltage and VBC is the base-collector voltage.
• βF is the ideal maximum current gain BF
• βR is the ideal maximum current gain BR
• VA is the forward Early voltage VAF
• q is the elementary charge on an electron (1.602176e-19 Coulombs).

1-381
PNP Bipolar Transistor

• k is the Boltzmann constant (1.3806503e-23 J/K).


• Tm1 is the transistor temperature, as defined by the Measurement
temperature parameter value.

You can specify the transistor behavior using datasheet parameters


that the block uses to calculate the parameters for these equations, or
you can specify the equation parameters directly.
If –qVBC / (kTm1) > 40 or –qVBE / (kTm1) > 40, the corresponding
exponential terms in the equations are replaced with (–qVBC / (kTm1)
– 39)e40 and (–qVBE / (kTm1) – 39)e40, respectively. This helps prevent
numerical issues associated with the steep gradient of the exponential
function ex at large values of x. Similarly, if –qVBC / (kTm1) < –39 or
–qVBE / (kTm1) < –39 then the corresponding exponential terms in the
equations are replaced with (–qVBC / (kTm1) + 40)e–39 and (–qVBE / (kTm1)
+ 40)e–39, respectively.
Optionally, you can specify parasitic fixed capacitances across the
base-emitter and base-collector junctions. You also have the option to
specify base, collector, and emitter connection resistances.
Modeling Temperature Dependence
The default behavior is that dependence on temperature is not modeled,
and the device is simulated at the temperature for which you provide
block parameters. You can optionally include modeling the dependence
of the transistor static behavior on temperature during simulation.
Temperature dependence of the junction capacitances is not modeled,
this being a much smaller effect.
When including temperature dependence, the transistor defining
equations remain the same. The measurement temperature value,
Tm1, is replaced with the simulation temperature, Ts. The saturation
current, IS, and the forward and reverse gains (βF and βR) become a
function of temperature according to the following equations:

 EG 
ISTs  ISTm1  (Ts / Tm1 ) XTI  exp   (1  Ts / Tm1 ) 
 kTs 

1-382
PNP Bipolar Transistor

XTB
 T 
 Fs   Fm1  s 
 Tm1 

XTB
 T 
 Rs   Rm1  s 
 Tm1 

where:

• Tm1 is the temperature at which the transistor parameters are


specified, as defined by the Measurement temperature parameter
value.
• Ts is the simulation temperature.
• ISTm1 is the saturation current at the measurement temperature.
• ISTs is the saturation current at the simulation temperature. This is
the saturation current value used in the bipolar transistor equations
when temperature dependence is modeled.
• βFm1 and βRm1 are the forward and reverse gains at the measurement
temperature.
• βFs and βRs are the forward and reverse gains at the simulation
temperature. These are the values used in the bipolar transistor
equations when temperature dependence is modeled.
• EG is the energy gap for the semiconductor type measured in Joules.
The value for silicon is usually taken to be 1.11 eV, where 1 eV is
1.602e-19 Joules.
• XTI is the saturation current temperature exponent.
• XTB is the forward and reverse gain temperature coefficient.
• k is the Boltzmann constant (1.3806503e–23 J/K).

Appropriate values for XTI and EG depend on the type of transistor


and the semiconductor material used. In practice, the values of XTI,
EG, and XTB need tuning to model the exact behavior of a particular

1-383
PNP Bipolar Transistor

transistor. Some manufacturers quote these tuned values in a SPICE


Netlist, and you can read off the appropriate values. Otherwise you can
determine values for XTI, EG, and XTB by using a datasheet-defined
data at a higher temperature Tm2. The block provides a datasheet
parameterization option for this.
You can also tune the values of XTI, EG, and XTB yourself, to match
lab data for your particular device. You can use Simulink Design
Optimization software to help tune the values.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from the
context menu select Simscape block choices > Show thermal port.
This action displays the thermal port H on the block icon, and adds the
Thermal port tab to the block dialog box.
Use the thermal port to simulate the effects of generated heat and
device temperature. For more information on using thermal ports and
on the Thermal port tab parameters, see “Simulating Thermal Effects
in Semiconductors”.

Basic The PNP Bipolar Transistor model has the following limitations:
Assumptions
and • The block does not account for temperature-dependent effects on
the junction capacitances.
Limitations
• You may need to use nonzero ohmic resistance and junction
capacitance values to prevent numerical simulation issues, but the
simulation may run faster with these values set to zero.

1-384
PNP Bipolar Transistor

Dialog
Box and
Parameters

• “Main Tab” on page 1-385


• “Ohmic Resistance Tab” on page 1-388
• “Capacitance Tab” on page 1-388
• “Temperature Dependence Tab” on page 1-389

Main Tab

Parameterization
Select one of the following methods for block parameterization:

1-385
PNP Bipolar Transistor

• Specify from a datasheet — Provide parameters that the


block converts to equations that describe the transistor. The
block calculates the forward Early voltage VAF as Ic/h_oe,
where Ic is the Collector current at which h-parameters
are defined parameter value, and h_oe is the Output
admittance h_oe parameter value [2]. The block sets BF
to the small-signal Forward current transfer ratio h_fe
value. The block calculates the saturation current IS from the
specified Voltage Vbe value and the corresponding Current
Ib for voltage Vbe value when Ic is zero. This is the default
method.
• Specify using equation parameters directly — Provide
equation parameters IS, BF, and VAF.
Forward current transfer ratio h_fe
Small-signal current gain. This parameter is only visible when you
select Specify from a datasheet for the Parameterization
parameter. The default value is 100.
Output admittance h_oe
Derivative of the collector current with respect to the
collector-emitter voltage for a fixed base current. This parameter
is only visible when you select Specify from a datasheet for
the Parameterization parameter. The default value is 5e-5 1/Ω.
Collector current at which h-parameters are defined
The h-parameters vary with operating point, and are defined
for this value of the collector current. This parameter is only
visible when you select Specify from a datasheet for the
Parameterization parameter. The default value is -1 mA.
Collector-emitter voltage at which h-parameters are defined
The h-parameters vary with operating point, and are defined
for this value of the collector-emitter voltage. This parameter is
only visible when you select Specify from a datasheet for the
Parameterization parameter. The default value is -5 V.

1-386
PNP Bipolar Transistor

Voltage Vbe
Base-emitter voltage when the base current is Ib. The [ Vbe Ib ]
data pair must be quoted for when the transistor is in the normal
active region, that is, not in the saturated region. This parameter
is only visible when you select Specify from a datasheet for
the Parameterization parameter. The default value is -0.55 V.
Current Ib for voltage Vbe
Base current when the base-emitter voltage is Vbe. The [ Vbe Ib ]
data pair must be quoted for when the transistor is in the normal
active region, that is, not in the saturated region. This parameter
is only visible when you select Specify from a datasheet for
the Parameterization parameter. The default value is -0.5 mA.
Forward current transfer ratio BF
Ideal maximum forward current gain. This parameter is only
visible when you select Specify using equation parameters
directly for the Parameterization parameter. The default
value is 100.
Saturation current IS
Transistor saturation current. This parameter is only visible when
you select Specify using equation parameters directly for
the Parameterization parameter. The default value is 1e-14 A.
Forward Early voltage VAF
In the standard Ebers-Moll equations, the gradient of the
Ic versus Vce curve is zero in the normal active region. The
additional forward Early voltage term increases this gradient.
The intercept on the Vce-axis is equal to –VAF when the linear
region is extrapolated. This parameter is only visible when you
select Specify using equation parameters directly for the
Parameterization parameter. The default value is 200 V.
Reverse current transfer ratio BR
Ideal maximum reverse current gain. This value is often not
quoted in manufacturer datasheets because it is not significant
when the transistor is biased to operate in the normal active

1-387
PNP Bipolar Transistor

region. When the value is not known and the transistor is not to
be operated on the inverse region, use the default value of 1.
Measurement temperature
Temperature Tm1 at which Vbe and Ib, or IS, are measured. The
default value is 25 C.

Ohmic Resistance Tab

Collector resistance RC
Resistance at the collector. The default value is 0.01 Ω.
Emitter resistance RE
Resistance at the emitter. The default value is 1e-4 Ω.
Zero bias base resistance RB
Resistance at the base at zero bias. The default value is 1 Ω.

Capacitance Tab

Base-collector junction capacitance


Parasitic capacitance across the base-collector junction. The
default value is 5 pF.
Base-emitter junction capacitance
Parasitic capacitance across the base-emitter junction. The
default value is 5 pF.
Total forward transit time
Represents the mean time for the minority carriers to cross the
base region from the emitter to the collector, and is often denoted
by the parameter TF [1]. The default value is 0 μs.
Total reverse transit time
Represents the mean time for the minority carriers to cross the
base region from the collector to the emitter, and is often denoted
by the parameter TR [1]. The default value is 0μs.

1-388
PNP Bipolar Transistor

Temperature Dependence Tab

Parameterization
Select one of the following methods for temperature dependence
parameterization:
• None Simulate at parameter measurement temperature
— Temperature dependence is not modeled, or the model is
simulated at the measurement temperature Tm1 (as specified
by the Measurement temperature parameter on the Main
tab). This is the default method.
• Model temperature dependence — Provide a value for
simulation temperature, to model temperature-dependent
effects. You also have to provide a set of additional parameters
depending on the block parameterization method. If you
parameterize the block from a datasheet, you have to provide
values for a second [ Vbe Ib ] data pair and h_fe at second
measurement temperature. If you parameterize by directly
specifying equation parameters, you have to provide the values
for XTI, EG, and XTB.
Forward current transfer ratio, h_fe, at second measurement
temperature
Small-signal current gain at second measurement temperature.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter on the Main
tab. It must be quoted at the same collector-emitter voltage and
collector current as for the Forward current transfer ratio
h_fe parameter on the Main tab. The default value is 125.
Voltage Vbe at second measurement temperature
Base-emitter voltage when the base current is Ib and the
temperature is set to the second measurement temperature. The
[Vbe Ib] data pair must be quoted for when the transistor is in
the normal active region, that is, not in the saturated region.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter on the Main
tab. The default value is -0.45 V.

1-389
PNP Bipolar Transistor

Current Ib for voltage Vbe at second measurement temperature


Base current when the base-emitter voltage is Vbe and the
temperature is set to the second measurement temperature. The
[ Vbe Ib ] data pair must be quoted for when the transistor is in
the normal active region, that is, not in the saturated region.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter on the Main
tab. The default value is -0.5 mA.
Second measurement temperature
Second temperature Tm2 at which h_fe,Vbe, and Ib are measured.
This parameter is only visible when you select Specify from a
datasheet for the Parameterization parameter on the Main
tab. The default value is 125 C.
Current gain temperature coefficient, XTB
Current gain temperature coefficient value. This parameter
is only visible when you select Specify using equation
parameters directly for the Parameterization parameter on
the Main tab. The default value is 0.
Energy gap, EG
Energy gap value. This parameter is only visible when you
select Specify using equation parameters directly for the
Parameterization parameter on the Main tab. The default
value is 1.11 eV.
Saturation current temperature exponent, XTI
Saturation current temperature coefficient value. This parameter
is only visible when you select Specify using equation
parameters directly for the Parameterization parameter on
the Main tab. The default value is 3.
Device simulation temperature
Temperature Ts at which the device is simulated. The default
value is 25 C.

Ports The block has the following ports:

1-390
PNP Bipolar Transistor

B
Electrical conserving port associated with the transistor base
terminal
C
Electrical conserving port associated with the transistor collector
terminal
E
Electrical conserving port associated with the transistor emitter
terminal

Examples See the PNP Bipolar Transistor Characteristics example.

References [1] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993.

[2] H. Ahmed and P.J. Spreadbury. Analogue and digital electronics for
engineers. 2nd Edition, Cambridge University Press, 1984.

See Also Diode | NPN Bipolar Transistor

1-391
Positive Supply Rail

Purpose Model ideal positive supply rail

Library Sources

Description The Positive Supply Rail block represents an ideal positive supply rail.
Use this block instead of the Simscape DC Voltage Source block to
define the output voltage relative to the Simscape Electrical Reference
block that must appear in each model.

Note Do not attach more than one Positive Supply Rail block to any
connected line.

Dialog
Box and
Parameters

Constant voltage
The voltage at the output port relative to the Electrical Reference
block ground port. The default value is 1 V.

Ports The block has the following ports:

+
Positive electrical voltage

See Also DC Voltage Source | Negative Supply Rail

1-392
Potentiometer

Purpose Model rotary or linear-travel potentiometer controlled by physical signal

Library Passive Devices

Description The Potentiometer block represents a rotary or linear-travel


potentiometer, with the wiper position controlled by the input physical
signal.
If the potentiometer resistance changes linearly based on wiper
position, then the resistance between the wiper position and port L is:

R0
RWL = ( x − xmin )
xmax − xmin
where

• RWL is the resistance between the wiper position and port L.


• R0 is the total resistance between ports L and R.
• x is the wiper position.
• xmin is the value of the wiper position when the wiper is at port L.
• xmax is the value of the wiper position when the wiper is at port R.

If you specify LOG for the potentiometer resistance Taper parameter,


then the resistance between the wiper position and port L is:

RWL

=⎨
( )
⎧ A eλ( x − xmin ) − 1 if resistance gradient is higher at R

(
⎪ R0 − A eλ( xmax − x ) − 1
⎩ ) if resistance gradient is higher at L

where A and λ are chosen such that RWL at xmax is R0, and RWL at x =
(xmax + xmin) / 2 is equal to Rav, the resistance when the wiper is centered.

1-393
Potentiometer

Note Potentiometers widely described as LOG or logarithmic taper


are, in fact, exponential taper. That is, the gradient of the resistance
between wiper and left-hand port increases as the resistance increases.
The Potentiometer block implements this behavior.

For both linear and logarithmic tapers, the resistance between the
wiper position and port R is:

RWR = R0 − RWL
where

• RWR is the resistance between the wiper position and port R.


• R0 is the total resistance between ports L and R.
• RWL is the resistance between the wiper position and port L.

Dialog
Box and
Parameters

1-394
Potentiometer

Total resistance
The resistance between port L and port R when port W is
open-circuit. The default value is 1000Ω.
Residual resistance
The lower limit placed on the resistance between the wiper and
the two end ports. It must be greater than zero. A typical value is
5e-3 times the total resistance. The default value is 1Ω.
Resistance when centered
This parameter is available only if you select LOG for the Taper
parameter. If you select Higher at R for the Resistance
gradient parameter, then Resistance when centered is the
resistance between port L and port W when the wiper is centered.
Otherwise, if you select Higher at R for the Resistance
gradient parameter, then Resistance when centered is the
resistance between port R and port W when the wiper is centered.
Because the resistance taper is exponential in shape, the value
of the Resistance when centered parameter must be less than
half of the Total resistance parameter value. The default value
is 200Ω.
PS input for wiper at L
The value of the input physical signal at port x that corresponds
to the wiper being located at port L. The default value is 0.
PS input for wiper at R
The value of the input physical signal at port x that corresponds
to the wiper being located at port R. The default value is 1.
Taper
Specifies the potentiometer resistance taper behavior: LIN (linear)
or LOG (logarithmic). The default value is LIN.
Resistance gradient
Specifies whether the potentiometer resistance varies more
rapidly at the left or the right end: Higher at L or Higher at R.
This parameter is available only if you select LOG for the Taper
parameter. The default value is Higher at R.

1-395
Potentiometer

Ports The block has the following ports:

L
Electrical port representing the left pin
R
Electrical port representing the right pin
W
Electrical port representing the wiper pin
x
Physical signal input port controlling the wiper position

See Also Variable Resistor

1-396
Power Sensor

Purpose Measure instantaneous or cycle-average power

Library Sensors

Description The Power Sensor block calculates the power taken by the load
connected across the + and - terminals under the assumption that only
the load is connected to the + terminal. Refer to the block icon for the
arrangement of internal current and voltage sensors.
The sensor can return either instantaneous power, or power averaged
over a fixed time period. Use the latter option for periodic current and
voltage waveforms such as those associated with PWM control.
The following figure shows how you connect the block to measure power
dissipated in a resistor.

For an alternative workflow using data logging to view component


powers, see the Synchronous Buck Converter example.

1-397
Power Sensor

Dialog
Box and
Parameters

Measurement type
Select whether you want to measure Instantaneous power or
Average power over a specified period. The default value is
Instantaneous power.
Averaging period
The fixed period of time for measuring the average power. This
parameter is only visible when you select Average power over a
specified period for the Measurement type parameter. The
default value is 1e-4 s.

Ports The block has the following ports:

S
Electrical conserving port connected to the positive supply rail
+
Electrical conserving port connected to the positive terminal of
the load
-
Electrical conserving port connected to the negative terminal of
the load

1-398
Power Sensor

P
Physical signal port that outputs the measured power

1-399
Pressure Transducer

Purpose Model generic pressure transducer that turns pressure measurement


into voltage

Library Sensors

Description The Pressure Transducer block models a generic pressure transducer


that turns a pressure measurement into a voltage. The output voltage
is linearly proportional to the pressure, and the block outputs zero
volts if the pressure is less than zero. An input pressure equal to the
Pressure range parameter value results in an output voltage equal to
the Full-scale deflection parameter value. For higher pressures, the
output voltage remains at this Full-scale deflection value.
You have three choices of operation mode, which let you select between
vacuum, atmospheric pressure, or sealed-gauge reference pressure as
the reference point for the pressure measurement.
Optionally, if you set the Dynamics parameter to Model transducer
bandwidth, then the dynamics of the sensor are approximated by a
first-order lag. The lag is determined by the Bandwidth parameter. If
you select this option, you must also specify an initial condition for the
lag by using the Initial pressure parameter.
If running your simulation with a fixed-step solver, or generating code
for hardware-in-the-loop testing, MathWorks recommends that you
set the Dynamics parameter to No dynamics Suitable for HIL,
because this avoids the need for a small simulation time step if the
sensor bandwidth is high.

1-400
Pressure Transducer

Dialog
Box and
Parameters

Pressure range
The maximum pressure that the sensor can measure. The default
value is 1e6 Pa.
Operation mode
Select one of the following options to define the reference point
for the pressure measurement:
• Absolute — The pressure measurement is with respect to zero
absolute pressure, that is, vacuum. This is the default option.
• Gauge — The pressure measurement is with respect to
atmospheric pressure. Atmospheric pressure is defined by the
Gas Properties block in the Simscape Foundation library.
• Sealed-Gauge — The pressure measurement is referenced to
an internal sealed chamber. If you select this option, use the
Reference pressure parameter to specify the reference point
for pressure measurement.

1-401
Pressure Transducer

Reference pressure
The reference pressure in the internal sealed chamber. This
parameter is only visible when you select Sealed-Gauge for the
Operation mode parameter. The default value is 1.01325e5 Pa.
Full-scape deflection
The output voltage when the measured pressure is equal to, or
greater than, the Pressure range parameter value. The default
value is 5 V.
Output resistance
The output resistance of the transducer. The default value is
200 Ω.
Dynamics
Select one of the following options for modeling sensor dynamics:
• No dynamics Suitable for HIL — Do not model sensor
dynamics. Use this option when running your simulation
fixed step or generating code for hardware-in-the-loop testing,
because this avoids the need for a small simulation time step if
the sensor bandwidth is high. This is the default option.
• Model transducer bandwidth — Model sensor dynamics with
a first-order lag approximation, based on the Bandwidth and
the Initial pressure parameter values.
Bandwidth
Determines the value of the sensor lag. This parameter is only
visible when you select Model transducer bandwidth for the
Dynamics parameter. The default value is 5 kHz.
Initial pressure
Determines the initial condition for the lag. This parameter is
only visible when you select Model transducer bandwidth for
the Dynamics parameter. The default value is 0 Pa.

Ports The block has the following ports:

1-402
Pressure Transducer

A
Pneumatic port
+
Positive electrical port
-
Negative electrical port

1-403
Proximity Sensor

Purpose Model simple distance sensor

Library Sensors

Description The Proximity Sensor block represents a simple proximity sensor. The
sensing distance Z is defined as the distance normal to the sensor
surface at which the sensor detects an object for a given radial offset R,
as shown in the following figure.

Object

Sensor

+ -

A typical sensing distance curve is shown in the following figure.

1-404
Proximity Sensor

Distance Z

Distance R

The output is modeled by an electrical switch which can either be


Normally Open (N.O.) or Normally Closed (N.C.) when no object is
detected.

Dialog
Box and
Parameters

1-405
Proximity Sensor

Vector of radial offset distances R


Vector of distances from the sensor to the object resolved into a
plane tangential to the sensor head. The default value is [ -25
-20 -15 -10 -5 0 5 10 15 20 25 ] mm.
Corresponding sensing distances Z
Vector of distances from the sensor to the object resolved with
respect to a normal vector at the sensor head. The default value is
[ 0 0 5 8 9.5 10 9.5 8 5 0 0 ] mm.
Output when not detected
Indicates whether the output is Normally Open (N.O.), meaning
the output becomes closed only when the object is detected, or
Normally Closed (N.C.), meaning the output becomes open
only when the object is detected. The default value is Normally
Open (N.O.).
Closed resistance R_closed
The resistance between the + and - ports when the output contacts
are closed. The default value is 0.01 Ω.
Open conductance G_open
The conductance between the + and - ports when the output
contacts are open. The default value is 1e-08 1/Ω.

Ports The block has the following ports:

R
Radial distance to the sensor
Z
Perpendicular distance to the sensor
+
Positive electrical voltage
-
Negative electrical voltage

1-406
PS Sensor

Purpose Model generic linear sensor

Library Sensors

Description The PS Sensor block represents a generic linear sensor. The block
converts the physical signal input U into an electrical output Y across
the + and - ports. The Output type parameter value determines which
of the following electrical outputs the block produces:

• Output voltage
• Output current
• Output resistance

Y is related to U as Y = max(min(A · U + B,Ymax),Ymin), where Ymin and


Ymax are minimum and maximum limits on the output, respectively.

Dialog
Box and
Parameters

1-407
PS Sensor

Output type
Indicates whether the sensor output is a Variable voltage of Y
V, a Variable current of Y A, or Variable resistor with a
value of Y Ω. The default value is Variable voltage.
Sensor gain, A
The sensitivity of the output Y with respect to the input U,
dY/dU. The default value is 1.
Sensor offset, B
The output when the input U is zero. The output does not exceed
the limits Ymax and Ymin. The default value is 0.
Maximum output, Ymax
The upper limit on the sensor output. The following table shows
the units of this parameter, which depend on the selected value of
the Output type parameter.

Output type Units


Variable voltage V
Variable current A
Variable resistor Ω
The default value is 5.
Minimum output, Ymin
The lower limit on the sensor output. The following table shows
the units of this parameter, which depend on the selected value of
the Output type parameter.

Output type Units


Variable voltage V
Variable current A
Variable resistor Ω
The default value is 0.01.

1-408
PS Sensor

If you select Variable resistance for the Output type


parameter, the minimum resistance Ymin must be greater than
zero.

Ports The block has the following ports:

U
Physical input signal
+
Positive electrical voltage
-
Negative electrical voltage

See Also Controlled Voltage Source | Controlled Current Source | Variable


Resistor

1-409
PTC Thermistor

Purpose Model switching type positive temperature coefficient (PTC) thermistor

Library Sensors

Description The PTC Thermistor block represents a switching type PTC thermistor.
This type of thermistor has a decreasing resistance with temperature
increasing up to the Curie temperature. Above the Curie temperature
the resistance increases very rapidly with increasing temperature,
as shown in the following plot. The region to the right of the Curie
temperature is called the Positive Temperature Coefficient (PTC)
regime. To represent a non-switching linear PTC thermistor, use the
Thermal Resistor block.

For a switching type PTC thermistor, the resistance R at temperature T


is given by

1-410
PTC Thermistor

 R e0  T T0 
 for T < Tc
R 0
 R1 e1  T T1  for T  Tc

log  R1   log  R0   0 T0  1T1


Tc 
0  1

where:

• Tc is the Curie temperature.


• R0 is the resistance at nominal temperature T0.
• R1 is the resistance at reference temperature T1.
• T0 is the nominal temperature at which the resistance is quoted,
usually room temperature. T0 is less than the Curie temperature Tc.
• T1 is the reference temperature, equal or greater than the Curie
temperature Tc, which means that at this temperature the PTC
regime is in force.
• α0 is the temperature coefficient at nominal temperature T0.
• α1 is the temperature coefficient at reference temperature T1.

The following equation describes the thermal behavior of the block:

dT
Q = K d tc
dt
where:

• Q is the net heat flow into port A.


• Kd is the Dissipation factor parameter value.
• tc is the Thermal time constant parameter value.
• dT/dt is the rate of change of the temperature.

1-411
PTC Thermistor

Dialog
Box and
Parameters

• “Electrical Tab” on page 1-412


• “Thermal Tab” on page 1-413

Electrical Tab

Nominal resistance R0 at T0
The nominal resistance of the thermistor at the nominal
temperature. Many datasheets quote the nominal resistance at
25°C and list it as R25. The default value is 1000 Ω.
Temperature coefficient alpha0 at T0
The temperature coefficient at the nominal temperature. The
value must be less than zero. The default value is -0.01 1/K.

1-412
PTC Thermistor

Nominal temperature T0
The temperature at which the nominal resistance is measured.
The default value is 298.15 K.
Reference resistance R1 at T1
The reference resistance of the thermistor at the reference
temperature. The default value is 10000 Ω.
Temperature coefficient alpha1 at T1
The temperature coefficient at the reference temperature. The
value must be greater than zero. The default value is 1 1/K.
Reference temperature T1
The temperature at which the reference resistance is measured.
This temperature must be in the PTC regime. The default value
is 398.15 K.

Thermal Tab

Thermal time constant


The time it takes the sensor temperature to reach 63% of the final
temperature change when a step change in ambient temperature
occurs. The default value is 5 s.
Dissipation factor
The thermal power required to raise the thermistor temperature
by one K. The default value is 7.5e-4 W/K.
Initial temperature
The temperature of the thermistor at the start of the simulation.
The default value is 298.15 K.

Ports The block has the following ports:

A
Thermal port
+
Positive electrical port

1-413
PTC Thermistor

-
Negative electrical port

See Also Thermal Resistor | Thermistor

1-414
Pulse Current Source

Purpose Model periodic square pulse current source

Library SPICE-Compatible Components/Sources

Description The Pulse Current Source block represents a current source whose
output current value is a periodic square pulse as a function of time
and is independent of the voltage across the terminals of the source.
The following equations describe the current through the source as a
function of time:

I out ( 0 ) = I1
I out (TD ) = I1
I out (TD + TR ) = I 2
I out (TD + TR + PW ) = I 2
I out (TD + TR + PW + TF ) = I1
I out (TD + PER ) = I1
where:

• I1 is the Initial value, I1 parameter value.


• I2 is the Pulse value, I2 parameter value.
• TD is the Pulse delay time, TD parameter value.
• TR is the Pulse rise time, TR parameter value.
• TF is the Pulse fall time, TF parameter value.
• PW is the Pulse width, PW parameter value.
• PER is the Pulse period, PER parameter value.

The block determines the values at intermediate time points by linear


interpolation.

1-415
Pulse Current Source

The specified values for PW and PER have the following effect on the
block output:

• If both PW and PER are infinite, the block produces a step response
at time TD.
• If PER is infinite and PW is finite, the block produces a single pulse
of width PW and infinite period.
• If PW is infinite and PER is finite, the block produces a step response
with pulses of width TR to a value I1 every PER seconds.
• If PW > PER, the block produces a step response with pulses of width
TR to a value I1 every PER seconds.

The block uses a small conductance internally to prevent numerical


simulation issues. The conductance connects the + and - ports of the
device and has a conductance GMIN:

• By default, GMIN matches the Minimum conductance GMIN


parameter of the SPICE Environment Parameters block, whose
default value is 1e–12.
• To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

1-416
Pulse Current Source

Dialog
Box and
Parameters

Initial value, I1
The value of the output current at time zero. The default value
is 0 A.

1-417
Pulse Current Source

Pulse value, I2
The value of the output current when the output is high. The
default value is 0 A.
Pulse delay time, TD
The time at which the pulse first starts. The default value is 0 s.
Pulse rise time, TR
The time it takes the output current to rise from the Initial
value, I1 value to the Pulse value, I2 value. The default value is
1e-09 s. The value must be greater than or equal to 0.
Pulse fall time, TF
The time it takes the output current to fall from the Pulse value,
I2 value to the Initial value, I1 value. The default value is 1e-09
s. The value must be greater than or equal to 0.
Pulse width, PW
The time width of the output pulse. The default value is Inf s.
The value must be greater than 0.
Pulse period, PER
The period of the output pulse. The default value is Inf s. This
value means that the block produces a single pulse with an
infinite period. The value must be greater than 0.

Ports The block has the following ports:

+
Positive electrical voltage.
-
Negative electrical voltage.

See Also Pulse Voltage Source

1-418
Pulse Voltage Source

Purpose Model periodic square pulse voltage source

Library SPICE-Compatible Components/Sources

Description The Pulse Voltage Source block represents a voltage source whose
output voltage value is a periodic square pulse as a function of time
and is independent of the current through the source. The following
equations describe the output voltage as a function of time:

Vout ( 0 ) = V 1
Vout (TD ) = V 1
Vout (TD + TR ) = V 2
Vout (TD + TR + PW ) = V 2
Vout (TD + TR + PW + TF ) = V 1
Vout (TD + PER ) = V 1
where:

• V1 is the Initial value, V1 parameter value.


• V2 is the Pulse value, V2 parameter value.
• TD is the Pulse delay time, TD parameter value.
• TR is the Pulse rise time, TR parameter value.
• TF is the Pulse fall time, TF parameter value.
• PW is the Pulse width, PW parameter value.
• PER is the Pulse period, PER parameter value.

The block determines the values at intermediate time points by linear


interpolation.
The specified values for PW and PER have the following effect on the
block output:

1-419
Pulse Voltage Source

• If both PW and PER are infinite, the block produces a step response
at time TD.
• If PER is infinite and PW is finite, the block produces a single pulse
of width PW and infinite period.
• If PW is infinite and PER is finite, the block produces a step response
with pulses of width TR to a value V1 every PER seconds.
• If PW > PER, the block produces a step response with pulses of width
TR to a value V1 every PER seconds.

1-420
Pulse Voltage Source

Dialog
Box and
Parameters

Initial value, V1
The value of the output voltage at time zero. The default value
is 0 V.

1-421
Pulse Voltage Source

Pulse value, V2
The value of the output voltage when the output is high. The
default value is 0 V.
Pulse delay time, TD
The time at which the pulse first starts. The default value is 0 s.
Pulse rise time, TR
The time it takes the output voltage to rise from the Initial
Value, I1 value to the Pulse Value, V2 value. The default value
is 1e-09 s. The value must be greater than or equal to 0.
Pulse fall time, TF
The time it takes the output voltage to fall from the Pulse Value,
V2 value to the Initial Value, V1 value. The default value is
1e-09 s. The value must be greater than or equal to 0.
Pulse width, PW
The time width of the output pulse. The default value is Inf s.
Pulse period, PER
The period of the output pulse. The default value is Inf s. This
value means that the block produces a single pulse with an
infinite period.

Ports The block has the following ports:

+
Positive electrical voltage.
-
Negative electrical voltage.

See Also Pulse Current Source

1-422
Push-Pull Output

Purpose Represent CMOS complementary output stage behaviorally

Library Integrated Circuits

Description The Push-Pull Output block represents a CMOS complementary


output stage behaviorally. To improve simulation speed, the block
does not model all the internal individual MOSFET devices that make
up the gate. You can use this block to create a representative output
current-voltage relationship when defining an integrated circuit model
behavior with Physical Signal blocks from the Simscape Foundation
library.
You can choose between are two output current-voltage relationships:

• Linear — The block represents the output as a voltage source plus


series resistance and parallel capacitance, as shown in the following
figure. The value you specify for the Output resistance parameter
is assigned to the series resistance, and the capacitance values are
determined by matching the RC time constant to the Propagation
delay parameter value.

1-423
Push-Pull Output

The input to the Controlled Voltage Source block is limited to be


between the supply rails, and it is also inverted by subtraction
from the supply voltage. The inversion makes it behave like a
complementary output stage, with a high gate-source voltage
resulting in a low output.
• Quadratic — The output stage is modeled by the two MOSFETs that
constitute the complementary pair. The MOSFET parameters are
derived from the output resistance values and short-circuit currents
that you specify as mask parameters. The gate input demand is
lagged to approximate the Propagation delay parameter value.

Both Linear and Quadratic output models add an offset and scale the
physical input X so that the gate voltage is given by:

Vg = k · ( X + c )

where

• k is the input signal scaling.


• c is the input signal offset.

1-424
Push-Pull Output

The offset and scaling can be used, for example, to match logical values
for X (that is, range [0,1] ) to [V-, V+] at the output pin. For example,
if V+ = 10V and V- = 0, then to match the signal logical values to this
voltage range, set c = -1 and k = -10.
For both Linear and Quadratic output models, the protection diodes
D1 and D2 act to limit the output voltage range. These diodes are
Diode blocks from the Simscape Foundation library, that is, piecewise
linear diodes defined by their forward voltage and on resistance. If the
voltage across D1 rises above the forward voltage, then the diode starts
to conduct, and provided that the on resistance is low, it effectively
prevents the output rising above V+ plus the diode forward voltage
drop. An equivalent behavior results if the output voltage drops too low.
The output model is very similar to that used for the logic blocks. For
a plot of a typical output V-I characteristic when using the Quadratic
output model, see Selecting the Output Model for Logic Blocks.

Basic The Push-Pull Output block has the following limitations:


Assumptions
and • The block does not accurately model dynamic response.
Limitations • The Quadratic output model does not model any output capacitance
effects. Add output capacitance externally to the block if required.

1-425
Push-Pull Output

Dialog
Box and
Parameters

• “Input Scaling Tab” on page 1-426


• “Output Characteristics Tab” on page 1-427
• “Supply Voltage Tab” on page 1-429
• “Initial Conditions Tab” on page 1-429

Input Scaling Tab

Input signal scaling, k


The input physical signal X is mapped to the gate voltage by
Vg = k · ( X + c ), where k is the input signal scaling. Use this
parameter in conjunction with the Input signal offset, c to map
the range of X to the voltage range defined by the power supply.
The default value is 1 V.
Input signal offset, c
The input physical signal X is mapped to the gate voltage by Vg =
k · ( X + c ), where c is the input signal offset. Use this parameter
in conjunction with the Input signal scaling, k to map the range

1-426
Push-Pull Output

of X to the voltage range defined by the power supply. The default


value is 0.

Output Characteristics Tab

Output current-voltage relationship


Select the output model, Linear or Quadratic output model
options. If Linear, the output voltage drops linearly with
output current. If you select Quadratic, then the output voltage
dependency on output current is defined by the quadratic I-V
characteristics of the two output MOSFET devices. The default
value is Linear.
Output resistance
Defines one over the slope of the output I-V characteristic. This
parameter is available when you select the Linear option for the
Output current-voltage relationship parameter. The default
value is 25 Ω.
Power rail voltages, [V- V+], used for measurements
Defines the rail voltages for which mask data output resistances
and currents are defined. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter. The default value is [ 0 5 ] V.
Output resistance values at zero output current and at I_OH
when Vg=V-
A row vector [ R_OH1 R_OH2 ] of two resistance values. The
first value R_OH1 is the gradient of the output voltage-current
relationship when the complementary pair output is HIGH
(Vg=V-) and there is no output current. The second value R_OH2
is the gradient of the output voltage-current relationship when the
output is HIGH and the output current is I_OH. This parameter
is available when you select the Quadratic option for the Output
current-voltage relationship parameter. The default value
is [ 25 250 ] Ω.

1-427
Push-Pull Output

Output current I_OH when output is shorted to V- and Vg=V-


The resulting current when the output is HIGH (Vg=V-), but the
load forces the output voltage to the negative supply rail. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter. The
default value is 63 mA.
Output resistance values at zero output current and at I_OL
when Vg=V+
A row vector [ R_OL1 R_OL2 ] of two resistance values. The
first value R_OL1 is the gradient of the output voltage-current
relationship when the complementary pair output is LOW
(Vg=V+) and there is no output current. The second value R_OL2
is the gradient of the output voltage-current relationship when the
output is LOW and the output current is I_OL. This parameter is
available when you select the Quadratic option for the Output
current-voltage relationship parameter. The default value
is [ 30 800 ] Ω.
Output current I_OL when output is shorted to V+ and Vg=V+
The resulting current when the output is LOW (Vg=V+), but the
load forces the output voltage to the positive supply voltage. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter. The
default value is -45 mA.
Propagation delay
Time it takes for the output to reach 63.2% of its final value
following a step change in the input, X. For Quadratic output, it
is implemented by the lagged gate input demand. The default
value is 25 ns.
Protection diode on resistance
The gradient of the voltage-current relationship for the protection
diodes when forward biased. The default value is 5 Ω.
Protection diode forward voltage
The voltage above which the protection diode is turned on. The
default value is 0.6 V.

1-428
Push-Pull Output

Supply Voltage Tab

Negative power rail voltage, V-


Negative power supply voltage applied to the N-channel MOSFET
source pin. The default value is 0 V.
Positive power rail voltage, V+
Positive power supply voltage applied to the P-channel MOSFET
source pin. The default value is 5 V.

Initial Conditions Tab

Initial output voltage


This parameter is visible when you select the Linear option for
the Output current-voltage relationship parameter on the
Output Characteristics tab. The parameter is used to set the
voltage on the output capacitors so that the output voltage is
initialized to the parameter’s value. The default value is 0 V.
Initial input signal
This parameter is visible when you select the Quadratic option
for the Output current-voltage relationship parameter on
the Output Characteristics tab. The parameter is used to
initialize the propagation delay first-order lag such that there is
no transient at time zero. The default value is 0 V.

Ports The block has one input physical signal port X and one electrical
conserving port that outputs the resulting voltage.

1-429
PVCCS

Purpose Model polynomial voltage-controlled current source

Library SPICE-Compatible Components/Sources

Description The PVCCS (Polynomial Voltage-Controlled Current Source) block


represents a current source whose output current value is a polynomial
function of the voltage across the input ports. The following equations
describe the current through the source as a function of time:

• If you specify an n-element vector of polynomial coefficients for the


Polynomial coefficients parameter:

n −1 n
Iout = p(0) + p(1) * Vin + ... + p(n − 1) * Vin + p(n) * Vin

• If you specify a scalar coefficient for the Polynomial coefficients


parameter:

Iout = p * Vin

where:

• Vin is the voltage across the input ports.


• p is the Polynomial coefficients parameter value.

The block uses a small conductance internally to prevent numerical


simulation issues. The conductance connects the output ports of the
device and has a conductance GMIN:

• By default, GMIN matches the Minimum conductance GMIN


parameter of the SPICE Environment Parameters block, whose
default value is 1e–12.
• To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

1-430
PVCCS

Dialog
Box and
Parameters

Polynomial coefficients
The polynomial coefficients that relate the input voltage to the
output current, as described in the preceding section. The default
value is [ 0 1 ].

Ports The block has the following ports:

+
Positive electrical input voltage.
-
Negative electrical input voltage.
N+
Positive electrical output voltage.
N-
Negative electrical output voltage.

1-431
PVCCS

See Also PCCCS, PCCVS, PVCCS2, and PVCVS

1-432
PVCCS2

Purpose Model polynomial voltage-controlled current source with two controlling


inputs

Library SPICE-Compatible Components/Sources

Description The PVCCS2 (Two-Input Polynomial Voltage-Controlled Current


Source) block represents a current source whose output current value
is a polynomial function of the voltages across the pairs of controlling
input ports. The following equations describes the current through
the source as a function of time:

I out = p1 + p2 * Vin1 + p3 * Vin 2 + p4 * Vin21 + p5Vin1 * Vin 2 + p6 * Vin22 + 


where:

• Vin1 is the voltage across the first pair of input ports.


• Vin2 is the voltage across the second pair of input ports.
• p is the Polynomial coefficients parameter value.

The block uses a small conductance internally to prevent numerical


simulation issues. The conductance connects the output ports of the
device and has a conductance GMIN:

• By default, GMIN matches the Minimum conductance GMIN


parameter of the SPICE Environment Parameters block, whose
default value is 1e–12.
• To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

1-433
PVCCS2

Dialog
Box and
Parameters

Polynomial coefficients
The polynomial coefficients that relate the input voltage to the
output current, as described in the preceding section. The default
value is [ 0 1 1 ].

Ports The block has the following ports:

+1
Positive electrical input voltage of first controlling source.
-1
Negative electrical input voltage of first controlling source.
+2
Positive electrical input voltage of second controlling source.
-2
Negative electrical input voltage of second controlling source.
N+
Positive electrical output voltage.
N-
Negative electrical output voltage.

See Also PCCCS2, PCCVS2, PVCCS, and PVCVS2

1-434
PVCVS

Purpose Model polynomial voltage-controlled voltage source

Library SPICE-Compatible Components/Sources

Description The PVCVS (Polynomial Voltage-Controlled Voltage Source) block


represents a voltage source whose output voltage value is a polynomial
function of the voltage across the input ports. The following equations
describe the voltage across the source as a function of time:

• If you specify an n-element vector of polynomial coefficients for the


Polynomial coefficients parameter:

n −1 n
Vout = p(0) + p(1) * Vin + ... + p(n − 1) * Vin + p(n) * Vin

• If you specify a scalar coefficient for the Polynomial coefficients


parameter:

Vout = p * Vin

where:

• Vin is the voltage across the input ports.


• p is the Polynomial coefficients parameter value.

1-435
PVCVS

Dialog
Box and
Parameters

Polynomial coefficients
The polynomial coefficients that relate the input voltage to the
output voltage, as described in the preceding section. The default
value is [ 0 1 ].

Ports The block has the following ports:

+
Positive electrical input voltage.
-
Negative electrical input voltage.
N+
Positive electrical output voltage.
N-
Negative electrical output voltage.

1-436
PVCVS

See Also PCCCS, PCCVS, PVCCS, and PVCVS2

1-437
PVCVS2

Purpose Model polynomial voltage-controlled voltage source with two controlling


inputs

Library SPICE-Compatible Components/Sources

Description The PVCVS2 (Two-Input Polynomial Voltage-Controlled Voltage


Source) block represents a voltage source whose output voltage value
is a polynomial function of the voltages across the pairs of controlling
input ports. The following equations describes the voltage across the
source as a function of time:

Vout = p1 + p2 * Vin1 + p3 * Vin 2 + p4 * Vin21 + p5Vin1 * Vin 2 + p6 * Vin22 + 


where:

• Vin1 is the voltage across the first pair of input ports.


• Vin2 is the voltage across the second pair of input ports.
• p is the Polynomial coefficients parameter value.

The block uses a small conductance internally to prevent numerical


simulation issues. The conductance connects the output ports of the
device and has a conductance GMIN:

• By default, GMIN matches the Minimum conductance GMIN


parameter of the SPICE Environment Parameters block, whose
default value is 1e–12.
• To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

1-438
PVCVS2

Dialog
Box and
Parameters

Polynomial coefficients
The polynomial coefficients that relate the input voltage to the
output voltage, as described in the preceding section. The default
value is [ 0 1 1 ].

Ports The block has the following ports:

+1
Positive electrical input voltage of first controlling source.
-1
Negative electrical input voltage of first controlling source.
+2
Positive electrical input voltage of second controlling source.
-2
Negative electrical input voltage of second controlling source.
N+
Positive electrical output voltage.
N-
Negative electrical output voltage.

See Also PCCCS2, PCCVS2, PVCCS2, and PVCVS

1-439
PWL Current Source

Purpose Model lookup table current source

Library SPICE-Compatible Components/Sources

Description The PWL Current Source block represents a current source that you
specify in lookup table form using a vector of time values and a vector
of the corresponding current values. You must specify at least four
time-current value pairs. The block generates a time-dependent current
based on these time-current values using the selected interpolation
and extrapolation methods. You have a choice of three interpolation
methods and two extrapolation methods. The output current is
independent of the voltage across the terminals of the source.
The block uses a small conductance internally to prevent numerical
simulation issues. The conductance connects the + and - ports of the
device and has a conductance GMIN:

• By default, GMIN matches the Minimum conductance GMIN


parameter of the SPICE Environment Parameters block, whose
default value is 1e–12.
• To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

1-440
PWL Current Source

Dialog
Box and
Parameters

Time specification
The vector of time values as a tabulated 1-by-n array. The time
values vector must be strictly monotonically increasing. The
values can be non-uniformly spaced. The default value is [ 0
1 2 3 4 ] s.
Current at specified time
The vector of current values as a tabulated 1-by-n array. The
current values vector must be the same size as the time values
vector. The default value is [ 0 0 0 0 0 ] A.
Interpolation method
Select the method the block uses determine the output current
values at intermediate time points that are not specified in the
preceding vectors:
• Linear — Use a linear function. This is the default method.

1-441
PWL Current Source

• Cubic — Use the Piecewise Cubic Hermite Interpolation


Polinomial (PCHIP). For more information, see [1] and the
pchip MATLAB function.
• Spline — Use the cubic spline interpolation algorithm
described in [2].
Extrapolation method
Select the method the block uses determine the output current
values at time points that are outside the time range specified
in the preceding vectors:
• Last point value — Use the last specified current value at
the appropriate end of the range. That is, use the last specified
current value for all time values greater than the last specified
time argument, and the first specified current value for all
time values less than the first specified time argument. This
is the default method.
• Last 2 points — Extrapolate using the linear method
(regardless of the interpolation method specified), based on the
last two current values at the appropriate end of the range.
That is, use the first and second specified current values if
the time value is below the specified range, and the two last
specified current values if the time value is above the specified
range.

Ports The block has the following ports:

+
Positive electrical voltage.
-
Negative electrical voltage.

References [1] D. Kahaner, Cleve Moler, and Stephen Nash Numerical Methods
and Software Prentice Hall, 1988.

1-442
PWL Current Source

[2] W.H. Press, B.P. Flannery, S.A. Teulkolsky, and W.T. Wetterling
Numerical Recipes in C: The Art of Scientific Computing Cambridge
University Press, 1992.

See Also PWL Voltage Source

1-443
PWL Voltage Source

Purpose Model lookup table voltage source

Library SPICE-Compatible Components/Sources

Description The PWL Voltage Source block represents a voltage source that you
specify in lookup table form using a vector of time values and a vector
of the corresponding voltage values. You must specify at least four
time-current value pairs. The block generates a time-dependent voltage
based on these time-voltage values using the selected interpolation
and extrapolation methods. You have a choice of three interpolation
methods and two extrapolation methods. The output voltage is
independent of the current through the source.

Dialog
Box and
Parameters

Time specification
The vector of time values as a tabulated 1-by-n array. The time
values vector must be strictly monotonically increasing. The
values can be non-uniformly spaced. The default value is [ 0
1 2 3 4 ] s.

1-444
PWL Voltage Source

Voltage at specified time


The vector of voltage values as a tabulated 1-by-n array. The
voltage values vector must be the same size as the time values
vector. The default value is [ 0 0 0 0 0 ] V.
Interpolation method
Select the method the block uses determine the output voltage
values at intermediate time points that are not specified in the
preceding vectors:
• Linear — Use a linear function. This is the default method.
• Cubic — Use the Piecewise Cubic Hermite Interpolation
Polinomial (PCHIP). For more information, see [1] and the
pchip MATLAB function.
• Spline — Use the cubic spline interpolation algorithm
described in [2].
Extrapolation method
Select the method the block uses determine the output voltage
values at time points that are outside the time range specified
in the preceding vectors:
• Last point value — Use the last specified voltage value at
the appropriate end of the range. That is, use the last specified
voltage value for all time values greater than the last specified
time argument, and the first specified voltage value for all
time values less than the first specified time argument. This
is the default method.
• Last 2 points — Extrapolate using the linear method
(regardless of the interpolation method specified), based on the
last two voltage values at the appropriate end of the range.
That is, use the first and second specified voltage values if
the time value is below the specified range, and the two last
specified voltage values if the time value is above the specified
range.

Ports The block has the following ports:

1-445
PWL Voltage Source

+
Positive electrical voltage.
-
Negative electrical voltage.

References [1] D. Kahaner, Cleve Moler, and Stephen Nash Numerical Methods
and Software Prentice Hall, 1988.

[2] W.H. Press, B.P. Flannery, S.A. Teulkolsky, and W.T. Wetterling
Numerical Recipes in C: The Art of Scientific Computing Cambridge
University Press, 1992.

See Also PWL Current Source

1-446
Relay

Purpose Model switching and associated delay of relay

Library Passive Devices

Description The Relay block models a relay controlled by an external physical


signal. In the steady state, the relay behaves as follows:

• When the physical signal input PS rises above the Threshold


parameter, the relay is energized (meaning closed). The common port
C connects to the normally open port S2.
• When the physical signal input PS falls below the Threshold
parameter, the relay is not energized (meaning open). The common
port C connects to the normally closed port S1.

During switching, the relay behaves as follows:

• When the relay closes, the C to S1 connection breaks open after delay
Time-to-break C-S1 connection. The C to S2 connection closes
after delay Time-to-make C-S2 connection.
• When the relay opens, the C to S2 connection breaks open after delay
Time-to-break C-S2 connection. The C to S1 connection closes
after delay Time-to-make C-S1 connection.

You can specify break delays that are longer than the close delays to
implement a make-before-break behavior.

Basic If the PS input changes during the switching process, the block
Assumptions behavior can be inaccurate. The switching delay occurs due to both
and mechanical inertia and the fact that modeling inertia as a delay
requires approximation.
Limitations

1-447
Relay

Dialog
Box and
Parameters

Time-to-break C-S1 connection


Time it takes the connection between ports C and S1 to break
apart when the relay is energized. The default value is 0 s.
Time-to-make C-S1 connection
Time it takes the connection between ports C and S1 to close when
the relay is not energized. The default value is 0 s.
Time-to-break C-S2 connection
Time it takes the connection between ports C and S2 to break
apart when the relay is not energized. The default value is 0 s.
Time-to-make C-S2 connection
Time it takes the connection between ports C and S2 to close when
the relay is not energized. The default value is 0 s.

1-448
Relay

Connected resistance R
Resistance across closed relay contacts. The parameter value
must be greater than zero. The default value is 0.01 Ω.
Open-circuit conductance G
Conductance across open relay contacts. The parameter value
must be greater than zero. The default value is 1e-08 1/Ω.
Threshold
If the physical signal input rises above this value, the relay is
energized. Conversely, if the physical signal input falls below this
value, the relay is de-energized. The default value is 0.
Initial connection
For the initial state of the relay, select one of the following options:
• C to S1 closed, C to S2 open — The common port C
connects to the S1 contact. This is the default option.
• C to S1 open, C to S2 closed — The common port C
connects to the S2 contact.

Ports This block has the following ports:

PS
Physical signal that energizes and de-energizes the relay
C
Common electrical port
S1
Normally-closed electrical port
S2
Normally-open electrical port

See Also Switch

1-449
Resistor

Purpose Model linear resistor with optional noise

Library Passive Devices

Description The Resistor block models a linear resistor, described with the following
equation:

iv R

where:

• i is the current.
• v is the voltage.
• R is the resistance.

Optionally, the Resistor block can generate thermal noise current. If you
set the Noise mode parameter to Enabled, then the defining equations
are augmented by a discrete variable iN to represent thermal noise:

i  v R  iN

If the sampling time is h, then the thermal noise is given by:

N  0, 1
iN  2kT R
h

where:

• k is the Boltzmann constant, 1.3806504e-23 J/K.


• T is the temperature.
• R is the resistance.
• N is a Gaussian random number with zero mean and standard
deviation of one.

1-450
Resistor

• 2kT/R is the double-sided thermal noise power distribution (the


single-sided equivalent is 4kT/R).

If you set the Noise mode parameter to Disabled, then no noise


is added, and the component behavior is identical to the Simscape
Foundation library Resistor block.

Noise Options
The block generates Gaussian noise by using the Random Number
source in the Simscape Foundation library. You can control the random
number seed by setting the Repeatability parameter:

• Not repeatable — Every time you simulate your model, the


block resets the random seed using the MATLAB random number
generator:

seed = randi(2^32-1);

• Repeatable — The block uses a hidden parameter, called auto_seed,


to always start the simulation with the same random number. The
value of auto_seed is set whenever you copy the Resistor block
from the block library to the model, or when you make a new copy
of the Resistor block from an existing one in a model. The block sets
the value using the MATLAB random number generator command
shown above.
• Specify seed — If you select this option, the additional Seed
parameter lets you directly specify the random number seed value.

Basic Simulating with noise enabled slows down simulation. Choose the
Assumptions sample time (h) so that noise is generated only at frequencies of interest,
and and not higher.
Limitations

1-451
Resistor

Dialog
Box and
Parameters

• “Main Tab” on page 1-452


• “Noise Tab” on page 1-452

Main Tab

Resistance
The resistance value. The default value is 1 Ω.

Noise Tab

Noise mode
Select the noise option:
• Disabled — No noise is produced by the resistor. This is the
default.
• Enabled — Resistor generates thermal noise current, and the
associated parameters become visible on the Noise tab.
Device simulation temperature
The temperature of the thermal resistor at the start of the
simulation. The default value is 25 °C.
Sample time
Defines the rate at which the noise source is sampled. Choose
it to reflect the frequencies of interest in your model. Making

1-452
Resistor

the sample time too small will unnecessarily slow down your
simulation. The default value is 1e-3 s.
Repeatability
Select the noise control option:
• Not repeatable — The random sequence used for noise
generation is not repeatable. This is the default.
• Repeatable — The random sequence used for noise generation
is repeatable, with a system-generated seed.
• Specify seed — The random sequence used for noise
generation is repeatable, and you control the seed by using the
Seed parameter.
Seed
Random number seed used by the noise random number
generator. This parameter is visible only if you select Specify
seed for the Repeatability parameter. The default value is 0.

Ports The block has the following ports:

+
Positive electrical port
-
Negative electrical port

See Also Current Source | Voltage Source

1-453
Resolver

Purpose Model rotary transformer that measures motor rotation angle

Library Sensors

Description The Resolver block models a generic resolver, which consists of a rotary
transformer that couples an AC voltage applied to the primary winding
to two secondary windings. These secondary windings are physically
oriented at 90 degrees to each other. As the rotor angle changes, the
relative coupling between the primary and the two secondary windings
varies. In the Resolver block model, the first secondary winding is
oriented such that peak coupling occurs when the rotor is at zero
degrees, and therefore the second secondary winding has minimum
coupling when the rotor is at zero degrees.

Without loss of generality, it is assumed that the transformer between


primary and rotor circuit is ideal with a ratio of 1:1. This results in
the rotor current and voltage being equivalent to the primary current
and voltage.
You have two options for defining the block equations:

1-454
Resolver

• Omit the dynamics by neglecting the transformer inductive terms.


This model is only valid if the sensor is driven by a sine wave because
any DC component on the primary side will pass to the output side.
• Include the inductive terms, thereby capturing voltage amplitude loss
and phase differences. This model is valid for any input waveform.
Within this option, you can either specify the inductances and the
peak coupling coefficient directly, or specify the transformation ratio
and measured impedances, in which case the block uses these values
to determine the inductive terms.

Equations when Omitting Dynamics


The equations are based on the superposition of two ideal transformers,
both with coupling coefficients that depend on rotor angle. The two ideal
transformers have a common primary winding. See the Simscape Ideal
Transformer block reference page for more information on modeling
ideal transformers. The equations are:

Kx = R cos(N Θ)

Ky = R sin(N Θ)

v x = K xv p

v y = K yv p

ip = –Kxix – Kyiy

where:

• vp and ip are the rotor (or equivalently primary) voltage and current,
respectively.
• vx and ix are the first secondary voltage and current, respectively.
• vy and iy are the second secondary voltage and current, respectively.
• Kx is the coupling coefficient for the first secondary winding.

1-455
Resolver

• Ky is the coupling coefficient for the second secondary winding.


• R is the transformation ratio.
• N is the number of pole pairs.
• Θ is the rotor angle.

Equations when Including Dynamics


The equations are based on the superposition of two mutual inductors,
both with coupling coefficients that depend on rotor angle. The two
mutual inductors have a common primary winding. See the Simscape
Mutual Inductor block reference page for more information on modeling
mutual inductors. The equations are:

di p  di diy 
v p  R pi p  L p  L p Ls k  cos  N   x  sin  N   
dt  dt dt 

dix di p
vx  Rs ix  Ls  L p Ls k cos  N  
dt dt

diy di p
vy  Rs iy  Ls  L p Ls k sin  N  
dt dt

where:

• vp and ip are the rotor (or equivalently primary) voltage and current,
respectively.
• vx and ix are the first secondary voltage and current, respectively.
• vy and iy are the second secondary voltage and current, respectively.
• Rp is the rotor (or primary) resistance.
• Lp is the rotor (or primary) inductance.
• Rs is the stator (or secondary) resistance.
• Ls is the stator (or secondary) inductance.

1-456
Resolver

• N is the number of pole pairs.


• k is the coefficient of coupling.
• Θ is the rotor angle.

It is assumed that coupling between the two secondary windings is zero.


Datasheets typically do not quote the coefficient of coupling and
inductance parameters, but instead give the transformation ratio R and
measured impedances. If you select Specify transformation ratio
and measured impedances for the Parameterization parameter, then
the values you provide are used to determine values for the equation
coefficients, as defined above.

Basic The model is based on the following assumptions:


Assumptions
and • The resolver draws no torque between the mechanical rotational
ports R and C.
Limitations
• The transformer between primary and rotor circuit is ideal with a
ratio of 1:1.
• The coupling between the two secondary windings is zero.

Dialog
Box and
Parameters

1-457
Resolver

Parameterization
Select one of the following methods for block parameterization:
• Specify transformation ratio and omit dynamics —
Provide values for transformation ratio, number of pole
pairs, and initial rotor angle only. This model neglects the
transformer inductive terms, and is only valid if the sensor
is driven by a sine wave. The equations are based on the
superposition of two ideal transformers, both with coupling
coefficients that depend on rotor angle. For more information,
see “Equations when Omitting Dynamics” on page 1-455. This
is the default option.
• Specify transformation ratio and measured impedances
— Provide additional values to determine the transformer
inductive terms, to model the voltage amplitude loss and
phase differences. This model is valid for any input waveform.
The equations are based on the superposition of two mutual
inductors, both with coupling coefficients that depend on rotor
angle. For more information, see “Equations when Including
Dynamics” on page 1-456.
• Specify equation parameters directly — Model the
dynamics, but provide values for rotor and stator inductances
and the peak coefficient of coupling, instead of transformation
ratio and measured impedances. For more information, see
“Equations when Including Dynamics” on page 1-456. This
model is valid for any input waveform.
Transformation ratio
The ratio between peak output voltage and peak input voltage
assuming negligible secondary voltage drop due to resistance
and inductance. This parameter is only visible when you
select Specify transformation ratio and omit dynamics or
Specify transformation ratio and measured impedances
for the Parameterization parameter. If you select Specify
transformation ratio and measured impedances for the
Parameterization parameter, then the transformation ratio

1-458
Resolver

takes into account the voltage drop due to primary winding


resistance. The default value is 0.5.
Rotor resistance
This is the rotor (or equivalently the primary) ohmic resistance.
This parameter is only visible when you select Specify
transformation ratio and measured impedances or Specify
equation parameters directly for the Parameterization
parameter. The default value is 70 Ω.
Stator resistance
This is the secondary winding ohmic resistance. It is assumed
that both secondaries have the same resistance. This parameter
is only visible when you select Specify transformation ratio
and measured impedances or Specify equation parameters
directly for the Parameterization parameter. The default
value is 180 Ω.
Rotor reactance
This is the rotor (or equivalently the primary) reactance with the
secondary windings open-circuit. This parameter is only visible
when you select Specify transformation ratio and measured
impedances for the Parameterization parameter. The default
value is 100 Ω.
Stator reactance
This is the stator (or equivalently the secondary) reactance with
the primary winding open-circuit. This parameter is only visible
when you select Specify transformation ratio and measured
impedances for the Parameterization parameter. The default
value is 300 Ω.
Frequency at which reactances and transformation ratio are
specified
This is the frequency of the sinusoidal source used when
measuring the reactances. This parameter is only visible when
you select Specify transformation ratio and measured
impedances for the Parameterization parameter. The default
value is 10 kHz.

1-459
Resolver

Rotor inductance
This is the rotor (or equivalently the primary) inductance Lp. This
parameter is only visible when you select Specify equation
parameters directly for the Parameterization parameter.
The default value is 0.0016 H.
Stator inductance
This is the stator (or equivalently the secondary) inductance Ls.
This parameter is only visible when you select Specify equation
parameters directly for the Parameterization parameter.
The default value is 0.0048 H.
Peak coefficient of coupling
This is the peak coefficient of coupling between the primary and
secondary windings. The parameter value should be greater than
zero and less than one. This parameter is only visible when
you select Specify equation parameters directly for the
Parameterization parameter. The default value is 0.35.
Number of pole pairs
The number of pole pairs on the rotor. The default value is 1.
Initial rotor angle
The initial angle of the rotor, Θ. The default value is 0 degrees.

Ports The block has the following ports:

p1, p2
Electrical ports of the primary winding
x1, x2
Electrical ports of the first secondary winding
y1, y2
Electrical ports of the second secondary winding
R, C
Mechanical rotational ports

1-460
S-R Latch

Purpose Model an S-R Latch behaviorally

Library Logic

Description The S-R Latch block is an abstracted behavioral model of a set-reset


latch. It does not model the internal individual MOSFET devices
(see “Basic Assumptions and Limitations” on page 1-462 for details).
Therefore, the block runs quickly during simulation but retains the
correct I/O behavior.

If the gate voltage is greater than the threshold voltage VTH , then
the input taken is 1 (HIGH). Otherwise, the input is zero (LOW). The
gate threshold voltage VTH is halfway between the Low level input
voltage ( VIL ) and High level input voltage ( VIH ) parameters.
The block output logic level is either HIGH or LOW, according to the
logic levels of the gate inputs and the S-R latch truth table.

S R Q
0 0 0

0 1 0
1 0 1
1 1 1

The block models the gate as follows:

• The gate inputs have infinite resistance and finite or zero capacitance.
• The gate output offers a selection of two models: Linear and
Quadratic. For more information, see “Selecting the Output Model
for Logic Blocks”. Use the Output current-voltage relationship
parameter to specify the output model.
• You can specify propagation delay for both output models. For Linear
output, the block sets the value of the gate output capacitor such that

1-461
S-R Latch

the resistor-capacitor time constant equals the Propagation delay


parameter value. For Quadratic output, the gate input demand is
lagged to approximate the Propagation delay parameter value.

The block output voltage depends on the output model selected:

• For Linear model, output high is the High level output voltage
parameter value, and output low is the Low level output voltage
parameter value.
• For Quadratic model, the output voltage for High and Low states is
a function of the output current, as explained in “Quadratic Model
Output and Parameters”. For zero load current, output high is Vcc
(the Supply voltage parameter value), and output low is zero volts.

Basic The block does not model the internal individual MOSFET devices
Assumptions that make up the gate (except for the final MOSFET pair if you select
and the Quadratic option for the Output current-voltage relationship
parameter). This limitation has the following implications:
Limitations
• The behavior of this block is abstracted. In particular, response to
input noise and inputs that are around the logic threshold voltage
can be inaccurate. Also, dynamic response is approximate.
• The linear drop in output voltage as a function of output current is
an approximation to the MOSFET or bipolar output behavior.
• Modeling of the output as a controlled voltage source is representative
of a totem-pole or push-pull output stage. To model a device with an
open-collector:
1 Connect the output pin to the base of an NPN Bipolar Transistor
or PNP Bipolar Transistor block.
2 Set the Output resistance parameter to a suitable value.

1-462
S-R Latch

Dialog
Box and
Parameters

• “Inputs Tab” on page 1-463


• “Outputs Tab” on page 1-464
• “Initial Conditions Tab” on page 1-466

Inputs Tab

Low level input voltage


Voltage value less than which the block interprets the input
voltage as LOW. The default value is 2 V.
High level input voltage
Voltage value greater than which the block interprets the input
voltage as HIGH. The default value is 3 V.
Average input capacitance
Fixed capacitance that approximates the input capacitance for a
MOSFET gate. You can usually find this capacitance value on a
manufacturer datasheet. The default value is 5 pF. Setting this
value to zero can result in faster simulation times.

1-463
S-R Latch

Outputs Tab

Output current-voltage relationship


Select the output model, Linear or Quadratic. The default value
is Linear.
Low level output voltage
Voltage value at the output when the output logic level is LOW. The
default value is 0 V. This parameter is available when you select
the Linear option for the Output current-voltage relationship
parameter.
High level output voltage
Voltage value at the output when the output logic level is HIGH.
The default value is 5 V. This parameter is available when
you select the Linear option for the Output current-voltage
relationship parameter.
Output resistance
Value of the series output resistor that is used to model the drop
in output voltage resulting from the output current. The default
value is 25 Ω. You can derive this value from a datasheet by
dividing the high-level output voltage by the maximum low-level
output current. This parameter is available when you select the
Linear option for the Output current-voltage relationship
parameter.
Supply voltage
Supply voltage value applied to the gate in your circuit. The
default value is 5 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.
Measurement voltage
The gate supply voltage for which mask data output resistances
and currents are defined. The default value is 5 V. This parameter
is available when you select the Quadratic option for the Output
current-voltage relationship parameter.

1-464
S-R Latch

Logic HIGH output resistance at zero current and at I_OH


A row vector [ R_OH1 R_OH2 ] of two resistance values. The
first value R_OH1 is the gradient of the output voltage-current
relationship when the gate is logic HIGH and there is no output
current. The second value R_OH2 is the gradient of the output
voltage-current relationship when the gate is logic HIGH and the
output current is I_OH. The default value is [ 25 250 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic HIGH output current I_OH when shorted to ground
The resulting current when the gate is in the logic HIGH state,
but the load forces the output voltage to zero. The default value is
63 mA. This parameter is available when you select the Quadratic
option for the Output current-voltage relationship parameter.
Logic LOW output resistance at zero current and at I_OL
A row vector [ R_OL1 R_OL2 ] of two resistance values. The
first value R_OL1 is the gradient of the output voltage-current
relationship when the gate is logic LOW and there is no output
current. The second value R_OL2 is the gradient of the output
voltage-current relationship when the gate is logic LOW and the
output current is I_OL. The default value is [ 30 800 ] Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Logic LOW output current I_OL when shorted to Vcc
The resulting current when the gate is in the logic LOW state,
but the load forces the output voltage to the supply voltage Vcc.
The default value is -45 mA. This parameter is available when
you select the Quadratic option for the Output current-voltage
relationship parameter.
Propagation delay
Time it takes for the output to swing from LOW to HIGH or HIGH to
LOW after the input logic levels change. The default value is 25 ns.

1-465
S-R Latch

Protection diode on resistance


The gradient of the voltage-current relationship for the protection
diodes when forward biased. The default value is 5 Ω. This
parameter is available when you select the Quadratic option for
the Output current-voltage relationship parameter.
Protection diode forward voltage
The voltage above which the protection diode is turned on. The
default value is 0.6 V. This parameter is available when you
select the Quadratic option for the Output current-voltage
relationship parameter.

Initial Conditions Tab

Output initial state


Specify whether the initial output state of the block is High
or Low. This parameter is used for both linear and quadratic
output states, provided that the Propagation delay parameter
is greater than zero and the Solver Configuration block does not
have the Start simulation from steady state option selected.
The default value is Low.

Ports This block has the following ports:

S
Electrical input port corresponding to the set pin
R
Electrical input port corresponding to the reset pin
Q
Electrical output port corresponding to the output pin

1-466
Servomotor

Purpose Brushless motor model with closed-loop torque control

Library Rotational Actuators

Description The Servomotor block represents a brushless motor model with


closed-loop torque control. This block abstracts the torque-speed
behavior of the combined motor and motor driver in order to support
system-level simulation where simulation speed is important.
The block permits only the range of torques and speeds that the
torque-speed envelope defines. In the default block configuration, you
specify this data in the block dialog box as a set of speed data points and
corresponding maximum torque values. The following figure shows a
typical torque-speed envelope for a servomotor.

Specify the torque-speed envelope for the positive torque region only,
that is, quadrants 1 and 4. If you specify only for positive speeds
(quadrant 1 or, equivalently, the motoring region), then the quadrant 4
torque envelope is defined by the block as the mirror image of quadrant

1-467
Servomotor

1. The servomotor torque-speed envelope has the same profile when the
motor is operating in a reverse direction (quadrants 2 and 3).
Instead of providing tabulated torque-speed data, you can specify
a maximum torque and a maximum power. This results in the
torque-speed envelope profile shown below. The other three operating
quadrants are constrained by this same profile.

The block models the electrical losses as the sum of four terms:

• A series resistance between the DC power supply and the motor drive.
• Fixed losses independent of torque and speed, P0. Use this to account
for fixed converter losses.
• A torque-dependent electrical loss kτ2, where τ is the torque and k is
a constant. This represents ohmic losses in the copper windings.
• A speed-dependent electrical loss kwω2, where ω is the speed and kw
is a constant. This represents iron losses due to eddy currents.

The block produces a positive torque acting from the mechanical C to


R ports.

1-468
Servomotor

Thermal Ports
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from
the context menu select Simscape block choices > Show thermal
port. This action displays the thermal port H on the block icon, and
adds the Temperature Dependence and Thermal port tabs to the
block dialog box.
Use the thermal port to simulate the effects of copper resistance losses
that convert electrical power to heat. For more information on using
thermal ports and on the Temperature Dependence and Thermal
port tab parameters, see “Simulating Thermal Effects in Rotational
and Translational Actuators”.

Basic This model is based on the following assumptions:


Assumptions
and • The motor driver tracks a torque demand with a time constant Tc.
Limitations • Motor speed fluctuations due to mechanical load do not affect the
motor torque tracking.

1-469
Servomotor

Dialog
Box and
Parameters

• “Electrical Torque Tab” on page 1-470


• “Electrical Losses Tab” on page 1-471
• “Mechanical Tab” on page 1-473

Electrical Torque Tab

Parameterize by
Select one of the following methods for block parameterization:
• Tabulated torque-speed envelope — Provide the vectors of
rotational speeds and corresponding maximum torque values.
This is the default option.

1-470
Servomotor

• Maximum torque and power — Define the torque-speed


envelope by providing values for maximum permissible torque
and motor power.
Vector of rotational speeds
Rotational speeds for permissible steady-state operation. This
parameter is visible only if you select Tabulated torque-speed
envelope for the Parameterize by parameter. The default value
is [0 3.75e+03 7.5e+03 8e+03] rpm. To avoid poor performance
due to an infinite slope in the torque-speed curve, specify a vector
of rotational speeds that does not contain duplicate consecutive
values.
Vector of maximum torque values
Maximum torque values for permissible steady-state operation.
This parameter is visible only if you select Tabulated
torque-speed envelope for the Parameterize by parameter.
These values correspond to the speeds in the Vector of
rotational speeds parameter and define the torque-speed
envelope for the motor. The default value is [0.09 0.08 0.07
0] Nm.
Maximum torque
The maximum permissible motor torque. This parameter is
visible only if you select Maximum torque and power for the
Parameterize by parameter. The default value is 0.1 Nm.
Maximum power
The maximum permissible motor power. This parameter is
visible only if you select Maximum torque and power for the
Parameterize by parameter. The default value is 30 W.
Torque Control time constant, Tc
Time constant with which the motor driver tracks a torque
demand. The default value is 0.02 s.

Electrical Losses Tab

Motor and driver overall efficiency (percent)


The block defines overall efficiency as

1-471
Servomotor

 00
  100
 00  P0  k 02  kw 2
where:
• τ0 represents the Torque at which efficiency is measured.
• ω0 represents the Speed at which efficiency is measured.
• P0 represents the Fixed losses independent of torque or
speed.

• k 02 represents the torque-dependent electrical losses.


• kwω2 represents the speed-dependent iron losses.
At initialization, the block solves the efficiency equation for k. The
block neglects losses associated with the rotor damping.
Speed at which efficiency is measured
Speed that the block uses to calculate torque-dependent electrical
losses. The default value is 3.75e+03 rpm.
Torque at which efficiency is measured
Torque that the block uses to calculate torque-dependent electrical
losses. The default value is 0.08 Nm.
Iron losses
Iron losses at the speed and torque at which efficiency is defined.
The default value is 0 W.
Fixed losses independent of torque and speed
Fixed electrical loss associated with the driver when the motor
current and torque are zero. The default value is 0 W.
Supply series resistance
The equivalent resistance used in series with the DC supply
to model electrical losses that are proportional to the driver
supply current. The block assumes that the DC supply current
is approximately constant under constant load conditions. The
default value is 0 Ω.

1-472
Servomotor

Mechanical Tab

Rotor inertia
Rotor resistance to change in motor motion. The default value is
5e-06 kg*m2. The value can be zero.
Rotor damping
Rotor damping. The default value is 1e-05 N*m/(rad/s). The
value can be zero.
Initial rotor speed
Rotor speed at the start of the simulation. The default value is
0 rpm.

Ports This block has the following ports:

+
Positive electrical DC supply
-
Negative electrical DC supply
Tr
Reference torque demand
w
Mechanical speed output
C
Mechanical rotational conserving port
R
Mechanical rotational conserving port

See Also DC Motor | Induction Motor | Shunt Motor | Universal Motor

1-473
SFFM Current Source

Purpose Model single-frequency FM current source

Library SPICE-Compatible Components/Sources

Description The SFFM Current Source block represents a single-frequency current


source whose frequency-modulated output current value is independent
of the voltage across its terminals. The following equation describes the
current through the source as a function of time:

I out = IO + IA * sin ( ( 2 * FC * Time ) + MI * sin ( 2 * FS * Time ) )


where:

• I0 is the Current offset, IO parameter value.


• IA is the Current amplitude, IA parameter value.
• FC is the Carrier frequency, FC parameter value.
• MI is the Modulation index, MI parameter value.
• FS is the Signal frequency, FS parameter value.

The block uses a small conductance internally to prevent numerical


simulation issues. The conductance connects the + and - ports of the
device and has a conductance GMIN:

• By default, GMIN matches the Minimum conductance GMIN


parameter of the SPICE Environment Parameters block, whose
default value is 1e–12.
• To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

1-474
SFFM Current Source

Dialog
Box and
Parameters

Current offset, IO
The magnitude of the time-independent part of the output
current. The default value is 0 A.
Current amplitude, IA
The magnitude of the sinusoidal part of the output current. The
default value is 0 A.
Carrier frequency, FC
Frequency of the carrier wave. The default value is 0 Hz. The
value must be greater than or equal to 0.

1-475
SFFM Current Source

Modulation index, MI
The amount by which the modulated signal varies around its
unmodulated level. The default value is 0. The value must be
greater than or equal to 0.
Signal frequency, FS
Frequency of the modulated signal. The default value is 0 Hz. The
value must be greater than or equal to 0.

Ports The block has the following ports:

+
Positive electrical voltage.
-
Negative electrical voltage.

See Also SFFM Voltage Source

1-476
SFFM Voltage Source

Purpose Model single-frequency FM voltage source

Library SPICE-Compatible Components/Sources

Description The SFFM Voltage Source block represents a single-frequency voltage


source whose frequency-modulated output voltage value is independent
of the current through the source. The following equation describes the
output voltage as a function of time:

Vout = VO + VA* sin ( ( 2 * FC * Time ) + MI * sin ( 2 * FS * Time ) )


where:

• V0 is the Voltage offset, VO parameter value.


• VA is the Voltage amplitude, VA parameter value.
• FC is the Carrier frequency, FC parameter value.
• MI is the Modulation index, MI parameter value.
• FS is the Signal frequency, FS parameter value.

1-477
SFFM Voltage Source

Dialog
Box and
Parameters

Voltage offset, VO
The magnitude of the time-independent part of the output voltage.
The default value is 0 V.
Voltage amplitude, VA
The magnitude of the sinusoidal part of the output voltage. The
default value is 0 V.
Carrier frequency, FC
Frequency of the carrier wave. The default value is 0 Hz. The
value must be greater than or equal to 0.

1-478
SFFM Voltage Source

Modulation index, MI
The amount by which the modulated signal varies around its
unmodulated level. The default value is 0. The value must be
greater than or equal to 0.
Signal frequency, FS
Frequency of the modulated signal. The default value is 0 Hz. The
value must be greater than or equal to 0.

Ports The block has the following ports:

+
Positive electrical voltage.
-
Negative electrical voltage.

See Also SFFM Current Source

1-479
Shunt Motor

Purpose Model electrical and torque characteristics of shunt motor

Library Rotational Actuators

Description The Shunt Motor block represents the electrical and torque
characteristics of a shunt motor using the following equivalent circuit
model.

ia if
Ra

Rf
La V

+ Lf
vb

When you set the Model parameterization parameter to By


equivalent circuit parameters, you specify the equivalent circuit
parameters for this model:

• Ra — Armature resistance
• La — Armature inductance
• Rf — Field winding resistance
• Lf — Field winding inductance

The Shunt Motor block computes the motor torque as follows:

1 The magnetic field in the motor induces the following back emf vb in
the armature:

1-480
Shunt Motor

vb = Laf i f 
where Laf is a constant of proportionality and ω is the angular
velocity.

2 The mechanical power is equal to the power reacted by the back emf:

P = vbia = Laf i f ia

3 The motor torque is:

T = P /  = Laf i f ia

The torque-speed characteristic for the Shunt Motor block model is


related to the parameters in the preceding figure. When you set the
Model parameterization parameter to By rated power, rated
speed & no-load speed, the block solves for the equivalent circuit
parameters as follows:

1 For the steady-state torque-speed relationship, L has no effect.

2 Sum the voltages around the loop:

V = ia Ra + Laf i f 
V = if Rf

3 Solve the preceding equations for ia and if:

V
if =
Rf

V ⎛ Laf w ⎞
ia = ⎜1 − ⎟
Ra ⎜ Rf ⎟⎠

4 Substitute these values of ia and if into the equation for torque:

1-481
Shunt Motor

Laf ⎛ Laf  ⎞ 2
T= ⎜1 − ⎟V
Ra R f ⎜⎝ R f ⎟⎠

The block uses the rated speed and power to calculate the rated
torque. The block uses the rated torque and no-load speed values
to get one equation that relates Ra and Laf/Rf. It uses the no-load
speed at zero torque to get a second equation that relates these two
quantities. Then, it solves for Ra and Laf/Rf.

The block models motor inertia J and damping B for all values of the
Model parameterization parameter. The output torque is:

Laf ⎛ Laf  ⎞ 2
Tload = ⎜1 − ⎟ V − J  − B
Ra R f ⎜⎝ R f ⎟⎠

The block produces a positive torque acting from the mechanical C to


R ports.

Thermal Ports
The block has two optional thermal ports, one per winding, hidden by
default. To expose the thermal ports, right-click the block in your model,
and then from the context menu select Simscape block choices >
Show thermal port. This action displays the thermal ports on the
block icon, and adds the Temperature Dependence and Thermal
port tabs to the block dialog box. These tabs are described further on
this reference page.
Use the thermal ports to simulate the effects of copper resistance losses
that convert electrical power to heat. For more information on using
thermal ports in actuator blocks, see “Simulating Thermal Effects in
Rotational and Translational Actuators”.

1-482
Shunt Motor

Dialog
Box and
Parameters

• “Electrical Torque Tab” on page 1-483


• “Mechanical Tab” on page 1-485
• “Temperature Dependence Tab” on page 1-485
• “Thermal Port Tab” on page 1-486
Electrical Torque Tab

Model parameterization
Select one of the following methods for block parameterization:
• By equivalent circuit parameters — Provide electrical
parameters for an equivalent circuit model of the motor. This
is the default method.

1-483
Shunt Motor

• By rated power, rated speed & no-load speed — Provide


power and speed parameters that the block converts to an
equivalent circuit model of the motor.
Armature resistance
Resistance of the armature. This parameter is only visible when
you select By equivalent circuit parameters for the Model
parameterization parameter. The default value is 110 Ω.
Field winding resistance
Resistance of the field winding. This parameter is only visible
when you select By equivalent circuit parameters for the
Model parameterization parameter. The default value is
2.5e+03 Ω.
Back-emf constant
The ratio of the voltage generated by the motor to the motor
speed. The default value is 5.11 s*V/rad/A.
Armature inductance
Inductance of the armature. If you do not have information about
this inductance, set the value of this parameter to a small, nonzero
number. The default value is 0.1 H. The value can be zero.
Field winding inductance
Inductance of the field winding. If you do not have information
about this inductance, set the value of this parameter to a small,
nonzero number. The default value is 0.1 H. The value can be
zero.
No-load speed
Speed of the motor when no load is applied. This parameter is
only visible when you select By rated power, rated speed &
no-load speed for the Model parameterization parameter.
The default value is 4.6e+03 rpm.
Rated speed (at rated load)
Motor speed at the rated load. This parameter is only visible
when you select By rated power, rated speed & no-load

1-484
Shunt Motor

speed for the Model parameterization parameter. The default


value is 4e+03 rpm.
Rated load (mechanical power)
The mechanical load for which the motor is rated to operate. This
parameter is only visible when you select By rated power, rated
speed & no-load speed for the Model parameterization
parameter. The default value is 50 W.
Rated DC supply voltage
The voltage at which the motor is rated to operate. This parameter
is only visible when you select By rated power, rated speed
& no-load speed for the Model parameterization parameter.
The default value is 220 V.
Starting current at rated DC supply voltage
The initial current when starting the motor with the rated DC
supply voltage. This parameter is only visible when you select By
rated power, rated speed & no-load speed for the Model
parameterization parameter. The default value is 2.09 A.

Mechanical Tab

Rotor inertia
Rotor inertia. The default value is 2e-04 kg*m2. The value can
be zero.
Rotor damping
Rotor damping. The default value is 1e-06 N*m/(rad/s). The
value can be zero.
Initial rotor speed
Speed of the rotor at the start of the simulation. The default
value is 0 rpm.

Temperature Dependence Tab


This tab appears only for blocks with exposed thermal ports. For more
information, see “Thermal Ports” on page 1-482.

1-485
Shunt Motor

Resistance temperature coefficients, [alpha_f alpha_a]


A 1 by 2 row vector defining the coefficient α in the equation
relating resistance to temperature, as described in “Thermal
Model for Actuator Blocks”. The first element corresponds to the
field winding, and the second to the armature. The default value
is for copper, and is [ 0.00393 0.00393 ] 1/K.
Measurement temperature
The temperature for which motor parameters are defined. The
default value is 25 C.

Thermal Port Tab


This tab appears only for blocks with exposed thermal ports. For more
information, see “Thermal Ports” on page 1-482.

Thermal masses, [Mf Ma]


A 1 by 2 row vector defining the thermal mass for the field and
armature windings. The thermal mass is the energy required to
raise the temperature by one degree. The default value is [ 100
100 ] J/K.
Initial temperatures, [Tf Ta]
A 1 by 2 row vector defining the temperature of the field and
armature thermal ports at the start of simulation. The default
value is [ 25 25 ] C.

Ports The block has the following ports:

+
Positive electrical input.
-
Negative electrical input.
C
Mechanical rotational conserving port.
R
Mechanical rotational conserving port.

1-486
Shunt Motor

Hf
Field winding thermal port. For more information, see “Thermal
Ports” on page 1-482.
Ha
Armature winding thermal port. For more information, see
“Thermal Ports” on page 1-482.

References [1] Bolton, W. Mechatronics: Electronic Control Systems in Mechanical


and Electrical Engineering, 3rd edition Pearson Education, 2004.

See Also DC Motor | Induction Motor | Servomotor | Universal Motor

1-487
Sinusoidal Current Source

Purpose Model damped sinusoidal current source

Library SPICE-Compatible Components/Sources

Description The Sinusoidal Current Source block represents a damped sinusoidal


current source whose output current is independent of the voltage
across the terminals of the source. The following equations describe the
current through the source as a function of time:

I out (Time < TD ) = IO


I out (Time ≥ TD ) = IO + IA * e −(Time−TD )*DF *sin ( 2 * FREQ * (Time − TD ) )
where:

• I0 is the Current offset, IO parameter value.


• IA is the Sinusoidal amplitude, IA parameter value.
• FREQ is the Sinusoidal frequency, FREQ parameter value.
• TD is the Time delay, TD parameter value.
• DF is the Damping factor, DF parameter value.

The block uses a small conductance internally to prevent numerical


simulation issues. The conductance connects the + and - ports of the
device and has a conductance GMIN:

• By default, GMIN matches the Minimum conductance GMIN


parameter of the SPICE Environment Parameters block, whose
default value is 1e–12.
• To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

1-488
Sinusoidal Current Source

Dialog
Box and
Parameters

Current offset, I0
The magnitude of the time-independent part of the output
current. The default value is 0 A.
Sinusoidal amplitude, IA
The magnitude of the sinusoidal part of the output current. The
default value is 0 A.
Sinusoidal frequency, FREQ
The frequency of the output sine wave. The default value is 1e+06
Hz. The value can be less than 0.
Time delay, TD
The time at which the sine wave first starts. The default value is
0 s. The value can be less than 0.

1-489
Sinusoidal Current Source

Damping factor, DF
The amount by which to amplify or reduce the exponential
damping term that multiples the sine wave to produce the output
current. The default value is 0 1/s. The value must be greater
than or equal to 0.

Ports The block has the following ports:

+
Positive electrical voltage.
-
Negative electrical voltage.

See Also Sinusoidal Voltage Source

1-490
Sinusoidal Voltage Source

Purpose Model damped sinusoidal voltage source

Library SPICE-Compatible Components/Sources

Description The Sinusoidal Voltage Source block represents a damped sinusoidal


voltage source whose output voltage is independent of the current
through the source. The following equations describe the output as a
function of time:

Vout (Time < TD ) = VO


Vout (Time ≥ TD ) = VO + VA * e−(Time−TD )*DF *sin ( 2 * FREQ * (Time − TD ) )
where:

• V0 is the Voltage offset, VO parameter value.


• VA is the Sinusoidal amplitude, VA parameter value.
• FREQ is the Sinusoidal frequency, FREQ parameter value.
• TD is the Time delay, TD parameter value.
• DF is the Damping factor, DF parameter value.

1-491
Sinusoidal Voltage Source

Dialog
Box and
Parameters

Voltage offset, V0
The magnitude of the time-independent part of the output voltage.
The default value is 0 V.
Sinusoidal amplitude, VA
The magnitude of the sinusoidal part of the output voltage. The
default value is 0 V.
Sinusoidal frequency, FREQ
The frequency of the output sine wave. The default value is 1e+06
Hz. The value can be less than 0.
Time delay, TD
The time at which the sine wave first starts. The default value is
0 s. The value can be less than 0.

1-492
Sinusoidal Voltage Source

Damping factor, DF
The amount by which to amplify or reduce the exponential
damping term that multiples the sine wave to produce the output
voltage. The default value is 0 1/s. The value must be greater
than or equal to 0.

Ports The block has the following ports:

+
Positive electrical voltage.
-
Negative electrical voltage.

See Also Sinusoidal Current Source

1-493
Solar Cell

Purpose Solar cell model

Library Sources

Description The Solar Cell block represents a solar cell current source.
The solar cell model includes the following components:

• “Solar-Induced Current” on page 1-494


• “Temperature Dependence” on page 1-497
• “Thermal Port” on page 1-498
Solar-Induced Current
The block represents a single solar cell as a resistance Rs that is
connected in series with a parallel combination of the following
elements:

• Current source
• Two exponential diodes
• Parallel resistor Rp

The following illustration shows the equivalent circuit diagram:

1-494
Solar Cell

The output current I is:

( )
I = I ph − I s * e(V + I *Rs ) /( N*Vt ) − 1 − I s 2 * (e(
V + I *Rs ) ( N 2 *Vt )
− 1) − (V + I * Rs ) R p
where:

• Iph is the solar-induced current:

Ir
I ph = I ph 0 ×
Ir 0
where:
- Ir is the irradiance (light intensity) in W/m2 falling on the cell.
- Iph0 is the measured solar-generated current for the irradiance Ir0.
• Is is the saturation current of the first diode.
• Is2 is the saturation current of the second diode.
• Vt is the thermal voltage, kT/q, where:
- k is the Boltzmann constant.

1-495
Solar Cell

- T is the Device simulation temperature parameter value.


- q is the elementary charge on an electron.
• N is the quality factor (diode emission coefficient) of the first diode.
• N2 is the quality factor (diode emission coefficient) of the second diode.
• V is the voltage across the solar cell electrical ports.

The quality factor varies for amorphous cells, and is typically 2 for
polycrystalline cells.
The block lets you choose between two models:

• An 8-parameter model where the preceding equation describes the


output current
• A 5-parameter model that applies the following simplifying
assumptions to the preceding equation:
- The saturation current of the second diode is zero.
- The impedance of the parallel resistor is infinite.

If you choose the 5-parameter model, you can parameterize this block in
terms of the preceding equivalent circuit model parameters or in terms
of the short-circuit current and open-circuit voltage the block uses to
derive these parameters.
All models adjust the block resistance and current parameters as a
function of temperature.
You can model any number of solar cells connected in series using a
single Solar Cell block by setting the parameter Number of series
cells to a value larger than 1. Internally the block still simulates
only the equations for a single solar cell, but scales up the output
voltage according to the number of cells. This results in a more efficient
simulation than if equations for each cell were simulated individually.
If you want to model N cells in parallel, you can do so for single cells by
scaling the parameter values accordingly. That is, multiply short-circuit

1-496
Solar Cell

current, diode saturation current, and solar-generated currents by N,


and divide series resistance by N. To connect solar cell blocks in parallel,
where each block contains multiple cells in series, make multiple copies
of the block and connect accordingly.

Temperature Dependence
Several solar cell parameters depend on temperature. The solar cell
temperature is specified by the Device simulation temperature
parameter value.
The block provides the following relationship between the solar-induced
current Iph and the solar cell temperature T:

I ph (t ) = I ph * (1 + TIPH 1 * (T − Tmeas ) )
where:

• TIPH1 is the First order temperature coefficient for Iph,


TIPH1 parameter value.
• Tmeas is the Measurement temperature parameter value.

The block provides the following relationship between the saturation


current of the first diode Is and the solar cell temperature T:

(TXIS 1 N ) ⎛ ⎛ T ⎞
( N *Vt ) ⎟⎟

⎛ T ⎞ ⎜⎜ EG*⎜ −1⎟
I s1 (T ) = I s1 * ⎜ ⎟ *e ⎝ ⎝ Tmeas ⎠ ⎠

⎝ Tmeas ⎠
where TXIS1 is the Temperature exponent for Is, TXIS1 parameter
value.
The block provides the following relationship between the saturation
current of the second diode Is2 and the solar cell temperature T:

⎛ T ⎞( )
TXIS 2 ⎛ ⎛ T ⎞ ⎞
N2 ⎜⎜ EG*⎜⎜ −1⎟⎟ ( N 2 *Vt ) ⎟⎟
I s 2 (T ) = I s 2 * ⎜ ⎟ *e ⎝ ⎝ Tmeas ⎠ ⎠

⎝ Tmeas ⎠

1-497
Solar Cell

where TXIS2 is the Temperature exponent for Is2, TXIS2


parameter value.
The block provides the following relationship between the series
resistance Rs and the solar cell temperature T:

TRS 1
⎛ T ⎞
Rs (T ) = Rs * ⎜ ⎟
⎝ Tmeas ⎠
where TRS1 is the Temperature exponent for Rs, TRS1 parameter
value.
The block provides the following relationship between the parallel
resistance Rp and the solar cell temperature T:

TRP1
⎛ T ⎞
R p (T ) = R p * ⎜ ⎟
⎝ Tmeas ⎠
where TRP1 is the Temperature exponent for Rp, TRP1 parameter
value.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from the
context menu select Simscape block choices > Show thermal port.
This action displays the thermal port H on the block icon, and adds the
Thermal port tab to the block dialog box.
The thermal port model, shown in the following illustration, represents
just the thermal mass of the device. The thermal mass is directly
connected to the component thermal port H. An internal Ideal Heat
Flow Source supplies a heat flow to the port and thermal mass. This
heat flow represents the internally generated heat.

1-498
Solar Cell

The internally generated heat in the solar cell is calculated according to


the equivalent circuit diagram, shown at the beginning of the reference
page, in the “Solar-Induced Current” on page 1-494 section. It is the
sum of the i^2·R losses for each of the resistors plus the losses in each of
the diodes.
The internally generated heat due to electrical losses is a separate
heating effect to that of the solar irradation. To model thermal heating
due to solar irradiation, you must account for it separately in your
model and add the heat flow to the physical node connected to the solar
cell thermal port.

1-499
Solar Cell

Dialog
Box and
Parameters

• “Cell Characteristics Tab” on page 1-500


• “Configuration Tab” on page 1-503
• “Temperature Dependence Tab” on page 1-503
• “Thermal Port Tab” on page 1-504

Cell Characteristics Tab

Parameterize by
Select one of the following methods for block parameterization:

1-500
Solar Cell

• By s/c current and o/c voltage, 5 parameter — Provide


short-circuit current and open-circuit voltage that the block
converts to an equivalent circuit model of the solar cell. This is
the default option.
• By equivalent circuit parameters, 5 parameter —
Provide electrical parameters for an equivalent circuit model
of the solar cell using the 5-parameter solar cell model that
makes the following assumptions:
— The saturation current of the second diode is zero.
— The parallel resistor has infinite impedance.
• By equivalent circuit parameters, 8 parameter —
Provide electrical parameters for an equivalent circuit model of
the solar cell using the 8-parameter solar cell model.
Short-circuit current, Isc
The current that flows when you short-circuit the solar cell.
This parameter is only visible when you select By s/c current
and o/c voltage, 5 parameter for the Parameterize by
parameter. The default value is 7.34 A.
Open-circuit voltage, Voc
The voltage across the solar cell when it is not connected. This
parameter is only visible when you select By s/c current
and o/c voltage, 5 parameter for the Parameterize by
parameter. The default value is 0.6 V.
Diode saturation current, Is
The asymptotic reverse current of the first diode for increasing
reverse bias in the absence of any incident light. This parameter
is only visible when you select one of the following settings:
• By equivalent circuit parameters, 5 parameter for the
Parameterize by parameter
• By equivalent circuit parameters, 8 parameter for the
Parameterize by parameter

1-501
Solar Cell

The default value is 1e-06 A.


Diode saturation current, Is2
The asymptotic reverse current of the second diode for increasing
reverse bias in the absence of any incident light. This parameter
is only visible when you select By equivalent circuit
parameters, 8 parameter for the Parameterize by parameter.
The default value is 0 A.
Solar-generated current, Iph0
The solar-induced current when the irradiance is Ir0. This
parameter is only visible when you select one of the following
settings:
• By equivalent circuit parameters, 5 parameter for the
Parameterize by parameter
• By equivalent circuit parameters, 8 parameter for the
Parameterize by parameter

The default value is 7.34 A.


Irradiance used for measurements, Ir0
The irradiance that produces a current of Iph0 in the solar cell.
The default value is 1000 W/m2.
Quality factor, N
The emission coefficient of the first diode. The default value is 1.5.
Quality factor, N2
The emission coefficient of the second diode. This parameter
is only visible when you select By equivalent circuit
parameters, 8 parameter for the Parameterize by parameter.
The default value is 2.
Series resistance, Rs
The internal series resistance. The default value is 0 Ω.
Parallel resistance, Rp
The internal parallel resistance. This parameter is only visible
when you select By equivalent circuit parameters, 8

1-502
Solar Cell

parameter for the Parameterize by parameter. The default


value is inf Ω.

Configuration Tab

Number of series cells


The number of series-connected solar cells modeled by the block.
The default value is 1. The value must be greater than 0.

Temperature Dependence Tab

First order temperature coefficient for Iph, TIPH1


The order of the linear increase in the solar-generated current as
temperature increases. The default value is 0 1/K. The value must
be greater than or equal to 0.
Energy gap, EG
The solar cell activation energy. The default value is 1.11 eV. The
value must be greater than or equal to 0.1.
Temperature exponent for Is, TXIS1
The order of the exponential increase in the current from the first
diode as temperature increases. The default value is 3. The value
must be greater than or equal to 0.
Temperature exponent for Is2, TXIS2
The order of the exponential increase in the current from the
second diode as temperature increases. This parameter is only
visible when you select By equivalent circuit parameters,
8 parameter for the Parameterize by parameter. The default
value is 3. The value must be greater than or equal to 0.
Temperature exponent for Rs, TRS1
The order of the exponential increase in the series resistance as
temperature increases. The default value is 0. The value must
be greater than or equal to 0.
Temperature exponent for Rp, TRP1
The order of the exponential increase in the parallel resistance as
temperature increases. This parameter is only visible when you

1-503
Solar Cell

select By equivalent circuit parameters, 8 parameter for


the Parameterize by parameter. The default value is 0. The
value must be greater than or equal to 0.
Measurement temperature
The temperature at which the solar cell parameters were
measured. The default value is 25 C. The value must be greater
than 0.
Device simulation temperature
The temperature at which the solar cell is simulated. The default
value is 25 C. The value must be greater than 0.

Thermal Port Tab


This tab appears only for blocks with exposed thermal ports. For more
information, see “Thermal Port” on page 1-498.

Thermal mass
The heat energy required to raise the temperature of the solar cell
by one degree. When modeling more than one cell in series, specify
the thermal mass for a single cell. This value gets multiplied
internally by the number of cells to determine the total thermal
mass. The default value is 100 J/K.
Initial temperature
The temperature of the solar cell at the start of simulation. The
default value is 25 C.

Ports The block has the following ports:

Ir
Incident irradiance
+
Positive electrical voltage
-
Negative electrical voltage

1-504
Solar Cell

References [1] Gow, J.A. and C.D. Manning. “Development of a Photovoltaic


Array Model for Use in Power-Electronics Simulation Studies.” IEEE
Proceedings of Electric Power Applications, Vol. 146, No. 2, 1999, pp.
193–200.

1-505
Solenoid

Purpose Model electrical characteristics and generated force of solenoid

Library Translational Actuators

Description The Solenoid block represents the electrical characteristics and


generated force for the solenoid in the following figure:

Ferromagnetic core

Plunger Spring
d k

Magnetic λ
Winding x(t) force, Fe (t)

Load, F1

The return spring is optional. To remove the effects of this spring from
the model, set the Spring constant parameter to 0.
The equation of motion for the plunger as a function of position, x, is:

Fl + mx +  x + kx = Fe
where Fe is the electromagnetic force, Fl is the load force, λ is the viscous
damping term and m is the plunger mass. The electromagnetic force is
related to the solenoid current and inductance by:

1 ∂L( x)
Fe = i 2
2 ∂x

1-506
Solenoid

The inductance, which is derived in [1], can be written as:

∂L( x) −
=
∂x ( +  x )
2

where α and β are constants. Plugging the preceding equation into the
equation for electromagnetic force gives the force-stroke relationship of
the solenoid for a current i0:

1 −
F = i0 2
2 ( +  x ) 2
The Solenoid block solves for α and β by taking the two specified force
and stroke measurements and substituting them into the preceding
equation. It solves the resulting equations for α and β.
A positive current from the electrical + to - ports creates a negative force
(i.e., a pulling force) from the mechanical C to R ports.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from
the context menu select Simscape block choices > Show thermal
port. This action displays the thermal port H on the block icon, and
adds the Temperature Dependence and Thermal port tabs to the
block dialog box.
Use the thermal port to simulate the effects of copper resistance losses
that convert electrical power to heat. For more information on using
thermal ports and on the Temperature Dependence and Thermal
port tab parameters, see “Simulating Thermal Effects in Rotational
and Translational Actuators”.

1-507
Solenoid

Dialog
Box and
Parameters

• “Magnetic Force Tab” on page 1-508


• “Mechanical Tab” on page 1-509
Magnetic Force Tab

Forces [F1 F2]


A vector of the force values at the two points on the force-stroke
curve. The second measurement point must be at a stroke that
is greater than that of the first measurement point. When the

1-508
Solenoid

manufacturer doesn’t provide a force-stroke curve, set F1 to the


holding torque (when X1 = 0) and F2 to the pull-in torque when
running the solenoid at the Rated voltage Vdc and Rated
current Idc values. The default value is [ 7.5 0.75 ] N.
Stroke [X1 X2]
A vector of the stroke (plunger distance from the fully closed
position) values at the two points on the force-stroke curve. The
second measurement point must be at a stroke that is greater
than that of the first measurement point. To ensure a finite force
value, the points must meet the condition

X2 F1
>
X1 F2
The default value is [ 1 5 ] mm.
Rated voltage Vdc
The voltage at which the solenoid is rated to operate. This voltage
value is used to measure the Forces [F1 F2] and Stroke [X1 X2]
values. The default value is 50 V.
Rated current Idc
The current that flows when the solenoid is supplied with the
Rated voltage Vdc voltage. The default value is 0.05 A.

Mechanical Tab

Spring constant
Constant representing the stiffness of the spring that acts to
retract the plunger when the solenoid is powered off. The force is
zero when the plunger is displaced to the Stroke for zero spring
force parameter value. The default value is 200 N/m. Set the
spring constant to zero if there is no spring.
Stroke for zero spring force
The stroke at which the spring provides no force. The default
value is 5 mm.

1-509
Solenoid

Damping
The term λ in the equation of motion for the plunger as a function
of position that linearly damps the plunger motion. The default
value is 1 N/(m/s). The value can be zero.
Plunger mass
The weight of the solenoid plunger. The default value is 0.05 kg.
The value can be zero.
Maximum stroke
The maximum amount by which the plunger can be displaced. You
can use this parameter to model a hard endstop that limits the
stroke. The default value is Inf mm, which means no stroke limit.
Initial plunger position
The amount by which the plunger is displaced at the start of the
simulation. The default value is 0 m.
Contact stiffness
Stiffness of the plunger contact that models the hard stop at the
minimum (x = 0) and maximum (x = Maximum stroke) plunger
positions. The default value is 1e+06 N/m.
Contact damping
Damping of the plunger contact that models the hard stop at the
minimum (x = 0) and maximum (x = Maximum stroke) plunger
positions. The default value is 500 N/(m/s).

Ports The block has the following ports:

+
Positive electrical input
-
Negative electrical input
C
Mechanical translational conserving port
R
Mechanical translational conserving port

1-510
Solenoid

References [1] S.E. Lyshevski. Electromechanical Systems, Electric Machines, and


Applied Mechatronics. CRC, 1999.

1-511
SPDT Switch

Purpose Model single-pole double-throw switch

Library Passive Devices/Switches

Description The SPDT Switch block models a single-pole double-throw switch:

• When the switch is closed, port c is connected to port s2.


• When the switch is open, port c is connected to port s1.

Closed connections are modeled by a resistor with value equal to the


Closed resistance parameter value. Open connections are modeled by
a resistor with value equal to the reciprocal of the Open conductance
parameter value.
The switch is closed if the voltage presented at the vT control port
exceeds the value of the Threshold parameter.
Optionally, you can add a delay between the point at which the voltage
at vT passes the threshold and the switch opening or closing. To enable
the delay, on the Dynamics tab, set the Model dynamics parameter
to Model turn-on and turn-off times.

Dialog
Box and
Parameters

1-512
SPDT Switch

• “Main Tab” on page 1-513


• “Dynamics Tab” on page 1-513

Main Tab

Closed resistance
Resistance between the c and s electrical ports when the switch is
closed. The value must be greater than zero. The default value
is 0.01 Ω.
Open conductance
Conductance between the c and s electrical ports when the switch
is open. The value must be greater than zero. The default value
is 1e-6 S.
Threshold
The threshold voltage for the control physical signal input vT
above which the switch will turn on. The default value is 0 V.

Dynamics Tab

Model dynamics
Select whether the block models a switching delay:
• No dynamics — Do not model the delay. This is the default
option.
• Model turn-on and turn-off times — Use additional
parameters to model a delay between the point at which the
voltage at vT passes the threshold and the switch opening or
closing.
Turn-on delay
Time between the input voltage exceeding the threshold voltage
and the switch closing. This parameter is only visible when
you select Model turn-on and turn-off times for the Model
dynamics parameter. The value must be greater than zero. The
default value is 1e-3 seconds.

1-513
SPDT Switch

Turn-off delay
Time between the input voltage falling below the threshold
voltage and the switch opening. This parameter is only visible
when you select Model turn-on and turn-off times for the
Model dynamics parameter. The value must be greater than
zero. The default value is 1e-3 seconds.
Initial input value, vT
The value of the physical signal input vT at time zero. This
value is used to initialize the delayed control voltage parameter
internally. This parameter is only visible when you select
Model turn-on and turn-off times for the Model dynamics
parameter. The default value is 0 V.

Ports This block has the following ports:

vT
Physical signal that opens and closes the switch
c, s1, s2
Electrical conserving ports

See Also DPDT Switch | DPST Switch | SPST Switch | Switch

1-514
SPICE Diode

Purpose Model SPICE-compatible diode

Library SPICE-Compatible Components/Semiconductor Devices

Description The SPICE Diode block represents a SPICE-compatible diode.


The SPICE Diode block model includes the following components:

• “Current-Voltage Model” on page 1-515


• “Junction Charge Model” on page 1-517
• “Temperature Dependence” on page 1-518

Current-Voltage Model
The block provides the following relationship between the diode current
Id and the diode voltage Vd after adjusting the applicable model
parameters for temperature.

Applicable Range Corresponding Id Equation


of Vd Values

Vd > 80 * Vt ⎛⎛V ⎞ ⎞
I d = IS ⎜ ⎜ d − 79 ⎟ e80 − 1⎟ + Vd * G min
⎜ V ⎟
⎝⎝ t ⎠ ⎠

80 * Vt ≥ Vd ≥ −3* Vt I d = IS * (eVd /Vt − 1 ) + Vd * G min

1-515
SPICE Diode

Applicable Range Corresponding Id Equation


of Vd Values

−3* Vt > Vd ≥ − BV ⎛ 27 ⎞
I d = − IS ⎜1 + ⎟ + Vd * G min
⎜ (V / V ) e ⎟
3 3
⎝ d t ⎠

Vd < − BV
(
I d = − IBV * e(-(BV +Vd )/Vt − 1 − )
⎛ ⎛ ⎞
3

⎜ ⎟
IS * ⎜1 − ⎜ ⎟
3
⎜ e * BV ⎟ ⎟ +Vd * G min
⎜ ⎜⎝ Vt ⎟
⎠ ⎟
⎝ ⎠
Where:

• IS is the Saturation current, IS parameter value.

• Vt = N * k * T/q
• N is the Emission coefficient, ND parameter value.
• q is the elementary charge on an electron.
• k is the Boltzmann constant.
• T is the diode temperature:
- If you select Device temperature for the Model temperature
dependence using parameter, T is the sum of the Circuit
temperature value plus the Offset local circuit temperature,
TOFFSET parameter value. The Circuit temperature value
comes from the SPICE Environment Parameters block, if one
exists in the circuit. Otherwise, it comes from the default value
for this block.

1-516
SPICE Diode

- If you select Fixed temperature for the Model temperature


dependence using parameter, T is the Fixed circuit
temperature, TFIXED parameter value.
• GMIN is the diode minimum conductance. By default, GMIN
matches the Minimum conductance GMIN parameter of the
SPICE Environment Parameters block, whose default value is 1e–12.
To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.
• BV is the Reverse breakdown voltage, BV parameter value.

Junction Charge Model


The block provides the following relationship between the diode charge
Qd and the diode voltage Vd after adjusting the applicable model
parameters for temperature.

Applicable Corresponding Qd Equation


Range of Vd
Values

1− MG
Vd < FC * VJ ⎛ V ⎞
1 − ⎜1 − d ⎟
Qd = TT * I d + CJO* VJ * ⎝
VJ ⎠
1 − MG

Vd ≥ FC * VJ Qd = TT * I d +


⎛ MG ⎞
F 3 * (Vd - FC * VJ ) + ⎜ (
⎟ * Vd - ( FC * VJ )
⎝ 2 * VJ ⎠
2 2
) ⎟⎞
CJO * ⎜ F1 + ⎟
⎜ F2 ⎟
⎜ ⎟
⎝ ⎠
Where:

• FC is the Capacitance coefficient FC parameter value.

1-517
SPICE Diode

• VJ is the Junction potential VJ parameter value.


• TT is the Transit time, TT parameter value.
• CJ0 is the Zero-bias junction capacitance CJ0 parameter value.
• MG is the Grading coefficient MG parameter value.

• F1 = VJ * ( 1 - ( 1 - FC)( 1-MG ) )/( 1 - MG)


• F 2 = ( 1 - FC)( 1+ MG)
• F 3 = 1 - FC * ( 1 + MG)
Temperature Dependence
Several diode parameters depend on temperature. There are two ways
to specify the diode temperature:

• When you select Device temperature for the Model temperature


dependence using parameter, the diode temperature is

T = TC + TO
where:
- TC is the Circuit temperature parameter value from the SPICE
Environment Parameters block. If this block doesn’t exist in the
circuit, TC is the default value of this parameter.
- TO is the Offset local circuit temperature, TOFFSET
parameter value.
• When you select Fixed temperature for the Model temperature
dependence using parameter, the diode temperature is the Fixed
circuit temperature, TFIXED parameter value.

The block provides the following relationship between the saturation


current IS and the diode temperature T:

1-518
SPICE Diode

⎛ T ⎞ EG
XTI ⎜⎜ −1⎟⎟*
IS (T ) = IS * (T Tmeas ) ND *e ⎝ Tmeas ⎠ Vt

where:

• IS is the Transport saturation current, IS parameter value.


• Tmeas is the Parameter extraction temperature, TMEAS
parameter value.
• XTI is the Saturation current temperature exponent, XTI
parameter value.
• ND is the Emission coefficient, ND parameter value.
• EG is the Activation energy, EG parameter value.
• Vt = kT/q.

The block provides the following relationship between the junction


potential VJ and the diode temperature T:

⎛ T ⎞ 3* k * T ⎛ T ⎞ ⎛ T ⎞
VJ (T ) = VJ * ⎜ ⎟- * log ⎜ ⎟-⎜ ⎟ * EGTmeas + EGT
⎝ Tmeas ⎠ q ⎝ Tmeas ⎠ ⎝ Tmeas ⎠
where:

• VJ is the Junction potential, VJ parameter value.

• EGTmeas = 1.16eV - ( 7.02e - 4 * Tmeas 2 ) / (Tmeas + 1108 )

• EGT = 1.16eV - ( 7.02e - 4 * T 2 ) / (T + 1108 )


The block provides the following relationship between the junction
capacitance CJO and the diode temperature T:

1-519
SPICE Diode

⎡ ⎛ VJ (T ) -VJ ⎞⎤
CJO(T ) = CJO* ⎢1 + MG* ⎜ 400e − 6 * (T - Tmeas ) - ⎟⎥
⎣ ⎝ VJ ⎠⎦
where CJO is the Zero-bias junction capacitance CJ0 parameter
value.

Basic The model is based on the following assumptions:


Assumptions
and • The SPICE Diode block does not support noise analysis.
Limitations • The SPICE Diode block applies initial conditions across junction
capacitors and not across the block ports.

1-520
SPICE Diode

Dialog Main Tab


Box and
Parameters

Device area, AREA


The diode area. This value multiplies the Saturation current,
IS, Zero-bias junction capacitance CJ0, and Reverse
breakdown current, IBV parameter values. It divides the
Ohmic resistance, RS parameter value. The default value is 1
m2. The value must be greater than 0.
Number of parallel devices, SCALE
The number of parallel diodes the block represents. This value
multiplies the output current and device charges. The default
value is 1. The value must be greater than 0.

1-521
SPICE Diode

Saturation current, IS
The magnitude of the current that the ideal diode equation
approaches asymptotically for very large reverse bias levels. The
default value is 1e-14 A/m2. The value must be greater than or
equal to 0.
Ohmic resistance, RS
The series diode connection resistance. The default value is 0.01
m2*Ω. The value must be greater than or equal to 0.
Emission coefficient, ND
The diode emission coefficient or ideality factor. The default value
is 1. The value must be greater than 0.

Junction Capacitance Tab

1-522
SPICE Diode

Model junction capacitance


Select one of the following options for modeling the junction
capacitance:
• No — Do not include junction capacitance in the model. This is
the default option.
• Yes — Specify zero-bias junction capacitance, junction
potential, grading coefficient, forward-bias depletion
capacitance coefficient, and transit time.
Zero-bias junction capacitance CJ0
The value of the capacitance placed in parallel with the
exponential diode term. This parameter is only visible when you
select Yes for the Model junction capacitance parameter. The
default value is 0 F/m2. The value must be greater than or equal
to 0.
Junction potential VJ
The junction potential. This parameter is only visible when you
select Yes for the Model junction capacitance parameter. The
default value is 1 V. The value must be greater than 0.01 V.
Grading coefficient MG
The grading coefficient. This parameter is only visible when you
select Yes for the Model junction capacitance parameter. The
default value is 0.5. The value must be greater than 0 and less
than 0.9.
Capacitance coefficient FC
The fitting coefficient that quantifies the decrease of the depletion
capacitance with applied voltage. This parameter is only visible
when you select Yes for the Model junction capacitance
parameter. The default value is 0.5. The value must be greater
than or equal to 0 and less than 0.95.
Transit time, TT
The transit time of the minority carriers that cause diffusion
capacitance. This parameter is only visible when you select Yes

1-523
SPICE Diode

for the Model junction capacitance parameter. The default


value is 0 s. The value must be greater than or equal to 0.
Specify initial condition
Select one of the following options for specifying an initial
condition:
• No — Do not specify an initial condition for the model. This is
the default option.
• Yes — Specify the initial diode voltage.

Note The SPICE Diode block applies the initial diode voltage
across the junction capacitors and not across the ports.

Initial voltage V0
Diode voltage at the start of the simulation. This parameter
is only visible when you select Yes for the Model junction
capacitance and Yes for the Specify initial condition
parameter. The default value is 0 V.

Note The block applies the initial condition across the diode
junction, so the initial condition is only effective when charge
storage is included, i.e. when one or both of the Zero-bias
junction capacitance CJ0 and Transit time, TT parameters
are greater than zero.

1-524
SPICE Diode

Reverse Breakdown Tab

Model reverse breakdown


Select one of the following options for modeling the diode reverse
breakdown:
• No — Don’t model reverse breakdown. This is the default
option.
• Yes — Introduce a second exponential term to the diode I-V
relationship, thereby modeling a rapid increase in conductance
as the breakdown voltage is exceeded.

1-525
SPICE Diode

Reverse breakdown current, IBV


The diode current that corresponds to the Reverse breakdown
voltage, BV value. This parameter is only visible when you select
Yes for the Model reverse breakdown parameter. The default
value is 0.001 A/m2. The value must be greater than 0.

Note The Diode model does not use this parameter at this time.

Reverse breakdown voltage, BV


The voltage below which to model the rapid increase in
conductance that occurs at diode breakdown. This parameter
is only visible when you select Yes for the Model reverse
breakdown parameter. The default value is Inf V. The value
must be greater than or equal to 0.

1-526
SPICE Diode

Temperature Tab

Model temperature dependence using


Select one of the following options for modeling the diode
temperature dependence:
• Device temperature — Use the device temperature, which is
the Circuit temperature parameter value (from the SPICE
Environment Parameters block, if one exists in the circuit, or
the default value for this block otherwise) plus the Offset local
circuit temperature, TOFFSET parameter value.
• Fixed temperature — Use a temperature that is independent
of the circuit temperature to model temperature dependence.

1-527
SPICE Diode

Saturation current temperature exponent, XTI


The order of the exponential increase in the saturation current
as temperature increases. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 3. The value
must be greater than 0.
Activation energy, EG
The diode activation energy. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 1.11 eV. The
value must be greater than or equal to 0.1.
Offset local circuit temperature, TOFFSET
The amount by which the diode temperature differs from the
circuit temperature. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 0 K.
Parameter extraction temperature, TMEAS
The temperature at which the diode parameters were measured.
The default value is 300.15 K. The value must be greater than 0.
Fixed circuit temperature, TFIXED
The temperature at which to simulate the diode. This parameter
is only visible when you select Fixed temperature for the Model
temperature dependence using parameter. The default value
is 300.15 K. The value must be greater than 0.

Ports The block has the following ports:

+
Positive electrical voltage.
-
Negative electrical voltage.

See Also Diode

1-528
SPICE Environment Parameters

Purpose Set parameters that apply to all connected SPICE-compatible blocks

Library SPICE-Compatible Components/Utilities

Description The SPICE Environment Parameters block lets you set parameters that
apply to all SPICE-compatible blocks in an electrical network:

• Circuit temperature
• Minimum conductance

If your Simulink model does not contain a SPICE Environment


Parameters block, all blocks use the default values of these parameters.
You must connect every network in the system to a SPICE Environment
Parameters block to override the default values.

Note The simple semiconductor models in the Semiconductors


sublibrary are not temperature dependent, so the SPICE Environment
Parameters block only changes the minimum conductance parameter
used by the exponential diode and bipolar transistor models.

1-529
SPICE Environment Parameters

Dialog
Box and
Parameters

Circuit temperature
The temperature of the connected SPICE-compatible blocks. The
default value is 300.15 K.
Minimum conductance GMIN
The minimum conductance used by some blocks. The default
value is 1e-12 1/Ω.

Ports The block has the following ports:

OUT
Electrical output.

1-530
SPICE NJFET

Purpose Model SPICE-compatible N-Channel JFET

Library SPICE-Compatible Components/Semiconductor Devices

Description The NJFET block represents a SPICE-compatible N-channel JFET.


The NJFET block model includes the following components:

• “Gate-Source Current-Voltage Model” on page 1-531


• “Gate-Drain Current-Voltage Model” on page 1-532
• “Drain-Source Current-Voltage Model” on page 1-533
• “Junction Charge Model” on page 1-534
• “Temperature Dependence” on page 1-536

Gate-Source Current-Voltage Model


The block provides the following relationship between the gate-source
current Igs and the gate-source voltage Vgs after adjusting the applicable
model parameters for temperature.

Applicable Range of Corresponding Igs Equation


Vgs Values

Vgs > 80 * Vt ⎛ ⎛ Vgs ⎞ ⎞


I gs = IS * ⎜ ⎜ − 79 ⎟ e80 − 1⎟ + Vgs * G min
⎜ V ⎟
⎝⎝ t ⎠ ⎠

80* Vt ≥ Vgs (
I gs = IS * e
Vgs / Vt
)
− 1 + Vgs * G min
Where:

• IS is the Saturation current, IS parameter value.

• Vt = ND * k * T/q
• ND is the Emission coefficient, ND parameter value.

1-531
SPICE NJFET

• q is the elementary charge on an electron.


• k is the Boltzmann constant.
• T is the diode temperature:
- If you select Device temperature for the Model temperature
dependence using parameter, T is the sum of the Circuit
temperature value plus the Offset local circuit temperature,
TOFFSET parameter value. The Circuit temperature value
comes from the SPICE Environment Parameters block, if one
exists in the circuit. Otherwise, it comes from the default value
for this block.
- If you select Fixed temperature for the Model temperature
dependence using parameter, T is the Fixed circuit
temperature, TFIXED parameter value.
• GMIN is the diode minimum conductance. By default, GMIN
matches the Minimum conductance GMIN parameter of the
SPICE Environment Parameters block, whose default value is 1e-12.
To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

Gate-Drain Current-Voltage Model


The block provides the following relationship between the gate-drain
current Igd and the gate-drain voltage Vgd after adjusting the applicable
model parameters for temperature.

Applicable Range of Corresponding Igd Equation


Vgd Values

Vgd > 80 * Vt ⎛ ⎛ Vgd ⎞ ⎞


I gd = IS * ⎜ ⎜ − 79 ⎟ e80 − 1⎟ + Vgd * G min
⎜ V ⎟
⎝⎝ t ⎠ ⎠

80* Vt ≥ Vgd (
I gd = IS * e
Vgd / Vt
)
− 1 + Vgd * G min

1-532
SPICE NJFET

Drain-Source Current-Voltage Model


The block provides the following relationship between the drain-source

current Ids and the drain-source voltage Vds in normal mode ( Vds ≥ 0 )
after adjusting the applicable model parameters for temperature.

Applicable Corresponding Ids Equation


Range of Vgs
and Vgd Values

Vgs -Vto ≤ 0 I ds = 0

I ds =  (Vgs − Vto ) (1 + Vds )


2
0 < Vgs -Vto ≤ Vds

0 < Vds < Vgs -Vto ( )


I ds = Vds 2 (Vgs -Vto ) -Vds (1 + Vds )

Where:

• Vto is the Threshold voltage, VTO parameter value.


• β is the Transconductance, BETA parameter value.
• λ is the Channel modulation, LAMBDA parameter value.

The block provides the following relationship between the drain-source

current Ids and the drain-source voltage Vds in inverse mode ( Vds < 0 )
after adjusting the applicable model parameters for temperature.

1-533
SPICE NJFET

Applicable Corresponding Ids Equation


Range of Vgs
and Vgd Values

Vgd -Vto ≤ 0 I ds = 0

I ds = −  (Vgd − Vto ) (1 − Vds )


2
0 < Vgd -Vto ≤ −Vds

0 < −Vds < Vgs -Vto ( )


I ds = Vds 2 (Vgd -Vto ) + Vds (1 − Vds )

Junction Charge Model


The block provides the following relationship between the gate-source
charge Qgs and the gate-source voltage Vgs after adjusting the applicable
model parameters for temperature.

Applicable Corresponding Qgs Equation


Range of Vgs
Values

Vgs < FC * VJ ⎛ ⎛ Vgs ⎞1−MG ⎞


CGS * VJ * ⎜1 - ⎜1 - ⎟
⎜ ⎝ VJ ⎟⎠ ⎟
Qgs = ⎝ ⎠
1 − MG

Vgs ≥ FC * VJ ⎛
⎜ F 3* (Vgs - FC * VJ ) +
(
MG * Vgs2 - ( FC * VJ )
2
) ⎟⎞
⎜ 2 * VJ ⎟
Qgs = CGS * ⎜ F1 + ⎟
F2
⎜ ⎟
⎜ ⎟
⎝ ⎠
Where:

1-534
SPICE NJFET

• FC is the Capacitance coefficient FC parameter value.


• VJ is the Junction potential VJ parameter value.
• CGS is the Zero-bias GS capacitance, CGS parameter value.
• MG is the Grading coefficient, MG parameter value.

• F1 =
(
VJ * 1 - (1 - FC )
1− MG
)
1 − MG
F 2 = (1 - FC )
1+ MG

• F 3 = 1 - FC * (1 + MG )

The block provides the following relationship between the gate-drain


charge Qgd and the gate-drain voltage Vgd after adjusting the applicable
model parameters for temperature.

Applicable Corresponding Qgd Equation


Range of Vgd
Values

Vgd < FC * VJ ⎛ ⎛ Vgd ⎞1−MG ⎞


CGD * VJ * ⎜1 - ⎜1 - ⎟
⎜ ⎝ VJ ⎟⎠ ⎟
Qgd = ⎝ ⎠
1 − MG

Vgd ≥ FC * VJ ⎛
⎜ F 3* (Vgd - FC * VJ ) +
(
MG * Vgd2 - ( FC * VJ )
2
) ⎞⎟
⎜ 2 * VJ ⎟
Qgd = CGD* ⎜ F1 + ⎟
F2
⎜ ⎟
⎜ ⎟
⎝ ⎠
Where:

1-535
SPICE NJFET

• CGD is the Zero-bias GD capacitance, CGD parameter value.


Temperature Dependence
Several transistor parameters depend on temperature. There are two
ways to specify the transistor temperature:

• When you select Device temperature for the Model temperature


dependence using parameter, the transistor temperature is

T = TC + TO
where:
- TC is the Circuit temperature parameter value from the SPICE
Environment Parameters block. If this block doesn’t exist in the
circuit, TC is the default value of this parameter.
- TO is the Offset local circuit temperature, TOFFSET
parameter value.
• When you select Fixed temperature for the Model temperature
dependence using parameter, the transistor temperature is the
Fixed circuit temperature, TFIXED parameter value.

The block provides the following relationship between the saturation


current IS and the transistor temperature T:

⎛ T ⎞ EG
XTI ⎜⎜ −1⎟⎟*
IS (T ) = IS * (T Tmeas ) ND *e ⎝ Tmeas ⎠ Vt

where:

• IS is the Saturation current, IS parameter value.


• Tmeas is the Parameter extraction temperature, TMEAS
parameter value.
• XTI is the Saturation current temperature exponent, XTI
parameter value.
• EG is the Energy gap, EG parameter value.

1-536
SPICE NJFET

• Vt = ND * k * T/q
• ND is the Emission coefficient, ND parameter value.

The block provides the following relationship between the junction


potential VJ and the transistor temperature T:

⎛ T ⎞ 3* k * T ⎛ T ⎞ ⎛ T ⎞
VJ (T ) = VJ * ⎜ ⎟- * log ⎜ ⎟-⎜ ⎟ * EGTmeas + EGT
⎝ Tmeas ⎠ q ⎝ Tmeas ⎠ ⎝ Tmeas ⎠
where:

• VJ is the Junction potential VJ parameter value.

• EGTmeas = 1.16eV - ( 7.02e - 4 * Tmeas 2 ) / (Tmeas + 1108 )

• EGT = 1.16eV - ( 7.02e - 4 * T 2 ) / (T + 1108 )

The block provides the following relationship between the gate-source


junction capacitance CGS and the transistor temperature T:

⎡ ⎛ VJ (T ) -VJ ⎞⎤
CGS (T ) = CGS * ⎢1 + MG* ⎜ 400e − 6 * (T - Tmeas ) - ⎟⎥
⎣ ⎝ VJ ⎠⎦
where:

• CGS is the Zero-bias GS capacitance, CGS parameter value.

The block uses the CGS(T) equation to calculate the gate-drain junction
capacitance by substituting CGD (the Zero-bias GD capacitance,
CGD parameter value) for CGS.
The block provides the following relationship between the forward and
reverse beta and the transistor temperature T:

1-537
SPICE NJFET

⎛ T ⎞
 (T ) =  * ⎜ ⎟
⎝ Tmeas ⎠
where β is the Transconductance, BETA parameter value.

Basic The model is based on the following assumptions:


Assumptions
and • The NJFET block does not support noise analysis.
Limitations • The NJFET block applies initial conditions across junction capacitors
and not across the block ports.

1-538
SPICE NJFET

Dialog Main Tab


Box and
Parameters

Device area, AREA


The transistor area. This value multiplies the
Transconductance, BETA, Zero-bias GS capacitance, CGS,
Zero-bias GD capacitance, CGD, and Saturation current, IS
parameter values. It divides the Source resistance, RS and
Drain resistance, RD parameter values. The default value is 1
m2. The value must be greater than 0.

1-539
SPICE NJFET

Number of parallel devices, SCALE


The number of parallel transistors the block represents. This
value multiplies the output current and device charges. The
default value is 1. The value must be greater than 0.
Threshold voltage, VTO
The gate-source voltage above which the transistor produces a
nonzero drain current. The default value is -2 V.
Transconductance, BETA
The derivative of drain current with respect to gate voltage. The
default value is 1e-04 A/m2/V2. The value must be greater than
or equal to 0.
Channel modulation, LAMBDA
The channel-length modulation. The default value is 0 1/V.
Saturation current, IS
The magnitude of the current that the ideal diode equation
approaches asymptotically for very large reverse bias levels. The
default value is 1e-14 A/m2. The value must be greater than or
equal to 0.
Emission coefficient, ND
The transistor emission coefficient or ideality factor. The default
value is 1. The value must be greater than 0.
Source resistance, RS
The transistor source resistance. The default value is 1e-4 m2*Ω.
The value must be greater than or equal to 0.
Drain resistance, RD
The transistor drain resistance. The default value is 0.01 m2*Ω.
The value must be greater than or equal to 0.

1-540
SPICE NJFET

Junction Capacitance Tab

Model junction capacitance


Select one of the following options for modeling the junction
capacitance:
• No — Do not include junction capacitance in the model. This is
the default option.

1-541
SPICE NJFET

• Yes — Specify zero-bias junction capacitance, junction


potential, grading coefficient, forward-bias depletion
capacitance coefficient, and transit time.
Zero-bias GS capacitance, CGS
The value of the capacitance placed between the gate and the
source. This parameter is only visible when you select Yes for the
Model junction capacitance parameter. The default value is 0
F/m2. The value must be greater than or equal to 0.
Zero-bias GD capacitance, CGD
The value of the capacitance placed between the gate and the
drain. This parameter is only visible when you select Yes for the
Model junction capacitance parameter. The default value is 0
F/m2. The value must be greater than or equal to 0.
Junction potential VJ
The junction potential. This parameter is only visible when you
select Yes for the Model junction capacitance parameter. The
default value is 1 V. The value must be greater than 0.01 V.
Grading coefficient, MG
The transistor grading coefficient. The default value is 0.5. The
value must be greater than 0 and less than 0.9.
Capacitance coefficient FC
The fitting coefficient that quantifies the decrease of the depletion
capacitance with applied voltage. This parameter is only visible
when you select Yes for the Model junction capacitance
parameter. The default value is 0.5. The value must be greater
than or equal to 0 and less than or equal to 0.95.
Specify initial condition
Select one of the following options for specifying an initial
condition:
• No — Do not specify an initial condition for the model. This is
the default option.
• Yes — Specify the initial diode voltage.

1-542
SPICE NJFET

Note The NJFET block applies the initial diode voltage across
the junction capacitors and not across the ports.

Initial condition voltage ICVDS


Drain-source voltage at the start of the simulation. This
parameter is only visible when you select Yes for the Model
junction capacitance and Yes for the Specify initial
condition parameter. The default value is 0 V.
Initial condition voltage ICVGS
Gate-source voltage at the start of the simulation. This parameter
is only visible when you select Yes for the Model junction
capacitance and Yes for the Specify initial condition
parameter. The default value is 0 V.

1-543
SPICE NJFET

Temperature Tab

Model temperature dependence using


Select one of the following options for modeling the diode
temperature dependence:
• Device temperature — Use the device temperature, which is
the Circuit temperature value plus the Offset local circuit
temperature, TOFFSET value. The Circuit temperature
value comes from the SPICE Environment Parameters block, if

1-544
SPICE NJFET

one exists in the circuit. Otherwise, it comes from the default


value for this block.
• Fixed temperature — Use a temperature that is independent
of the circuit temperature to model temperature dependence.
Saturation current temperature exponent, XTI
The order of the exponential increase in the saturation current as
temperature increases. The default value is 0. The value must
be greater than or equal to 0.
Activation energy, EG
The energy gap that affects the increase in the saturation current
as temperature increases. The default value is 1.11 eV. The value
must be greater than 0.1 eV.
Offset local circuit temperature, TOFFSET
The amount by which the transistor temperature differs from
the circuit temperature. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 0 K.
Fixed circuit temperature, TFIXED
The temperature at which to simulate the transistor. This
parameter is only visible when you select Fixed temperature for
the Model temperature dependence using parameter. The
default value is 300.15 K. The value must be greater than 0.
Parameter extraction temperature, TMEAS
The temperature at which the transistor parameters were
measured. The default value is 300.15 K. The value must be
greater than 0.

Ports The block has the following ports:

G
Electrical conserving port associated with the transistor gate
terminal.

1-545
SPICE NJFET

D
Electrical conserving port associated with the transistor drain
terminal.
S
Electrical conserving port associated with the transistor source
terminal.

References [1] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993. Chapter 3.

See Also N-Channel JFET, SPICE PJFET

1-546
SPICE NMOS

Purpose Model SPICE-compatible N-Channel MOSFET

Library SPICE-Compatible Components/Semiconductor Devices

Description The NMOS block represents a SPICE-compatible N-channel MOSFET.


The NMOS block model includes the following components:

• “Resistance Calculations” on page 1-547


• “Bulk-Source Diode Model” on page 1-548
• “Bulk-Drain Diode Model” on page 1-549
• “Level 1 Drain Current Model” on page 1-550
• “Level 3 Drain Current Model” on page 1-553
• “Junction Charge Model” on page 1-559
• “Temperature Dependence” on page 1-564

Resistance Calculations
The following table shows how the NMOS block calculates the transistor
drain resistance. The abbreviations in the table represent the values of
the following block parameters:

• Drain resistance, RD
• Sheet resistance, RSH
• Number of drain squares, NRD

Drain resistance, Sheet resistance, Drain Resistance


RD Parameter RSH Parameter
NaN NaN 0
RD NaN or RSH RD
NaN RSH RSH*NRD

1-547
SPICE NMOS

The following table shows how the NMOS block calculates the transistor
source resistance. The abbreviations in the table represent the values
of the following block parameters:

• Source resistance, RS
• Sheet resistance, RSH
• Number of source squares, NRS

Source resistance, Sheet resistance, Source Resistance


RS Parameter RSH Parameter
NaN NaN 0
RS NaN or RSH RS
NaN RSH RSH*NRS

Bulk-Source Diode Model


The block provides the following relationship between the bulk-source
current Ibs and the bulk-source voltage Vbs after adjusting the applicable
model parameters for temperature.

Applicable Range Corresponding Igs Equation


of Vbs Values

Vbs > 80 * Vtn ⎛⎛V ⎞ ⎞


I bs = ISbs * ⎜ ⎜ bs − 79 ⎟ e80 − 1⎟ + Vbs * G min
⎜ V ⎟
⎝ ⎝ tn ⎠ ⎠

80Vtn ≥ Vbs ( )
I bs = ISbs * eVbs / Vtn − 1 + Vbs * G min

Where:

• ISbs is
- The product of the Bulk jct sat current density, JS parameter
value and the Area of source, AS parameter value if both these

1-548
SPICE NMOS

parameter values and the Area of drain, AD parameter value


are nonzero.
- The Bulk saturation current, IS parameter value, otherwise.

• Vtn=NkT/q
• q is the elementary charge on an electron, 1.6021918e-19 C.
• N is the Emission coefficient, ND parameter value.
• k is the Boltzmann constant.
• T is the diode temperature:
- If you select Device temperature for the Model temperature
dependence using parameter, T is the sum of the Circuit
temperature value plus the Offset local circuit temperature,
TOFFSET parameter value. The Circuit temperature value
comes from the SPICE Environment Parameters block, if one
exists in the circuit. Otherwise, it comes from the default value
for this block.
- If you select Fixed temperature for the Model temperature
dependence using parameter, T is the Fixed circuit
temperature, TFIXED parameter value.
• GMIN is the diode minimum conductance. By default, GMIN
matches the Minimum conductance GMIN parameter of the
SPICE Environment Parameters block, whose default value is 1e-12.
To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

Bulk-Drain Diode Model


The block provides the following relationship between the bulk-drain
current Ibd and the bulk-drain voltage Vbd after adjusting the applicable
model parameters for temperature.

1-549
SPICE NMOS

Applicable Range Corresponding Igs Equation


of Vbs Values

Vbd > 80 * Vtn ⎛⎛V ⎞ ⎞


I bd = ISbd * ⎜ ⎜ bd − 79 ⎟ e80 − 1⎟ + Vbd * G min
⎜ V ⎟
⎝ ⎝ tn ⎠ ⎠

80Vtn ≥ Vbd ( )
I bd = ISbd * eVbd / Vtn − 1 + Vbd * G min

Where:

• ISbd is
- The product of the Bulk jct sat current density, JS parameter
value and the Area of drain, AD parameter value if both these
parameter values and the Area of source, AS parameter value
are nonzero.
- The Bulk saturation current, IS parameter value, otherwise.

Level 1 Drain Current Model


The block provides the following relationship between the drain current

Id and the drain-source voltage Vds in normal mode ( Vds ≥ 0 ) after


adjusting the applicable model parameters for temperature.

1-550
SPICE NMOS

Normal Mode

Applicable Corresponding Id Equation


Range of Vgs
and Vds Values

Id = 0
Vgs -Von ≤ 0
(1 + LAMBDA *Vds )
0 < Vgs -Von ≤ Vds I d = BETA * (Vgs − Von )
2

2
I d = BETA *
0 < Vds < Vgs -Von
⎛ V ⎞
Vds ⎜ (Vgs -Von ) - ds ⎟ (1 + LAMBDA *Vds )
⎝ 2 ⎠
Where:

• Von is:

- MTYPE * VBI + GAMMA PHI − Vbs if Vbs ≤ 0 .

⎛ Vbs ⎞
- MTYPE * VBI + GAMMA ⎜ PHI − ⎟ if 0 < Vbs ≤ 2 * PHI .
⎝ 2 PHI ⎠
- MTYPE*VBI if Vbs > 2*PHI.
• MTYPE is 1.
• BETA is KP*WIDTH/(LENGTH-2*LD)
• KP is:
- The Transconductance, KP parameter value, if this parameter
has a numerical value.

1-551
SPICE NMOS

- U 0 * 3.9 *  0 / TOX , if Transconductance, KP is NaN and you


specify values for both the Oxide thickness, TOX and Substrate
doping, NSUB parameters.
• WIDTH is the Width of channel, WIDTH parameter value.
• LENGTH is the Length of channel, LENGTH parameter value.
• LD is the Lateral diffusion, LD parameter value.
• VBI is an built-in voltage value the block uses in calculations. The
value is a function of temperature. For a detailed definition, see
“Temperature Dependence” on page 1-564.
• PHI is:
- The Surface potential, PHI parameter value, if this parameter
has a numerical value.

- 2 * kTmeas / q * log( NSUB / ni ) , if Surface potential, PHI is NaN


and you specify values for both the Oxide thickness, TOX and
Substrate doping, NSUB parameters.
• LAMBDA is the Channel modulation, LAMBDA parameter value.
• GAMMA is:
- The Bulk threshold, GAMMA parameter value, if this parameter
has a numerical value.

- TOX * 2 *11.7 *  0 * q * NSUB / ( 3.9 *  0 ) , if Bulk threshold,


GAMMA is NaN and you specify values for both the Oxide
thickness, TOX and Substrate doping, NSUB parameters.
• ε0 is the permittivity of free space, 8.854214871e-12 F/m.
• ni is the carrier concentration of intrinsic silicon, 1.45e10 cm-3.

The block provides the following relationship between the drain current

Id and the drain-source voltage Vds in inverse mode ( Vds < 0 ) after
adjusting the applicable model parameters for temperature.

1-552
SPICE NMOS

Inverse Mode

Applicable Corresponding Id Equation


Range of Vgd
and Vds Values

Id = 0
Vgd -Von ≤ 0

I d = − BETA (Vgd − Von ) (1 − LAMBDA * Vds ) 2


2
0 < Vgd -Von ≤ −Vds

I d = BETA *
0 < Vds < Vgd -Von
( )
Vds (Vgd -Von ) + Vds 2 (1 − LAMBDA *Vds )

Where:

• Von is:

- MTYPE * VBI + GAMMA PHI − Vbd if Vbd ≤ 0 .

⎛ Vbd ⎞
- MTYPE * VBI + GAMMA ⎜ PHI − ⎟ if 0 < Vbd ≤ 2 * PHI .
⎝ 2 PHI ⎠
- MTYPE*VBI if Vbd > 2*PHI.

Level 3 Drain Current Model


The block provides the following model for drain current Ids in normal

mode ( Vds ≥ 0 ) after adjusting the applicable model parameters for


temperature.

I DS = I DS 0 * ScaleVMAX * ScaleLChan * ScaleINV


Where:

• IDS0 is the Basic Drain Current Model.

1-553
SPICE NMOS

• ScaleVMAX is the Velocity Saturation Scaling.


• ScaleLChan is the Channel Length Modulation Scaling.
• ScaleINV is the Weak Inversion Scaling.

The blocks uses the same model for drain current in inverse mode
( Vds < 0 ), with the following substitutions:
• Vbs – Vds for Vbs
• Vgs – Vds for Vds
• –Vds for Vds

Basic Drain Current Model


The block provides the following relationship between the drain current
Ids and the drain-source voltage Vds:

⎛ 1 + FB ⎞
I DS 0 = BETA * Fgate * ⎜ VGSX − VTH − * VDSX ⎟ * VDSX
⎝ 2 ⎠

• The block calculates BETA as described in “Level 1 Drain Current


Model” on page 1-550.
• The block calculates FGATE using the following equation:

1
Fgate =
1 + THETA * (Vgsx − VTH )

• THETA is the Vgs dependence on mobility, THETA parameter


value.

• Vgsx = max(VGS , Von )


• If you specify a nonzero value for the Fast surface state density,
NFS parameter, the block calculates Von using the following equation:

1-554
SPICE NMOS

Von = VTH + xnVT

Otherwise, Von = VTH.


• The block calculates xn using the following equation:

⎛ F *V ⎞
⎜ GAMMA * Fs * Vbulk + n bulk ⎟
q * NFS ⎝ WIDTH ⎠
xn = 1 + +
COX 2 * Vbulk
• The block calculates Vbulk as follows:
- If VBS ≤ 0, Vbulk = PHI – VBS.
- Otherwise, the block calculates Vbulk using the following equation:

PHI
Vbulk = 2
⎛ VBS ⎞
⎜1 + ⎟
⎝ 2 * PHI ⎠
• VT=kT/q
• The block calculates VTH using the equation following equation:

8.15e−22 * ETA
VTH = VBI − * VDS
COX * ( LENGTH − 2 * LD )
3

+ GAMMA * Fs * Vbulk + Fn * Vbulk

• For information about how the block calculates VBI, see “Temperature
Dependence” on page 1-564.
• ETA is the Vds dependence threshold volt, ETA parameter value.
• COX = εox/TOX, where εox is the permittivity of the oxide and TOX is
the Oxide thickness, TOX parameter value.

1-555
SPICE NMOS

• If you specify a nonzero value for the Junction depth, XJ parameter


and a value for the Substrate doping, NSUB parameter, the block
calculates Fs using the following equations:

2 si
=
qNSUB
XD = 
XD * Vbulk
wc = .0631353 + .8013292 *
XJ
2
⎛ XD * Vbulk ⎞ LD
−.01110777 * ⎜ ⎟ +
⎜ XJ ⎟ XJ
⎝ ⎠
⎛ ⎛ XD * Vbulk ⎞
2

Fs = 1 − ⎜ wc * 1 − ⎜
LD ⎟
⎜ ⎟ −
⎜ ⎜ XJ + XD * V
⎝ bulk

⎠ XJ ⎟⎟
⎝ ⎠
where εsi is the permittivity of silicon.
Otherwise, Fs = 1.
• The block calculates FB using the following equation:

GAMMA * Fs
FB = + Fn
4 * Vbulk

• The block calculates Fn using the following equation:

DELTA *  *  si
Fn =
2 * COX * WIDTH
• DELTA is the Width effect on threshold, DELTA parameter
value.

1-556
SPICE NMOS

• VDSX is the lesser of VDS and the saturation voltage, Vdsat.


- If you specify a positive value for the Max carrier drift velocity,
VMAX parameter, the block calculates Vdsat using the following
equation:

Vgsx − VTH ( LENGTH − 2 * LD ) *VMAX


Vdsat = +
1 + FB UO * Fgate

⎛ Vgsx − VTH ⎞ ⎛ ( LENGTH − 2 * LD ) * VMAX


2

2

− ⎜ ⎟ + ⎜⎜ ⎟⎟
⎝ 1 + FB ⎠ ⎝ UO * Fgate ⎠
Otherwise, the block calculates Vdsat using the following equation:

Vgsx − VTH
Vdsat =
1 + FB

Velocity Saturation Scaling


If you specify a positive value for the Max carrier drift velocity,
VMAX parameter, the block calculates ScaleVMAX using the following
equation:

1
ScaleVMAX =
UO * Fgate
1+ * VDSX
( LENGTH − 2 * LD ) *VMAX
Otherwise, ScaleVMAX = 1.
Channel Length Modulation Scaling
The block scales the drain current to account for channel length
modulation if the block meets all of the following criteria:

• VDS > Vsat

1-557
SPICE NMOS

• The Max carrier drift velocity, VMAX parameter value is zero


or α is nonzero.

The block scales the drain current using the following equation:

1
ScaleLChan =
Δl
1−
( LENGTH − 2 * LD )
The block uses the following procedure to calculate Δl:

1 The block first calculates the intermediate value Δl0.

• If you specify a positive value for the Max carrier drift velocity,
VMAX parameter, the block computes the intermediate value gdsat
as the greater of 1e-12 and the result of the following equation:

⎛ 1 ⎞
I DS 0 * ⎜1 − ⎟ * Scalegdsat
⎜ 1 + Scaleg * VDSX ⎟
⎝ dsat ⎠
where:

UO * Fgate
Scalegdsat =
( LENGTH − 2 * LD ) *VMAX
Then, the block uses the following equation to calculate the
intermediate value Δl0:

2
⎛ KA * I DS ⎞
Δl0 = ⎜
⎜ 2 * ( LENGTH − 2 * LD ) * g ⎟⎟ + KA * (VDS − Vdsat )
⎝ dsat ⎠
KA * I DS

2 * ( LENGTH − 2 * LD ) * g dsat

1-558
SPICE NMOS

where KA is the product of the Mobility modulation, KAPPA


parameter value and α.
• Otherwise, the block uses the following equation to calculate the
intermediate value Δl0:

Δl = KA * (VDS − Vdsat )

2 The block checks for punch through and calculates Δl.

• If Δl0 is greater than (LENGTH-2*LD)/2, the block calculates Δl


using the following equation:

⎛ ( LENGTH − 2 * LD ) ⎞
Δl = ⎜1 − ⎟ * ( LENGTH − 2 * LD )
⎝ 4 * Δl0 ⎠
• Otherwise, Δl = Δl0.

Weak Inversion Scaling


If VGS is less than Von, the block calculates ScaleINV using the following
equation:

Vgs −Von

ScaleINV = e xn *VT

Otherwise, ScaleINV = 1.

Junction Charge Model


The block models the following junction charges:

• Junction Overlap Charges


• Bulk Junction Charges

Junction Overlap Charges


The block calculates the following junction overlap charges:

1-559
SPICE NMOS

• QGS=CGSO*WIDTH*Vgs
Where:
- QGS is the gate-source overlap charge.
- CGSO is the G-S overlap capacitance, CGSO parameter value.
- WIDTH is the Width of channel, WIDTH parameter value.
• QGD=CGDO*WIDTH*Vgd
Where:
- QGD is the gate-drain overlap charge.
- CGDO is the G-D overlap capacitance, CGDO parameter value.
• QGB=CGBO*(LENGTH-2*LD)*Vgb
Where:
- QGB is the gate-bulk overlap charge.
- CGBO is the G-B overlap capacitance, CGBO parameter value.
- LENGTH is the Length of channel, LENGTH parameter value.
- LD is the Lateral diffusion, LD parameter value.

Bulk Junction Charges


The block provides the following relationship between the bulk-drain
bottom junction charge Qbottom and the junction voltage Vbd after
adjusting the applicable model parameters for temperature.

1-560
SPICE NMOS

Applicable Corresponding Qbottom Equation


Range of Vbd
Values

Vbd < FC * PB ⎛ ⎛ Vbd ⎞1−MJ ⎞


CBD * PB * ⎜1 - ⎜1 - ⎟⎟
⎜ ⎝ PB ⎟⎠
Qbottom = ⎝ ⎠
1 − MJ if CBD > 0.
⎛ ⎛ V ⎞1−MJ ⎞
CJ * AD * PB * ⎜1 - ⎜1 - bd ⎟ ⎟⎟
⎜ ⎝ PB ⎠
Qbottom = ⎝ ⎠
1 − MJ otherwise.

Qbottom = CBD *
Vbd ≥ FC * PB

⎜ F 3* (Vbd - FC * PB ) +
(
MJ * Vbd2 - ( FC * PB )
2
) ⎞⎟
⎜ 2 * PB ⎟
⎜ F1 + F2 ⎟
⎜ ⎟
⎜ ⎟
⎝ ⎠
if CBD > 0.
Qbottom = CJ * AD*

⎜ F 3* (Vbd - FC * PB ) +
(
MJ * Vbd2 - ( FC * PB )
2
) ⎞⎟
⎜ 2 * PB ⎟
⎜ F1 + F2 ⎟
⎜ ⎟
⎜ ⎟
⎝ ⎠
otherwise.

1-561
SPICE NMOS

Where:

• PB is the Bulk junction potential, PB parameter value.


• FC is the Capacitance coefficient FC parameter value.
• CBD is the Zero-bias BD capacitance, CBD parameter value.
• CJ is the Bottom junction cap per area, CJ parameter value.
• AD is the Area of drain, AD parameter value.
• MJ is the Bottom grading coefficient, MJ parameter value.

• F1 =
(
PB* 1 - (1 - FC )
1− MJ
)
1 − MJ
F 2 = (1 - FC )
1+ MJ

• F 3 = 1 - FC * (1 + MJ )

The block uses the equations in the preceding table to calculate the
bulk-source bottom junction charge, with the following substitutions:

• Vbs replaces Vbd.


• AS (the Area of source, AS parameter value) replaces AD.
• CBS (the Zero-bias BS capacitance, CBS parameter value)
replaces CBD.

The block provides the following relationship between the bulk-drain


sidewall junction charge Qsidewall and the junction voltage Vbd after
adjusting the applicable model parameters for temperature.

1-562
SPICE NMOS

Applicable Corresponding Qsidewall Equation


Range of Vbd
Values

Vbd < FC * PB ⎛ ⎛ Vbd ⎞1−MGSW ⎞


CJSW * PD * PB * ⎜1 - ⎜1 - ⎟⎟
⎜ ⎝ PB ⎟⎠
Qsidewall = ⎝ ⎠
1 − MGSW
Qsidewall = CJSW * PD*
Vbd ≥ FC * PB

⎜ F 3* (Vbd - FC * PB ) +
(
MGSW * Vbd2 - ( FC * PB )
2
) ⎞⎟
⎜ 2 * PB ⎟
⎜ F1 + F2 ⎟
⎜ ⎟
⎜ ⎟
⎝ ⎠

Where:

• CJSW is the Side jct cap/area of jct perimeter, CJSW parameter


value.
• PD is the Perimeter of drain, AD parameter value.
• MGSW is the Side grading coefficient, MJSW parameter value.

• F1 =
(
PB* 1 - (1 - FC )
1− MJSW
)
1 − MJSW
F 2 = (1 - FC )
1+ MJSW

• F 3 = 1 - FC * (1 + MJSW )

1-563
SPICE NMOS

The block uses the equations in the preceding table to calculate the
bulk-source sidewall junction charge and the sidewall junction voltage,
with the following substitutions:

• Vbs replaces Vbd.


• PS (the Perimeter of source, PS parameter value) replaces PD.

Temperature Dependence
Several transistor parameters depend on temperature. There are two
ways to specify the transistor temperature:

• When you select Device temperature for the Model temperature


dependence using parameter, the transistor temperature is

T = TC + TO
where:
- TC is the Circuit temperature parameter value from the SPICE
Environment Parameters block. If this block doesn’t exist in the
circuit, TC is the default value of this parameter.
- TO is the Offset local circuit temperature, TOFFSET
parameter value.
• When you select Fixed temperature for the Model temperature
dependence using parameter, the transistor temperature is the
Fixed circuit temperature, TFIXED parameter value.

The block provides the following relationship between the


transconductance KP and the transistor temperature T:

KP
KP(T ) = 3/ 2
⎛T ⎞
⎜ T ⎟
⎝ meas ⎠
where:

1-564
SPICE NMOS

• KP is the Transconductance, KP parameter value.


• Tmeas is the Parameter extraction temperature, TMEAS
parameter value.

The block provides the following relationship between the surface


potential PHI and the transistor temperature T:

⎛ ⎛ 3
q ⎛ 1.115 EGTmeas ⎞⎞⎞
⎜ PHI + meas ⎜ log ⎛⎜ meas ⎞⎟ + ⎜
T kT T
PHI (T ) = − ⎟⎟ ⎟ ⎟
Tmeas ⎜ q ⎜ ⎝ 300.15 ⎠ k ⎜⎝ 300.15 Tmeas ⎠ ⎟⎠ ⎟⎠
⎝ ⎝
kT ⎛ EGT ⎞ ⎞
3
⎛ T ⎞ q ⎛ 1.115
− ⎜ log ⎜ ⎟ + ⎜ − ⎟⎟
q ⎝⎜ ⎝ 300.15 ⎠ k ⎝ 300.15 T ⎠ ⎟⎠
where:

• EGTmeas = 1.16eV - ( 7.02e - 4 * Tmeas 2 ) / (Tmeas + 1108 )

• EGT = 1.16eV - ( 7.02e - 4 * T 2 ) / (T + 1108 )


The block provides the following relationship between the built-in
voltage VBI and the transistor temperature T:

⎛ PHI (T ) − PHI ⎞
VBI (T ) = VTO + MTYPE * ⎜ − GAMMA PHI ⎟
⎝ 2 ⎠
EGTmeas − EGT
+
2
where:

• VTO is:
- The Threshold voltage, VTO parameter value, if this parameter
has a numerical value.

1-565
SPICE NMOS

- Φ − 3.25 + EGT meas


2 + MTYPE * PHI 2 − NSS * q * TOX / ( 3.9 *  0 )

+ MTYPE * (GAMMA * PHI + PHI ) , if Threshold voltage,


VTO is NaN and you specify values for both the Oxide thickness,
TOX and Substrate doping, NSUB parameters.
• Φ is:
- 3.2, if TPG (the Gate type?, TPG parameter value) is 0.

- 3.25 + EGT meas


2 − MTYPE * TPG * EGTmeas 2 , otherwise.
• GAMMA is:
- The Bulk threshold, GAMMA parameter value, if this parameter
has a numerical value.

- TOX * 2 *11.7 *  0 * q * NSUB / ( 3.9 *  0 ) , if Bulk threshold,


GAMMA is NaN and you specify values for both the Oxide
thickness, TOX and Substrate doping, NSUB parameters.

The block provides the following relationship between the bulk


saturation current IS and the transistor temperature T:

− qEGT qEGTmeas
+
IS (T ) = IS * e ND*kT ND*kTmeas

where:

• ND is the Emission coefficient, ND parameter value.


• IS is the Bulk saturation current, IS parameter value.

The block provides the following relationship between the bulk junction
saturation current density JS and the transistor temperature T:

− qEGT qEGTmeas
+
JS (T ) = JS * e ND*kT ND*kTmeas

1-566
SPICE NMOS

where:

• JS is the Bulk jct sat current density, JS parameter value.

The block provides the following relationship between the bulk junction
potential PB and the transistor temperature T:

kTmeas ⎛ ⎞⎞
3
⎛ T ⎞ q ⎛ 1.115 EGTmeas
PB + ⎜ log ⎜ meas ⎟ + ⎜ − ⎟⎟ ⎟
q ⎜ ⎜
⎝ ⎝ 300.15 ⎠ k ⎝ 300.15 T ⎠ ⎟⎠
PB(T ) =
Tmeas
T
kT ⎛ EGT ⎞ ⎞
3
⎛ T ⎞ q ⎛ 1.115
− ⎜ log ⎜ ⎟ + ⎜ − ⎟⎟
q ⎜⎝ ⎝ 300.15 ⎠ k ⎝ 300.15 T ⎠ ⎟⎠

where:

• PB is the Bulk junction potential, PB parameter value.

The block provides the following relationship between the bulk-drain


junction capacitance CBD and the transistor temperature T:

CBD(T ) = CBD
(
pbo + MJ * 4 * 104 * ( T − 300.15 ) * pbo − ( PB(T ) − pbo ) )
pbo + MJ * ( 4 * 10 * ( Tmeas − 300.15 ) * pbo − ( PB − pbo ) )
4

where:

• CBD is the Zero-bias BD capacitance, CBD parameter value.


• MJ is the Bottom grading coefficient, MJ parameter value.

kTmeas ⎛ ⎞⎞
3
⎛ T ⎞ q ⎛ 1.115 EGTmeas
PB + ⎜ log ⎜ meas ⎟ + ⎜ − ⎟⎟ ⎟
q ⎜ ⎜
⎝ ⎝ 300.15 ⎠ k ⎝ 300.15 T ⎠ ⎟⎠
• pbo =
Tmeas
300.15

1-567
SPICE NMOS

The block uses the CBD(T) equation to calculate:

• The bulk-source junction capacitance by substituting CBS (the


Zero-bias BS capacitance, CBS parameter value) for CBD.
• The bottom junction capacitance by substituting CJ (the Bottom
junction cap per area, CJ parameter value) for CBD.

The block provides the following relationship between the sidewall


junction capacitance CJSW and the transistor temperature T:

CJSW (T ) = CJSW
(
pbo + MJSW * 4 * 104 * ( T − 300.15 ) * pbo − ( PB(T ) − pbo ) )
pbo + MJSW * ( 4 * 10 * ( Tmeas − 300.15 ) * pbo − ( PB − pbo ) )
4

where:

• MJSW is the Side grading coefficient, MJSW parameter value.

Basic The model is based on the following assumptions:


Assumptions
and • The NMOS block does not support noise analysis.
Limitations • The NMOS block applies initial conditions across junction capacitors
and not across the block ports.

1-568
SPICE NMOS

Dialog Model Selection Tab


Box and
Parameters

MOS model
Select one of the following MOSFET model options:
• Level 1 MOS — Use the “Level 1 Drain Current Model” on page
1-550. This is the default option.
• Level 3 MOS — Use the “Level 3 Drain Current Model” on
page 1-553.

1-569
SPICE NMOS

Dimensions Tab

Device area factor, AREA


The transistor area. This value multiplies the following parameter
values:
• Transconductance, KP
• Bulk saturation current, IS
• Bulk jct sat current density, JS
• Zero-bias BD capacitance, CBD

1-570
SPICE NMOS

• Zero-bias BS capacitance, CBS


• G-S overlap capacitance, CGSO
• G-D overlap capacitance, CGDO
• G-B overlap capacitance, CGBO
• Bottom junction cap per area CJ
• Side jct cap/area of jct perimeter CJSW

It divides the following parameter values:


• Drain resistance, RD
• Source resistance, RS
• Sheet resistance, RSH

The default value is 1. The value must be greater than 0.


Number of parallel devices, SCALE
The number of parallel MOS instances for this device. This
parameter multiplies the output current and device charge. The
default value is 1. The value must be greater than 0.
Length of channel, LENGTH
Length of the channel between the source and drain. The default
value is 1e-04 m.
Width of channel, WIDTH
Width of the channel between the source and drain. The default
value is 1e-04 m.
Area of drain, AD
Area of the transistor drain diffusion. The default value is 0 m2.
The value must be greater than or equal to 0.
Area of source, AS
Area of the transistor source diffusion. The default value is 0 m2.
The value must be greater than or equal to 0.

1-571
SPICE NMOS

Perimeter of drain, PD
Perimeter of the transistor drain diffusion. The default value
is 0 m.
Perimeter of source, PS
Perimeter of the transistor source diffusion. The default value
is 0 m.

Resistors Tab

1-572
SPICE NMOS

Drain resistance, RD
The transistor drain ohmic resistance. The default value is
0.01 Ω. If you set this parameter to NaN Ω, this value means
the parameter is unspecified, so the block calculates the drain
resistance as described in “Resistance Calculations” on page
1-547. The value must be equal to 0 or greater than or equal to
Rmin. Rmin is a built-in model constant whose value is 1e-12.
Source resistance, RS
The transistor source ohmic resistance. The default value is
1e-4 Ω. If you set this parameter to NaN Ω, this value means
the parameter is unspecified, so the block calculates the drain
resistance as described in “Resistance Calculations” on page
1-547. The value must be equal to 0 or greater than or equal to
Rmin. Rmin is a built-in model constant whose value is 1e-12.
Sheet resistance, RSH
Resistance per square of the transistor source and drain. The
default value is NaN Ω. This value means the parameter is
unspecified. The block only uses this parameter value if you do
not specify one or both of the Drain resistance, RD and Source
resistance, RS parameter values, as described in “Resistance
Calculations” on page 1-547. The value must be greater than or
equal to 0.
Number of drain squares, NRD
Number of squares of resistance that make up the transistor
drain diffusion. The default value is 1 . The value must be greater
than or equal to 0. The block only uses this parameter value
if you do not specify one or both of the Drain resistance, RD
and Source resistance, RS parameter values, as described in
“Resistance Calculations” on page 1-547.
Number of source squares, NRS
Number of squares of resistance that make up the transistor
source diffusion. The default value is 1 . The value must be
greater than or equal to 0. The block only uses this parameter
value if you do not specify one or both of the Drain resistance,

1-573
SPICE NMOS

RD and Source resistance, RS parameter values, as described


in “Resistance Calculations” on page 1-547.

DC Currents Tab

Threshold voltage, VTO


The gate-source voltage above which the transistor produces a
nonzero drain current. The default value is 0 V. If you assign this
parameter a value of NaN, the block calculates the value from the
specified values of the Oxide thickness, TOX and Substrate

1-574
SPICE NMOS

doping, NSUB parameters. For more information about this


calculation, see “Temperature Dependence” on page 1-564.
Transconductance, KP
The derivative of drain current with respect to gate voltage. The
default value is 2e-05 A/V2. The value must be greater than
or equal to 0. If you assign this parameter a value of NaN, the
block calculates the value from the specified values of the Oxide
thickness, TOX and Substrate doping, NSUB parameters.
For more information about this calculation, see “Level 1 Drain
Current Model” on page 1-550 or “Level 3 Drain Current Model”
on page 1-553 as appropriate for the selected value of the MOS
model parameter.
Bulk threshold, GAMMA
Body effect parameter, which relates the threshold voltage, VTH,
to the body bias, VBS, as described in “Level 1 Drain Current
Model” on page 1-550 and “Level 3 Drain Current Model” on page
1-553. The default value is 0 V . The value must be greater
than or equal to 0. If you assign this parameter a value of NaN, the
block calculates the value from the specified values of the Oxide
thickness, TOX and Substrate doping, NSUB parameters.
For more information about this calculation, see “Level 1 Drain
Current Model” on page 1-550 or “Level 3 Drain Current Model”
on page 1-553 as appropriate for the selected value of the MOS
model parameter.
Surface potential, PHI
Twice the voltage at which the surface electron concentration
becomes equal to the intrinsic concentration and the device
transitions between depletion and inversion conditions. The
default value is 0.6 V. The value must be greater than or equal to
0. If you assign this parameter a value of NaN, the block calculates
the value from the specified values of the Oxide thickness,
TOX and Substrate doping, NSUB parameters. For more
information about this calculation, see “Level 1 Drain Current
Model” on page 1-550 or “Level 3 Drain Current Model” on page

1-575
SPICE NMOS

1-553 as appropriate for the selected value of the MOS model


parameter.
Channel modulation, LAMBDA
The channel-length modulation. This parameter is only visible
when you select Level 1 MOS for the MOS model parameter.
The default value is 0 1/V.
Bulk saturation current, IS
The magnitude of the current that the junction approaches
asymptotically for very large reverse bias levels. The default
value is 1e-14 A. The value must be greater than or equal to 0.
Bulk jct sat current density, JS
The magnitude of the current per unit area that the junction
approaches asymptotically for very large reverse bias levels. The
default value is 0 A/m2. The value must be greater than or equal
to 0.
Emission coefficient, ND
The transistor emission coefficient or ideality factor. The default
value is 1. The value must be greater than 0.
Width effect on threshold, DELTA
The factor that controls the effect of transistor width on threshold
voltage. This parameter is only visible when you select Level 3
MOS for the MOS model parameter. The default value is 0.
Max carrier drift velocity, VMAX
The maximum drift velocity of the carriers. This parameter is
only visible when you select Level 3 MOS for the MOS model
parameter. The default value is 0 m/s.
Fast surface state density, NFS
The fast surface state density adjusts the drain current for the
mobility reduction caused by the gate voltage. This parameter is
only visible when you select Level 3 MOS for the MOS model
parameter. The default value is 0 1/cm2.

1-576
SPICE NMOS

Vds dependence threshold volt, ETA


The coefficient that controls how the threshold voltage depends
on the drain-source voltage in the drain current calculation. This
parameter is only visible when you select Level 3 MOS for the
MOS model parameter. The default value is 0.
Vgs dependence on mobility, THETA
The coefficient that controls how the mobility affects the gate
voltage in the drain current calculation. This parameter is
only visible when you select Level 3 MOS for the MOS model
parameter. The default value is 0 1/V.
Mobility modulation, KAPPA
The coefficient that controls how the mobility affects the channel
length in the drain current calculation. This parameter is
only visible when you select Level 3 MOS for the MOS model
parameter. The default value is 0.2.

1-577
SPICE NMOS

C-V Tab

Model junction capacitance


Select one of the following options for modeling the junction
capacitance:
• No — Do not include junction capacitance in the model. This is
the default option.
• Yes — Specify zero-bias junction capacitance, junction
potential, grading coefficient, forward-bias depletion and
capacitance coefficient.

1-578
SPICE NMOS

G-S overlap capacitance, CGSO


Gate-source capacitance due to the diffusion that occurs when
the device operates in depletion mode. This parameter is only
visible when you select Yes for the Model junction capacitance
parameter. The default value is 0 F/m. The value must be equal
to 0 or greater than or equal to Cmin. Cmin is a built-in model
constant whose value is 1e-18.
G-D overlap capacitance, CGDO
Gate-drain capacitance due to the diffusion that occurs when
the device operates in depletion mode. This parameter is only
visible when you select Yes for the Model junction capacitance
parameter. The default value is 0 F/m. The value must be equal
to 0 or greater than or equal to Cmin. Cmin is a built-in model
constant whose value is 1e-18.
G-B overlap capacitance, CGBO
Gate-base capacitance due to the diffusion that occurs when
the device operates in depletion mode. This parameter is only
visible when you select Yes for the Model junction capacitance
parameter. The default value is 0 F/m. The value must be equal
to 0 or greater than or equal to Cmin. Cmin is a built-in model
constant whose value is 1e-18.
Zero-bias BD capacitance, CBD
The value of the capacitance placed between the base and the
drain. This parameter is only visible when you select Yes for the
Model junction capacitance parameter. The default value is 0
F. The value must be equal to 0 or greater than or equal to Cmin.
Cmin is a built-in model constant whose value is 1e-18.
Zero-bias BS capacitance, CBS
The value of the capacitance placed between the base and the
source. This parameter is only visible when you select Yes for the
Model junction capacitance parameter. The default value is 0
F. The value must be equal to 0 or greater than or equal to Cmin.
Cmin is a built-in model constant whose value is 1e-18.

1-579
SPICE NMOS

Bottom junction cap per area CJ


Zero-bias bulk junction bottom capacitance per junction area.
This parameter is only visible when you select Yes for the Model
junction capacitance parameter. The default value is 0 F/m2.
The value must be equal to 0 or greater than or equal to Cmin.
Cmin is a built-in model constant whose value is 1e-18.
Bottom grading coefficient, MJ
The transistor bottom grading coefficient. This parameter is only
visible when you select Yes for the Model junction capacitance
parameter. The default value is 0.5. The value must be equal to
0 or less than MGmax. MGmax is a built-in model constant whose
value is 0.9.
Side jct cap/area of jct perimeter CJSW
Zero-bias bulk junction sidewall capacitance per junction
perimeter. This parameter is only visible when you select Yes for
the Model junction capacitance parameter. The default value
is 0 F/m. The value must be equal to 0 or greater than or equal to
Cmin. Cmin is a built-in model constant whose value is 1e-18.
Side grading coefficient, MJSW
The transistor sidewall grading coefficient. This parameter is only
visible when you select Yes for the Model junction capacitance
parameter. The default value is 0.5. The value must be equal to
0 or less than MGmax. MGmax is a built-in model constant whose
value is 0.9.
Bulk junction potential, PB
The potential across the bulk junction. This parameter is only
visible when you select Yes for the Model junction capacitance
parameter. The default value is 0.8 V. The value must be equal
to 0 or greater than or equal to VJmin. VJmin is a built-in model
constant whose value is 0.01.
Capacitance coefficient FC
The fitting coefficient that quantifies the decrease of the depletion
capacitance with applied voltage. This parameter is only visible
when you select Yes for the Model junction capacitance

1-580
SPICE NMOS

parameter. The default value is 0.5. The value must be equal to 0


or less than or equal to FCmax. FCmax is a built-in model constant
whose value is 0.95.
Specify initial condition
Select one of the following options for specifying an initial
condition:
• No — Do not specify an initial condition for the model. This is
the default option.
• Yes — Specify the initial diode voltage.

Note The NMOS block applies the initial diode voltage across
the junction capacitors and not across the ports.

Initial condition voltage ICVDS


Drain-source voltage at the start of the simulation. This
parameter is only visible when you select Yes for the Model
junction capacitance and Yes for the Specify initial
condition parameter. The default value is 0 V.
Initial condition voltage ICVGS
Gate-source voltage at the start of the simulation. This parameter
is only visible when you select Yes for the Model junction
capacitance and Yes for the Specify initial condition
parameter. The default value is 0 V.
Initial condition voltage ICVBS
Bulk-source voltage at the start of the simulation. This parameter
is only visible when you select Yes for the Model junction
capacitance and Yes for the Specify initial condition
parameter. The default value is 0 V.

1-581
SPICE NMOS

Process Tab

Oxide thickness, TOX


Thickness of the gate oxide. The default value is NaN m. The value
must be greater than or equal to 0.

Note When you select Level 3 MOS for the MOS model
parameter, the block uses a value of 1e-7 rather than NaN by
default.

1-582
SPICE NMOS

Lateral diffusion, LD
Length of lateral diffusion. The default value is 0 m.
Substrate doping, NSUB
Substrate doping. The default value is NaN 1/cm3. The value must
be greater than or equal to 1.45e10 (the carrier concentration
of intrinsic silicon).
Surface state density, NSS
Substrate doping. The default value is 0 1/cm2.
Surface mobility, U0
Zero-bias surface mobility coefficient. The default value is 600
cm2/V/s.
Junction depth, XJ
Junction depth. This parameter is only visible when you select
Level 3 MOS for the MOS model parameter. The default value
is 0 m.
Gate type?,TPG
Select one of the following MOSFET gate materials (as compared
to the substrate):
• Opposite of substrate — The gate material is the opposite
of the substrate. This means that TPG = 1 in the device
equations. This is the default option.
• Same as substrate — The gate material is the same as the
substrate. This means that TPG = –1 in the device equations.
• Aluminum — The gate material is aluminum. This means that
TPG = 0 in the device equations.

1-583
SPICE NMOS

Temperature Tab

Model temperature dependence using


Select one of the following options for modeling the diode
temperature dependence:
• Device temperature — Use the device temperature, which is
the Circuit temperature value plus the Offset local circuit
temperature, TOFFSET value. The Circuit temperature
value comes from the SPICE Environment Parameters block, if

1-584
SPICE NMOS

one exists in the circuit. Otherwise, it comes from the default


value for this block.
• Fixed temperature — Use a temperature that is independent
of the circuit temperature to model temperature dependence.
Offset local circuit temperature, TOFFSET
The amount by which the transistor temperature differs from
the circuit temperature. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 0 K.
Fixed circuit temperature, TFIXED
The temperature at which to simulate the transistor. This
parameter is only visible when you select Fixed temperature for
the Model temperature dependence using parameter. The
default value is 300.15 K. The value must be greater than 0.
Parameter extraction temperature, TMEAS
The temperature at which the transistor parameters were
measured. The default value is 300.15 K. The value must be
greater than 0.

Ports The block has the following ports:

G
Electrical conserving port associated with the transistor gate
terminal.
D
Electrical conserving port associated with the transistor drain
terminal.
S
Electrical conserving port associated with the transistor source
terminal.
B
Electrical conserving port associated with the transistor bulk
terminal.

1-585
SPICE NMOS

References [1] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993. Chapter 3.

See Also SPICE PMOS

1-586
SPICE NPN

Purpose Model Gummel-Poon NPN Transistor

Library SPICE-Compatible Components/Semiconductor Devices

Description The NPN block represents a SPICE-compatible four-terminal


Gummel-Poon NPN transistor. The substrate port is connected to the
transistor body using a capacitor, so these devices are equivalent to
a three-terminal transistor when you connect the substrate port to
any other port and use the default value of zero for the C-S junction
capacitance, CJS parameter.
The NPN block model includes the following components:

• “Current-Voltage and Base Charge Model” on page 1-587


• “Base Resistance Model” on page 1-591
• “Transit Charge Modulation Model” on page 1-591
• “Junction Charge Model” on page 1-592
• “Temperature Dependence” on page 1-594

Current-Voltage and Base Charge Model


The current-voltage relationships and base charge relationships for the
transistor are calculated adjusting the applicable model parameters for
temperature as described in the following sections:

• Base-Emitter and Base-Collector Junction Currents on page 587


• Terminal Currents on page 590
• Base Charge Model on page 590

Base-Emitter and Base-Collector Junction Currents


The base-emitter junction current is calculated using the following
equations:

• When VBE > 80 * VTF :

1-587
SPICE NPN

⎛⎛V ⎞ ⎞
I bef = IS * ⎜ ⎜ BE - 79 ⎟ * e80 - 1⎟ + Gmin * VBE
⎜ V ⎟
⎝ ⎝ TF ⎠ ⎠
⎛ e( 80*VTF /VTE ) ⎞
I bee = ISE * ⎜ (VBE - 80 * VTF + VTE ) * - 1⎟
⎝ V TE ⎠

• When VBE ≤ 80 * VTF

( )
I bef = IS * e(VBE /VTF ) - 1 + Gmin * VBE

(
I bee = ISE * e(VBE /VTE ) - 1 )
The base-collector junction current is calculated using the following
equations:

• When VBC > 80 * VTR :

⎛⎛V ⎞ ⎞
I bcr = IS * ⎜ ⎜ BC - 79 ⎟ * e80 - 1⎟ + Gmin * VBC
⎜ V ⎟
⎝ ⎝ TR ⎠ ⎠
⎛ e( 80*VTR /VTC ) ⎞
I bcc = ISC * ⎜ (VBC - 80 * VTR + VTC ) * - 1⎟
⎝ VTC ⎠

• When VBC ≤ 80 * VTR

( )
I bcr = IS * e(VBC /VTR ) - 1 + Gmin * VBC

(
I bcc = ISC * e(VBC /VTC ) - 1 )
In the preceding equations:

1-588
SPICE NPN

• VBE is the base-emitter voltage and VBC is the base-collector voltage.

VTE = NE * k * T / q, VTC = NC * k * T / q, VTF = NF * k * T / q, and



VTR = NR * k * T / q.
• ISC and ISE are the B-C leakage current, ISC and B-E leakage
current, ISE parameter values, respectively.
• NE, NC, NF, and NR are the B-E emission coefficient, NE,
B-C emission coefficient, NC, Forward emission coefficient,
NF and Reverse emission coefficient, NR parameter values,
respectively.
• q is the elementary charge on an electron.
• k is the Boltzmann constant.
• T is the transistor temperature:
- If you select Device temperature for the Model temperature
dependence using parameter, T is the sum of the Circuit
temperature value plus the Offset local circuit temperature,
TOFFSET parameter value. The Circuit temperature value
comes from the SPICE Environment Parameters block, if one
exists in the circuit. Otherwise, it comes from the default value
for this block.
- If you select Fixed temperature for the Model temperature
dependence using parameter, T is the Fixed circuit
temperature, TFIXED parameter value.
• Gmin is the minimum conductance. By default, Gmin matches
the Minimum conductance GMIN parameter of the SPICE
Environment Parameters block, whose default value is 1e-12. To
change Gmin, add a SPICE Environment Parameters block to your
model and set the Minimum conductance GMIN parameter to
the desired value.

1-589
SPICE NPN

Terminal Currents
The terminal currents, IB and IC are the base and collector currents,
defined as positive into the device. They are calculated as:

⎛ I ebf I ⎞
IB = − ⎜ + I ebe + cbr + I cbc ⎟
⎝ BF BR ⎠
⎛ I ebf - I cbr I cbr ⎞
IC = − ⎜ - - I cbc ⎟
⎝ qb BR ⎠
where BF and BR are the Forward beta, BF and Reverse beta, BR
parameter values, respectively.
Base Charge Model
The base charge, qb, is calculated using the following equations:

qb =
q1 ⎛
2⎝
⎜1 + 0.5 * ( ) ⎞
(1 + 4 * q2 - eps ) 2 + eps 2 + 1 + 4 * q2 - eps + eps ⎟

−1
⎛ V V ⎞
q1 = ⎜1 − BC − BE ⎟
⎝ VAF VAR ⎠

I bef I bcr
q2 = +
IKF IKR
where

• VAF and VAR are the Forward Early voltage, VAF and Reverse
Early voltage, VAR parameters, respectively.
• IKF and IKR are the Forward knee current, IKF and Reverse
knee current, IKR parameter values, respectively.
• eps is 1e-4.

1-590
SPICE NPN

Base Resistance Model


The block models base resistance in one of two ways:

• If you use the default value of infinity for the Half base resistance
cur, IRB parameter, the NPN block calculates the base resistance
rbb as

RB - RBM
rbb = RBM +
qb
where:
- RBM is the Minimum base resistance, RBM parameter value.
- RB is the Zero-bias base resistance, RB parameter value.
• If you specify a finite value for the Half base resistance cur, IRB
parameter, the NPN block calculates the base resistance rbb as

⎛ tan z - z ⎞
rbb = RBM + 3 * ( RB - RBM ) * ⎜ 2 ⎟
⎝ z * tan z ⎠
where

1 + 144 I B / ( 2 IRB ) − 1
z=
( 24 /  ) ( I
2
B / IRB )

Transit Charge Modulation Model


If you specify nonzero values for the Coefficient of TF, XTF
parameter, the block models transit charge modulation by scaling the
Forward transit time, TF parameter value as follows:

1-591
SPICE NPN

⎡ VBC / (1.44VTF ) ⎛ I BE ⎞ ⎤
2

TF * ⎢1 + XTF * e ⎜ ⎟ ⎥
⎢⎣ ⎝ I BE + ITF ⎠ ⎥⎦
TFmod =
qb
where ITF is the Coefficient of TF, ITF parameter value.

Junction Charge Model


The block lets you model junction charge. The base-collector charge
Qbc and the base-emitter charge Qbe depend on an intermediate value,
Qdep as follows, after adjusting the applicable model parameters for
temperature:

• For the internal base-emitter junctions:

Qbe = TFmod * I be + Qdep

• For the internal base-collector junctions:

Qbc = TR * I bc + XCJC * Qdep

• For the external base-collector junctions:

Qbext c = (1 − XCJC ) * Qdep

Qdep depends on the junction voltage, Vjct (VBE for the base-emitter
junction and VBC for the base-collector junction) as follows.

1-592
SPICE NPN

Applicable Corresponding Qdep Equation


Range of Vjct
Values

1 - (1 -V jct /VJ )
(1− MJ )
V jct < FC * VJ
Qdep = C jct * VJ *
1 − MJ

V jct ≥ FC * VJ ⎡ MJ * ⎡V jct 2 - ( FC * VJ ) ⎤ ⎤
2

⎢ F 3* (V jct - FC * VJ ) + ⎣ ⎦⎥
⎢ 2 * VJ ⎥
Qdep = C jct * ⎢ F1 + ⎥
F2
⎢ ⎥
⎢⎣ ⎥⎦

Where:

• FC is the Capacitance coefficient FC parameter value.


• VJ is:
- The B-E built-in potential, VJE parameter value for the
base-emitter junction.
- The B-C built-in potential, VJC parameter value for the
base-collector junction.
• MJ is:
- The B-E exponential factor, MJE parameter value for the
base-emitter junction.
- The B-C exponential factor, MJC parameter value for the
base-collector junction.
• Cjct is:
- The B-E depletion capacitance, CJE parameter value for the
base-emitter junction.

1-593
SPICE NPN

- The B-C depletion capacitance, CJC parameter value for the


base-collector junction.

• (
F1 = VJ * 1 - (1 - FC )
(1− MJ )
) (1 − MJ )
F 2 = (1 - FC )
(1+ MJ )

• F 3 = 1 - FC * (1 + MJ )
The collector-substrate charge Qcs depends on the collector-substrate
voltage Vcs as follows, after adjusting the applicable model parameters
for temperature.

Applicable Corresponding Qcs Equation


Range of Vcs
Values

Vcs < 0 ⎛ 1 - (1 -Vcs /VJS )(1−MJS ) ⎞


Qcs = CJS * VJS * ⎜ ⎟
⎜ 1 − MJS ⎟
⎝ ⎠

Vcs ≥ 0 Qcs = CJS * (1 + MJS * Vcs /(2 * VJS ) ) * Vcs


where:

• CJS is the C-S junction capacitance, CJS parameter value.


• VJS is the Substrate built-in potential, VJS parameter value.
• MJS is the Substrate exponential factor, MJS parameter value.

Temperature Dependence
Several transistor parameters depend on temperature. There are two
ways to specify the transistor temperature:

1-594
SPICE NPN

• When you select Device temperature for the Model temperature


dependence using parameter, the transistor temperature is

T = TC + TO
where:
- TC is the Circuit temperature parameter value from the SPICE
Environment Parameters block. If this block doesn’t exist in the
circuit, TC is the default value of this parameter.
- TO is the Offset local circuit temperature, TOFFSET
parameter value.
• When you select Fixed temperature for the Model temperature
dependence using parameter, the transistor temperature is the
Fixed circuit temperature, TFIXED parameter value.

The block provides the following relationship between the saturation


current IS and the transistor temperature T:

⎛ T ⎞ EG
⎜⎜ −1⎟⎟*
IS (T ) = IS * (T Tmeas )
XTI ⎝ Tmeas ⎠ Vt
*e
where:

• IS is the Transport saturation current, IS parameter value.


• Tmeas is the Parameter extraction temperature, TMEAS
parameter value.
• XTI is the Temperature exponent for IS, XTI parameter value.
• EG is the Energy gap, EG parameter value.
• Vt = kT/q.

The block provides the following relationship between the base-emitter


junction potential VJE and the transistor temperature T:

1-595
SPICE NPN

⎛ T ⎞ 3* k * T ⎛ T ⎞ ⎛ T ⎞
VJE (T ) = VJE * ⎜ ⎟- * log ⎜ ⎟-⎜ ⎟ * EGTmeas + EGT
⎝ Tmeas ⎠ q ⎝ Tmeas ⎠ ⎝ Tmeas ⎠
where:

• VJE is the B-E built-in potential, VJE parameter value.

• EGTmeas = 1.16eV - ( 7.02e - 4 * Tmeas 2 ) / (Tmeas + 1108 )

• EGT = 1.16eV - ( 7.02e - 4 * T 2 ) / (T + 1108 )


The block uses the VJE(T) equation to calculate the base-collector
junction potential by substituting VJC (the B-C built-in potential,
VJC parameter value) for VJE.
The block provides the following relationship between the base-emitter
junction capacitance CJE and the transistor temperature T:

⎡ ⎛ VJE (T ) -VJE ⎞ ⎤
CJE (T ) = CJE * ⎢1 + MJE * ⎜ 400e − 6 * (T - Tmeas ) - ⎟⎥
⎣ ⎝ VJE ⎠⎦
where:

• CJE is the B-E depletion capacitance, CJE parameter value.


• MJE is the B-E exponential factor, MJE parameter value.

The block uses the CJE(T) equation to calculate the base-collector


junction capacitance by substituting CJC (the B-C depletion
capacitance, CJC parameter value) for CJE and MJC (the B-C
exponential factor, MJC parameter value) for MJE.
The block provides the following relationship between the forward and
reverse beta and the transistor temperature T:

1-596
SPICE NPN

XTB
⎛ T ⎞
 (T ) =  * ⎜ ⎟
⎝ Tmeas ⎠
where:

• β is the Forward beta, BF or Reverse beta, BR parameter value.


• XTB is the Beta temperature exponent, XTB parameter value.

The block provides the following relationship between the base-emitter


leakage current ISE and the transistor temperature T:

-XTB
⎛ T ⎞
1 / NE
⎛ IS(T) ⎞
ISE (T ) = ISE * ⎜ ⎟ *⎜ ⎟
⎝ Tmeas ⎠ ⎝ IS ⎠
where:

• ISE is the B-E leakage current, ISE parameter value.


• NE is the B-E emission coefficient, NE parameter value.

The block uses this equation to calculate the base-collector leakage


current by substituting ISC (the B-C leakage current, ISC parameter
value) for ISE and NC (the B-C emission coefficient, NC parameter
value) for NE.

Basic The model is based on the following assumptions:


Assumptions
and • The NPN block does not support noise analysis.
Limitations • The NPN block applies initial conditions across junction capacitors
and not across the block ports.

1-597
SPICE NPN

Dialog Main Tab


Box and
Parameters

Device area, AREA


The transistor area. This value multiplies the following parameter
values:
• Transport saturation current, IS
• Forward knee current, IKF
• B-E leakage current, ISE
• Reverse knee current, IKR
• B-C leakage current, ISC

1-598
SPICE NPN

• Half base resistance cur, IRB


• B-E depletion capacitance, CJE
• Coefficient of TF, ITF
• B-C depletion capacitance, CJC
• C-S junction capacitance, CJS

It divides the following parameter values:


• Zero-bias base resistance, RB
• Minimum base resistance, RBM
• Emitter resistance, RE
• Collector resistance, RC

The default value is 1 m2. The value must be greater than 0.


Number of parallel devices, SCALE
The number of parallel transistors the block represents. This
value multiplies the output current and device charges. The
default value is 1. The value must be greater than 0.

1-599
SPICE NPN

Forward Gain Tab

Transport saturation current, IS


The magnitude of the current at which the transistor saturates.
The default value is 1e-16 A/m2. The value must be greater than
or equal to 0.
Forward beta, BF
The ideal maximum reverse beta. The default value is 100. The
value must be greater than 0.

1-600
SPICE NPN

Forward emission coefficient, NF


The reverse emission coefficient or ideality factor. The default
value is 1. The value must be greater than 0.
B-E leakage current, ISE
The base-emitter leakage current. The default value is 0 A/m2.
The value must be greater than or equal to 0.
B-E emission coefficient, NE
The base-collector emission coefficient or ideality factor. The
default value is 1.5. The value must be greater than 0.
Forward knee current, IKF
The current value at which forward-beta high-current roll-off
occurs. The default value is Inf A/m2. The value must be greater
than or equal to 0.
Forward Early voltage, VAF
The forward Early voltage. The default value is Inf V. The value
must be greater than or equal to 0.

1-601
SPICE NPN

Reverse Gain Tab

Reverse beta, BR
The ideal maximum reverse beta. The default value is 1. The
value must be greater than 0.
Reverse emission coefficient, NR
The reverse emission coefficient or ideality factor. The default
value is 1. The value must be greater than 0.
B-C leakage current, ISC
The base-collector leakage current. The default value is 0 A/m2.
The value must be greater than or equal to 0.

1-602
SPICE NPN

B-C emission coefficient, NC


The base-collector emission coefficient or ideality factor. The
default value is 2. The value must be greater than 0.
Reverse knee current, IKR
The current value at which reverse-beta high-current roll-off
occurs. The default value is Inf A/m2. The value must be greater
than or equal to 0.
Reverse Early voltage, VAR
The reverse Early voltage. The default value is Inf V. The value
must be greater than or equal to 0.
Resistors Tab

1-603
SPICE NPN

Emitter resistance, RE
The resistance of the emitter. The default value is 1e-4 m2*Ω.
The value must be greater than or equal to 0.
Collector resistance, RC
The resistance of the collector. The default value is 0.01 m2*Ω.
The value must be greater than or equal to 0.
Zero-bias base resistance, RB
The resistance of the base. The default value is 1 m2*Ω. The value
must be greater than or equal to 0.
Minimum base resistance, RBM
The minimum resistance of the base. The default value is 0 m2*Ω.
The value must be less than or equal to the Zero-bias base
resistance, RB parameter value.
Half base resistance cur, IRB
The base current at which the base resistance has dropped to
half of its zero-bias value. The default value is Inf A/m2. The
value must be greater than or equal to 0. Use the default value
of Inf if you do not want to model the change in base resistance
as a function of base current.

1-604
SPICE NPN

Capacitance Tab

Model junction capacitance


Select one of the following options for modeling the junction
capacitance:
• No — Do not include junction capacitance in the model. This is
the default option.
• B-E Capacitance — Model the junction capacitance across the
base-emitter junction.

1-605
SPICE NPN

• B-C Capacitance — Model the junction capacitance across the


base-collector junction.
• C-S Capacitance — Model the junction capacitance across the
collector-substrate junction.

Note To include junction capacitance in the model:


1 Select B-E Capacitance and specify the base-emitter junction
capacitance parameters.
2 Select B-C Capacitance and specify the base-collector junction
capacitance parameters.
3 Select C-S Capacitance and specify the collector-substrate
junction capacitance parameters.

You can specify or change any of the common parameters when


you select any of the preceding options for the Model junction
capacitance parameter.

B-E depletion capacitance, CJE


The depletion capacitance across the base-emitter junction. This
parameter is only visible when you select B-E Capacitance for
the Model junction capacitance parameter. The default value
is 0 F/m2. The value must be greater than or equal to 0.
B-E built-in potential, VJE
The base-emitter junction potential. This parameter is only
visible when you select B-E Capacitance for the Model junction
capacitance parameter. The default value is 0.75 V. The value
must be greater than or equal to 0.01 V.
B-E exponential factor, MJE
The grading coefficient for the base-emitter junction. This
parameter is only visible when you select B-E Capacitance for
the Model junction capacitance parameter. The default value

1-606
SPICE NPN

is 0.33. The value must be greater than or equal to 0 and less


than or equal to 0.9.
Forward transit time, TF
The transit time of the minority carriers that cause diffusion
capacitance when the base-emitter junction is forward-biased.
This parameter is only visible when you select B-E Capacitance
for the Model junction capacitance parameter. The default
value is 0. The value must be greater than or equal to 0.
Coefficient of TF, XTF
The coefficient for the base-emitter and base-collector bias
dependence of the transit time, which produces a charge across
the base-emitter junction. This parameter is only visible when you
select B-E Capacitance for the Model junction capacitance
parameter. The default value is 0. The value must be greater
than or equal to 0. Use the default value of 0 if you do not want to
model the effect of base-emitter bias on transit time.
VBC dependence of TF, VTF
The coefficient for the base-emitter bias dependence of the
transit time. This parameter is only visible when you select B-E
Capacitance for the Model junction capacitance parameter.
The default value is Inf V. The value must be greater than or
equal to 0.
Coefficient of TF, ITF
The coefficient for the dependence of the transit time on collector
current. This parameter is only visible when you select B-E
Capacitance for the Model junction capacitance parameter.
The default value is 0 A/m2. The value must be greater than or
equal to 0. Use the default value of 0 if you do not want to model
the effect of collector current on transit time.
B-C depletion capacitance, CJC
The depletion capacitance across the base-collector junction. This
parameter is only visible when you select B-C Capacitance for
the Model junction capacitance parameter. The default value
is 0 F/m2. The value must be greater than 0.

1-607
SPICE NPN

B-C built-in potential, VJC


The base-collector junction potential. This parameter is only
visible when you select B-C Capacitance for the Model junction
capacitance parameter. The default value is 0.75 V. The value
must be greater than or equal to 0.01 V.
B-C exponential factor, MJC
The grading coefficient for the base-collector junction. This
parameter is only visible when you select B-C Capacitance for
the Model junction capacitance parameter. The default value
is 0.33. The value must be greater than or equal to 0 and less
than or equal to 0.9.
B-C capacitance fraction, XCJC
The fraction of the base-collector depletion capacitance that is
connected between the internal base and the internal collector.
The rest of the base-collector depletion capacitance is connected
between the external base and the internal collector. This
parameter is only visible when you select B-C Capacitance for
the Model junction capacitance parameter. The default value
is 0. The value must be greater than or equal to 0 and less than
or equal to 1.
Reverse transit time, TR
The transit time of the minority carriers that cause diffusion
capacitance when the base-collector junction is reverse-biased.
This parameter is only visible when you select B-C Capacitance
for the Model junction capacitance parameter. The default
value is 0 s. The value must be greater than or equal to 0.
Capacitance coefficient FC
The fitting coefficient that quantifies the decrease of the depletion
capacitance with applied voltage. This parameter is only visible
when you select B-E Capacitance or B-C Capacitance for the
Model junction capacitance parameter. The default value is
0.5. The value must be greater than or equal to 0 and less than or
equal to 0.95.

1-608
SPICE NPN

Specify initial condition


Select one of the following options for specifying an initial
condition:
• No — Do not specify an initial condition for the model. This is
the default option.
• Yes — Specify the initial transistor conditions.

Note The NPN block applies the initial transistor voltages


across the junction capacitors and not across the ports.

This parameter is only visible when you select B-E Capacitance


or B-C Capacitance for the Model junction capacitance
parameter.
Initial condition voltage ICVBE
Base-emitter voltage at the start of the simulation. This
parameter is only visible when you select B-E Capacitance or
B-C Capacitance for the Model junction capacitance and Yes
for the Specify initial condition parameter. The default value
is 0 V.
Initial condition voltage ICVCE
Base-collector voltage at the start of the simulation. This
parameter is only visible when you select B-E Capacitance or
B-C Capacitance for the Model junction capacitance and Yes
for the Specify initial condition parameter. The default value
is 0 V.
C-S junction capacitance, CJS
The collector-substrate junction capacitance. This parameter is
only visible when you select C-S Capacitance for the Model
junction capacitance parameter. The default value is 0 F/m2.
The value must be greater than or equal to 0.

1-609
SPICE NPN

Substrate built-in potential, VJS


The potential of the substrate. This parameter is only visible
when you select C-S Capacitance for the Model junction
capacitance parameter. The default value is 0.75 V.
Substrate exponential factor, MJS
The grading coefficient for the collector-substrate junction. This
parameter is only visible when you select C-S Capacitance for
the Model junction capacitance parameter. The default value
is 0. The value must be greater than or equal to 0 and less than or
equal to 0.9.

Temperature Tab

1-610
SPICE NPN

Model temperature dependence using


Select one of the following options for modeling the transistor
temperature dependence:
• Device temperature — Use the device temperature, which is
the Circuit temperature value plus the Offset local circuit
temperature, TOFFSET value. The Circuit temperature
value comes from the SPICE Environment Parameters block, if
one exists in the circuit. Otherwise, it comes from the default
value for this block.
• Fixed temperature — Use a temperature that is independent
of the circuit temperature to model temperature dependence.
Beta temperature exponent, XTB
The forward and reverse beta temperature exponent that models
base current temperature dependence. This parameter is only
visible when you select Device temperature for the Model
temperature dependence using parameter. The default value
is 0. The value must be greater than or equal to 0.
Energy gap, EG
The energy gap that affects the increase in the saturation current
as temperature increases. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 1.11 eV. The
value must be greater than or equal to 0.1.
Temperature exponent for IS, XTI
The order of the exponential increase in the saturation current
as temperature increases. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 3. The value
must be greater than or equal to 0.
Offset local circuit temperature, TOFFSET
The amount by which the transistor temperature differs from
the circuit temperature. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 0 K.

1-611
SPICE NPN

Parameter extraction temperature, TMEAS


The temperature at which the transistor parameters were
measured. The default value is 300.15 K. The value must be
greater than 0.
Fixed circuit temperature, TFIXED
The temperature at which to simulate the transistor. This
parameter is only visible when you select Fixed temperature for
the Model temperature dependence using parameter. The
default value is 300.15 K. The value must be greater than 0.

Ports The block has the following ports:

B
Electrical conserving port associated with the transistor base
terminal.
C
Electrical conserving port associated with the transistor collector
terminal.
E
Electrical conserving port associated with the transistor emitter
terminal.
S
Electrical conserving port associated with the transistor substrate
terminal.

References [1] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993. Chapter 2.

See Also NPN Bipolar Transistor

1-612
SPICE PJFET

Purpose Model SPICE-compatible P-Channel JFET

Library SPICE-Compatible Components/Semiconductor Devices

Description The PJFET block represents a SPICE-compatible P-channel JFET.


The PJFET block model includes the following components:

• “Source-Gate Current-Voltage Model” on page 1-613


• “Drain-Gate Current-Voltage Model” on page 1-614
• “Source-Drain Current-Voltage Model” on page 1-615
• “Junction Charge Model” on page 1-616
• “Temperature Dependence” on page 1-618

Source-Gate Current-Voltage Model


The block provides the following relationship between the source-gate
current Isg and the source-gate voltage Vsg after adjusting the applicable
model parameters for temperature.

Applicable Range of Corresponding Isg Equation


Vsg Values

Vsg > 80 * Vt ⎛ ⎛ Vsg ⎞ ⎞


I sg = IS * ⎜ ⎜ − 79 ⎟ e80 − 1⎟ + Vsg * G min
⎜ V ⎟
⎝⎝ t ⎠ ⎠

80* Vt ≥ Vsg (
I sg = IS * e
Vsg / Vt
)
− 1 + Vsg * G min

Where:

• IS is the Saturation current, IS parameter value.

• Vt = ND * k * T/q
• ND is the Emission coefficient, ND parameter value.

1-613
SPICE PJFET

• q is the elementary charge on an electron.


• k is the Boltzmann constant.
• T is the diode temperature:
- If you select Device temperature for the Model temperature
dependence using parameter, T is the sum of the Circuit
temperature value plus the Offset local circuit temperature,
TOFFSET parameter value. The Circuit temperature value
comes from the SPICE Environment Parameters block, if one
exists in the circuit. Otherwise, it comes from the default value
for this block.
- If you select Fixed temperature for the Model temperature
dependence using parameter, T is the Fixed circuit
temperature, TFIXED parameter value.
• GMIN is the diode minimum conductance. By default, GMIN
matches the Minimum conductance GMIN parameter of the
SPICE Environment Parameters block, whose default value is 1e-12.
To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

Drain-Gate Current-Voltage Model


The block provides the following relationship between the drain-gate
current Idg and the drain-gate voltage Vdg after adjusting the applicable
model parameters for temperature.

Applicable Range of Corresponding Idg Equation


Vdg Values

Vdg > 80 * Vt ⎛ ⎛ Vdg ⎞ ⎞


I dg = IS * ⎜ ⎜ − 79 ⎟ e80 − 1⎟ + Vdg * G min
⎜ V ⎟
⎝⎝ t ⎠ ⎠

80* Vt ≥ Vdg (
I dg = IS * e
Vdg / Vt
)
− 1 + Vdg * G min

1-614
SPICE PJFET

Source-Drain Current-Voltage Model


The block provides the following relationship between the source-drain
current Isd and the source-drain voltage Vsd in normal mode (Vsd ≥ 0)
after adjusting the applicable model parameters for temperature.

Applicable Corresponding Isd Equation


Range of Vsg
and Vdg Values

I sd = 0
Vsg -Vto ≤ 0

I sd = −  * (Vsg − Vto ) * (1 +  * Vsd )


2
0 < Vsg -Vto ≤ Vsd

0 < Vsd < Vsg -Vto ( )


I sd =  * Vsd * 2 * (Vsg -Vto ) -Vsd * (1 +  * Vsd )

Where:

• Vto is the Threshold voltage, VTO parameter value.


• β is the Transconductance, BETA parameter value.
• λ is the Channel modulation, LAMBDA parameter value.

The block provides the following relationship between the source-drain


current Isd and the source-drain voltage Vsd in inverse mode (Vsd < 0)
after adjusting the applicable model parameters for temperature.

1-615
SPICE PJFET

Applicable Corresponding Isd Equation


Range of Vsg
and Vdg Values

I sd = 0
Vdg -Vto ≤ 0

I sd =  * (Vdg − Vto ) * (1 −  * Vsd )


2
0 < Vdg -Vto ≤ −Vsd

0 < −Vsd < Vdg -Vto ( )


I sd =  * Vsd * 2 * (Vdg -Vto ) + Vsd * (1 −  * Vsd )

Junction Charge Model


The block provides the following relationship between the source-gate
charge Qsg and the source-gate voltage Vsg after adjusting the applicable
model parameters for temperature.

Applicable Corresponding Qsg Equation


Range of Vsg
Values

Vsg < FC * VJ ⎛ ⎛ Vsg ⎞1−MG ⎞


CGS * VJ * ⎜1 - ⎜1 - ⎟
⎜ ⎝ VJ ⎟⎠ ⎟
Qsg = ⎝ ⎠
1 − MG

Vsg ≥ FC * VJ ⎛
⎜ F 3* (Vsg - FC * VJ ) +
(
MG * Vsg2 - ( FC * VJ )
2
) ⎞⎟
⎜ 2 * VJ ⎟
Qsg = CGS * ⎜ F1 + ⎟
F2
⎜ ⎟
⎜ ⎟
⎝ ⎠
Where:

1-616
SPICE PJFET

• FC is the Capacitance coefficient FC parameter value.


• VJ is the Junction potential VJ parameter value.
• CGS is the Zero-bias GS capacitance, CGS parameter value.
• MG is the Grading coefficient, MG parameter value.

• F1 =
(
VJ * 1 - (1 - FC )
1− MG
)
1 − MG
F 2 = (1 - FC )
1+ MG

• F 3 = 1 - FC * (1 + MG )

The block provides the following relationship between the drain-gate


charge Qdg and the drain-gate voltage Vdg after adjusting the applicable
model parameters for temperature.

Applicable Corresponding Qdg Equation


Range of Vdg
Values

Vdg < FC * VJ ⎛ ⎛ Vdg ⎞1−MG ⎞


CGD * VJ * ⎜1 - ⎜1 - ⎟
⎜ ⎝ VJ ⎟⎠ ⎟
Qdg = ⎝ ⎠
1 − MG

Vdg ≥ FC * VJ ⎛
⎜ F 3* (Vdg - FC * VJ ) +
(
MG * Vdg2 - ( FC * VJ )
2
) ⎞⎟
⎜ 2 * VJ ⎟
Qdg = CGD* ⎜ F1 + ⎟
F2
⎜ ⎟
⎜ ⎟
⎝ ⎠
Where:

1-617
SPICE PJFET

• CGD is the Zero-bias GD capacitance, CGD parameter value.


Temperature Dependence
Several transistor parameters depend on temperature. There are two
ways to specify the transistor temperature:

• When you select Device temperature for the Model temperature


dependence using parameter, the transistor temperature is

T = TC + TO
where:
- TC is the Circuit temperature parameter value from the SPICE
Environment Parameters block. If this block doesn’t exist in the
circuit, TC is the default value of this parameter.
- TO is the Offset local circuit temperature, TOFFSET
parameter value.
• When you select Fixed temperature for the Model temperature
dependence using parameter, the transistor temperature is the
Fixed circuit temperature, TFIXED parameter value.

The block provides the following relationship between the saturation


current IS and the transistor temperature T:

⎛ T ⎞ EG
XTI ⎜⎜ −1⎟⎟*
IS (T ) = IS * (T Tmeas ) ND *e ⎝ Tmeas ⎠ Vt

where:

• IS is the Saturation current, IS parameter value.


• Tmeas is the Parameter extraction temperature, TMEAS
parameter value.
• XTI is the Saturation current temperature exponent, XTI
parameter value.
• EG is the Energy gap, EG parameter value.

1-618
SPICE PJFET

• Vt = ND * k * T/q
• ND is the Emission coefficient, ND parameter value.

The block provides the following relationship between the junction


potential VJ and the transistor temperature T:

⎛ T ⎞ 3* k * T ⎛ T ⎞ ⎛ T ⎞
VJ (T ) = VJ * ⎜ ⎟- * log ⎜ ⎟-⎜ ⎟ * EGTmeas + EGT
⎝ Tmeas ⎠ q ⎝ Tmeas ⎠ ⎝ Tmeas ⎠
where:

• VJ is the Junction potential VJ parameter value.

• EGTmeas = 1.16eV - ( 7.02e - 4 * Tmeas 2 ) / (Tmeas + 1108 )

• EGT = 1.16eV - ( 7.02e - 4 * T 2 ) / (T + 1108 )

The block provides the following relationship between the gate-source


junction capacitance CGS and the transistor temperature T:

⎡ ⎛ VJ (T ) -VJ ⎞⎤
CGS (T ) = CGS * ⎢1 + MG* ⎜ 400e − 6 * (T - Tmeas ) - ⎟⎥
⎣ ⎝ VJ ⎠⎦
where:

• CGS is the Zero-bias GS capacitance, CGS parameter value.

The block uses the CGS(T) equation to calculate the gate-drain junction
capacitance by substituting CGD (the Zero-bias GD capacitance,
CGD parameter value) for CGS.
The block provides the following relationship between the forward and
reverse beta and the transistor temperature T:

1-619
SPICE PJFET

⎛ T ⎞
 (T ) =  * ⎜ ⎟
⎝ Tmeas ⎠
where β is the Transconductance, BETA parameter value.

Basic The model is based on the following assumptions:


Assumptions
and • The PJFET block does not support noise analysis.
Limitations • The PJFET block applies initial conditions across junction capacitors
and not across the block ports.

1-620
SPICE PJFET

Dialog Main Tab


Box and
Parameters

Device area, AREA


The transistor area. This value multiplies the
Transconductance, BETA, Zero-bias GS capacitance, CGS,
Zero-bias GD capacitance, CGD, and Saturation current, IS
parameter values. It divides the Source resistance, RS and
Drain resistance, RD parameter values. The default value is 1
m2. The value must be greater than 0.

1-621
SPICE PJFET

Number of parallel devices, SCALE


The number of parallel transistors the block represents. This
value multiplies the output current and device charges. The
default value is 1. The value must be greater than 0.
Threshold voltage, VTO
The gate-source voltage above which the transistor produces a
nonzero drain current. The default value is -2 V.
Transconductance, BETA
The derivative of drain current with respect to gate voltage. The
default value is 1e-04 A/m2/V2. The value must be greater than
or equal to 0.
Channel modulation, LAMBDA
The channel-length modulation. The default value is 0 1/V.
Saturation current, IS
The magnitude of the current that the ideal diode equation
approaches asymptotically for very large reverse bias levels. The
default value is 1e-14 A/m2. The value must be greater than or
equal to 0.
Emission coefficient, ND
The transistor emission coefficient or ideality factor. The default
value is 1. The value must be greater than 0.
Source resistance, RS
The transistor source resistance. The default value is 1e-4 m2*Ω.
The value must be greater than or equal to 0.
Drain resistance, RD
The transistor drain resistance. The default value is 0.01 m2*Ω.
The value must be greater than or equal to 0.

1-622
SPICE PJFET

Junction Capacitance Tab

Model junction capacitance


Select one of the following options for modeling the junction
capacitance:
• No — Do not include junction capacitance in the model. This is
the default option.

1-623
SPICE PJFET

• Yes — Specify zero-bias junction capacitance, junction


potential, grading coefficient, forward-bias depletion
capacitance coefficient, and transit time.
Zero-bias GS capacitance, CGS
The value of the capacitance placed between the gate and the
source. This parameter is only visible when you select Yes for the
Model junction capacitance parameter. The default value is 0
F/m2. The value must be greater than or equal to 0.
Zero-bias GD capacitance, CGD
The value of the capacitance placed between the gate and the
drain. This parameter is only visible when you select Yes for the
Model junction capacitance parameter. The default value is 0
F/m2. The value must be greater than or equal to 0.
Junction potential VJ
The junction potential. This parameter is only visible when you
select Yes for the Model junction capacitance parameter. The
default value is 1 V. The value must be greater than 0.01 V.
Grading coefficient, MG
The transistor grading coefficient. The default value is 0.5. The
value must be greater than 0 and less than 0.9.
Capacitance coefficient FC
The fitting coefficient that quantifies the decrease of the depletion
capacitance with applied voltage. This parameter is only visible
when you select Yes for the Model junction capacitance
parameter. The default value is 0.5. The value must be greater
than or equal to 0 and less than or equal to 0.95.
Specify initial condition
Select one of the following options for specifying an initial
condition:
• No — Do not specify an initial condition for the model. This is
the default option.
• Yes — Specify the initial diode voltage.

1-624
SPICE PJFET

Note The PJFET block applies the initial diode voltage across
the junction capacitors and not across the ports.

Initial condition voltage ICVDS


Drain-source voltage at the start of the simulation. This
parameter is only visible when you select Yes for the Model
junction capacitance and Yes for the Specify initial
condition parameter. The default value is 0 V.
Initial condition voltage ICVGS
Gate-source voltage at the start of the simulation. This parameter
is only visible when you select Yes for the Model junction
capacitance and Yes for the Specify initial condition
parameter. The default value is 0 V.

1-625
SPICE PJFET

Temperature Tab

Model temperature dependence using


Select one of the following options for modeling the diode
temperature dependence:
• Device temperature — Use the device temperature, which is
the Circuit temperature value plus the Offset local circuit
temperature, TOFFSET value. The Circuit temperature
value comes from the SPICE Environment Parameters block, if

1-626
SPICE PJFET

one exists in the circuit. Otherwise, it comes from the default


value for this block.
• Fixed temperature — Use a temperature that is independent
of the circuit temperature to model temperature dependence.
Saturation current temperature exponent, XTI
The order of the exponential increase in the saturation current as
temperature increases. The default value is 0. The value must
be greater than or equal to 0.
Activation energy, EG
The energy gap that affects the increase in the saturation current
as temperature increases. The default value is 1.11 eV. The value
must be greater than 0.1 eVi.
Offset local circuit temperature, TOFFSET
The amount by which the transistor temperature differs from
the circuit temperature. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 0 K.
Fixed circuit temperature, TFIXED
The temperature at which to simulate the transistor. This
parameter is only visible when you select Fixed temperature for
the Model temperature dependence using parameter. The
default value is 300.15 K. The value must be greater than 0.
Parameter extraction temperature, TMEAS
The temperature at which the transistor parameters were
measured. The default value is 300.15 K. The value must be
greater than 0.

Ports The block has the following ports:

G
Electrical conserving port associated with the transistor gate
terminal.

1-627
SPICE PJFET

D
Electrical conserving port associated with the transistor drain
terminal.
S
Electrical conserving port associated with the transistor source
terminal.

References [1] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993. Chapter 3.

See Also P-Channel JFET, SPICE NJFET

1-628
SPICE PMOS

Purpose Model SPICE-compatible P-Channel MOSFET

Library SPICE-Compatible Components/Semiconductor Devices

Description The PMOS block represents a SPICE-compatible P-channel MOSFET.


The PMOS block model includes the following components:

• “Resistance Calculations” on page 1-629


• “Bulk-Source Diode Model” on page 1-630
• “Bulk-Drain Diode Model” on page 1-631
• “Level 1 Drain Current Model” on page 1-632
• “Level 3 Drain Current Model” on page 1-635
• “Junction Charge Model” on page 1-641
• “Temperature Dependence” on page 1-646

Resistance Calculations
The following table shows how the PMOS block calculates the transistor
drain resistance. The abbreviations in the table represent the values of
the following block parameters:

• Drain resistance, RD
• Sheet resistance, RSH
• Number of drain squares, NRD

Drain resistance, Sheet resistance, Drain Resistance


RD Parameter RSH Parameter
NaN NaN 0
RD NaN or RSH RD
NaN RSH RSH*NRD

1-629
SPICE PMOS

The following table shows how the PMOS block calculates the transistor
source resistance. The abbreviations in the table represent the values
of the following block parameters:

• Source resistance, RS
• Sheet resistance, RSH
• Number of source squares, NRS

Source resistance, Sheet resistance, Source Resistance


RS Parameter RSH Parameter
NaN NaN 0
RS NaN or RSH RS
NaN RSH RSH*NRS

Bulk-Source Diode Model


The block provides the following relationship between the bulk-source
current Isb and the bulk-source voltage Vsb after adjusting the applicable
model parameters for temperature.

Applicable Range Corresponding Igs Equation


of Vsb Values

Vsb > 80 * Vtn ⎛⎛V ⎞ ⎞


I sb = IS sb * ⎜ ⎜ sb − 79 ⎟ e80 − 1⎟ + Vsb * G min
⎜ V ⎟
⎝ ⎝ tn ⎠ ⎠

80Vtn ≥ Vsb ( )
I sb = IS sb * eVsb / Vtn − 1 + Vsb * G min

Where:

• ISsb is
- The product of the Bulk jct sat current density, JS parameter
value and the Area of source, AS parameter value if both these

1-630
SPICE PMOS

parameter values and the Area of drain, AD parameter value


are nonzero.
- The Bulk saturation current, IS parameter value, otherwise.

• Vtn=NkT/q
• q is the elementary charge on an electron, 1.6021918e-19 C.
• N is the Emission coefficient, ND parameter value.
• k is the Boltzmann constant.
• T is the diode temperature:
- If you select Device temperature for the Model temperature
dependence using parameter, T is the sum of the Circuit
temperature value plus the Offset local circuit temperature,
TOFFSET parameter value. The Circuit temperature value
comes from the SPICE Environment Parameters block, if one
exists in the circuit. Otherwise, it comes from the default value
for this block.
- If you select Fixed temperature for the Model temperature
dependence using parameter, T is the Fixed circuit
temperature, TFIXED parameter value.
• GMIN is the diode minimum conductance. By default, GMIN
matches the Minimum conductance GMIN parameter of the
SPICE Environment Parameters block, whose default value is 1e-12.
To change GMIN, add a SPICE Environment Parameters block to
your model and set the Minimum conductance GMIN parameter
to the desired value.

Bulk-Drain Diode Model


The block provides the following relationship between the bulk-drain
current Idb and the bulk-drain voltage Vdb after adjusting the applicable
model parameters for temperature.

1-631
SPICE PMOS

Applicable Range Corresponding Igs Equation


of Vdb Values

Vdb > 80 * Vtn ⎛⎛V ⎞ ⎞


I db = ISdb * ⎜ ⎜ db − 79 ⎟ e80 − 1⎟ + Vdb * G min
⎜ V ⎟
⎝ ⎝ tn ⎠ ⎠

80Vtn ≥ Vdb ( )
I db = ISdb * eVdb / Vtn − 1 + Vdb * G min

Where:

• ISdb is
- The product of the Bulk jct sat current density, JS parameter
value and the Area of drain, AD parameter value if both these
parameter values and the Area of source, AS parameter value
are nonzero.
- The Bulk saturation current, IS parameter value, otherwise.

Level 1 Drain Current Model


The block provides the following relationship between the drain current

Isd and the drain-source voltage Vsd in normal mode ( Vsd ≥ 0 ) after
adjusting the applicable model parameters for temperature.

1-632
SPICE PMOS

Normal Mode

Applicable Corresponding Isd Equation


Range of Vsg
and Vsd Values

Isd = 0
Vsg -Von ≤ 0
(1 + LAMBDA *Vsd )
0 < Vsg -Von ≤ Vsd I sd = BETA * (Vsg − Von )
2

2
I sd = BETA *
0 < Vsd < Vsg -Von
⎛ V ⎞
Vsd ⎜ (Vsg -Von ) - sd ⎟ (1 + LAMBDA *Vsd )
⎝ 2 ⎠
Where:

• Von is:

- MTYPE * VBI + GAMMA PHI − Vsb if Vsb ≤ 0 .

⎛ Vsb ⎞
- MTYPE * VBI + GAMMA ⎜ PHI − ⎟ if 0 < Vsb ≤ 2 * PHI .
⎝ 2 PHI ⎠
- MTYPE*VBI if Vsb > 2*PHI.
• MTYPE is –1.
• BETA is KP*WIDTH/(LENGTH-2*LD)
• KP is:
- The Transconductance, KP parameter value, if this parameter
has a numerical value.

1-633
SPICE PMOS

- U 0 * 3.9 *  0 / TOX , if Transconductance, KP is NaN and you


specify values for both the Oxide thickness, TOX and Substrate
doping, NSUB parameters.
• WIDTH is the Width of channel, WIDTH parameter value.
• LENGTH is the Length of channel, LENGTH parameter value.
• LD is the Lateral diffusion, LD parameter value.
• VBI is an built-in voltage value the block uses in calculations. The
value is a function of temperature. For a detailed definition, see
“Temperature Dependence” on page 1-564.
• PHI is:
- The Surface potential, PHI parameter value, if this parameter
has a numerical value.

- 2 * kTmeas / q * log( NSUB / ni ) , if Surface potential, PHI is NaN


and you specify values for both the Oxide thickness, TOX and
Substrate doping, NSUB parameters.
• LAMBDA is the Channel modulation, LAMBDA parameter value.
• GAMMA is:
- The Bulk threshold, GAMMA parameter value, if this parameter
has a numerical value.

- TOX * 2 *11.7 *  0 * q * NSUB / ( 3.9 *  0 ) , if Bulk threshold,


GAMMA is NaN and you specify values for both the Oxide
thickness, TOX and Substrate doping, NSUB parameters.
• ε0 is the permittivity of free space, 8.854214871e-12 F/m.
• ni is the carrier concentration of intrinsic silicon, 1.45e10 cm-3.

The block provides the following relationship between the drain current

Isd and the drain-source voltage Vsd in inverse mode ( Vsd < 0 ) after
adjusting the applicable model parameters for temperature.

1-634
SPICE PMOS

Inverse Mode

Applicable Corresponding Isd Equation


Range of Vdg
and Vsd Values

Isd = 0
Vdg -Von ≤ 0

I sd = − BETA (Vdg − Von ) (1 − LAMBDA * Vsd ) 2


2
0 < Vdg -Von ≤ −Vsd

I sd = BETA *
0 < Vsd < Vdg -Von
( )
Vsd (Vdg -Von ) + Vsd 2 (1 − LAMBDA *Vsd )

Where:

• Von is:

- MTYPE * VBI + GAMMA PHI − Vdb if

Vdb ≤ 0
.

⎛ Vdb ⎞
- MTYPE * VBI + GAMMA ⎜ PHI − ⎟ if
⎝ 2 PHI ⎠
0 < Vdb ≤ 2 * PHI
.
- MTYPE*VBI if Vdb > 2*PHI.

Level 3 Drain Current Model


The block provides the following model for drain current Isd in normal

mode ( Vsd ≥ 0 ) after adjusting the applicable model parameters for


temperature.

1-635
SPICE PMOS

I SD = I SD 0 * ScaleVMAX * ScaleLChan * ScaleINV


Where:

• ISD0 is the Basic Drain Current Model.


• ScaleVMAX is the Velocity Saturation Scaling.
• ScaleLChan is the Channel Length Modulation Scaling.
• ScaleINV is the Weak Inversion Scaling.

The blocks uses the same model for drain current in inverse mode
( Vsd < 0 ), with the following substitutions:
• Vsb – Vsd for Vsb
• Vsg – Vsd for Vsd
• –Vsd for Vsd

Basic Drain Current Model


The block provides the following relationship between the drain current
Isd and the drain-source voltage Vds:

⎛ 1 + FB ⎞
I SD 0 = BETA * Fgate * ⎜ VSGX − VTH − * VSDX ⎟ * VSDX
⎝ 2 ⎠

• The block calculates BETA as described in “Level 1 Drain Current


Model” on page 1-632.
• The block calculates FGATE using the following equation:

1
Fgate =
1 + THETA * (Vsgx − VTH )

• THETA is the Vgs dependence on mobility, THETA parameter


value.

1-636
SPICE PMOS

• Vsgx = max(VSG , Von )


• If you specify a nonzero value for the Fast surface state density,
NFS parameter, the block calculates Von using the following equation:

Von = VTH + xnVT


Otherwise, Von = VTH.
• The block calculates xn using the following equation:

⎛ F *V ⎞
⎜ GAMMA * Fs * Vbulk + n bulk ⎟
q * NFS ⎝ WIDTH ⎠
xn = 1 + +
COX 2 * Vbulk
• The block calculates Vbulk as follows:
- If VSB ≤ 0, Vbulk = PHI – VBS.
- Otherwise, the block calculates Vbulk using the following equation:

PHI
Vbulk = 2
⎛ VSB ⎞
⎜1 + ⎟
⎝ 2 * PHI ⎠
• VT=kT/q
• The block calculates VTH using the equation following equation:

8.15e−22 * ETA
VTH = VBI − * VSD
COX * ( LENGTH − 2 * LD )
3

+ GAMMA * Fs * Vbulk + Fn * Vbulk

• For information about how the block calculates VBI, see “Temperature
Dependence” on page 1-646.

1-637
SPICE PMOS

• ETA is the Vds dependence threshold volt, ETA parameter value.


• COX = εox/TOX, where εox is the permittivity of the oxide and TOX is
the Oxide thickness, TOX parameter value.
• If you specify a nonzero value for the Junction depth, XJ parameter
and a value for the Substrate doping, NSUB parameter, the block
calculates Fs using the following equations:

2 si
=
qNSUB
XD = 
XD * Vbulk
wc = .0631353 + .8013292 *
XJ
2
⎛ XD * Vbulk ⎞ LD
−.01110777 * ⎜ ⎟ +
⎜ XJ ⎟ XJ
⎝ ⎠
⎛ ⎛ XD * Vbulk ⎞
2

Fs = 1 − ⎜ wc * 1 − ⎜
LD ⎟
⎜ ⎟ −
⎜ ⎜ XJ + XD * V
⎝ bulk

⎠ XJ ⎟⎟
⎝ ⎠
where εsi is the permittivity of silicon.
Otherwise, Fs = 1.
• The block calculates FB using the following equation:

GAMMA * Fs
FB = + Fn
4 * Vbulk

• The block calculates Fn using the following equation:

1-638
SPICE PMOS

DELTA *  *  si
Fn =
2 * COX * WIDTH
• DELTA is the Width effect on threshold, DELTA parameter
value.
• VSDX is the lesser of VSD and the saturation voltage, Vdsat.
- If you specify a positive value for the Max carrier drift velocity,
VMAX parameter, the block calculates Vdsat using the following
equation:

Vsgx − VTH ( LENGTH − 2 * LD ) *VMAX


Vdsat = +
1 + FB UO * Fgate

⎛ Vsgx − VTH ⎞ ⎛ ( LENGTH − 2 * LD ) * VMAX


2

2

− ⎜ ⎟ + ⎜⎜ ⎟⎟
⎝ 1 + F B ⎠ ⎝ UO * Fgate ⎠
Otherwise, the block calculates Vdsat using the following equation:

Vsgx − VTH
Vdsat =
1 + FB

Velocity Saturation Scaling


If you specify a positive value for the Max carrier drift velocity,
VMAX parameter, the block calculates ScaleVMAX using the following
equation:

1
ScaleVMAX =
UO * Fgate
1+ * VSDX
( LENGTH − 2 * LD ) *VMAX
Otherwise, ScaleVMAX = 1.

1-639
SPICE PMOS

Channel Length Modulation Scaling


The block scales the drain current to account for channel length
modulation if the block meets all of the following criteria:

• VSD > Vsat


• The Max carrier drift velocity, VMAX parameter value is zero
or α is nonzero.

The block scales the drain current using the following equation:

1
ScaleLChan =
Δl
1−
( LENGTH − 2 * LD )
The block uses the following procedure to calculate Δl:

1 The block first calculates the intermediate value Δl0.

• If you specify a positive value for the Max carrier drift velocity,
VMAX parameter, the block computes the intermediate value gdsat
as the greater of 1e-12 and the result of the following equation:

⎛ 1 ⎞
I SD 0 * ⎜1 − ⎟ * Scalegdsat
⎜ 1 + Scaleg * VSDX ⎟
⎝ dsat ⎠
where:

UO * Fgate
Scalegdsat =
( LENGTH − 2 * LD ) *VMAX
Then, the block uses the following equation to calculate the
intermediate value Δl0:

1-640
SPICE PMOS

2
⎛ KA * I SD ⎞
Δl0 = ⎜
⎜ 2 * ( LENGTH − 2 * LD ) * g ⎟⎟ + KA * (VSD − Vdsat )
⎝ dsat ⎠
KA * I SD

2 * ( LENGTH − 2 * LD ) * g dsat
where KA is the product of the Mobility modulation, KAPPA
parameter value and α.
• Otherwise, the block uses the following equation to calculate the
intermediate value Δl0:

Δl = KA * (VSD − Vdsat )

2 The block checks for punch through and calculates Δl.

• If Δl0 is greater than (LENGTH-2*LD)/2, the block calculates Δl


using the following equation:

⎛ ( LENGTH − 2 * LD ) ⎞
Δl = ⎜1 − ⎟ * ( LENGTH − 2 * LD )
⎝ 4 * Δl0 ⎠
• Otherwise, Δl = Δl0.

Weak Inversion Scaling


If VSG is less than Von, the block calculates ScaleINV using the following
equation:

Vsg −Von

ScaleINV = e xn *VT

Otherwise, ScaleINV = 1.

Junction Charge Model


The block models the following junction charges:

1-641
SPICE PMOS

• Junction Overlap Charges


• Bulk Junction Charges

Junction Overlap Charges


The block calculates the following junction overlap charges:

• QSG=CGSO*WIDTH*Vsg
Where:
- QSG is the gate-source overlap charge.
- CGSO is the G-S overlap capacitance, CGSO parameter value.
- WIDTH is the Width of channel, WIDTH parameter value.
• QDG=CGDO*WIDTH*Vdg
Where:
- QDG is the gate-drain overlap charge.
- CGDO is the G-D overlap capacitance, CGDO parameter value.
• QBG=CGBO*(LENGTH-2*LD)*Vbg
Where:
- QBG is the gate-bulk overlap charge.
- CGBO is the G-B overlap capacitance, CGBO parameter value.
- LENGTH is the Length of channel, LENGTH parameter value.
- LD is the Lateral diffusion, LD parameter value.

Bulk Junction Charges


The block provides the following relationship between the bulk-drain
bottom junction charge Qbottom and the junction voltage Vdb after
adjusting the applicable model parameters for temperature.

1-642
SPICE PMOS

Applicable Corresponding Qbottom Equation


Range of Vdb
Values

Vdb < FC * PB ⎛ ⎛ Vdb ⎞1−MJ ⎞


CBD * PB * ⎜1 - ⎜1 - ⎟⎟
⎜ ⎝ PB ⎟⎠
Qbottom = ⎝ ⎠
1 − MJ if CBD > 0.
⎛ ⎛ V ⎞1−MJ ⎞
CJ * AD * PB * ⎜1 - ⎜1 - db ⎟ ⎟⎟
⎜ ⎝ PB ⎠
Qbottom = ⎝ ⎠
1 − MJ otherwise.

Qbottom = CBD *
Vdb ≥ FC * PB

⎜ F 3* (Vdb - FC * PB ) +
(
MJ * Vdb2 - ( FC * PB )
2
) ⎞⎟
⎜ 2 * PB ⎟
⎜ F1 + F2 ⎟
⎜ ⎟
⎜ ⎟
⎝ ⎠
if CBD > 0.
Qbottom = CJ * AD*

⎜ F 3* (Vdb - FC * PB ) +
(
MJ * Vdb2 - ( FC * PB )
2
) ⎞⎟
⎜ 2 * PB ⎟
⎜ F1 + F2 ⎟
⎜ ⎟
⎜ ⎟
⎝ ⎠
otherwise.

1-643
SPICE PMOS

Where:

• PB is the Bulk junction potential, PB parameter value.


• FC is the Capacitance coefficient FC parameter value.
• CBD is the Zero-bias BD capacitance, CBD parameter value.
• CJ is the Bottom junction cap per area, CJ parameter value.
• AD is the Area of drain, AD parameter value.
• MJ is the Bottom grading coefficient, MJ parameter value.

• F1 =
(
PB* 1 - (1 - FC )
1− MJ
)
1 − MJ
F 2 = (1 - FC )
1+ MJ

• F 3 = 1 - FC * (1 + MJ )

The block uses the equations in the preceding table to calculate the
bulk-source bottom junction charge, with the following substitutions:

• Vsb replaces Vdb.


• AS (the Area of source, AS parameter value) replaces AD.
• CBS (the Zero-bias BS capacitance, CBS parameter value)
replaces CBD.

The block provides the following relationship between the bulk-drain


sidewall junction charge Qsidewall and the junction voltage Vdb after
adjusting the applicable model parameters for temperature.

1-644
SPICE PMOS

Applicable Corresponding Qsidewall Equation


Range of Vdb
Values

Vdb < FC * PB ⎛ ⎛ V ⎞1− MJSW ⎞


CJSW * PD * PB * ⎜1 - ⎜1 - db ⎟ ⎟⎟
⎜ ⎝ PB ⎠
Qsidewall = ⎝ ⎠
1 − MJSW
Qsidewall = CJSW * PD*
Vdb ≥ FC * PB

⎜ F 3* (Vdb - FC * PB ) +
(
MJSW * Vdb2 - ( FC * PB )
2
) ⎟⎞
⎜ 2 * PB ⎟
⎜ F1 + F2 ⎟
⎜ ⎟
⎜ ⎟
⎝ ⎠

Where:

• CJSW is the Side jct cap/area of jct perimeter, CJSW parameter


value.
• PD is the Perimeter of drain, AD parameter value.
• MJSW is the Side grading coefficient, MJSW parameter value.

• F1 =
(
PB* 1 - (1 - FC )
1− MJSW
)
1 − MJSW
F 2 = (1 - FC )
1+ MJSW

• F 3 = 1 - FC * (1 + MJSW )

1-645
SPICE PMOS

The block uses the equations in the preceding table to calculate the
bulk-source sidewall junction charge and the sidewall junction voltage,
with the following substitutions:

• Vsb replaces Vdb.


• PS (the Perimeter of source, PS parameter value) replaces PD.

Temperature Dependence
Several transistor parameters depend on temperature. There are two
ways to specify the transistor temperature:

• When you select Device temperature for the Model temperature


dependence using parameter, the transistor temperature is

T = TC + TO
where:
- TC is the Circuit temperature parameter value from the SPICE
Environment Parameters block. If this block doesn’t exist in the
circuit, TC is the default value of this parameter.
- TO is the Offset local circuit temperature, TOFFSET
parameter value.
• When you select Fixed temperature for the Model temperature
dependence using parameter, the transistor temperature is the
Fixed circuit temperature, TFIXED parameter value.

The block provides the following relationship between the


transconductance KP and the transistor temperature T:

KP
KP(T ) = 3/ 2
⎛T ⎞
⎜ T ⎟
⎝ meas ⎠
where:

1-646
SPICE PMOS

• KP is the Transconductance, KP parameter value.


• Tmeas is the Parameter extraction temperature, TMEAS
parameter value.

The block provides the following relationship between the surface


potential PHI and the transistor temperature T:

⎛ ⎛ 3
q ⎛ 1.115 EGTmeas ⎞⎞⎞
⎜ PHI + meas ⎜ log ⎛⎜ meas ⎞⎟ + ⎜
T kT T
PHI (T ) = − ⎟⎟ ⎟ ⎟
Tmeas ⎜ q ⎜ ⎝ 300.15 ⎠ k ⎜⎝ 300.15 Tmeas ⎠ ⎟⎠ ⎟⎠
⎝ ⎝
kT ⎛ EGT ⎞ ⎞
3
⎛ T ⎞ q ⎛ 1.115
− ⎜ log ⎜ ⎟ + ⎜ − ⎟⎟
q ⎝⎜ ⎝ 300.15 ⎠ k ⎝ 300.15 T ⎠ ⎟⎠
where:

• EGTmeas = 1.16eV - ( 7.02e - 4 * Tmeas 2 ) / (Tmeas + 1108 )

• EGT = 1.16eV - ( 7.02e - 4 * T 2 ) / (T + 1108 )


The block provides the following relationship between the built-in
voltage VBI and the transistor temperature T:

⎛ PHI (T ) − PHI ⎞
VBI (T ) = VTO + MTYPE * ⎜ − GAMMA PHI ⎟
⎝ 2 ⎠
EGTmeas − EGT
+
2
where:

• VTO is:
- The Threshold voltage, VTO parameter value, if this parameter
has a numerical value.

1-647
SPICE PMOS

- Φ − 3.25 + EGT meas


2 + MTYPE * PHI 2 − NSS * q * TOX / ( 3.9 *  0 )

+ MTYPE * (GAMMA * PHI + PHI ) , if Threshold voltage,


VTO is NaN and you specify values for both the Oxide thickness,
TOX and Substrate doping, NSUB parameters.
• Φ is:
- 3.2, if TPG (the Gate type?, TPG parameter value) is 0.

- 3.25 + EGT meas


2 − MTYPE * TPG * EGTmeas 2 , otherwise.
• GAMMA is:
- The Bulk threshold, GAMMA parameter value, if this parameter
has a numerical value.

- TOX * 2 *11.7 *  0 * q * NSUB / ( 3.9 *  0 ) , if Bulk threshold,


GAMMA is NaN and you specify values for both the Oxide
thickness, TOX and Substrate doping, NSUB parameters.

The block provides the following relationship between the bulk


saturation current IS and the transistor temperature T:

− qEGT qEGTmeas
+
IS (T ) = IS * e ND*kT ND*kTmeas

where:

• ND is the Emission coefficient, ND parameter value.


• IS is the Bulk saturation current, IS parameter value.

The block provides the following relationship between the bulk junction
saturation current density JS and the transistor temperature T:

− qEGT qEGTmeas
+
JS (T ) = JS * e ND*kT ND*kTmeas

1-648
SPICE PMOS

where:

• JS is the Bulk jct sat current density, JS parameter value.

The block provides the following relationship between the bulk junction
potential PB and the transistor temperature T:

kTmeas ⎛ ⎞⎞
3
⎛ T ⎞ q ⎛ 1.115 EGTmeas
PB + ⎜ log ⎜ meas ⎟ + ⎜ − ⎟⎟ ⎟
q ⎜ ⎜
⎝ ⎝ 300.15 ⎠ k ⎝ 300.15 T ⎠ ⎟⎠
PB(T ) =
Tmeas
T
kT ⎛ EGT ⎞ ⎞
3
⎛ T ⎞ q ⎛ 1.115
− ⎜ log ⎜ ⎟ + ⎜ − ⎟⎟
q ⎜⎝ ⎝ 300.15 ⎠ k ⎝ 300.15 T ⎠ ⎟⎠

where:

• PB is the Bulk junction potential, PB parameter value.

The block provides the following relationship between the bulk-drain


junction capacitance CBD and the transistor temperature T:

CBD(T ) = CBD
(
pbo + MJ * 4 * 104 * ( T − 300.15 ) * pbo − ( PB(T ) − pbo ) )
pbo + MJ * ( 4 * 10 * ( Tmeas − 300.15 ) * pbo − ( PB − pbo ) )
4

where:

• CBD is the Zero-bias BD capacitance, CBD parameter value.


• MJ is the Bottom grading coefficient, MJ parameter value.

kTmeas ⎛ ⎞⎞
3
⎛ T ⎞ q ⎛ 1.115 EGTmeas
PB + ⎜ log ⎜ meas ⎟ + ⎜ − ⎟⎟ ⎟
q ⎜ ⎜
⎝ ⎝ 300.15 ⎠ k ⎝ 300.15 T ⎠ ⎟⎠
• pbo =
Tmeas
300.15

1-649
SPICE PMOS

The block uses the CBD(T) equation to calculate:

• The bulk-source junction capacitance by substituting CBS (the


Zero-bias BS capacitance, CBS parameter value) for CBD.
• The bottom junction capacitance by substituting CJ (the Bottom
junction cap per area, CJ parameter value) for CBD.

The block provides the following relationship between the sidewall


junction capacitance CJSW and the transistor temperature T:

CJSW (T ) = CJSW
(
pbo + MJSW * 4 * 104 * ( T − 300.15 ) * pbo − ( PB(T ) − pbo ) )
pbo + MJSW * ( 4 * 10 * ( Tmeas − 300.15 ) * pbo − ( PB − pbo ) )
4

where:

• MJSW is the Side grading coefficient, MJSW parameter value.

Basic The model is based on the following assumptions:


Assumptions
and • The PMOS block does not support noise analysis.
Limitations • The PMOS block applies initial conditions across junction capacitors
and not across the block ports.

1-650
SPICE PMOS

Dialog Model Selection Tab


Box and
Parameters

MOS model
Select one of the following MOSFET model options:
• Level 1 MOS — Use the “Level 1 Drain Current Model” on page
1-632. This is the default option.
• Level 3 MOS — Use the “Level 3 Drain Current Model” on
page 1-635.

1-651
SPICE PMOS

Dimensions Tab

Device area factor, AREA


The transistor area. This value multiplies the following parameter
values:
• Transconductance, KP
• Bulk saturation current, IS
• Bulk jct sat current density, JS
• Zero-bias BD capacitance, CBD
• Zero-bias BS capacitance, CBS

1-652
SPICE PMOS

• G-S overlap capacitance, CGSO


• G-D overlap capacitance, CGDO
• G-B overlap capacitance, CGBO
• Bottom junction cap per area CJ
• Side jct cap/area of jct perimeter CJSW

It divides the following parameter values:


• Drain resistance, RD
• Source resistance, RS
• Sheet resistance, RSH

The default value is 1. The value must be greater than 0.


Number of parallel devices, SCALE
The number of parallel MOS instances for this device. This
parameter multiplies the output current and device charge. The
default value is 1. The value must be greater than 0.
Length of channel, LENGTH
Length of the channel between the source and drain. The default
value is 1e-04 m.
Width of channel, WIDTH
Width of the channel between the source and drain. The default
value is 1e-04 m.
Area of drain, AD
Area of the transistor drain diffusion. The default value is 0 m2.
The value must be greater than or equal to 0.
Area of source, AS
Area of the transistor source diffusion. The default value is 0 m2.
The value must be greater than or equal to 0.

1-653
SPICE PMOS

Perimeter of drain, PD
Perimeter of the transistor drain diffusion. The default value
is 0 m.
Perimeter of source, PS
Perimeter of the transistor source diffusion. The default value
is 0 m.

Resistors Tab

Drain resistance, RD
The transistor drain ohmic resistance. The default value is
0.01 Ω. If you set this parameter to NaN Ω, this value means

1-654
SPICE PMOS

the parameter is unspecified, so the block calculates the drain


resistance as described in “Resistance Calculations” on page
1-629. The value must be equal to 0 or greater than or equal to
Rmin. Rmin is a built-in model constant whose value is 1e-12.
Source resistance, RS
The transistor source ohmic resistance. The default value is
1e-4 Ω. If you set this parameter to NaN Ω, this value means
the parameter is unspecified, so the block calculates the drain
resistance as described in “Resistance Calculations” on page
1-629. The value must be equal to 0 or greater than or equal to
Rmin. Rmin is a built-in model constant whose value is 1e-12.
Sheet resistance, RSH
Resistance per square of the transistor source and drain. The
default value is Nan Ω. This value means the parameter is
unspecified. The block only uses this parameter value if you do
not specify one or both of the Drain resistance, RD and Source
resistance, RS parameter values, as described in “Resistance
Calculations” on page 1-629. The value must be greater than or
equal to 0.
Number of drain squares, NRD
Number of squares of resistance that make up the transistor
drain diffusion. The default value is 1 . The value must be greater
than or equal to 0. The block only uses this parameter value
if you do not specify one or both of the Drain resistance, RD
and Source resistance, RS parameter values, as described in
“Resistance Calculations” on page 1-629.
Number of source squares, NRS
Number of squares of resistance that make up the transistor
source diffusion. The default value is 1 . The value must be
greater than or equal to 0. The block only uses this parameter
value if you do not specify one or both of the Drain resistance,
RD and Source resistance, RS parameter values, as described
in “Resistance Calculations” on page 1-629.

1-655
SPICE PMOS

DC Currents Tab

Threshold voltage, VTO


The gate-source voltage above which the transistor produces a
nonzero drain current. The default value is 0 V. If you assign this
parameter a value of NaN, the block calculates the value from the
specified values of the Oxide thickness, TOX and Substrate
doping, NSUB parameters. For more information about this
calculation, see “Temperature Dependence” on page 1-564.
Transconductance, KP
The derivative of drain current with respect to gate voltage. The
default value is 2e-05 A/V2. The value must be greater than

1-656
SPICE PMOS

or equal to 0. If you assign this parameter a value of NaN, the


block calculates the value from the specified values of the Oxide
thickness, TOX and Substrate doping, NSUB parameters.
For more information about this calculation, see “Level 1 Drain
Current Model” on page 1-550 or “Level 3 Drain Current Model”
on page 1-635 as appropriate for the selected value of the MOS
model parameter.
Bulk threshold, GAMMA
Body effect parameter, which relates the threshold voltage, VTH,
to the body bias, VBS, as described in “Level 1 Drain Current
Model” on page 1-550. The default value is 0 V . The value must
be greater than or equal to 0. If you assign this parameter a value
of NaN, the block calculates the value from the specified values
of the Oxide thickness, TOX and Substrate doping, NSUB
parameters. For more information about this calculation, see
“Level 1 Drain Current Model” on page 1-550 or “Level 3 Drain
Current Model” on page 1-635 as appropriate for the selected
value of the MOS model parameter.
Surface potential, PHI
Twice the voltage at which the surface electron concentration
becomes equal to the intrinsic concentration and the device
transitions between depletion and inversion conditions. The
default value is 0.6 V. The value must be greater than or equal to
0. If you assign this parameter a value of NaN, the block calculates
the value from the specified values of the Oxide thickness,
TOX and Substrate doping, NSUB parameters. For more
information about this calculation, see “Level 1 Drain Current
Model” on page 1-550 or “Level 3 Drain Current Model” on page
1-635 as appropriate for the selected value of the MOS model
parameter.
Channel modulation, LAMBDA
The channel-length modulation. This parameter is only visible
when you select Level 1 MOS for the MOS model parameter.
The default value is 0 1/V.

1-657
SPICE PMOS

Bulk saturation current, IS


The magnitude of the current that the junction approaches
asymptotically for very large reverse bias levels. The default
value is 1e-14 A. The value must be greater than or equal to 0.
Bulk jct sat current density, JS
The magnitude of the current per unit area that the junction
approaches asymptotically for very large reverse bias levels. The
default value is 0 A/m2. The value must be greater than or equal
to 0.
Emission coefficient, ND
The transistor emission coefficient or ideality factor. The default
value is 1. The value must be greater than 0.
Width effect on threshold, DELTA
The factor that controls the effect of transistor width on threshold
voltage. This parameter is only visible when you select Level 3
MOS for the MOS model parameter. The default value is 0.
Max carrier drift velocity, VMAX
The maximum drift velocity of the carriers. This parameter is
only visible when you select Level 3 MOS for the MOS model
parameter. The default value is 0 m/s.
Fast surface state density, NFS
The fast surface state density adjusts the drain current for the
mobility reduction caused by the gate voltage. This parameter is
only visible when you select Level 3 MOS for the MOS model
parameter. The default value is 0 1/cm2.
Vds dependence threshold volt, ETA
The coefficient that controls how the threshold voltage depends
on the drain-source voltage in the drain current calculation. This
parameter is only visible when you select Level 3 MOS for the
MOS model parameter. The default value is 0.
Vgs dependence on mobility, THETA
The coefficient that controls how the mobility affects the gate
voltage in the drain current calculation. This parameter is

1-658
SPICE PMOS

only visible when you select Level 3 MOS for the MOS model
parameter. The default value is 0 1/V.
Mobility modulation, KAPPA
The coefficient that controls how the mobility affects the channel
length in the drain current calculation. This parameter is
only visible when you select Level 3 MOS for the MOS model
parameter. The default value is 0.2.

C-V Tab

1-659
SPICE PMOS

Model junction capacitance


Select one of the following options for modeling the junction
capacitance:
• No — Do not include junction capacitance in the model. This is
the default option.
• Yes — Specify zero-bias junction capacitance, junction
potential, grading coefficient, forward-bias depletion and
capacitance coefficient.
G-S overlap capacitance, CGSO
Gate-source capacitance due to the diffusion that occurs when
the device operates in depletion mode. This parameter is only
visible when you select Yes for the Model junction capacitance
parameter. The default value is 0 F/m. The value must be equal
to 0 or greater than or equal to Cmin. Cmin is a built-in model
constant whose value is 1e-18.
G-D overlap capacitance, CGDO
Gate-drain capacitance due to the diffusion that occurs when
the device operates in depletion mode. This parameter is only
visible when you select Yes for the Model junction capacitance
parameter. The default value is 0 F/m. The value must be equal
to 0 or greater than or equal to Cmin. Cmin is a built-in model
constant whose value is 1e-18.
G-B overlap capacitance, CGBO
Gate-base capacitance due to the diffusion that occurs when
the device operates in depletion mode. This parameter is only
visible when you select Yes for the Model junction capacitance
parameter. The default value is 0 F/m. The value must be equal
to 0 or greater than or equal to Cmin. Cmin is a built-in model
constant whose value is 1e-18.
Zero-bias BD capacitance, CBD
The value of the capacitance placed between the base and the
drain. This parameter is only visible when you select Yes for the
Model junction capacitance parameter. The default value is 0

1-660
SPICE PMOS

F. The value must be equal to 0 or greater than or equal to Cmin.


Cmin is a built-in model constant whose value is 1e-18.
Zero-bias BS capacitance, CBS
The value of the capacitance placed between the base and the
source. This parameter is only visible when you select Yes for the
Model junction capacitance parameter. The default value is 0
F. The value must be equal to 0 or greater than or equal to Cmin.
Cmin is a built-in model constant whose value is 1e-18.
Bottom junction cap per area CJ
Zero-bias bulk junction bottom capacitance per junction area.
This parameter is only visible when you select Yes for the Model
junction capacitance parameter. The default value is 0 F/m2.
The value must be equal to 0 or greater than or equal to Cmin.
Cmin is a built-in model constant whose value is 1e-18.
Bottom grading coefficient, MJ
The transistor bottom grading coefficient. This parameter is only
visible when you select Yes for the Model junction capacitance
parameter. The default value is 0.5. The value must be equal to
0 or less than MGmax. MGmax is a built-in model constant whose
value is 0.9.
Side jct cap/area of jct perimeter CJSW
Zero-bias bulk junction sidewall capacitance per junction
perimeter. This parameter is only visible when you select Yes for
the Model junction capacitance parameter. The default value
is 0 F/m. The value must be equal to 0 or greater than or equal to
Cmin. Cmin is a built-in model constant whose value is 1e-18.
Side grading coefficient, MJSW
The transistor sidewall grading coefficient. This parameter is only
visible when you select Yes for the Model junction capacitance
parameter. The default value is 0.5. The value must be equal to
0 or less than MGmax. MGmax is a built-in model constant whose
value is 0.9.

1-661
SPICE PMOS

Bulk junction potential, PB


The potential across the bulk junction. This parameter is only
visible when you select Yes for the Model junction capacitance
parameter. The default value is 0.8 V. The value must be equal
to 0 or greater than or equal to VJmin. VJmin is a built-in model
constant whose value is 0.01.
Capacitance coefficient FC
The fitting coefficient that quantifies the decrease of the depletion
capacitance with applied voltage. This parameter is only visible
when you select Yes for the Model junction capacitance
parameter. The default value is 0.5. The value must be equal to 0
or less than or equal to FCmax. FCmax is a built-in model constant
whose value is 0.95.
Specify initial condition
Select one of the following options for specifying an initial
condition:
• No — Do not specify an initial condition for the model. This is
the default option.
• Yes — Specify the initial diode voltage.

Note The PMOS block applies the initial diode voltage across
the junction capacitors and not across the ports.

Initial condition voltage ICVDS


Drain-source voltage at the start of the simulation. This
parameter is only visible when you select Yes for the Model
junction capacitance and Yes for the Specify initial
condition parameter. The default value is 0 V.
Initial condition voltage ICVGS
Gate-source voltage at the start of the simulation. This parameter
is only visible when you select Yes for the Model junction

1-662
SPICE PMOS

capacitance and Yes for the Specify initial condition


parameter. The default value is 0 V.
Initial condition voltage ICVBS
Bulk-source voltage at the start of the simulation. This parameter
is only visible when you select Yes for the Model junction
capacitance and Yes for the Specify initial condition
parameter. The default value is 0 V.

Process Tab

1-663
SPICE PMOS

Oxide thickness, TOX


Thickness of the gate oxide. The default value is NaN m. The value
must be greater than or equal to 0.

Note When you select Level 3 MOS for the MOS model
parameter, the block uses a value of 1e-7 rather than NaN by
default.

Lateral diffusion, LD
Length of lateral diffusion. The default value is 0 m.
Substrate doping, NSUB
Substrate doping. The default value is NaN 1/cm3. The value must
be greater than or equal to 1.45e10 (the carrier concentration
of intrinsic silicon).
Surface state density, NSS
Substrate doping. The default value is 0 1/cm2.
Surface mobility, U0
Zero-bias surface mobility coefficient. The default value is 600
cm2/V/s.
Junction depth, XJ
Junction depth. This parameter is only visible when you select
Level 3 MOS for the MOS model parameter. The default value
is 0 m.
Gate type?,TPG
Select one of the following MOSFET gate materials (as compared
to the substrate):
• Opposite of substrate — The gate material is the opposite
of the substrate. This means that TPG = 1 in the device
equations. This is the default option.
• Same as substrate — The gate material is the same as the
substrate. This means that TPG = –1 in the device equations.

1-664
SPICE PMOS

• Aluminum — The gate material is aluminum. This means that


TPG = 0 in the device equations.

Temperature Tab

Model temperature dependence using


Select one of the following options for modeling the diode
temperature dependence:
• Device temperature — Use the device temperature, which is
the Circuit temperature value plus the Offset local circuit
temperature, TOFFSET value. The Circuit temperature
value comes from the SPICE Environment Parameters block, if

1-665
SPICE PMOS

one exists in the circuit. Otherwise, it comes from the default


value for this block.
• Fixed temperature — Use a temperature that is independent
of the circuit temperature to model temperature dependence.
Offset local circuit temperature, TOFFSET
The amount by which the transistor temperature differs from
the circuit temperature. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 0 K.
Fixed circuit temperature, TFIXED
The temperature at which to simulate the transistor. This
parameter is only visible when you select Fixed temperature for
the Model temperature dependence using parameter. The
default value is 300.15 K. The value must be greater than 0.
Parameter extraction temperature, TMEAS
The temperature at which the transistor parameters were
measured. The default value is 300.15 K. The value must be
greater than 0.

Ports The block has the following ports:

G
Electrical conserving port associated with the transistor gate
terminal.
D
Electrical conserving port associated with the transistor drain
terminal.
S
Electrical conserving port associated with the transistor source
terminal.
B
Electrical conserving port associated with the transistor bulk
terminal.

1-666
SPICE PMOS

References [1] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993. Chapter 3.

See Also SPICE NMOS

1-667
SPICE PNP

Purpose Model Gummel-Poon PNP Transistor

Library SPICE-Compatible Components/Semiconductor Devices

Description The PNP block represents a SPICE-compatible four-terminal


Gummel-Poon PNP transistor. The substrate port is connected to the
transistor body using a capacitor, so these devices are equivalent to
a three-terminal transistor when you connect the substrate port to
any other port and use the default value of zero for the C-S junction
capacitance, CJS parameter.
The PNP block model includes the following components:

• “Current-Voltage and Base Charge Model” on page 1-668


• “Base Resistance Model” on page 1-672
• “Transit Charge Modulation Model” on page 1-672
• “Junction Charge Model” on page 1-673
• “Temperature Dependence” on page 1-675

Current-Voltage and Base Charge Model


The current-voltage relationships and base charge relationships for
the transistor are calculated after adjusting the applicable model
parameters for temperature as described in the following sections:

• Emitter-Base and Collector-Base Junction Currents on page 668


• Terminal Currents on page 671
• Base Charge Model on page 671

Emitter-Base and Collector-Base Junction Currents


The base-emitter junction current is calculated using the following
equations:

• When VEB > 80 * VTF :

1-668
SPICE PNP

⎛⎛V ⎞ ⎞
I ebf = IS * ⎜ ⎜ EB - 79 ⎟ * e80 - 1⎟ + Gmin * VEB
⎜ V ⎟
⎝ ⎝ TF ⎠ ⎠
⎛ e( 80*VTF /VTE ) ⎞
I ebe = ISE * ⎜ (VEB - 80 * VTF + VTE ) * - 1⎟
⎝ V TE ⎠

• When VEB ≤ 80 * VTF

( )
I ebf = IS * e(VEB /VTF ) - 1 + Gmin * VEB

(
I ebe = ISE * e(VEB /VTE ) - 1 )
The base-collector junction current is calculated using the following
equations:

• When VCB > 80 * VTR :

⎛⎛V ⎞ ⎞
I cbr = IS * ⎜ ⎜ CB - 79 ⎟ * e80 - 1⎟ + Gmin * VCB
⎜ V ⎟
⎝ ⎝ TR ⎠ ⎠
⎛ e( 80*VTR /VTC ) ⎞
I cbc = ISC * ⎜ (VCB - 80 * VTR + VTC ) * - 1⎟
⎝ VTC ⎠

• When VCB ≤ 80 * VTR

( )
I cbr = IS * e(VCB /VTR ) - 1 + Gmin * VCB

(
I cbc = ISC * e(VCB /VTC ) - 1 )
In the preceding equations:

1-669
SPICE PNP

• VEB is the emitter-base voltage and VCB is the collector-base voltage.

VTE = NE * k * T / q, VTC = NC * k * T / q, VTF = NF * k * T / q, and



VTR = NR * k * T / q.
• ISC and ISE are the B-C leakage current, ISC and B-E leakage
current, ISE parameter values, respectively.
• NE, NC, NF, and NR are the B-E emission coefficient, NE,
B-C emission coefficient, NC, Forward emission coefficient,
NF and Reverse emission coefficient, NR parameter values,
respectively.
• q is the elementary charge on an electron.
• k is the Boltzmann constant.
• T is the transistor temperature:
- If you select Device temperature for the Model temperature
dependence using parameter, T is the sum of the Circuit
temperature value plus the Offset local circuit temperature,
TOFFSET parameter value. The Circuit temperature value
comes from the SPICE Environment Parameters block, if one
exists in the circuit. Otherwise, it comes from the default value
for this block.
- If you select Fixed temperature for the Model temperature
dependence using parameter, T is the Fixed circuit
temperature, TFIXED parameter value.
• Gmin is the minimum conductance. By default, Gmin matches
the Minimum conductance GMIN parameter of the SPICE
Environment Parameters block, whose default value is 1e-12. To
change Gmin, add a SPICE Environment Parameters block to your
model and set the Minimum conductance GMIN parameter to
the desired value.

1-670
SPICE PNP

Terminal Currents
The terminal currents, IB and IC are the base and collector currents,
defined as positive into the device. They are calculated as:

⎛ I ebf I ⎞
IB = − ⎜ + I ebe + cbr + I cbc ⎟
⎝ BF BR ⎠
⎛ I ebf - I cbr I cbr ⎞
IC = − ⎜ - - I cbc ⎟
⎝ qb BR ⎠
where BF and BR are the Forward beta, BF and Reverse beta, BR
parameter values, respectively.
Base Charge Model
The base charge, qb, is calculated using the following equations:

qb =
q1 ⎛
2⎝
⎜1 + 0.5 * ( ) ⎞
(1 + 4 * q2 - eps ) 2 + eps 2 + 1 + 4 * q2 - eps + eps ⎟

−1
⎛ V V ⎞
q1 = ⎜1 − CB − EB ⎟
⎝ VAF VAR ⎠

I ebf I cbr
q2 = +
IKF IKR
where

• VAF and VAR are the Forward Early voltage, VAF and Reverse
Early voltage, VAR parameters, respectively.
• IKF and IKR are the Forward knee current, IKF and Reverse
knee current, IKR parameter values, respectively.
• eps is 1e-4.

1-671
SPICE PNP

Base Resistance Model


The block models base resistance in one of two ways:

• If you use the default value of infinity for the Half base resistance
cur, IRB parameter, the PNP block calculates the base resistance
rbb as

RB - RBM
rbb = RBM +
qb
where:
- RBM is the Minimum base resistance, RBM parameter value.
- RB is the Zero-bias base resistance, RB parameter value.
• If you specify a finite value for the Half base resistance cur, IRB
parameter, the PNP block calculates the base resistance rbb as

⎛ tan z - z ⎞
rbb = RBM + 3 * ( RB - RBM ) * ⎜ 2 ⎟
⎝ z * tan z ⎠
where:

1 + 144 I B / ( 2 IRB ) − 1
z=
( 24 /  ) ( I
2
B / IRB )

Transit Charge Modulation Model


If you specify nonzero values for the Coefficient of TF, XTF
parameter, the block models transit charge modulation by scaling the
Forward transit time, TF parameter value as follows:

1-672
SPICE PNP

⎡ VCB / (1.44VTF ) ⎛ I EB ⎞ ⎤
2

TF * ⎢1 + XTF * e ⎜ ⎟ ⎥
⎢⎣ ⎝ I EB + ITF ⎠ ⎥⎦
TFmod =
qb
where ITF is the Coefficient of TF, ITF parameter value.

Junction Charge Model


The PNP block lets you model junction charge. The collector-base
charge Qcb and the emitter-base charge Qeb depend on an intermediate
value, Qdep as follows, after adjusting the applicable model parameters
for temperature:

• For the internal base-emitter junctions:

Qeb = TFmod * I eb + Qdep

• For the internal base-collector junctions:

Qcb = TR * I cb + XCJC * Qdep

• For the external base-collector junctions:

Qcbext = (1 − XCJC ) * Qdep

Qdep depends on the junction voltage, Vjct (VEB for the emitter-base
junction and VCB for the collector-base junction) as follows.

1-673
SPICE PNP

Applicable Corresponding Qdep Equation


Range of Vjct
Values

1 - (1 -V jct /VJ )
(1− MJ )
V jct < FC * VJ
Qdep = C jct * VJ *
1 − MJ

V jct ≥ FC * VJ ⎡ MJ * ⎡V jct 2 - ( FC * VJ ) ⎤ ⎤
2

⎢ F 3* (V jct - FC * VJ ) + ⎣ ⎦⎥
⎢ 2 * VJ ⎥
Qdep = C jct * ⎢ F1 + ⎥
F2
⎢ ⎥
⎢⎣ ⎥⎦

Where:

• FC is the Capacitance coefficient FC parameter value.


• VJ is:
- The B-E built-in potential, VJE parameter value for the
emitter-base junction.
- The B-C built-in potential, VJC parameter value for the
collector-base junction.
• MJ is:
- The B-E exponential factor, MJE parameter value for the
emitter-base junction.
- The B-C exponential factor, MJC parameter value for the
collector-base junction.
• Cjct is:
- The B-E depletion capacitance, CJE parameter value for the
emitter-base junction.

1-674
SPICE PNP

- The B-C depletion capacitance, CJC parameter value for the


collector-base junction.

• (
F1 = VJ * 1 - (1 - FC )
(1− MJ )
) (1 − MJ )
F 2 = (1 - FC )
(1+ MJ )

• F 3 = 1 - FC * (1 + MJ )
The collector-substrate charge Qsc depends on the collector-substrate
voltage Vsc as follows, after adjusting the applicable model parameters
for temperature.

Applicable Corresponding Qsc Equation


Range of Vsc
Values

Vsc < 0 ⎛ 1 - (1 -Vsc /VJS )(1−MJS ) ⎞


Qsc = CJS * VJS * ⎜ ⎟
⎜ 1 − MJS ⎟
⎝ ⎠

Vsc ≥ 0 Qsc = CJS * (1 + MJS * Vsc /(2 * VJS ) ) * Vsc


where:

• CJS is the C-S junction capacitance, CJS parameter value.


• VJS is the Substrate built-in potential, VJS parameter value.
• MJS is the Substrate exponential factor, MJS parameter value.

Temperature Dependence
Several transistor parameters depend on temperature. There are two
ways to specify the transistor temperature:

1-675
SPICE PNP

• When you select Device temperature for the Model temperature


dependence using parameter, the transistor temperature is

T = TC + TO
where:
- TC is the Circuit temperature parameter value from the SPICE
Environment Parameters block. If this block doesn’t exist in the
circuit, TC is the default value of this parameter.
- TO is the Offset local circuit temperature, TOFFSET
parameter value.
• When you select Fixed temperature for the Model temperature
dependence using parameter, the transistor temperature is the
Fixed circuit temperature, TFIXED parameter value.

The block provides the following relationship between the saturation


current IS and the transistor temperature T:

⎛ T ⎞ EG
⎜⎜ −1⎟⎟*
IS (T ) = IS * (T Tmeas )
XTI ⎝ Tmeas ⎠ Vt
*e
where:

• IS is the Transport saturation current, IS parameter value.


• Tmeas is the Parameter extraction temperature, TMEAS
parameter value.
• XTI is the Temperature exponent for IS, XTI parameter value.
• EG is the Energy gap, EG parameter value.
• Vt = kT/q.

The block provides the following relationship between the base-emitter


junction potential VJE and the transistor temperature T:

1-676
SPICE PNP

⎛ T ⎞ 3* k * T ⎛ T ⎞ ⎛ T ⎞
VJE (T ) = VJE * ⎜ ⎟- * log ⎜ ⎟-⎜ ⎟ * EGTmeas + EGT
⎝ Tmeas ⎠ q ⎝ Tmeas ⎠ ⎝ Tmeas ⎠
where:

• VJE is the B-E built-in potential, VJE parameter value.

• EGTmeas = 1.16eV - ( 7.02e - 4 * Tmeas 2 ) / (Tmeas + 1108 )

• EGT = 1.16eV - ( 7.02e - 4 * T 2 ) / (T + 1108 )


The block uses the VJE(T) equation to calculate the base-collector
junction potential by substituting VJC (the B-C built-in potential,
VJC parameter value) for VJE.
The block provides the following relationship between the base-emitter
junction capacitance CJE and the transistor temperature T:

⎡ ⎛ VJE (T ) -VJE ⎞ ⎤
CJE (T ) = CJE * ⎢1 + MJE * ⎜ 400e − 6 * (T - Tmeas ) - ⎟⎥
⎣ ⎝ VJE ⎠⎦
where:

• CJE is the B-E depletion capacitance, CJE parameter value.


• MJE is the B-E exponential factor, MJE parameter value.

The block uses this equation to calculate the base-collector junction


capacitance by substituting CJC (the B-C depletion capacitance,
CJC parameter value) for CJE and MJC (the B-C exponential factor,
MJC parameter value) for MJE.
The block provides the following relationship between the forward and
reverse beta and the transistor temperature T:

1-677
SPICE PNP

XTB
⎛ T ⎞
 (T ) =  * ⎜ ⎟
⎝ Tmeas ⎠
where:

• β is the Forward beta, BF or Reverse beta, BR parameter value.


• XTB is the Beta temperature exponent, XTB parameter value.

The block provides the following relationship between the base-emitter


leakage current ISE and the transistor temperature T:

-XTB
⎛ T ⎞
1 / NE
⎛ IS(T) ⎞
ISE (T ) = ISE * ⎜ ⎟ *⎜ ⎟
⎝ Tmeas ⎠ ⎝ IS ⎠
where:

• ISE is the B-E leakage current, ISE parameter value.


• NE is the B-E emission coefficient, NE parameter value.

The block uses this equation to calculate the base-collector leakage


current by substituting ISC (the B-C leakage current, ISC parameter
value) for ISE and NC (the B-C emission coefficient, NC parameter
value) for NE.

Basic The model is based on the following assumptions:


Assumptions
and • The PNP block does not support noise analysis.
Limitations • The PNP block applies initial conditions across junction capacitors
and not across the block ports.

1-678
SPICE PNP

Dialog Main Tab


Box and
Parameters

Device area, AREA


The transistor area. This value multiplies the following parameter
values:
• Transport saturation current, IS
• Forward knee current, IKF
• B-E leakage current, ISE
• Reverse knee current, IKR
• B-C leakage current, ISC

1-679
SPICE PNP

• Half base resistance cur, IRB


• B-E depletion capacitance, CJE
• Coefficient of TF, ITF
• B-C depletion capacitance, CJC
• C-S junction capacitance, CJS

It divides the following parameter values:


• Zero-bias base resistance, RB
• Minimum base resistance, RBM
• Emitter resistance, RE
• Collector resistance, RC

The default value is 1 m2. The value must be greater than 0.


Number of parallel devices, SCALE
The number of parallel transistors the block represents. This
value multiplies the output current and device charges. The
default value is 1. The value must be greater than 0.

1-680
SPICE PNP

Forward Gain Tab

Transport saturation current, IS


The magnitude of the current at which the transistor saturates.
The default value is 1e-16 A/m2. The value must be greater than
or equal to 0.
Forward beta, BF
The ideal maximum reverse beta. The default value is 100. The
value must be greater than 0.

1-681
SPICE PNP

Forward emission coefficient, NF


The reverse emission coefficient or ideality factor. The default
value is 1. The value must be greater than 0.
B-E leakage current, ISE
The base-emitter leakage current. The default value is 0 A/m2.
The value must be greater than or equal to 0.
B-E emission coefficient, NE
The base-collector emission coefficient or ideality factor. The
default value is 1.5. The value must be greater than 0.
Forward knee current, IKF
The current value at which forward-beta high-current roll-off
occurs. The default value is 0 A/m2. The value must be greater
than or equal to 0. For this parameter, the software interprets
a value of 0 as infinity.
Forward Early voltage, VAF
The forward Early voltage. The default value is 0 V. The value
must be greater than or equal to 0. For this parameter, the
software interprets a value of 0 as infinity.

1-682
SPICE PNP

Reverse Gain Tab

Reverse beta, BR
The ideal maximum reverse beta. The default value is 1. The
value must be greater than 0.
Reverse emission coefficient, NR
The reverse emission coefficient or ideality factor. The default
value is 1. The value must be greater than 0.
B-C leakage current, ISC
The base-collector leakage current. The default value is 0 A/m2.
The value must be greater than or equal to 0.

1-683
SPICE PNP

B-C emission coefficient, NC


The base-collector emission coefficient or ideality factor. The
default value is 2. The value must be greater than 0.
Reverse knee current, IKR
The current value at which reverse-beta high-current roll-off
occurs. The default value is 0 A/m2. The value must be greater
than or equal to 0. For this parameter, the software interprets
a value of 0 as infinity.
Reverse Early voltage, VAR
The reverse Early voltage. The default value is 0 V. The value
must be greater than or equal to 0. For this parameter, the
software interprets a value of 0 as infinity.

1-684
SPICE PNP

Resistors Tab

Emitter resistance, RE
The resistance of the emitter. The default value is 1e-4 m2*Ω.
The value must be greater than or equal to 0.
Collector resistance, RC
The resistance of the collector. The default value is 0.01 m2*Ω.
The value must be greater than or equal to 0.
Zero-bias base resistance, RB
The resistance of the base. The default value is 1 m2*Ω. The value
must be greater than or equal to 0.

1-685
SPICE PNP

Minimum base resistance, RBM


The minimum resistance of the base. The default value is 0 m2*Ω.
The value must be less than or equal to the Zero-bias base
resistance, RB parameter value.
Half base resistance cur, IRB
The base current at which the base resistance has dropped to
half of its zero-bias value. The default value is Inf A/m2. The
value must be greater than or equal to 0. Use the default value
of Inf if you do not want to model the change in base resistance
as a function of base current.

Capacitance Tab

1-686
SPICE PNP

Model junction capacitance


Select one of the following options for modeling the junction
capacitance:
• No — Do not include junction capacitance in the model. This is
the default option.
• B-E Capacitance — Model the junction capacitance across the
base-emitter junction.
• B-C Capacitance — Model the junction capacitance across the
base-collector junction.
• C-S Capacitance — Model the junction capacitance across the
collector-substrate junction.

Note To include junction capacitance in the model:


1 Select B-E Capacitance and specify the base-emitter junction
capacitance parameters.
2 Select B-C Capacitance and specify the base-collector junction
capacitance parameters.
3 Select C-S Capacitance and specify the collector-substrate
junction capacitance parameters.

You can specify or change any of the common parameters when


you select any of the preceding options for the Model junction
capacitance parameter.

B-E depletion capacitance, CJE


The depletion capacitance across the base-emitter junction. This
parameter is only visible when you select B-E Capacitance for
the Model junction capacitance parameter. The default value
is 0 F/m2. The value must be greater than or equal to 0.

1-687
SPICE PNP

B-E built-in potential, VJE


The base-emitter junction potential. This parameter is only
visible when you select B-E Capacitance for the Model junction
capacitance parameter. The default value is 0.75 V. The value
must be greater than or equal to 0.01 V.
B-E exponential factor, MJE
The grading coefficient for the base-emitter junction. This
parameter is only visible when you select B-E Capacitance for
the Model junction capacitance parameter. The default value
is 0.33. The value must be greater than or equal to 0 and less
than or equal to 0.9.
Forward transit time, TF
The transit time of the minority carriers that cause diffusion
capacitance when the base-emitter junction is forward-biased.
This parameter is only visible when you select B-E Capacitance
for the Model junction capacitance parameter. The default
value is 0. The value must be greater than or equal to 0.
Coefficient of TF, XTF
The coefficient for the base-emitter and base-collector bias
dependence of the transit time, which produces a charge across
the base-emitter junction. This parameter is only visible when you
select B-E Capacitance for the Model junction capacitance
parameter. The default value is 0. The value must be greater
than or equal to 0. Use the default value of 0 if you do not want to
model the effect of base-emitter bias on transit time.
VBC dependence of TF, VTF
The coefficient for the base-emitter bias dependence of the
transit time. This parameter is only visible when you select B-E
Capacitance for the Model junction capacitance parameter.
The default value is 0 V. The value must be greater than or equal
to 0. For this parameter, the software interprets a value of 0 as
infinity.

1-688
SPICE PNP

Coefficient of TF, ITF


The coefficient for the dependence of the transit time on collector
current. This parameter is only visible when you select B-E
Capacitance for the Model junction capacitance parameter.
The default value is 0 A/m2. The value must be greater than or
equal to 0. Use the default value of 0 if you do not want to model
the effect of collector current on transit time.
B-C depletion capacitance, CJC
The depletion capacitance across the base-collector junction. This
parameter is only visible when you select B-C Capacitance for
the Model junction capacitance parameter. The default value
is 0 F/m2. The value must be greater than 0.
B-C built-in potential, VJC
The base-collector junction potential. This parameter is only
visible when you select B-C Capacitance for the Model junction
capacitance parameter. The default value is 0.75 V. The value
must be greater than or equal to 0.01 V.
B-C exponential factor, MJC
The grading coefficient for the base-collector junction. This
parameter is only visible when you select B-C Capacitance for
the Model junction capacitance parameter. The default value
is 0.33. The value must be greater than or equal to 0 and less
than or equal to 0.9.
B-C capacitance fraction, XCJC
The fraction of the base-collector depletion capacitance that is
connected between the internal base and the internal collector.
The rest of the base-collector depletion capacitance is connected
between the external base and the internal collector. This
parameter is only visible when you select B-C Capacitance for
the Model junction capacitance parameter. The default value
is 0. The value must be greater than or equal to 0 and less than
or equal to 1.

1-689
SPICE PNP

Reverse transit time, TR


The transit time of the minority carriers that cause diffusion
capacitance when the base-collector junction is reverse-biased.
This parameter is only visible when you select B-C Capacitance
for the Model junction capacitance parameter. The default
value is 0 s. The value must be greater than or equal to 0.
Capacitance coefficient FC
The fitting coefficient that quantifies the decrease of the depletion
capacitance with applied voltage. This parameter is only visible
when you select B-E Capacitance or B-C Capacitance for the
Model junction capacitance parameter. The default value is
0.5. The value must be greater than or equal to 0 and less than or
equal to 0.95.
Specify initial condition
Select one of the following options for specifying an initial
condition:
• No — Do not specify an initial condition for the model. This is
the default option.
• Yes — Specify the initial transistor conditions.

Note The PNP block applies the initial transistor voltages


across the junction capacitors and not across the ports.

This parameter is only visible when you select B-E Capacitance


or B-C Capacitance for the Model junction capacitance
parameter.
Initial condition voltage ICVBE
Base-emitter voltage at the start of the simulation. This
parameter is only visible when you select B-E Capacitance or
B-C Capacitance for the Model junction capacitance and Yes
for the Specify initial condition parameter. The default value
is 0 V.

1-690
SPICE PNP

Initial condition voltage ICVCE


Base-collector voltage at the start of the simulation. This
parameter is only visible when you select B-E Capacitance or
B-C Capacitance for the Model junction capacitance and Yes
for the Specify initial condition parameter. The default value
is 0 V.
C-S junction capacitance, CJS
The collector-substrate junction capacitance. This parameter is
only visible when you select C-S Capacitance for the Model
junction capacitance parameter. The default value is 0 F/m2.
The value must be greater than or equal to 0.
Substrate built-in potential, VJS
The potential of the substrate. This parameter is only visible
when you select C-S Capacitance for the Model junction
capacitance parameter. The default value is 0.75 V.
Substrate exponential factor, MJS
The grading coefficient for the collector-substrate junction. This
parameter is only visible when you select C-S Capacitance for
the Model junction capacitance parameter. The default value
is 0. The value must be greater than or equal to 0 and less than or
equal to 0.9.

1-691
SPICE PNP

Temperature Tab

Model temperature dependence using


Select one of the following options for modeling the transistor
temperature dependence:
• Device temperature — Use the device temperature, which is
the Circuit temperature value plus the Offset local circuit
temperature, TOFFSET value. The Circuit temperature
value comes from the SPICE Environment Parameters block, if
one exists in the circuit. Otherwise, it comes from the default
value for this block.

1-692
SPICE PNP

• Fixed temperature — Use a temperature that is independent


of the circuit temperature to model temperature dependence.
Beta temperature exponent, XTB
The forward and reverse beta temperature exponent that models
base current temperature dependence. This parameter is only
visible when you select Device temperature for the Model
temperature dependence using parameter. The default value
is 0. The value must be greater than or equal to 0.
Energy gap, EG
The energy gap that affects the increase in the saturation current
as temperature increases. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 1.11 eV. The
value must be greater than or equal to 0.1.
Temperature exponent for IS, XTI
The order of the exponential increase in the saturation current
as temperature increases. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 3. The value
must be greater than or equal to 0.
Offset local circuit temperature, TOFFSET
The amount by which the transistor temperature differs from
the circuit temperature. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 0 K.
Parameter extraction temperature, TMEAS
The temperature at which the transistor parameters were
measured. The default value is 300.15 K. The value must be
greater than 0.
Fixed circuit temperature, TFIXED
The temperature at which to simulate the transistor. This
parameter is only visible when you select Fixed temperature for
the Model temperature dependence using parameter. The
default value is 300.15 K. The value must be greater than 0.

1-693
SPICE PNP

Ports The block has the following ports:

B
Electrical conserving port associated with the transistor base
terminal.
C
Electrical conserving port associated with the transistor collector
terminal.
E
Electrical conserving port associated with the transistor emitter
terminal.
S
Electrical conserving port associated with the transistor substrate
terminal.

References [1] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993. Chapter 2.

See Also Generic Linear Actuator

1-694
SPICE Resistor

Purpose Model SPICE-compatible resistor

Library SPICE-Compatible Components/Passive Devices

Description The SPICE Resistor block represents a SPICE-compatible resistor. You


can specify the resistance in one of the following ways:

• As a resistance value
• As process information that the block uses to calculate a resistance
value

The block models temperature dependence. There are two ways to


specify the resistor temperature:

• When you select Device temperature for the Model temperature


dependence using parameter, the resistor temperature is

T = TC + TO
where:
- TC is the Circuit temperature parameter value from the SPICE
Environment Parameters block. If this block doesn’t exist in the
circuit, TC is the default value of this parameter.
- TO is the Offset local circuit temperature, TOFFSET
parameter value.
• When you select Fixed temperature for the Model temperature
dependence using parameter, the resistor temperature is the
Fixed circuit temperature, TFIXED parameter value.

The block adjusts the specified or calculated resistance value for


temperature using the following equation:

R = R0(1+TC1(T–Tnom)+TC2(T–Tnom)2)

Where

1-695
SPICE Resistor

• R0 is the specified or calculated resistance value.


• TC1 is the First order temperature coefficient, TC1 parameter
value.
• TC2 is the Second order temperature coefficient, TC2
parameter value.
• Tnom is the Parameter extraction temperature, TMEAS
parameter value.

Dialog Resistance Tab


Box and
Parameters

Device scale factor, SCALE


The number of parallel resistors that the block represents. This
value multiplies the output current. The default value is 1.
Resistor parameterization
Select one of the following options for specifying the resistor value:

1-696
SPICE Resistor

• Use specified resistance — Provide the resistance value


directly. This option is the default.
• Calculate from process information — Provide process
parameters that the block uses to calculate the resistance value.
When you select this option, the block calculates the resistance
using the following equation:

( LENGTH − NARROW )
R = RSH *
(WIDTH − NARROW )
where:
— RSH is the Sheet resistance, RSH parameter value.
— LENGTH is the Resistor length, LENGTH parameter
value.
— WIDTH is the Resistor width, WIDTH parameter value.
— NARROW is the Etch narrowing, NARROW parameter
value.
Resistance, R
Resistance value. This parameter is only visible when you select
Use specified resistance for the Resistor parameterization
parameter. The default value is 0 Ω.
Sheet resistance, RSH
Resistance per square of the resistor. This parameter is only
visible when you select Calculate from process information
for the Resistor parameterization parameter. The default
value is 0 Ω.
Resistor length, LENGTH
Length dimension of the resistor. This parameter is only visible
when you select Calculate from process information for the
Resistor parameterization parameter. The default value is
1e-06 m.

1-697
SPICE Resistor

Resistor width, WIDTH


Width dimension of the resistor. This parameter is only visible
when you select Calculate from process information for the
Resistor parameterization parameter. The default value is
1e-06 m.
Etch narrowing, NARROW
Amount by which the resistor length and width are reduced
due to side etching. This parameter is only visible when you
select Calculate from process information for the Resistor
parameterization parameter. The default value is 0 m.

Temperature Tab

First order temperature coefficient, TC1


Coefficient for the linear term in the equation that the block
uses to adjust the specified or calculated resistance value for
temperature. The default value is 0 1/K.

1-698
SPICE Resistor

Second order temperature coefficient, TC2


Coefficient for the quadratic term in the equation the block
uses to adjust the specified or calculated resistance value for
temperature. The default value is 0 1/K2.
Model temperature dependence using
Select one of the following options for modeling the resistor
temperature dependence:
• Device temperature — Use the device temperature, which is
the Circuit temperature parameter value (from the SPICE
Environment Parameters block, if one exists in the circuit, or
the default value for this block otherwise) plus the Offset local
circuit temperature, TOFFSET parameter value.
• Fixed temperature — Use a temperature that is independent
of the circuit temperature to model temperature dependence.
Offset local circuit temperature, TOFFSET
The amount by which the resistor temperature differs from
the circuit temperature. This parameter is only visible when
you select Device temperature for the Model temperature
dependence using parameter. The default value is 0 K.
Parameter extraction temperature, TMEAS
The temperature at which the resistor parameters were measured.
The default value is 300.15 K. The value must be greater than 0.
Fixed circuit temperature, TFIXED
The temperature at which to simulate the resistor. This
parameter is only visible when you select Fixed temperature for
the Model temperature dependence using parameter. The
default value is 300.15 K. The value must be greater than 0.

Ports The block has the following ports:

+
Positive electrical voltage.

1-699
SPICE Resistor

-
Negative electrical voltage.

See Also Diode

1-700
SPST Switch

Purpose Model single-pole single-throw switch

Library Passive Devices/Switches

Description The SPST Switch block models a single-pole single-throw switch:

• When the switch is closed, port c is connected to port s through a


resistance with value equal to the Closed resistance parameter
value.
• When the switch is open, port c is connected to port s through
a resistance with value equal to the reciprocal of the Open
conductance parameter value.

The switch is closed if the voltage presented at the vT control port


exceeds the value of the Threshold parameter.
Optionally, you can add a delay between the point at which the voltage
at vT passes the threshold and the switch opening or closing. To enable
the delay, on the Dynamics tab, set the Model dynamics parameter
to Model turn-on and turn-off times.

Dialog
Box and
Parameters

• “Main Tab” on page 1-702

1-701
SPST Switch

• “Dynamics Tab” on page 1-702

Main Tab

Closed resistance
Resistance between the c and s electrical ports when the switch is
closed. The value must be greater than zero. The default value
is 0.01 Ω.
Open conductance
Conductance between the c and s electrical ports when the switch
is open. The value must be greater than zero. The default value
is 1e-6 S.
Threshold
The threshold voltage for the control physical signal input vT
above which the switch will turn on. The default value is 0 V.

Dynamics Tab

Model dynamics
Select whether the block models a switching delay:
• No dynamics — Do not model the delay. This is the default
option.
• Model turn-on and turn-off times — Use additional
parameters to model a delay between the point at which the
voltage at vT passes the threshold and the switch opening or
closing.
Turn-on delay
Time between the input voltage exceeding the threshold voltage
and the switch closing. This parameter is only visible when
you select Model turn-on and turn-off times for the Model
dynamics parameter. The value must be greater than zero. The
default value is 1e-3 seconds.
Turn-off delay
Time between the input voltage falling below the threshold
voltage and the switch opening. This parameter is only visible

1-702
SPST Switch

when you select Model turn-on and turn-off times for the
Model dynamics parameter. The value must be greater than
zero. The default value is 1e-3 seconds.
Initial input value, vT
The value of the physical signal input vT at time zero. This
value is used to initialize the delayed control voltage parameter
internally. This parameter is only visible when you select
Model turn-on and turn-off times for the Model dynamics
parameter. The default value is 0 V.

Ports This block has the following ports:

vT
Physical signal that opens and closes the switch
c, s
Electrical conserving ports

See Also DPDT Switch | DPST Switch | SPDT Switch | Switch

1-703
Stepper Motor

Purpose Model stepper motor

Library Rotational Actuators

Description The Stepper Motor block represents a stepper motor. It uses the input
pulse trains, A and B, to control the mechanical output according to the
following equations:

eA   K m sin( N r )

eB  K m cos( N r )

diA
  v A  RiA  eA  / L
dt

diB
  vB  RiB  eB  / L
dt

d
J  B  Te
dt

 e   e 
Te   K m  iA  A  sin  N r   K m  iB  B  cos  N r   Td sin  4N
N r 
 Rm   Rm 

d

dt
where:

• eA and eB are the back emfs induced in the A and B phase windings,
respectively.
• iA and iB are the A and B phase winding currents.

1-704
Stepper Motor

• vA and vB are the A and B phase winding voltages.


• Km is the motor torque constant.
• Nr is the number of teeth on each of the two rotor poles. The Full
step size parameter is (π/2)/Nr.
• R is the winding resistance.
• L is the winding inductance.
• Rm is the magnetizing resistance.
• B is the rotational damping.
• J is the inertia.
• ω is the rotor speed.
• Θ is the rotor angle.
• Td is the detent torque amplitude.

If the initial rotor is zero or some multiple of (π/2)/Nr, the rotor is


aligned with the phase winding of pulse A. This happens when there is
a positive current flowing from the A+ to the A- ports and there is no
current flowing from the B+ to the B- ports.
Use the Stepper Motor Driver block to create the pulse trains for the
Stepper Motor block.
The Stepper Motor block produces a positive torque acting from the
mechanical C to R ports when the phase of pulse A leads the phase
of pulse B.

Thermal Ports
The block has three optional thermal ports, one for each of the two
windings and one for the rotor. These ports are hidden by default.
To expose the thermal ports, right-click the block in your model, and
then from the context menu select Simscape block choices > Show
thermal port. This action displays the thermal ports on the block
icon, and adds the Temperature Dependence and Thermal port

1-705
Stepper Motor

tabs to the block dialog box. These tabs are described further on this
reference page.
Use the thermal ports to simulate the effects of copper resistance and
iron losses that convert electrical power to heat. For more information
on using thermal ports in actuator blocks, see “Simulating Thermal
Effects in Rotational and Translational Actuators”.

Basic The model is based on the following assumptions:


Assumptions
and • This model neglects magnetic saturation effects and any magnetic
coupling between phases.
Limitations
• When you select the Start simulation from steady state check
box in the Simscape Solver Configuration block, this block will not
initialize an Initial rotor angle value between –π and π.

Dialog
Box and
Parameters

1-706
Stepper Motor

• “Electrical Torque Tab” on page 1-707


• “Mechanical Tab” on page 1-707
• “Temperature Dependence Tab” on page 1-708
• “Thermal Port Tab” on page 1-708

Electrical Torque Tab

Phase winding resistance


Resistance of the A and B phase windings. The default value is
0.55 Ω.
Phase winding inductance
Inductance of the A and B phase windings. The default value is
0.0015 H.
Motor torque constant
Motor torque constant Km. The default value is 0.19 N*m/A.
Detent torque
The amplitude of the sinusoidal torque variation observed when
rotating the shaft of the unpowered motor. The default value is
0 N*m.
Magnetizing resistance
The total magnetizing resistance seen from each of the phase
windings. The value must be greater than zero. The default value
is Inf, which implies that there are no iron losses.
Full step size
Step size when changing the polarity of either the A or B phase
current. The default value is 1.8°.

Mechanical Tab

Rotor inertia
Resistance of the rotor to change in motor motion. The default
value is 4.5e-05 kg*m2. The value can be zero.

1-707
Stepper Motor

Rotor damping
Energy dissipated by the rotor. The default value is 8e-04
N*m/(rad/s). The value can be zero.
Initial rotor speed
Speed of the rotor at the start of the simulation. The default
value is 0 rpm.
Initial rotor angle
Angle of the rotor at the start of the simulation. The default
value is 0 rad.

Temperature Dependence Tab


This tab appears only for blocks with exposed thermal ports. For more
information, see “Thermal Ports” on page 1-705.

Resistance temperature coefficients, [alpha_A alpha_B]


A 1 by 2 row vector defining the coefficient α in the equation
relating resistance to temperature, as described in “Thermal
Model for Actuator Blocks”. The first element corresponds to
winding A, and the second to winding B. The default value is for
copper, and is [ 0.00393 0.00393 ] 1/K.
Measurement temperature
The temperature for which motor parameters are defined. The
default value is 25 C.

Thermal Port Tab


This tab appears only for blocks with exposed thermal ports. For more
information, see “Thermal Ports” on page 1-705.

Winding thermal masses, [M_A M_B]


A 1 by 2 row vector defining the thermal mass for the A and B
windings. The thermal mass is the energy required to raise the
temperature by one degree. The default value is [ 100 100 ] J/K.

1-708
Stepper Motor

Winding initial temperatures, [T_A T_B]


A 1 by 2 row vector defining the temperature of the A and B
thermal ports at the start of simulation. The default value is [
25 25 ] C.
Rotor thermal mass
The thermal mass of the rotor, that is, the energy required to
raise the temperature of the rotor by one degree. The default
value is 50 J/K.
Rotor initial temperature
The temperature of the rotor at the start of simulation. The
default value is 25 C.
Percentage of magnetizing resistance associated with the rotor
The percentage of the magnetizing resistance associated with the
magnetic path through the rotor. It determines how much of the
iron loss heating is attributed to the rotor thermal port HR, and
how much is attributed to the two winding thermal ports HA and
HB. The default value is 90%.

Ports The block has the following ports:

A+
Top A-phase electrical connection
A-
Lower A-phase electrical connection
B+
Top B-phase electrical connection
B-
Lower B-phase electrical connection
C
Mechanical rotational conserving port
R
Mechanical rotational conserving port

1-709
Stepper Motor

HA
Winding A thermal port. For more information, see “Thermal
Ports” on page 1-705.
HB
Winding B thermal port. For more information, see “Thermal
Ports” on page 1-705.
HR
Rotor thermal port. For more information, see “Thermal Ports”
on page 1-705.

Examples See the Controlled Stepper Motor example.

References [1] M. Bodson, J. N. Chiasson, R. T. Novotnak and R. B. Rekowski.


“High-Performance Nonlinear Feedback Control of a Permanent Magnet
Stepper Motor.” IEEE Transactions on Control Systems Technology,
Vol. 1, No. 1, March 1993.

[2] P. P. Acarnley. Stepping Motors: A Guide to Modern Theory and


Practice. New York: Peregrinus, 1982.

[3] S.E. Lyshevski. Electromechanical Systems, Electric Machines, and


Applied Mechatronics. CRC, 1999.

See Also Stepper Motor Driver | Unipolar Stepper Motor

1-710
Stepper Motor Driver

Purpose Driver for stepper motor

Library Drivers

Description The Stepper Motor Driver block represents a driver for a stepper motor.
It creates the pulse trains, A and B, required to control the motor. This
block initiates a step each time the voltage at the PWM port rises above
the Enable threshold voltage parameter value.
If the voltage at the REV port is less than or equal to the Reverse
threshold voltage parameter value, pulse A leads pulse B by 90
degrees. If the voltage at the REV port is greater than the Reverse
threshold voltage value, pulse B leads pulse A by 90 degrees and the
motor direction is reversed.
At time zero, pulse A is positive and pulse B is negative.
If you set the Stepping mode parameter to Half stepping, the
Stepper Motor Driver block can produce the output waveforms required
for half stepping. In this mode, there is an intermediate state between
the full steps, in which just one of the A or the B half-windings is
powered. As a result, the step size is half of the stepper motor’s full step
size. At half steps, windings that are not powered are short-circuited.
This approximates the effect of a freewheeling diode connected across
the windings.

1-711
Stepper Motor Driver

Dialog
Box and
Parameters

Enable threshold voltage


When the voltage at the PWM port rises above this threshold, the
Stepper Motor Driver block initiates a step. The default value is
2.5 V.
Reverse threshold voltage
When the voltage at the REV port rises above this threshold,
pulse B leads pulse A by 90 degrees, and the motor direction is
reversed. The default value is 2.5 V.
Output voltage amplitude
Amplitude of the output pulse trains. The default value is 10 V.
Stepping mode
Select Full stepping or Half stepping. The default value is
Full stepping.

Ports The block has the following ports:

1-712
Stepper Motor Driver

A+
Positive electrical output of pulse A
A-
Negative electrical output of pulse A
B+
Positive electrical output of pulse B
B-
Negative electrical output of pulse B
PWM
Triggering input step voltage
REF
Input floating reference voltage
REV
Input voltage that controls motor direction

Examples See the Controlled Stepper Motor example.

See Also Controlled PWM Voltage | Stepper Motor

1-713
Strain Gauge

Purpose Model deformation sensor

Library Sensors

Description The Strain Gauge block represents a sensor that generates a change in
resistance as a function of strain using the following equation:

ΔR
= Kε
R
where:

• ΔR/R is the fractional change in resistance.


• ε is the strain at port B.
• K is the Gauge factor parameter value.

Dialog
Box and
Parameters

Gauge resistance
The unstressed gauge resistance. The default value is 100 Ω.
Gauge factor
The ratio K of the fractional change in resistance to the fractional
change in length. The default value is 2.

Ports The block has the following ports:

1-714
Strain Gauge

B
Strain input
+
Positive electrical port
-
Negative electrical port

1-715
Thermal Resistor

Purpose Model resistor with thermal port

Library Passive Devices

Description The Thermal Resistor block represents a temperature-dependent


resistor. The resistance when the temperature at the thermal port is
T is

R = R0(1+α(T–T0))

where:

• R0 is the nominal resistance at the reference temperature T0.


• α is the temperature coefficient.

The following equation describes the thermal behavior of the block:

dT 2
Q  K d tc i R
dt
where:

• Q is the net heat flow into port A.


• Kd is the Dissipation factor parameter value.
• tc is the Thermal time constant parameter value.
• dT/dt is the rate of change of the temperature.
• i is the current through the resistor.

1-716
Thermal Resistor

Dialog
Box and
Parameters

• “Electrical Tab” on page 1-717


• “Thermal Tab” on page 1-718

Electrical Tab

Nominal resistance
The nominal resistance of the thermistor at the reference
temperature. Many datasheets quote the nominal resistance at
25°C (298.15 K) and list it as R25. The default value is 1 Ω.
Reference temperature
The temperature at which the nominal resistance was measured.
The default value is 298.15 K.
Temperature coefficient
The coefficient α in the equation that describes resistance as a
function of temperature. The default value is 5e-05 1/K.

1-717
Thermal Resistor

Thermal Tab

Thermal time constant


The time it takes the resistor temperature to reach 63% of
the final temperature change when a step change in ambient
temperature occurs. The default value is 10 s.
Dissipation factor
The thermal power required to raise the thermal resistor
temperature by one K. The default value is 0.001 W/K.
Initial temperature
The temperature of the thermal resistor at the start of the
simulation. The default value is 298.15 K.

Ports The block has the following ports:

A
Resistor thermal port
+
Positive electrical port
-
Negative electrical port

See Also Thermistor | Thermocouple

1-718
Thermistor

Purpose Model NTC thermistor using B-parameter equation

Library Sensors

Description The Thermistor block represents an NTC thermistor using the


B-parameter equation. The resistance at temperature T is

R = R0 (e B (1/ T −1/ T0 ) − 1)
where:

• R0 is the nominal resistance at the reference temperature T0.


• B is the characteristic temperature constant.

The following equation describes the thermal behavior of the block:

dT
Q = K d tc
dt
where:

• Q is the net heat flow into port A.


• Kd is the Dissipation factor parameter value.
• tc is the Thermal time constant parameter value.
• dT/dt is the rate of change of the temperature.

To model the thermistor in free space:

1 Connect the thermistor to the B port of a Simscape Convective Heat


Transfer block.

2 Connect the A port of the Convective Heat Transfer block to a


Simscape Ideal Temperature Source block whose temperature is set
to the ambient temperature.

1-719
Thermistor

3 Set the Area parameter of the Convective Heat Transfer block to


an approximate area Anom.

4 Set the Heat transfer coefficient parameter of the Convective


Heat Transfer block to Kd/Anom.

Dialog
Box and
Parameters

• “Electrical Tab” on page 1-720


• “Thermal Tab” on page 1-721

Electrical Tab

Nominal resistance R0 at reference temperature T0


The nominal resistance of the thermistor at the reference
temperature. Many datasheets quote the nominal resistance at
25°C and list it as R25. The default value is 1000 Ω.
Characteristic temperature constant B
The coefficient B in the equation that describes resistance as a
function of temperature. The default value is 3500 K.

1-720
Thermistor

Reference temperature T0
The temperature at which the nominal resistance was measured.
The default value is 298.15 K.

Thermal Tab

Thermal time constant


The time it takes the sensor temperature to reach 63% of the final
temperature change when a step change in ambient temperature
occurs. The default value is 5 s.
Dissipation factor
The thermal power required to raise the thermistor temperature
by one K. The default value is 0.75e-4 W/K.
Initial temperature
The temperature of the thermistor at the start of the simulation.
The default value is 298.15 K.

Ports The block has the following ports:

A
Thermal port
+
Positive electrical port
-
Negative electrical port

See Also PTC Thermistor | Thermal Resistor

1-721
Thermocouple

Purpose Model sensor that converts thermal potential difference into electrical
potential difference

Library Sensors

Description The Thermocouple block represents a thermocouple using the standard


polynomial parameterization defined in the NIST ITS-90 Thermocouple
Database [1]. The voltage E across the device in mV is

E(mV) = c0 + c1*t + ... + cn*tn

where:

• ci is the ith element of the Coefficients [c0 c1 ... cn] parameter


value.
• t is the temperature difference in degrees Celsius between the
temperature at the thermal port A and the Reference temperature
parameter value.

Note The equation for voltage across the device as a function of


temperature difference is defined in mV. The units of the voltage across
the actual device is V.

The following equation describes the thermal behavior of the block:

dT
Q = K d tc
dt
where:

• T is the temperature at port A.


• Q is the net heat flow into port A.
• Kd is the Dissipation factor parameter value.

1-722
Thermocouple

• tc is the Thermal time constant parameter value.


• dT/dt is the rate of change of the temperature.

To model the thermocouple in free space:

1 Connect the thermocouple to the B port of a Simscape Convective


Heat Transfer block.

2 Connect the A port of the Convective Heat Transfer block to a


Simscape Ideal Temperature Source block whose temperature is set
to the ambient temperature.

3 Set the Area parameter of the Convective Heat Transfer block to


an approximate area Anom.

4 Set the Heat transfer coefficient parameter of the Convective


Heat Transfer block to Kd/Anom.

Basic The model is based on the following assumptions:


Assumptions
and • The high-order polynomials this block uses are very sensitive to the
number of significant figures used for computation. Use all available
Limitations
significant figures when specifying the Coefficients [c0 c1 ... cn]
parameter.
• Coefficients [c0 c1 ... cn] are defined for use over a specified
temperature range.
• This block does not include the additional exponential term that Type
K thermocouples use when parameterized for t > 0.

1-723
Thermocouple

Dialog
Box and
Parameters

• “Electrical Tab” on page 1-724


• “Thermal Tab” on page 1-725

Electrical Tab

Coefficients [c0 c1 ... cn]


The vector of coefficients c in the equation that describes voltage
as a function of temperature. The default value is [ 0 0.0054031
1.2593e-05 -2.3248e-08 3.2203e-11 -3.315e-14 2.5574e-17
-1.2507e-20 2.7144e-24 ]. This value specifies a Type S
thermocouple, which is valid in the range -50 to 1064 degrees C.

1-724
Thermocouple

Note You can download parameters for other standard


thermocouple types from the NIST database [1]. For information
on how to do this, see the Simulink Approximating Nonlinear
Relationships: Type S Thermocouple example.

Thermal Tab

Reference temperature
The temperature the block subtracts from the temperature at the
thermal port in calculating the voltage across the device. The
default value is 0 °C.
Thermal time constant
The time it takes the thermocouple temperature to reach 63%
of the final temperature change when a step change in ambient
temperature occurs. The default value is 1 s.
Dissipation factor
The thermal power required to raise the thermocouple
temperature by one K. The default value is 0.001 W/K.
Initial temperature
The temperature of the thermocouple at the start of the
simulation. The default value is 25 °C.

Ports The block has the following ports:

A
Thermocouple thermal port
+
Positive electrical port
-
Negative electrical port

References [1] NIST ITS-90 Thermocouple Database


http://srdata.nist.gov/its90/main

1-725
Thermocouple

See Also Thermal Resistor

1-726
Three-Winding Mutual Inductor

Purpose Model three coupled inductors

Library Passive Devices

Description The Three-Winding Mutual Inductor block represents a set of three


coupled inductors or windings. The voltage across the three windings is

dI1 dI dI
V1 = L1 + M 12 2 + M 13 3
dt dt dt
dI dI dI
V2 = M 12 1 + L2 2 + M 23 3
dt dt dt
dI dI dI
V3 = M 13 1 + M 23 2 + L3 3
dt dt dt
where:

• Vi is voltage across the ith winding.


• Ii is current through the ith winding.
• Li is self inductance of the ith winding.

• Mij is mutual inductance of the ith and jth windings, M ij = K ij Li L j .

In the preceding equations, currents are positive when flowing into the
positive node of their respective inductor terminals.
When you run a simulation that includes this block, the software checks
the specified parameter values to ensure that the resulting device is
passive. If it is not, the software issues an error.

1-727
Three-Winding Mutual Inductor

Dialog
Box and
Parameters

Inductance L1
The self inductance of the first winding. The default value is
0.001 H.
Inductance L2
The self inductance of the second winding. The default value is
0.001 H.
Inductance L3
The self inductance of the third winding. The default value is
0.001 H.

1-728
Three-Winding Mutual Inductor

Coefficient of coupling, K12


The coefficient that defines the mutual inductance between the
first and second windings. The default value is 0.9. The absolute
value must be between 0 and 1, exclusive.
Coefficient of coupling, K13
The coefficient that defines the mutual inductance between the
first and third windings. The default value is 0.9. The absolute
value must be between 0 and 1, exclusive.
Coefficient of coupling, K23
The coefficient that defines the mutual inductance between the
second and third windings. The default value is 0.9. The absolute
value must be between 0 and 1, exclusive.
Specify initial condition
Select one of the following options for specifying an initial
condition:
• No — Do not specify an initial condition for the model. This is
the default option.
• Yes — Specify the initial inductor currents.
Initial current port 1, IC1
The current flowing through the first winding at the start of the
simulation. This parameter is only visible when you select Yes
for the Specify initial condition parameter. The default value
is 0 A.
Initial current port 2, IC2
The current flowing through the second winding at the start of
the simulation. This parameter is only visible when you select
Yes for the Specify initial condition parameter. The default
value is 0 A.
Initial current port 3, IC3
The current flowing through the third winding at the start of the
simulation. This parameter is only visible when you select Yes
for the Specify initial condition parameter. The default value
is 0 A.

1-729
Three-Winding Mutual Inductor

Ports The block has the following ports:

1+
Positive electrical voltage of the first mutual inductor
1-
Negative electrical voltage of the first mutual inductor
2+
Positive electrical voltage of the second mutual inductor
2-
Negative electrical voltage of the second mutual inductor
3+
Positive electrical voltage of the third mutual inductor
3-
Negative electrical voltage of the third mutual inductor

1-730
Thyristor

Purpose Model thyristor using NPN and PNP transistors

Library Semiconductor Devices

Description The Thyristor block provides two ways of modeling a thyristor:

• As an equivalent circuit based on NPN and PNP bipolar transistors


• By a lookup table approximation to the on-state I-V (current-voltage)
curve
Representation by Equivalent Circuit
The equivalent circuit contains a pair of NPN and PNP bipolar
transistors, as shown in the following illustration.

1-731
Thyristor

The P-N-P-N structure of a thyristor is matched by the P-N-P and


N-P-N structures of the bipolar transistors, the base of each device being
connected to the collector of the other device. Ensuring that this circuit
behaves like a thyristor is primarily picking suitable parameter values

1-732
Thyristor

of the NPN and PNP devices, plus external resistors. For example, for
the circuit to latch into the on-state, once triggered by a suitable gate
current, the total gain of the two transistors must be greater than one.
This model structure replicates the behavior of a thyristor in typical
application circuits, while at the same time presenting a minimum
number of equations to the solver, to improve simulation speed.

Note It is extremely important that you parameterize the thyristor


component correctly before using it in your model. To help you do this,
there are two test harnesses in the SimElectronics examples, Thyristor
Static Behavior Validation and Thyristor Dynamic Behavior Validation.
Follow the help text for these two examples, plus a datasheet for your
device, to re-parameterize the thyristor component so that it replicates
the required behavior. You can then copy the parameterized component
into your model. Take care to model the gate drive circuitry correctly,
including circuit series resistance. Connecting a controlled voltage
source directly to the thyristor gate gives nonphysical results because it
clamps the gate to the cathode voltage when the gate demand is zero.

The model captures the following thyristor behaviors:

• Off-state currents, IDRM and IRRM. These are typically quoted for the
maximum off-state voltages VDRM and VRRM. It is assumed, as is the
case for most thyristors, that IDRM = IRRM and VDRM = VRRM.
• The gate trigger voltage is equal to the Gate trigger voltage, v_GT
parameter value when the gate current is equal to the Gate trigger
current, i_GT parameter value.
• The thyristor latches on when the gate current is equal to the Gate
trigger current, i_GT. The thyristor does not latch on until the
gate current reaches this value. To ensure this is the case, you must
set the Internal shunt resistor, Rs parameter correctly. If the
resistance is too high, then the gate triggers before the gate current
reaches iGT. If the resistance is too small, then the gate does not
trigger.

1-733
Thyristor

You can determine the value of the internal shunt resistor Rs by


running the simulation. To see how this can be done, refer to the
Thyristor Static Behavior Validation example. Alternatively, if you
are using the thyristor in a circuit where there is an external resistor
RGK connected from gate to cathode, then the effect of Rs is usually
very small, and it can be set to inf.
• With the thyristor in the on-state, if the gate current is removed,
the thyristor stays in the on-state, provided that the load current is
higher than the latching current. You do not specify the latching
current directly because its value is primarily determined by other
block parameters.
However, the latching current can be influenced by the Product
of NPN and PNP forward current gains parameter on the
Advanced tab. Reducing the gain increases the latching current.
• The on-state voltage is equal to the On-state voltage, V_T
parameter value when the load current is equal to the On-state
current, I_T parameter value. This is ensured by the R_on
resistance value, which takes into account the voltage drop seen
across the PNP and NPN devices.
• Triggering by rate of rise of off-state voltage. A rapid change
in anode-cathode voltage induces a current in the base-collector
capacitance terms. If this current is large enough, it triggers the
thyristor into the on-state. The thyristor initialization routine
calculates a suitable value for the base-collector capacitance, so that
when the rate of change of voltage is equal to the Critical rate of
rise of off-state voltage, dV/dt parameter value, the thyristor
triggers on. This calculation is based on the approximation that the
required current is vGT / RGK where RGK is the gate-cathode resistance
value used when quoting the critical dV/dt value.
• A nonzero gate-controlled turn-on time. This is primarily influenced
by the NPN transistor forward transit time, TF. You either
specify this parameter directly, or calculate an approximate value for
TF from the turn-on time.

1-734
Thyristor

• A nonzero commuted turn-off time. This is primarily influenced by


the PNP transistor forward transit time, TF. You can either
specify this parameter directly, or set it to be equal to the forward
transit time for the NPN transistor.

Resistors Gmin1 and Gmin2 improve numerical robustness at large


forward and reverse voltages. Their values influence the off-state
currents by no more than 1% at the maximum off-state forward and
reverse voltages.

Representation by Lookup Table


If using the lookup table representation, you provide tabulated values
for anode-cathode current as a function of anode-cathode voltage when
in the on state. The main advantages of using this option are simulation
speed and ease of parameterization. To further simplify the underlying
model, this representation does not model:

• Device triggering due to rate of rise of off-state voltage


• Commuted turn-off time

The turn-on delay is represented by an input gate-cathode capacitor,


the value of which is calculated so that the delay between gate voltage
rising and the device starting to turn on is equal to the value specified
by the Turn-on delay time parameter. The turn-on rise time for the
load current is implemented by ramping nonlinearly between zero and
the current determined by on-state current-voltage profile over a time
period specified by the value of the Turn-on rise time parameter.
Note that the resulting turn-on current profile is an approximation
to an actual device.

Thermal Port
The block has an optional thermal port, hidden by default. To expose
the thermal port, right-click the block in your model, and then from the
context menu select Simscape block choices > Show thermal port.
This action displays the thermal port H on the block icon, and adds the
Thermal port tab to the block dialog box.

1-735
Thyristor

Use the thermal port to simulate the effects of generated heat and
device temperature. For more information on using thermal ports and
on the Thermal port tab parameters, see “Simulating Thermal Effects
in Semiconductors”.

Basic The Thyristor block has the following limitations:


Assumptions
and • This block does not model temperature-dependent effects.
SimElectronics simulates the block at the temperature at which
Limitations
the component behavior was measured, as specified by the
Measurement temperature parameter value. All parameters must
be quoted for this temperature.
• If you use the equivalent circuit representation:
- In sensitive gate circuits (that is, where there is no external
gate-cathode resistor RGK), you must set the value of the Internal
shunt resistor, Rs parameter to ensure correct triggering. If the
internal shunt resistance is too high, then the thyristor triggers
for currents less than iGT. If the internal shunt resistance is
too low, the thyristor does not trigger for an input current of
iGT. For details on using simulation to determine the acceptable
internal shunt resistance value, see the Thyristor Static Behavior
Validation example.
- Triggering by exceeding the break-over voltage is not modeled.
- Numerically the thyristor can be demanding to simulate, given the
very small gate currents in comparison to the load current, and
also the very steep current gradients during switching. However,
for most typical thyristor-based circuits, you can use the default
simulation parameters. In some cases you may need to tighten
the Absolute Tolerance and Relative Tolerance parameters
on the Solver tab of the Configuration Parameters dialog box, to
ensure convergence. In such cases, changing the default value
of Absolute Tolerance from auto to 1e-4 or 1e-5 is usually
sufficient, because it prevents adaptive changing of this parameter
during simulation.

1-736
Thyristor

- The leakage currents are approximated by the diodes D1 and D2,


as shown in the equivalent circuit. This approach assumes that
the leakage via the two transistors is small in comparison. This
assumption is not valid for values of vGT that are significantly
smaller than the typical forward voltage drop of 0.6 V.
• If you use the lookup table representation:
- Triggering by exceeding the break-over voltage or by rate of change
of off-state voltage is not modeled.
- Commutated turn-off time is not modeled. Check that your circuit
does not violate the stated commutated turn-off time for the
thyristor.
- When you specify a turn-on rise time, the resulting current-time
profile is an approximation.

Dialog
Box and
Parameters

1-737
Thyristor

• “Main Tab” on page 1-738


• “Gate Triggering Tab” on page 1-739
• “dV/dt Triggering Tab” on page 1-740
• “Time Constants Tab” on page 1-740
• “Advanced Tab” on page 1-743

Main Tab

I-V characteristics defined by


Select the thyristor representation:
• Fundamental nonlinear equations — Use an equivalent
circuit based on NPN and PNP bipolar transistors. This is the
default.
• Lookup table — Use a lookup table approximation to the
on-state I-V curve.
On-state voltage, V_T
The anode-cathode static voltage drop when in the on-state, and
the current flowing is equal to the on-state current IT. The default
value is 1.2 V. This parameter is visible only when you select
Fundamental nonlinear equations for the I-V characteristics
defined by parameter.
On-state current, I_T
Static load (or equivalently anode) current that flows when the
anode-cathode voltage is equal to the on-state voltage VT. The
default value is 1 A. This parameter is visible only when you select
Fundamental nonlinear equations for the I-V characteristics
defined by parameter.
Vector of on-state voltages, V_T
The vector of on-state voltages, to be used for table lookup. The
vector values must be strictly increasing, and the first value must
be greater than zero. The values can be nonuniformly spaced. The
default values, in V, are [0.75 1 1.25 1.5 1.75 2 2.25]. This

1-738
Thyristor

parameter is visible only when you select Lookup table for the
I-V characteristics defined by parameter.
Vector of corresponding currents, I_T
The vector of currents corresponding to the on-state voltages
vector values, to be used for 1D table lookup. The two vectors
must be of the same size. The default values, in A, are [0.015
0.22 0.75 1.4 2 2.75 3.45]. This parameter is visible only
when you select Lookup table for the I-V characteristics
defined by parameter.
Off-state current, I_DRM
The off-state anode current IDRM that flows when the
anode-cathode voltage is equal to the off-state voltage VDRM. The
default value is 0.01 mA.
Corresponding off-state voltage, V_DRM
Corresponding off-state voltage, VDRM. The anode-cathode voltage
VDRM applied with the thyristor in the off-state when quoting the
off-state current IDRM. The default value is 400 V.
Holding current
Minimum current at which the thyristor stays in the off
state when gate voltage is not commanding the on state. The
default value is 1 mA. This parameter is visible only when you
select Lookup table for the I-V characteristics defined by
parameter.
Measurement temperature
The device simulation temperature. You must specify all block
parameter values for this temperature. The default value is 25
°C. This parameter is visible only when you select Fundamental
nonlinear equations for the I-V characteristics defined by
parameter.

Gate Triggering Tab

Gate trigger current, I_GT


Critical gate current iGT required to turn the transistor on,
resulting in a gate voltage equal to the gate trigger voltage vGT.

1-739
Thyristor

You must set the value of the Internal shunt resistor, Rs


parameter on the Advanced tab to ensure that the gate triggers
at iGT, and not for currents less that iGT. The default value is 3 μA.
Corresponding gate voltage, V_GT
Gate-cathode voltage vGT when the gate current is equal to the
gate trigger current iGT. The default value is 0.6 V.
Test voltage, V_D
Supply voltage used when quoting values for vGT and iGT. The
default value is 12 V. This parameter is visible only when
you select Fundamental nonlinear equations for the I-V
characteristics defined by parameter.
Test load resistor
Load resistor used when quoting values for vGT and iGT. The
default value is 120 Ω. This parameter is visible only when
you select Fundamental nonlinear equations for the I-V
characteristics defined by parameter.

dV/dt Triggering Tab

Critical rate of rise of off-state voltage, dV/dt


Rate at which the off-state anode-cathode voltage must be
increased for the thyristor to turn on. The default value is 150
V/μs. This parameter is visible only when you select Fundamental
nonlinear equations for the I-V characteristics defined by
parameter.
Test gate-cathode resistor, R_GK
Gate-cathode resistor used when quoting the critical rate of rise
off off-state voltage. The default value is 1 KΩ. This parameter is
visible only when you select Fundamental nonlinear equations
for the I-V characteristics defined by parameter.

Time Constants Tab

NPN device forward transit time parameterization


Select one of the following options:

1-740
Thyristor

• Derive approximate value from gate-controlled


turn-on time — The block calculates the NPN device forward
transit time based on the values for the gate-controlled turn-on
time and corresponding gate current that you specify.
• Specify directly — Provide the value directly by using the
NPN device forward transit time parameter.

This parameter is visible only when you select Fundamental


nonlinear equations for the I-V characteristics defined by
parameter.
Gate-controlled turn-on time
Time for the gate to turn from the off to the on state when a gate
current is applied. The default value is 2 μs. This parameter is
visible only when you select Fundamental nonlinear equations
for the I-V characteristics defined by parameter and Derive
approximate value from gate-controlled turn-on time for
NPN device forward transit time parameterization.
Corresponding gate current
The gate current used when quoting the gate-controlled turn-on
time. The gate current and turn-on time are used to calculate
an approximate value for the NPN transistor forward transit
time on the assumption that all of the input charge is used to
raise the gate voltage to the gate trigger voltage vGT. The default
value is 10 mA. This parameter is visible only when you select
Fundamental nonlinear equations for the I-V characteristics
defined by parameter and Derive approximate value from
gate-controlled turn-on time for NPN device forward
transit time parameterization.
NPN device forward transit time
Represents the mean time for the minority carriers to cross the
base region from the emitter to the collector of the NPN device
[1]. The default value is 0.3 μs. This parameter is visible only
when you select Fundamental nonlinear equations for the I-V
characteristics defined by parameter and Specify directly
for NPN device forward transit time parameterization.

1-741
Thyristor

PNP device forward transit time parameterization


Select one of the following options:
• Set equal to NPN device forward transit time — The
block uses the NPN device forward transit time value.
• Specify directly — Provide the value directly by using the
PNP device forward transit time parameter.

This parameter is visible only when you select Fundamental


nonlinear equations for the I-V characteristics defined by
parameter.
PNP device forward transit time
Represents the mean time for the minority carriers to cross the
base region from the emitter to the collector of the PNP device
[1]. The default value is 0.3 μs. This parameter is visible only
when you select Fundamental nonlinear equations for the I-V
characteristics defined by parameter and Specify directly
for PNP device forward transit time parameterization.
Turn-on delay time
Time delay before the device starts to turn on following a step in
current on the gate from zero to the value specified by the Gate
current for turn-on delay time parameter. The default value is
0 s. This parameter is visible only when you select Lookup table
for the I-V characteristics defined by parameter.
Gate current for turn-on delay time
The gate current used when measuring the turn-on delay time.
The default value is 1 mA. This parameter is visible only when
you select Lookup table for the I-V characteristics defined
by parameter.
Turn-on rise time
Time it takes for the thyristor to turn on fully following the
turn-on delay event. The default value is 0 s. This parameter
is visible only when you select Lookup table for the I-V
characteristics defined by parameter.

1-742
Thyristor

Advanced Tab

Internal shunt resistor, Rs


Represents the gate-cathode shunt resistance. It is important to
set this parameter value to ensure that the gate triggers at iGT,
and not for currents less that iGT. For details, see the Thyristor
Static Behavior Validation example. If you are using the thyristor
in a circuit where there is an external gate-cathode resistor
RGK, then usually the effect of Rs is small, and it can be set to
inf. The default value is 87 kΩ. This parameter is visible only
when you select Fundamental nonlinear equations for the I-V
characteristics defined by parameter.
Internal series gate resistor, Rg
Represents the resistance associated with the gate connection.
A typical value is of the order of a few ohms, and its impact on
static and dynamic characteristics is small. Therefore, its precise
value is not important, but its presence helps avoid numerical
simulation issues if the gate is driven directly by a voltage source.
You can specify any positive value. The default value is 10 Ω.
Product of NPN and PNP forward current gains
This is the product of the NPN forward gain BFNPN and the PNP
forward gain BFPNP. The value must be greater than one for
latching to occur. The smaller the value, the larger the latching
current becomes. However, latching current is primarily set
by other block parameters, and the total gain has only a small
effect. The default value is 10. This parameter is visible only
when you select Fundamental nonlinear equations for the I-V
characteristics defined by parameter.

Ports The block has the following ports:

G
Electrical conserving port associated with the gate
A
Electrical conserving port associated with the anode

1-743
Thyristor

K
Electrical conserving port associated with the cathode

Examples See the Thyristor Static Behavior Validation and Thyristor Dynamic
Behavior Validation examples.

References [1] G. Massobrio and P. Antognetti. Semiconductor Device Modeling


with SPICE. 2nd Edition, McGraw-Hill, 1993.

See Also NPN Bipolar Transistor | PNP Bipolar Transistor

1-744
Timer

Purpose Model timer integrated circuit behaviorally

Library Integrated Circuits

Description The Timer block is a behavioral model of a timer integrated circuit


such as the NE555.
The following figure shows the implementation structure.

The Potential divider component resistance parameter sets


the values of the three resistors creating the potential divider. The
two comparator inputs have infinite input resistance and zero input
capacitance. The S-R Latch block provides the functionality of the
set-reset latch. It includes an output capacitor and a resistor with
values set to match the Propagation delay parameter value. The block
models the output stage inverter using a CMOS NOT block. You define
the output resistance, low-level output voltage, and high-level output
voltage for the CMOS gate in the Timer block dialog box. The discharge
switch approximates the NPN bipolar transistor on a real timer as a
switch with defined switch on-resistance and off-resistance values.

1-745
Timer

Basic This block has the following limitations:


Assumptions
and • The behavior is abstracted. Results are not as accurate as a
transistor-level model.
Limitations
• Delay in response to changing inputs depends solely upon the RC
time constant of the resistor-capacitor network at the output of the
latch. In practice, the delay has a more complex dependency on the
device structure. Set this value based on the output-pulse rise and
fall times.
• The drop in output voltage is a linear function of output current. In
practice, the relationship is that of a bipolar transistor push-pull pair.
• The controlled switch arrangement used by the block is an
approximation of an open-collector arrangement.
• The power supply connects internally within the component, and the
block assumes that the GND pin is grounded.

Dialog
Box and
Parameters

• “Supply Tab” on page 1-747


• “Outputs Tab” on page 1-747

1-746
Timer

• “Discharge Tab” on page 1-747


• “Potential Divider Tab” on page 1-748

Supply Tab

Power supply voltage


The voltage value Vcc that the block applies internally to the
timer component. The default value is 15 V.

Outputs Tab

Low level output voltage


The output voltage when the timer output is low and no output
current is drawn. The default value is 0 V.
High level output voltage
The output voltage VOH when the timer output is high and no
current is drawn. The default value is 14.1 V.
Output resistance
The ratio of output voltage drop to output current. Set this
parameter to (VOH − VOH 1 ) / IOH 1 , where VOH1 is the reduced
output high voltage when the output current is IOH1 . The default
value is 8 Ω.
Propagation delay
Set this value to the input-pulse or output-pulse rise time. The
default value is 1e-07 s.

Discharge Tab

Discharge switch on-resistance


A representative value is the discharge pin saturation voltage
divided by the corresponding current. The default value is 12 Ω.

1-747
Timer

Discharge switch off-resistance


A representative value is the discharge pin leakage current
divided by the corresponding pin voltage. The default value is
5e+08 Ω.

Potential Divider Tab

Potential divider component resistance


A typical value for a 555-type timer is 5 kΩ. You can measure it
directly across the positive supply and control pins when the chip
does not connect to a circuit. The default value is 5 kΩ.

Ports This block has the following ports:

THRES
Electrical port corresponding to the threshold pin
TRIG
Electrical port corresponding to the trigger pin
CONT
Electrical port corresponding to the control pin
RESET
Electrical port corresponding to the reset pin
OUT
Electrical port corresponding to the output pin
DISCH
Electrical port corresponding to the discharge pin

See Also S-R Latch | Comparator

1-748
Transmission Line

Purpose Model delay-based or lumped parameter transmission line

Library Passive Devices

Description The Transmission Line block lets you choose between the following
models of a transmission line:

1 Delay-based and lossless

2 Delay-based and lossy

3 Lumped parameter L-section

4 Lumped parameter pi-section

The first option provides the best simulation performance, with options
2, 3 and 4 requiring progressively more computing power.
Delay-Based and Lossless
This first option, Delay-based and lossless, models the transmission
line as a fixed impedance, irrespective of frequency, plus a delay term.
The defining equations are:

v 1 ( t ) – i 1 ( t ) Z 0 = v 2 ( t – τ ) + i2 ( t – τ ) Z 0

v 2 ( t ) – i 2 ( t ) Z 0 = v 1 ( t – τ ) + i1 ( t – τ ) Z 0

where:

• v1 is the voltage across the left-hand end of the transmission line.


• i1 is the current into the left-hand end of the transmission line.
• v2 is the voltage across the right-hand end of the transmission line.
• i2 is the current into the right-hand end of the transmission line.
• τ is the transmission line delay.
• Z0 is the line characteristic impedance.

1-749
Transmission Line

Delay-Based and Lossy


To introduce losses, the second option, Delay-based and lossy,
connects N delay-based components, each defined by the above
equations, in series via a set of resistors, as shown in the following
illustration.

N is an integer greater than or equal to 1. r = R · LEN / N, where R is


the line resistance per unit length and LEN is the line length.

Lumped Parameter L-Section


The following block diagram shows the model of one L-line segment.

The lumped parameter parameterization uses N copies of the above


segment model connected in series.
Parameters are as follows:

1-750
Transmission Line

• R is line resistance per unit length.


• L is the line inductance per unit length.
• C is the line capacitance per unit length.
• G is the line conductance per unit length.
• LEN is the length of the line.
• N is the number of series segments.

Lumped Parameter Pi-Section


The following block diagram shows the model of one pi-line segment.

The lumped parameter parameterization uses N copies of the above


segment model connected in series. The parameters are as defined for
the L-section transmission line model. Unlike the L-section model, the
pi-section model is symmetric.

Lumped Parameter Line Model Parameterization


The lumped-parameter models (L-section or pi-section) are the most
challenging to simulate, typically needing many more segments (greater
N) than for the delay-based and lossy model [1].

1-751
Transmission Line

Cable manufacturers do not typically quote an inductance value per unit


length, but instead give the characteristic impedance. The inductance,
capacitance, and characteristic impedance are related by:

L = C · Z 02

The block lets you specify either L or Z0 when using the lumped
parameter model.

Basic The Transmission Line model has the following limitations:


Assumptions
and • For the lumped parameter options, MathWorks recommends that
you use a trapezoidal solver such as ode23t. This is because lumped
Limitations
parameter transmission models have very lightly damped internal
dynamics, which are best suited to trapezoidal solvers for numerical
accuracy.
• The lumped parameter pi-section model has a parallel capacitor at
both ends. This means that you should not connect it directly to an
ideal voltage source, that is, a source with no internal resistance.
The lumped parameter L-section model, however, has a series input
resistor, and therefore you can connect it directly to an ideal voltage
source.

Dialog
Box and
Parameters

1-752
Transmission Line

Model type
Select one of the following transmission line models:
• Delay-based and lossless — Model the transmission line as
a fixed impedance, irrespective of frequency, plus a delay term,
as described in “Delay-Based and Lossless” on page 1-749.
This is the default method. It provides the best simulation
performance.
• Delay-based and lossy — Model the transmission line as a
number of delay-based components, connected in series via a
set of resistors, as described in “Delay-Based and Lossy” on
page 1-750.
• Lumped parameter L-section — Model the transmission
line as a number of L-line segments, connected in series, as
described in “Lumped Parameter L-Section” on page 1-750.
• Lumped parameter pi-section — Model the transmission
line as a number of pi-line segments, connected in series, as
described in “Lumped Parameter Pi-Section” on page 1-751.
Transmission delay
The total transmission line delay. This parameter appears for
delay-based models only. The parameter value must be greater
than zero. The default value is 5 ns, which is a typical value for a
one-meter coaxial cable.
Characteristic impedance
The characteristic impedance of the transmission line.
This parameter appears for delay-based models, and for
lumped parameter models where Parameterization is By
characteristic impedance and capacitance. The parameter
value must be greater than zero. The default value is 50 Ω.
Parameterization
This parameter appears for lumped parameter models only. Select
the model parameterization method, as described in “Lumped
Parameter Line Model Parameterization” on page 1-751:

1-753
Transmission Line

• By characteristic impedance and capacitance — Specify


values for the Characteristic impedance and Capacitance
per unit length parameters. This is the default method.
• By inductance and capacitance — Specify values for the
Inductance per unit length and Capacitance per unit
length parameters.
Inductance per unit length
The effective inductance of the transmission line per unit length.
For lumped parameter models where Parameterization is By
inductance and capacitance, this parameter appears instead
of the Characteristic impedance parameter. The parameter
value must be greater than zero. The default value is 220 μH/m.
Capacitance per unit length
The transmission line capacitance per unit length. This parameter
appears for lumped parameter models only. The parameter value
must be greater than zero. The default value is 90 pF/m.
Resistance per unit length
The total transmission line resistance (that is, the sum of the
resistance for the two conducting paths) per unit length. This
parameter appears for Delay-based and lossy and for lumped
parameter models. The parameter value must be greater than
zero. The default value is 0.3 Ω/m.
Insulation conductance per unit length
The conductance between the two transmission line conductors
per unit length. This parameter appears for lumped parameter
models only. The parameter value must be greater than, or equal
to, zero. The default value is 5e-6 S/m.
Line length
The total transmission line length. This parameter appears for
Delay-based and lossy and for lumped parameter models. The
parameter value must be greater than zero. The default value
is 1 m.

1-754
Transmission Line

Number of segments
The number of model segments used to represent the transmission
line. This parameter appears for Delay-based and lossy and
for lumped parameter models. The parameter value must be an
integer greater than, or equal to, 1. The default value is 1.

Ports The block has four conserving electrical ports. For a coaxial cable, the
two top ports correspond to the inner conductor, and the two lower ports
to the external shielding conductor.

References [1] Sussman-Fort, S.E. and J.C. Hantgan. “SPICE Implementation


of Lossy Transmission Line and Schottky Diode Models.” IEEE
Transactions on Microwave Theory and Techniques. Vol. 36, No. 1,
January, 1988.

1-755
Unipolar Stepper Motor

Purpose Model stepper motor with center taps on phase windings

Library Rotational Actuators

Description

The Unipolar Stepper Motor block represents a stepper motor that has
center taps on the two phase windings. The winding currents and
mechanical output are defined by the following equations:

eA   K m sin( N r )

eA  K m sin( N r )

eB   K m sin( N r )

eB    K m sin( N r )

diA
  v A  RiA  eA  / L
dt

diA
  v A  RiA  eA  / L
dt

diB 
  vB   RiB   eB   / L
dt

1-756
Unipolar Stepper Motor

diB 
  vB   RiB   eB   / L
dt

d
J  B  Te
dt

 e e   e e 
Te   K m  iA  iA  A A  sin  N r   K m  iB   iB   B  B   cos  N r   Td sin  4 N r 
 Rm   Rm 

d

dt
where:

• eA+ is the back emf induced across the A+ to A0 half-winding.


• eA- is the back emf induced across the A- to A0 half-winding.
• eB+ is the back emf induced across the B+ to B0 half-winding.
• eB- is the back emf induced across the B- to B0 half-winding.
• iA+ is the current flowing from the A+ port to the A0 center tap port.
• iA- is the current flowing from the A- port to the A0 center tap port.
• iB+ is the current flowing from the B+ port to the B0 center tap port.
• iB- is the current flowing from the B- port to the B0 center tap port.
• vA+ is the voltage at the A+ port relative to the A0 center tap port.
• vA- is the voltage at the A- port relative to the A0 center tap port.
• vB+ is the voltage at the B+ port relative to the B0 center tap port.
• vB- is the voltage at the B- port relative to the B0 center tap port.
• Km is the motor torque constant.

1-757
Unipolar Stepper Motor

• Nr is the number of teeth on each of the two rotor poles. The Full
step size parameter is (π/2)/Nr.
• R is the half-winding resistance. For example, it is the resistance
between A+ and A0 ports.
• L is the half-winding inductance. For example, it is the inductance
between A+ and A0 ports.
• Rm is the magnetizing resistance.
• B is the rotational damping.
• J is the inertia.
• ω is the rotor speed.
• Θ is the rotor angle.
• Td is the detent torque amplitude.

If the initial rotor is zero or some multiple of (π/2)/Nr, the rotor is


aligned with the A-phase winding. If a positive current flows from the
A+ port to the A0 center tap port, then the stepper acts to stay aligned
with the A-phase. Equivalently, a positive current flowing from the
A0 center tap port to the A- port also acts on the rotor to stay aligned
with the A-phase.
The Unipolar Stepper Motor block produces a positive torque acting
from the mechanical C to R ports for either of the following sequences.
Both sequences assume the rotor initial angle is zero or some multiple
of (π/2)/Nr.

Sequence Center taps connected to Center taps connected to


ground positive supply
1 Positive current from A+ to Positive current from A0 to
A0 A-
2 Positive current from B+ to Positive current from B0 to
B0 B-

1-758
Unipolar Stepper Motor

Sequence Center taps connected to Center taps connected to


ground positive supply
3 Positive current from A- to Positive current from A0 to
A0 A-
4 Positive current from B- to Positive current from B0 to
B0 B-

Thermal Ports
The block has five optional thermal ports, one for each of the four
half-windings and one for the rotor. These ports are hidden by default.
To expose the thermal ports, right-click the block in your model, and
then from the context menu select Simscape block choices > Show
thermal port. This action displays the thermal ports on the block
icon, and adds the Temperature Dependence and Thermal port
tabs to the block dialog box. These tabs are described further on this
reference page.
Use the thermal ports to simulate the effects of copper resistance and
iron losses that convert electrical power to heat. For more information
on using thermal ports in actuator blocks, see “Simulating Thermal
Effects in Rotational and Translational Actuators”.

Basic The model is based on the following assumptions:


Assumptions
and • This model neglects magnetic saturation effects and any magnetic
coupling between phases.
Limitations
• When you select the Start simulation from steady state check
box in the Simscape Solver Configuration block, this block will not
initialize an Initial rotor angle value between –π and π.
• All four half-windings are assumed to be identical, and therefore
have the same resistance temperature coefficient, alpha, and the
same thermal mass.

1-759
Unipolar Stepper Motor

Dialog
Box and
Parameters

• “Electrical Torque Tab” on page 1-760


• “Mechanical Tab” on page 1-761
• “Temperature Dependence Tab” on page 1-762
• “Thermal Port Tab” on page 1-762

Electrical Torque Tab

Half-winding resistance
Half of the resistance of the A and B phase windings as measured
between the A+ and A-, and the B+ and B- ports. The default
value is 0.55 Ω.

1-760
Unipolar Stepper Motor

Half-winding inductance
Half of the inductance of the A and B phase windings as measured
between the A+ and A-, and the B+ and B- ports. The default
value is 0.0015 H.
Motor torque constant
Motor torque constant Km. The default value is 0.19 N*m/A.
Detent torque
The amplitude of the sinusoidal torque variation observed when
rotating the shaft of the unpowered motor. The default value is
0 N*m.
Magnetizing resistance
The total magnetizing resistance seen from each of the phase
windings, for example across A+ and A0. The value must be
greater than zero. The default value is Inf, which implies that
there are no iron losses.
Full step size
Step size when changing the polarity of either the A or B phase
current. The default value is 1.8°.

Mechanical Tab

Rotor inertia
Resistance of the rotor to change in motor motion. The default
value is 4.5e-05 kg*m2. The value can be zero.
Rotor damping
Energy dissipated by the rotor. The default value is 8e-04
N*m/(rad/s). The value can be zero.
Initial rotor speed
Speed of the rotor at the start of the simulation. The default
value is 0 rpm.
Initial rotor angle
Angle of the rotor at the start of the simulation. The default
value is 0 rad.

1-761
Unipolar Stepper Motor

Temperature Dependence Tab


This tab appears only for blocks with exposed thermal ports. For more
information, see “Thermal Ports” on page 1-759.

Resistance temperature coefficient


Parameter α in the equation defining resistance as a function
of temperature, as described in “Thermal Model for Actuator
Blocks”. It is assumed that all windings are made of the same
material, and therefore have the same resistance temperature
coefficient. The default value is for copper, and is 0.00393 1/K.
Measurement temperature
The temperature for which motor parameters are defined. The
default value is 25 C.

Thermal Port Tab


This tab appears only for blocks with exposed thermal ports. For more
information, see “Thermal Ports” on page 1-759.

Half-winding thermal mass


The thermal mass for half of either the A or B winding. The
thermal mass is the energy required to raise the temperature by
one degree. It is assumed that all four half-windings have the
same thermal mass. The default value is 100 J/K.
Half-winding initial temperatures, [T_A+ T_A- T_B+ T_B-]
A 1 by 4 row vector defining the temperature of the four
half-windings at the start of simulation. The default value is [
25 25 25 25 ] C.
Rotor thermal mass
The thermal mass of the rotor, that is, the energy required to
raise the temperature of the rotor by one degree. The default
value is 50 J/K.
Rotor initial temperature
The temperature of the rotor at the start of simulation. The
default value is 25 C.

1-762
Unipolar Stepper Motor

Percentage of magnetizing resistance associated with the rotor


The percentage of the magnetizing resistance associated with the
magnetic path through the rotor. It determines how much of the
iron loss heating is attributed to the rotor thermal port HR, and
how much is attributed to the four winding thermal ports. The
default value is 90%.

Ports The block has the following ports:

A+
Top A-phase electrical connection
A0
A-phase center tap connection
A-
Lower A-phase electrical connection
B+
Top B-phase electrical connection.
B0
B-phase center tap connection
B-
Lower B-phase electrical connection
C
Mechanical rotational conserving port
R
Mechanical rotational conserving port
HA+
Thermal port for winding between A+ and A0. For more
information, see “Thermal Ports” on page 1-759.
HA-
Thermal port for winding between A- and A0. For more
information, see “Thermal Ports” on page 1-759.

1-763
Unipolar Stepper Motor

HB+
Thermal port for winding between B+ and B0. For more
information, see “Thermal Ports” on page 1-759.
HB-
Thermal port for winding between B- and B0. For more
information, see “Thermal Ports” on page 1-759.
HR
Thermal port for rotor. For more information, see “Thermal Ports”
on page 1-759.

References [1] M. Bodson, J. N. Chiasson, R. T. Novotnak and R. B. Rekowski.


“High-Performance Nonlinear Feedback Control of a Permanent Magnet
Stepper Motor.” IEEE Transactions on Control Systems Technology,
Vol. 1, No. 1, March 1993.

[2] P. P. Acarnley. Stepping Motors: A Guide to Modern Theory and


Practice. New York: Peregrinus, 1982.

[3] S.E. Lyshevski. Electromechanical Systems, Electric Machines, and


Applied Mechatronics. CRC, 1999.

See Also Stepper Motor | Unipolar Stepper Motor Driver

1-764
Unipolar Stepper Motor Driver

Purpose Driver for unipolar stepper motor

Library Drivers

Description The Unipolar Stepper Motor Driver block represents a driver specifically
configured for use with the Unipolar Stepper Motor block. It connects
the two winding center-tap connections A0 and B0 to the positive supply
with a voltage equal to the value you provide for the Output voltage
amplitude parameter. The A+, A-, B+, and B- ports are grounded in
the appropriate sequence to create the stepping motion. The block
initiates a step each time the voltage at the PWM port rises above the
Enable threshold voltage parameter value.
If the voltage at the REV port is less than or equal to the Reverse
threshold voltage parameter value, pulse A leads pulse B by 90
degrees. If the voltage at the REV port is greater than the Reverse
threshold voltage value, pulse B leads pulse A by 90 degrees and the
motor direction is reversed.
At time zero, A- and B+ are grounded.
If you set the Stepping mode parameter to Half stepping, the
Unipolar Stepper Motor Driver block can produce the output waveforms
required for half stepping. In this mode, there is an intermediate
state between the full steps, in which just one of the A or the B
half-windings is powered. As a result, the step size is half of the stepper
motor’s full step size. At half steps, windings that are not powered are
short-circuited. This approximates the effect of a freewheeling diode
connected across the windings.

1-765
Unipolar Stepper Motor Driver

Dialog
Box and
Parameters

Enable threshold voltage


When the voltage at the PWM port rises above this threshold,
the Unipolar Stepper Motor Driver block initiates a step. The
default value is 2.5 V.
Reverse threshold voltage
When the voltage at the REV port rises above this threshold,
pulse B leads pulse A by 90 degrees, and the motor direction is
reversed. The default value is 2.5 V.
Output voltage amplitude
Amplitude of the output pulse trains. The default value is 10 V.
Stepping mode
Select Full stepping or Half stepping. The default value is
Full stepping.

Ports The block has the following ports:

1-766
Unipolar Stepper Motor Driver

A+
Top A-phase electrical connection
A0
A-phase center tap connection
A-
Lower A-phase electrical connection
B+
Top B-phase electrical connection
B0
B-phase center tap connection
B-
Lower B-phase electrical connection
PWM
Triggering input step voltage
REF
Input floating reference voltage
REV
Input voltage that controls motor direction

See Also Controlled PWM Voltage | Unipolar Stepper Motor

1-767
Universal Motor

Purpose Model electrical and torque characteristics of a universal (or series)


motor

Library Rotational Actuators

Description The Universal Motor block represents the electrical and torque
characteristics of a universal (or series) motor using the following
equivalent circuit model.

Lf Rf if
Ra

La V

+
vb

Where:

• Ra is the armature resistance.


• La is the armature inductance.
• Rf is the field winding resistance.
• Lf is the field winding inductance.

When you set the Model parameterization parameter to By


equivalent circuit parameters, you specify the equivalent circuit
parameters for this model. The Universal Motor block computes the
motor torque as follows:

1-768
Universal Motor

1 The magnetic field in the motor induces the following back emf vb in
the armature:

vb = Laf i f 
where Laf is a constant of proportionality and ω is the angular
velocity.

2 The mechanical power is equal to the power reacted by the back emf:

P = vbi f = Laf i f 2

3 The motor torque is:

T = P /  = Laf i f 2

The torque-speed characteristic for the Universal Motor block model


is related to the parameters in the preceding figure. When you set
the Model parameterization parameter to By DC rated power,
rated speed & maximum torque or By DC rated power, rated
speed & electrical power, the block solves for the equivalent circuit
parameters as follows:

1 For the steady-state torque-speed relationship when using a DC


supply, L has no effect.

2 Sum the voltages around the loop:

V = ( R f + Ra )i f + vb = ( R f + Ra + Laf  )i f

3 Solve the preceding equation for if and substitute this value into
the equation for torque:

1-769
Universal Motor

2
⎛ V ⎞
T = Laf ⎜
⎜ R + R + L  ⎟⎟
⎝ f a af ⎠

The block uses the rated speed and power to calculate the rated
torque. The block uses the rated torque and rated speed values in
the preceding equation plus the corresponding electrical power to
determine values for Rf+Ra and Laf.

When you set the Model parameterization parameter to By AC


rated power, rated speed, current & electrical power, then
the block must include the inductive terms La and Lf in the model. This
requires information about the RMS rated current and voltage for the
total inductance.
The block models motor inertia J and damping B for all values of the
Model parameterization parameter. The output torque is:

2
⎛ V ⎞
= Laf ⎜ − J  − B
⎜ R + R + L  ⎟⎟
Tload
⎝ f a af ⎠
The block produces a positive torque acting from the mechanical C to
R ports.

Thermal Ports
The block has two optional thermal ports, one per winding, hidden by
default. To expose the thermal ports, right-click the block in your model,
and then from the context menu select Simscape block choices >
Show thermal port. This action displays the thermal ports on the
block icon, and adds the Temperature Dependence and Thermal
port tabs to the block dialog box. These tabs are described further on
this reference page.
Use the thermal ports to simulate the effects of copper resistance losses
that convert electrical power to heat. For more information on using

1-770
Universal Motor

thermal ports in actuator blocks, see “Simulating Thermal Effects in


Rotational and Translational Actuators”.

Dialog
Box and
Parameters

• “Electrical Torque Tab” on page 1-772


• “Mechanical Tab” on page 1-774
• “Temperature Dependence Tab” on page 1-774
• “Thermal Port Tab” on page 1-775

1-771
Universal Motor

Electrical Torque Tab

Model parameterization
Select one of the following methods for block parameterization:
• By equivalent circuit parameters — Provide electrical
parameters for an equivalent circuit model of the motor.
• By DC rated power, rated speed & maximum torque —
Provide DC power and speed parameters that the block
converts to an equivalent circuit model of the motor. This is
the default method.
• By DC rated power, rated speed & electrical power
— Provide AC power and speed parameters that the block
converts to an equivalent circuit model of the motor.
• By AC rated power, rated speed, current & electrical
power — Provide AC power and speed parameters that the
block converts to an equivalent circuit model of the motor.
Total armature and field winding resistance
Total resistance of the armature and field winding. This
parameter is only visible when you select By equivalent
circuit parameters for the Model parameterization
parameter. The default value is 132.8 Ω.
Rated speed (at rated load)
Motor speed at the rated mechanical load. This parameter
is only visible when you select By DC rated power, rated
speed & maximum torque, By DC rated power, rated speed
& electrical power, or By AC rated power, rated speed,
current & electrical power for the Model parameterization
parameter. The default value is 6.5e+03 rpm.
Rated load (mechanical power)
The mechanical load for which the motor is rated to operate.
This parameter is only visible when you select By DC rated
power, rated speed & maximum torque, By DC rated power,
rated speed & electrical power, or By AC rated power,

1-772
Universal Motor

rated speed, current & electrical power for the Model


parameterization parameter. The default value is 75 W.
Rated DC supply voltage
The DC voltage at which the motor is rated to operate. This
parameter is only visible when you select By DC rated power,
rated speed & maximum torque or By DC rated power, rated
speed & electrical power for the Model parameterization
parameter. The default value is 200 V.
Electrical power in at rated load
The amount of electrical power the motor uses at the rated
mechanical power. This parameter is only visible when you select
By DC rated power, rated speed & electrical power or By
AC rated power, rated speed, current & electrical power
for the Model parameterization parameter. The default value
is 160 W.
Maximum (starting) torque
Maximum torque the motor produces. This parameter is only
visible when you select By DC rated power, rated speed &
maximum torque for the Model parameterization parameter.
The default value is 0.39 N*m.
Total armature and field winding inductance
Total inductance of the armature and field winding. If you do
not have information about this inductance, set the value of this
parameter to a small, nonzero number. This parameter is only
visible when you select By equivalent circuit parameters, By
DC rated power, rated speed & maximum torque, or By DC
rated power, rated speed & electrical power for the Model
parameterization parameter. The default value is 0.525 H.

Note You can set the Total armature and field winding
inductance value to zero, but this only makes sense if you are
driving the motor with a DC source.

1-773
Universal Motor

RMS rated voltage


RMS supply voltage when the motor operates on AC power. This
parameter is only visible when you select By AC rated power,
rated speed, current & electrical power for the Model
parameterization parameter. The default value is 240 V.
RMS current at rated load
RMS current when the motor operates on AC power at the rated
load. This parameter is only visible when you select By AC rated
power, rated speed, current & electrical power for the
Model parameterization parameter. The default value is 0.8 A.
AC frequency
Frequency of the AC supply voltage. This parameter is only
visible when you select By AC rated power, rated speed,
current & electrical power for the Model parameterization
parameter. The default value is 50 Hz.

Mechanical Tab

Rotor inertia
Rotor inertia. The default value is 2e-04 kg*m2. The value can
be zero.
Rotor damping
Rotor damping. The default value is 1e-06 N*m/(rad/s). The
value can be zero.
Initial rotor speed
Speed of the rotor at the start of the simulation. The default
value is 0 rpm.

Temperature Dependence Tab


This tab appears only for blocks with exposed thermal ports. For more
information, see “Thermal Ports” on page 1-770.

Field to armature resistance ratio, Rf/Ra


The ratio of the field to the armature resistance. This parameter is
required only when showing the field and armature thermal ports.

1-774
Universal Motor

It is used to determine individual resistance values for the field


and armature windings so that the thermal heat generated by the
two resistors can be apportioned correctly. The default value is 1.
Resistance temperature coefficients, [alpha_f alpha_a]
A 1 by 2 row vector defining the coefficient α in the equation
relating resistance to temperature, as described in “Thermal
Model for Actuator Blocks”. The first element corresponds to the
field winding, and the second to the armature. The default value
is for copper, and is [ 0.00393 0.00393 ] 1/K.
Measurement temperature
The temperature for which motor parameters are defined. The
default value is 25 C.

Thermal Port Tab


This tab appears only for blocks with exposed thermal ports. For more
information, see “Thermal Ports” on page 1-770.

Thermal masses, [Mf Ma]


A 1 by 2 row vector defining the thermal mass for the field and
armature windings. The thermal mass is the energy required to
raise the temperature by one degree. The default value is [ 100
100 ] J/K.
Initial temperatures, [Tf Ta]
A 1 by 2 row vector defining the temperature of the field and
armature thermal ports at the start of simulation. The default
value is [ 25 25 ] C.

Ports The block has the following ports:

+
Positive electrical port.
-
Negative electrical port.

1-775
Universal Motor

C
Mechanical rotational conserving port.
R
Mechanical rotational conserving port.
Hf
Field winding thermal port. For more information, see “Thermal
Ports” on page 1-770.
Ha
Armature winding thermal port. For more information, see
“Thermal Ports” on page 1-770.

References [1] Bolton, W. Mechatronics: Electronic Control Systems in Mechanical


and Electrical Engineering 3rd edition, Pearson Education, 2004.

See Also DC Motor | Induction Motor | Servomotor | Shunt Motor

1-776
Variable Capacitor

Purpose Model linear time-varying capacitor

Library Passive Devices

Description The Variable Capacitor block represents a linear time-varying capacitor.


The block provides two options for the relationship between the current
i through the capacitor and the voltage v across the device when the
capacitance at port C is C. The Equation parameter determines which
of the following equations the block uses:

dC dv
• i= v+C
dt dt
Use the preceding equation when the capacitance is defined as the
ratio of the charge Q to the steady-state voltage:

Q(v)
C(v) =
v

dv
• i=C
dt
Use the preceding equation when the capacitance is defined as the
local gradient of the charge-voltage curve for a given voltage:

dQ(v)
C (v ) =
dv

The block includes a resistor in series with the variable capacitor. You
can use this resistor to represent the total ohmic connection resistance
of the capacitor. You may need to use this resistor to prevent numerical
issues for some circuit topologies, such as where a Variable Capacitor
block is connected in parallel with another capacitor block that does not
have a series resistance.

1-777
Variable Capacitor

Dialog
Box and
Parameters

Equation
Select one of the following options for block capacitance:
• I = C*dV/dt + dC/dt*V — This equation assumes the
capacitance is defined as the ratio of the charge to the
steady-state voltage. This option is the default.
• I = C*dV/dt — This equation assumes the capacitance is
defined as the local gradient of the charge-voltage curve for a
given voltage.
Minimum capacitance C>0
The lower limit on the value of the signal at port C. This limit
prevents the signal from reaching a value that has no physical
meaning. The default value is 1e-09 F.
Series resistance
The value of the resistance placed in series with the variable
capacitor. The default value is 1e-06 Ω.
Initial charge
The charge at the start of the simulation. This parameter is
only visible when you select I = C*dV/dt + dC/dt*V for the
Equation parameter. The default value is 0 c.

1-778
Variable Capacitor

Initial voltage
The output voltage at the start of the simulation. This parameter
is only visible when you select I = C*dV/dt for the Equation
parameter. The default value is 0 V.

Ports The block has the following ports:

C
Capacitance physical signal port (C must be finite and greater
than zero)
+
Positive electrical port
-
Negative electrical port

See Also Variable Inductor | Variable Resistor

1-779
Variable Inductor

Purpose Model linear time-varying inductor

Library Passive Devices

Description The Variable Inductor block represents a linear time-varying inductor.


The block provides two options for the relationship between the voltage
v across the device and the current through the inductor i when the
inductance at port L is L. The Equation parameter determines which
of the following equations the block uses:

dL di
• v= i+ L
dt dt
Use the preceding equation when the inductance is defined as the
ratio of the magnetic flux Ф to the steady-state current:

Φ (i )
L(i ) =
i

di
• v=L
dt
Use the preceding equation when the inductance is defined as the
local gradient of the flux-current curve for a given current:

d Φ (i )
L(i ) =
di

The block includes a conductance in parallel with the variable inductor.


You can use the conductor to represent the total insulation conductance
of the inductor. You may need to use the conductor to prevent numerical
issues for some circuit topologies, such as where a Variable Inductor
block is connected in series with another inductor block that does not
have a parallel conductance.

1-780
Variable Inductor

Dialog
Box and
Parameters

Equation
Select one of the following options for block inductance:
• V = L*dI/dt + dL/dt*I — This equation assumes the
inductance is defined as the ratio of the magnetic flux to the
steady-state current. This option is the default.
• V = L*dI/dt — This equation assumes the inductance is
defined as the local gradient of the flux-current curve for a
given current.
Minimum inductance L>0
The lower limit on the value of the signal at port L. This limit
prevents the signal from reaching a value that has no physical
meaning. The default value is 1e-06 H.
Parallel conductance
The value of the conductance placed in parallel with the variable
inductor. The default value is 1e-09 1/Ω.
Initial magnetic flux
The magnetic flux at the start of the simulation. This parameter
is only visible when you select V = L*dI/dt + dL/dt*I for the
Equation parameter. The default value is 0 Wb.

1-781
Variable Inductor

Initial current
The output current at the start of the simulation. This parameter
is only visible when you select V = L*dI/dt for the Equation
parameter. The default value is 0 A.

Ports The block has the following ports:

L
Inductance physical signal port (L must be finite and greater
than zero)
+
Positive electrical port
-
Negative electrical port

See Also Variable Capacitor | Variable Resistor

1-782
Voltage-Controlled Oscillator

Purpose Behavioral model of voltage-controlled oscillator

Library Integrated Circuits

Description The Voltage-Controlled Oscillator block provides a behavioral model


of a voltage-controlled oscillator (VCO). The output voltage is defined
by the following equations:

vmin for vin  vm in



vlim  vin for vm in  vin  vmax
v for vin  vmax
 max

  2 F  v 
 lim

vout  A sin  2 f nomt     iout Rout

where:

• vin is the voltage applied across the 1+ and 1– ports.


• vout is the voltage across the 2+ and 2– ports.
• fnom is the oscillator frequency when the input control voltage is vnom.
• F is a linear function of vlim or a lookup table function of vlim.
• A is the output voltage peak amplitude.
• t is simulation time.
• iout is the output current.
• Rout is the output resistance.

If you choose Linear for the Frequency dependence on input


voltage parameter, then the function F is given by:

1-783
Voltage-Controlled Oscillator

F  f nom  k  vlim  vnom 

where k is the rate of change of frequency with input voltage.


If you choose Tabulated for the Frequency dependence on input
voltage parameter, then the function F is defined by the vectors of
input voltages and corresponding output frequency deviations from
nominal that you supply. The values for vmin and vmax are the first and
the last values of the input voltage vector.
You can model the time delay between a change in the input control
voltage and the oscillator frequency. Do this by modeling a first-order
dynamic between vlim and the value passed to the function F.

Dialog
Box and
Parameters

• “Frequency Tab” on page 1-785


• “Electrical Characteristics Tab” on page 1-786

1-784
Voltage-Controlled Oscillator

• “Dynamics Tab” on page 1-786

Frequency Tab

Frequency dependence on input voltage


Select one of the following methods for block parameterization:
• Linear — Define a linear function by specifying the rate of
change of frequency with input voltage. This is the default
option.
• Tabulated — Provide the vectors of input voltages and
corresponding output frequency deviations from nominal. The
block determines the frequency deviation by table lookup based
on these values.
Nominal frequency
The oscillator frequency when the input control voltage is at the
nominal value. The default value is 1000 Hz.
Input voltage corresponding to nominal frequency
The input voltage corresponding to the oscillator nominal
frequency. This parameter is visible only if you select Linear for
the Frequency dependence on input voltage parameter. The
default value is 0.5 V.
Rate of change of frequency with input voltage
The linear coefficient defining the rate of change of frequency
depending on input voltage. This parameter is visible only if you
select Linear for the Frequency dependence on input voltage
parameter. The default value is 0 Hz/V.
Minimum input voltage
The minimum input voltage that affects VCO frequency. This
parameter is visible only if you select Linear for the Frequency
dependence on input voltage parameter. The default value
is 0 V.
Maximum input voltage
The maximum input voltage that affects VCO frequency. This
parameter is visible only if you select Linear for the Frequency

1-785
Voltage-Controlled Oscillator

dependence on input voltage parameter. The default value


is 1 V.
Input voltage vector
The vector of voltages for the tabulated VCO frequency. This
parameter is visible only if you select Tabulated for the
Frequency dependence on input voltage parameter. The
default value is [0 0.2 0.4 0.6 0.8 1] V.
Frequency deviation from nominal
The corresponding vector of VCO frequencies relative to the
nominal frequency. This parameter is visible only if you select
Tabulated for the Frequency dependence on input voltage
parameter. The default value is [-1000 -329 -51 162 342 500]
Hz.

Electrical Characteristics Tab

Output voltage peak amplitude


The peak amplitude of the voltage across the 2+ and 2– terminals.
The default value is 1 V.
Input resistance
The resistance seen at the 1+ and 1– terminals. The default value
is Inf Ohm.
Output resistance
The value of the series output resistance. The default value is
0 Ohm.

Dynamics Tab

Dynamics
Select one of the following methods for specifying dynamics:
• No dynamics — Do not model the time delay between a change
in the input control voltage and the oscillator frequency. This
is the default option.

1-786
Voltage-Controlled Oscillator

• Model frequency tracking dynamics — Model a first order


dynamic between the input control voltage and the oscillator
frequency.
Frequency tracking time constant
Time constant for the first-order filter that delays the measured
input control voltage, to model the lag between a change in
VCO demanded frequency and the resulting VCO frequency.
This parameter is visible only if you select Model frequency
tracking dynamics for the Dynamics parameter. The default
value is 0.001 s.
Initial frequency
The initial VCO output frequency. This parameter is visible
only if you select Model frequency tracking dynamics for the
Dynamics parameter. The default value is 1000 Hz.

Ports The block has the following ports:

1+
Positive input voltage
1-
Negative input voltage
2+
Positive output voltage
2-
Negative output voltage

1-787
Voltage-Controlled Switch

Purpose Model voltage-controlled switch with hysteresis

Library SPICE-Compatible Components/Passive Devices

Description The Voltage-Controlled Switch block represents the electrical


characteristics of a switch whose state is controlled by the voltage
across the input ports (the controlling voltage):

• When the controlling voltage is greater than the sum of the


Threshold voltage, VT and Hysteresis voltage, VH parameter
values, the switch is closed and has a resistance equal to the On
resistance, RON parameter value.
• When the controlling voltage is less than the Threshold voltage,
VT parameter value minus the Hysteresis voltage, VH parameter
value, the switch is open and has a resistance equal to the Off
resistance, ROFF parameter value.
• When the controlling voltage is greater than or less than the
Threshold voltage, VT parameter value by an amount less than or
equal to the Hysteresis voltage, VH parameter value, the voltage is
in the crossover region and the state of the switch remains unchanged.

Basic The block output resistance model is discontinuous during switching.


Assumptions The discontinuity might cause numerical issues. Try the following
and actions to resolve the issues:
Limitations
• Set the On resistance, RON and Off resistance, ROFF parameter
values to keep the ratio RON/ROFF as small as possible, and less
than 1e+12.
• Increase the Hysteresis voltage, VH parameter value to reduce
switch chatter.
• Decrease the Max step size parameter value (in the Configuration
Parameters block dialog box).

1-788
Voltage-Controlled Switch

Note This increases the simulation time.

Dialog
Box and
Parameters

Threshold voltage, VT
The voltage above which the block interprets the controlling
voltage as HIGH. The default value is 0 V.

Note The controlling voltage must differ from the threshold


voltage by at least the Hysteresis voltage, VH parameter value
to change the state of the switch.

Hysteresis voltage, VH
The amount by which the controlling voltage must exceed or fall
below the Threshold voltage, VT parameter value to change the
state of the switch. The default value is 0 V.

1-789
Voltage-Controlled Switch

On resistance, RON
The resistance of the switch when it is closed. The default value
is 1 Ω.
Off resistance, ROFF
The resistance of the switch when it is open. The default value
is 1e+12 Ω.
Initial switch state
Select one of the following options for the state of the switch at
the start of the simulation:
• On — The switch is initially closed and its resistance value is
equal to the On resistance, RON parameter value. This is
the default option.
• Off — The switch is initially open and its resistance value is
equal to the Off resistance, ROFF parameter value.

Ports The block has the following ports:

+
Positive electrical input and output ports.
-
Negative electrical input and output ports.

1-790
Voltage Source

Purpose Simulate voltage source with DC, AC, and noise components

Library Sources

Description The Voltage Source block implements a voltage source with DC, AC, and
noise components. The voltage across the + and – terminals is given by:

v  vDC  vAC sin  2ft     vN

where:

• vDC is the steady-state DC voltage component.

• vAC is the amplitude of the AC voltage component.


• f is the frequency of the AC component.
• ϕ is the phase offset of the AC component.
• vN is the noise voltage.

You can configure your source as DC-only, AC-only, or a combination of


both. By default, both AC and DC components are set to 0. Define the
AC/DC voltage by specifying nonzero parameter values after placing the
block in your model.
The noise component is also optional. If you set the Noise mode
parameter to Enabled, then the added noise voltage is given by:

N  0, 1
vN  Pv 2
h

where:

• Pv is the single-sided noise power spectral density for a 1 ohm load,


in V^2/Hz.
• N is a Gaussian random number with zero mean and standard
deviation of one.

1-791
Voltage Source

• h is the sampling interval.

By default, the Noise mode parameter is set to Disabled, and the


voltage source generates no thermal noise.

Noise Options
The block generates Gaussian noise by using the Random Number
source in the Simscape Foundation library. You can control the random
number seed by setting the Repeatability parameter:

• Not repeatable — Every time you simulate your model, the


block resets the random seed using the MATLAB random number
generator:

seed = randi(2^32-1);

• Repeatable — The block uses a hidden parameter, called auto_seed,


to always start the simulation with the same random number. The
value of auto_seed is set whenever you copy the Resistor block
from the block library to the model, or when you make a new copy
of the Resistor block from an existing one in a model. The block sets
the value using the MATLAB random number generator command
shown above.
• Specify seed — If you select this option, the additional Seed
parameter lets you directly specify the random number seed value.

Basic Simulating with noise enabled slows down simulation. Choose the
Assumptions sample time (h) so that noise is generated only at frequencies of interest,
and and not higher.
Limitations

1-792
Voltage Source

Dialog
Box and
Parameters

• “DC & AC Components Tab” on page 1-793


• “Noise Tab” on page 1-794

DC & AC Components Tab

DC voltage
The DC component of the output voltage. The default value is 0
V. Enter a nonzero value to add a DC component to the voltage
source.
AC voltage peak amplitude
Amplitude of the AC component of the output voltage. The default
value is 0 V. Enter a nonzero value to add an AC component to
the voltage source.
AC voltage phase shift
Phase offset of the AC component of the output voltage. The
default value is 0 degrees.
AC voltage frequency
Frequency of the AC component of the output voltage. The default
value is 60 Hz.

1-793
Voltage Source

Noise Tab

Noise mode
Select the noise option:
• Disabled — No noise is produced by the voltage source. This
is the default.
• Enabled — The voltage source generates thermal noise, and
the associated parameters become visible on the Noise tab.
Power spectral density
The single-sided spectrum noise power. Strictly-speaking, this
is a density function for the square of the voltage, commonly
thought of as a power into a 1 ohm load, and therefore the units
are V^2/Hz. To avoid this unit ambiguity, some datasheets quote
noise voltage as a noise density with units of V/√Hz. In this case,
you should enter the square of the noise density quoted in the
datasheet as the parameter value. The default value is 0 V^2/Hz.
Sample time
Defines the rate at which the noise source is sampled. Choose
it to reflect the frequencies of interest in your model. Making
the sample time too small will unnecessarily slow down your
simulation. The default value is 1e-3 s.
Repeatability
Select the noise control option:
• Not repeatable — The random sequence used for noise
generation is not repeatable. This is the default.
• Repeatable — The random sequence used for noise generation
is repeatable, with a system-generated seed.
• Specify seed — The random sequence used for noise
generation is repeatable, and you control the seed by using the
Seed parameter.

1-794
Voltage Source

Seed
Random number seed used by the noise random number
generator. This parameter is visible only if you select Specify
seed for the Repeatability parameter. The default value is 0.

Ports The block has the following ports:

+
Positive electrical port
-
Negative electrical port

See Also Current Source | Resistor

1-795

You might also like