%$Id: r.tex,v 25.95 2006/08/26 01:26:53 al Exp $ -*- LaTeX -*-
% man circuit r .
% Copyright (C) 2001 Albert Davis
% Author: Albert Davis <aldavis@ieee.org>
%
% This file is part of "Gnucap", the Gnu Circuit Analysis Package
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2, or (at your option)
% any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
% 02110-1301, USA.
%------------------------------------------------------------------------
\section{{\tt R}: Resistor}
%------------------------------------------------------------------------
\subsection{Syntax}
\subsubsection{Device}
\begin{verse}
{\tt R}{\it xxxxxxx n+ n-- value}\\
{\tt R}{\it xxxxxxx n+ n-- expression}\\
{\tt R}{\it xxxxxxx n+ n-- model} \{{\tt L=}{\it length}\}
        \{{\tt W=}{\it width}\} \{{\tt TEMP=}{\it temperature}\} \\
{\tt .resistor} {\it label n+ n-- expression}
\end{verse}
\subsubsection{Model (optional)}
\begin{verse}
{\tt .model} {\it mname} {\tt R} \{{\it args}\} \\
{\tt .model} {\it mname} {\tt TABLE} \{{\it args}\}
\end{verse}
%------------------------------------------------------------------------
\subsection{Purpose}

Resistor, or general current controlled dissipative element.
%------------------------------------------------------------------------
\subsection{Comments}

{\it N+} and {\it n--} are the positive and negative element nodes,
respectively.  {\it Value} is the resistance in Ohms.

The resistor (type {\tt R}) differs from the admittance (type {\tt Y}) in
that the resistor is a current controlled element, and the conductance is a
voltage controlled element, in addition to the obvious use of conductance
($1/R$) instead of resistance.

You may specify the {\it value} in one of three forms:

\begin{enumerate}
  
\item
A simple value.  This is the resistance in Ohms.
  
\item
An expression, as described in the behavioral modeling chapter.  The
expression can specify the voltage as a function of current, or the
resistance as a function of time.

\item
A {\it model}, as described in the behavioral modeling chapter.  The
{\tt table} model describes a table of voltage vs. current.
  
\item
A {\it model}, which calculates the resistance as a function of length
and width, referencing a {\tt .model} statement of type {\tt R}.  This
is compatible with the Spice-3 ``semiconductor resistor''.

\end{enumerate}
%------------------------------------------------------------------------
\subsection{R Model statement}

A model statement may be used,, with model type {\tt R} or {\tt Res}.
The parameters are:

\begin{description}
  
\item[{\tt RSH} = {\it x}] Sheet resistance. (Ohms / square). (Required)
  
\item[{\tt CJSW} = {\it x}] Junction sidewall capacitance. (Farads /
  meter).  (Default = 0.)
  
\item[{\tt DEFW} = {\it x}] Default width. (meters).  (Default = 1e-6)
  
\item[{\tt NARROW} = {\it x}] Narrowing due to side etching. (meters).
  (Default = 0.)
  
\item[{\tt TC1} = {\it x}] First order temperature coefficient.
  (Farads / degree C).  (Default = 0.)
  
\item[{\tt TC2} = {\it x}] Second order temperature coefficient.
  (Farads / degree C squared).  (Default = 0.)
  
\item[{\tt TNOM} = {\it x}] Parameter measurement temperature.
  (degrees C.).  (Default = 27.)

\end{description}

Resistance is computed by the formula:

\begin{verbatim}
resistance = RSH * (L - NARROW) / (W - NARROW)
\end{verbatim}

After the nominal value is calculated, it is adjusted for temperature
by the formula:

\begin{verbatim}
value *= (1 + TC1 * (T-T0) + TC2 * (T-T0)^2)
\end{verbatim}
%------------------------------------------------------------------------
\subsection{Probes}

The standard probes for all basic elements are all available.  See the
{\tt print} command for documentation.
%------------------------------------------------------------------------
%------------------------------------------------------------------------
