%$Id: op.tex,v 25.95 2006/08/26 01:26:53 al Exp $ -*- LaTeX -*-
% man commands op .
% 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 OP} command}
\index{op command}
\index{operating point}
\index{bias analysis}
\index{nonlinear bias analysis}
\index{temperature sweep}
\index{quiescent conditions}
%------------------------------------------------------------------------
\subsection{Syntax}
\begin{verse}
{\tt op} {\it start stop stepsize} \{{\it options} ...\}
\end{verse}
%------------------------------------------------------------------------
\subsection{Purpose}

Performs a nonlinear DC steady state analysis, with no input.  If a
temperature range is given, it sweeps the temperature.
%------------------------------------------------------------------------
\subsection{Comments}

There are substantial extensions beyond the capabilities of the SPICE {\tt
op} command.

If there are numeric arguments, they represent a temperature sweep.  They are
the start and stop temperatures in degrees Celsius, and the step size, in
order.  They are saved between commands, so no arguments will repeat the
previous sweep.

This command will use the {\tt op} probe set, instead of automatically
printing all nodes and source currents, so you must do "{\tt print
op} ...." before running op.  We did it this way because we believe
that printing everything all the time is usually unnecessary clutter.
All of the information available from SPICE and more is available
here.  See the {\tt print} command and the device descriptions for
more details.

A single parameter represents a single temperature.  Two parameters instruct
the computer to analyze for those two points only.

This command also sets up the quiescent point for subsequent {\tt AC}
analysis.  It is necessary to do this for nonlinear circuits.  The last step
in the sweep determines the quiescent point for the AC analysis.
%------------------------------------------------------------------------
\subsection{Options}

\begin{description}

\item[{\tt *} {\it multiplier}]
Log sweep.  Multiply the input by {\it multiplier} to get the next
step.  Do not pass zero volts!!

\item[{\tt >} {\it file}]
Send results of analysis to {\it file}.

\item[{\tt >>} {\it file}]
Append results to {\it file}.

%%%\item[{\tt ACMAx}] Use worst case max values, per last
%%%{\tt AC} analysis.

%%%\item[{\tt ACMIn}] Use worst case min values, per last
%%%{\tt AC} analysis.

\item[{\tt by} {\it stepsize}]
Linear sweep.  Add {\it stepsize} to get the next step.

\item[{\tt continue}]
Use the last step of a {\tt OP}, {\tt DC} or {\tt Transient} analysis
as the first guess.

%%%\item[{\tt DCMAx}] Use worst case max values, per last
%%%{\tt DC} or {\tt OP} analysis.

%%%\item[{\tt DCMIn}] Use worst case min values, per last
%%%{\tt DC} or {\tt OP} analysis.

\item[{\tt decade} {\it steps}]
Log sweep.  Use {\it steps} steps per decade.

\item[{\tt dtemp} {\it degrees}]
Temperature offset, degrees C.  Add this number to the temperature
from the {\tt options} command.

%%%\item[{\tt LAg}] Use worst case values, for lagging phase,
%%% per {\tt AC} analysis.

%%%\item[{\tt LEad}] Use worst case values, for leading	
%%% phase, per {\tt AC} analysis.

\item[{\tt loop}]
Repeat the sweep, backwards.

%%%\item[{\tt MAx}] Use worst case max values, per same type
bb%%%({\tt OP} or {\tt DC}) analysis.  (Same as {\tt DCMAx},
%%% here.)

%%%\item[{\tt MIn}] Use worst case min values, per same type
%%%({\tt OP} or {\tt DC}) analysis.  (Same as {\tt DCMIn},
%%% here.)

%%%\item[{\tt MCarlo} {\it trials}] Monte-Carlo analysis.
%%% Simulate {\it trials} circuits; compile statistics.  Hide
%%% individual trials.

\item[{\tt noplot}]
Suppress plotting.

\item[{\tt plot}]
Graphic output, when plotting is normally off.

\item[{\tt quiet}]
Suppress console output.

%%%\item[{\tt Random} {\it trials}] Simulate {\it trials}
%%% circuits using random values.

\item[{\tt reverse}]
Sweep in the opposite direction.

%%%\item[{\tt TAble}] Tabular output. Override default plot.

\item[{\tt temperature} {\it degrees}]
Temperature, degrees C.

\item[{\tt trace} {\it n}]
Show extended information during solution.
Must be followed by one of the following:
\begin{description}
\item[{\tt off}] No extended trace information (default, override .opt)
\item[{\tt warnings}] Show extended warnings
%%%\item[{\tt alltime}] Show all accepted internal time steps.
%%%\item[{\tt rejected}] Show all internal time steps including rejected steps.
\item[{\tt iterations}] Show every iteration.
\item[{\tt verbose}] Show extended diagnostics.
\end{description}

%%%\item[{\tt WOrstcase} {\it probe}] Worst case analysis, at
%%%{\it probe}.

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

\begin{description}

\item[{\tt op 27}] Do a DC operating point simulation at temperature 27
degrees Celsius.

\item[{\tt op -50 200 25}] Sweep the temperature from -50 to 200 in 25
degree steps.  Do a DC operating point simulation at each step.

\item[{\tt op}] With no parameters, it uses the same ones as the last time.
In this case, from -50 to 200 in 25 degree steps.

\item[{\tt op 200 -50 -25}] You can sweep downward, by asking for a negative
increment.

\item[{\tt op Input 2.3}] Apply an input to the circuit of 2.3 volts.  This
overrides the default of no input.

\item[{\tt op TEmperature 75}] Simulate at 75 degrees, this time.  This isn't
remembered for next time.

\item[{\tt op}] Since the last time used the {\tt lTEmperature} option, go
back one more to find what the sweep parameters were.  In this case, downward
from 200 to -50 in 25 degree steps.  (Because we did it 3 commands ago.)

\end{description}
%------------------------------------------------------------------------
%------------------------------------------------------------------------
