model PMOS "Simple PMOS transistor with heating port"
Modelica.Electrical.Analog.Interfaces.Pin D "Drain"
annotation (Placement(
transformation(extent = {
{90, 50},
{110, 70}}),
iconTransformation(extent = {
{90, 50},
{110, 70}})));
Modelica.Electrical.Analog.Interfaces.Pin G "Gate"
annotation (Placement(
transformation(extent = {
{-90, -50},
{-110, -70}}),
iconTransformation(extent = {
{-90, -50},
{-110, -70}})));
Modelica.Electrical.Analog.Interfaces.Pin S "Source"
annotation (Placement(
transformation(extent = {
{90, -50},
{110, -70}}),
iconTransformation(extent = {
{90, -50},
{110, -70}})));
Modelica.Electrical.Analog.Interfaces.Pin B "Bulk"
annotation (Placement(transformation(extent = {
{90, -10},
{110, 10}})));
parameter SI.Length W = 2e-5 "Width";
parameter SI.Length L = 6e-6 "Length";
parameter SI.Transconductance Beta = 1.05e-5 "Transconductance parameter";
parameter SI.Voltage Vt = -1 "Zero bias threshold voltage";
parameter Real K2 = 0.41 "Bulk threshold parameter";
parameter Real K5 = 0.839 "Reduction of pinch-off region";
parameter SI.Length dW = -2.5e-6 "Narrowing of channel";
parameter SI.Length dL = -2.1e-6 "Shortening of channel";
parameter SI.Resistance RDS = 1e+7 "Drain-Source-Resistance";
parameter Boolean useTemperatureDependency = false "= true, if parameters Beta, K2 and Vt depend on temperature"
annotation (
Evaluate = true,
HideResult = true,
choices(checkBox = true));
parameter SI.Temperature Tnom = 300.15 "Parameter measurement temperature"
annotation (Dialog(enable = useTemperatureDependency));
parameter Real kvt = -0.0029 "Fitting parameter for Vt"
annotation (Dialog(enable = useTemperatureDependency));
parameter Real kk2 = 6.2e-4 "Fitting parameter for K2"
annotation (Dialog(enable = useTemperatureDependency));
extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort(useHeatPort = useTemperatureDependency);
protected
Real v;
Real uds;
Real ubs;
Real ugst;
Real ud;
Real us;
Real id;
Real gds;
Real beta_t;
Real vt_t;
Real k2_t;
equation
assert(0 < L + dL, "PMOS: Effective length must be positive");
assert(0 < W + dW, "PMOS: Effective width must be positive");
assert(0 < T_heatPort, "PMOS: Temperature must be positive");
v = beta_t * (W + dW) / (L + dL);
LossPower = D.i * (D.v - S.v);
beta_t = if useTemperatureDependency then Beta * pow(T_heatPort / Tnom, -1.5) else Beta;
gds = if RDS < 1e-20 and -1e-20 < RDS then 1e+20 else RDS ^ (-1);
id = smooth(0, if 0 <= ugst then uds * gds else if ugst < uds then -v * uds * (ugst - 0.5 * uds) + uds * gds else -0.5 * (v * ugst * ugst) + uds * gds);
k2_t = if useTemperatureDependency then K2 * (1 + (T_heatPort - Tnom) * kk2) else K2;
ubs = smooth(0, if B.v < us then 0 else B.v - us);
ud = smooth(0, if S.v < D.v then S.v else D.v);
uds = ud - us;
ugst = (G.v - us - vt_t + k2_t * ubs) * K5;
us = smooth(0, if S.v < D.v then D.v else S.v);
vt_t = if useTemperatureDependency then Vt * (1 + (T_heatPort - Tnom) * kvt) else Vt;
B.i = 0;
D.i = smooth(0, if S.v < D.v then -id else id);
G.i = 0;
S.i = smooth(0, if S.v < D.v then id else -id);
annotation (
defaultComponentName = "pMOS",
Documentation(
info = "<html>\n<p>The PMOS model is a simple model of a p-channel metal-oxide semiconductor FET. It differs slightly from the device used in the SPICE simulator. For more details please care for [<a href=\"modelica://Modelica.Electrical.Analog.UsersGuide.References\">Spiro1990</a>].\n<br>A heating port is added for thermal electric simulation. The heating port is defined in the Modelica.Thermal library.\n<br>The model does not consider capacitances. A high drain-source resistance RDS is included to avoid numerical difficulties.</p>\n<p><strong>References:</strong> [<a href=\"modelica://Modelica.Electrical.Analog.UsersGuide.References\">Spiro1990</a>]</p>\n<p>Some typical parameter sets are:</p>\n<blockquote><pre>\nW L Beta Vt K2 K5 dW dL\nm m A/V^2 V - - m m\n50.e-6 8.e-6 0.0085e-3 -0.15 0.41 0.839 -3.8e-6 -4.0e-6\n20.e-6 6.e-6 0.0105e-3 -1.0 0.41 0.839 -2.5e-6 -2.1e-6\n30.e-6 5.e-6 0.0059e-3 -0.3 0.98 1.01 0 -3.9e-6\n30.e-6 5.e-6 0.0152e-3 -0.69 0.104 1.1 -0.8e-6 -0.4e-6\n30.e-6 5.e-6 0.0163e-3 -0.69 0.104 1.1 -0.8e-6 -0.4e-6\n30.e-6 5.e-6 0.0182e-3 -0.69 0.086 1.06 -0.1e-6 -0.6e-6\n20.e-6 6.e-6 0.0074e-3 -1. 0.4 0.59 0 0\n</pre></blockquote>\n</html>",
revisions = "<html>\n<ul>\n<li><em> March 11, 2009 </em>\n by Christoph Clauss<br> conditional heat port added<br>\n </li>\n<li><em>December 7, 2005 </em>\n by Christoph Clauss<br>\n error in RDS calculation deleted</li>\n<li><em>March 31, 2004 </em>\n by Christoph Clauss<br> implemented<br>\n </li>\n</ul>\n</html>"),
Icon(
coordinateSystem(
preserveAspectRatio = true,
extent = {
{-100, -100},
{100, 100}}),
graphics = {
Line(
points = {
{-90, -60},
{-10, -60}},
color = {0, 0, 255}),
Line(
points = {
{-10, -60},
{-10, 60}},
color = {0, 0, 255}),
Line(
points = {
{10, 80},
{10, 39}},
color = {0, 0, 255}),
Line(
points = {
{10, 20},
{10, -21}},
color = {0, 0, 255}),
Line(
points = {
{10, -40},
{10, -81}},
color = {0, 0, 255}),
Line(
points = {
{10, 60},
{91, 60}},
color = {0, 0, 255}),
Line(
points = {
{10, 0},
{90, 0}},
color = {0, 0, 255}),
Line(
points = {
{10, -60},
{90, -60}},
color = {0, 0, 255}),
Polygon(
points = {
{60, 0},
{40, 5},
{40, -5},
{60, 0}},
fillColor = {0, 0, 255},
fillPattern = FillPattern.Solid,
lineColor = {0, 0, 255}),
Text(
extent = {
{-150, 130},
{150, 90}},
textString = "%name",
textColor = {0, 0, 255})}));
end PMOS;