%$Id: exp.tex,v 25.92 2006/06/28 15:06:41 al Exp $
% man behavior exp .
% 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 EXP}: Exponential time dependent value}
%------------------------------------------------------------------------
\subsection{Syntax}
\begin{verse}
{\tt EXP} {\it args}\\
{\tt EXP} {\it iv pv td1 tau1 td2 tau2 period}
\end{verse}
%------------------------------------------------------------------------
\subsection{Purpose}

The component value is an exponential function of time.
%------------------------------------------------------------------------
\subsection{Comments}

For voltage and current sources, this is the same as the Spice {\tt
EXP} function, with some extensions.

The shape of the waveform is described by the following algorithm:

\begin{verbatim}
ev = _iv;
for (reltime=time; reltime>=0; reltime-=_period){
  if (reltime > _td1){
    ev += (_pv - _iv) 
          * (1. - Exp(-(reltime-_td1)/_tau1));
  }
  if (reltime > _td2){
    ev += (_iv - _pv) 
          * (1. - Exp(-(reltime-_td2)/_tau2));
  }
}
\end{verbatim}
%------------------------------------------------------------------------
\subsection{Parameters}

\begin{description}

\item[{\tt IV} = {\it x}] Initial value.  (required)

\item[{\tt PV} = {\it x}] Pulsed value.  (required)

\item[{\tt TD1} = {\it x}] Rise time delay.  (Default = 0.)

\item[{\tt TAU1} = {\it x}] Rise time constant.  (Default = 0.)

\item[{\tt TD2} = {\it x}] Fall time delay.  (Default = 0.)

\item[{\tt TAU2} = {\it x}] Fall time constant.  (Default = 0.)

\item[{\tt Period} = {\it x}] Repeat period.  (Default = infinity.)

\end{description}
%------------------------------------------------------------------------
%\subsection{Example} 
%------------------------------------------------------------------------
%------------------------------------------------------------------------
