
\section{User Interface and Expert System}
\label{sec:ExpertSystem} 


Currently the output of the transient stability programs is analyzed 
off-line by a trained engineer. Recognizing the output of a certain
contingency as either stable or unstable is not a simple task, but it
is one which must be automated if the program is to be brought on-line.
We have proposed an approach using an expert system to analyze stability
data. Similar methods are being studied in related EPRI projects. 

The analysis of the output data is only one part of setting stability 
limits. The engineer must also choose appropriate contingencies, and 
adjust parameter values, in order to find the limiting value for a certain
component, above which the network becomes unstable. We are also 
investigating methods for applying an expert system to this problem. 




\subsection{EPRI Research}
\label{sec:EPRIExpSys} 

EPRI are developing an expert system to integrate all the 
separate programs involved in DSA, and to analyze the results and 
provide a simple user interface to the operator.
A similar expert system and user interface program is being developed 
to integrate EPRI PSAPAC programs for off-line planning.

There has been some very interesting work done by ABB Systems Control 
(EPRI Research Project 3103-2) on methods for determining stability
which use numerical and neural network techniques
rather than expert system rules. 
These rely on around a dozen ``critical indices'' (such as maximum voltage
deviation) which are obtained from the ETMSP program. 
They have identified correlations between these indices and experts'
stability classifications, and trained a neural network to take these
indices as input and output a stability classification.
This would be a useful complement to expert system rules.
They have also shown interesting results for using internal program variables 
to predict longer term stability problems, where the system
appears to be going stable but then suddenly goes unstable at some large
time. This type of instability can often not be detected from standard
ETMSP or PSS/E outputs.


\subsection{The Knowledge Base for the Decision Model}
\label{sec:KnowBase} 

The IST research team culminated the process of interviewing engineers 
within the New York Power Pool (NYPP).  On December 2, group and 
individual interviews were conducted with planning engineers of the 
New York Power Authority (NYPA) in New York City.  

As with previous interviews at NMPC and the NYPP, 
the interviews were structured to focus on two 
main issues.  
\begin{enumerate}
\item  The engineers (4) were interviewed as a group in order 
to gain a general perspective on the way they perceive and approach 
the issue of transient stability.  During this part of the meeting opinions 
regarding the overall objectives of the research project, strengths and 
weaknesses of existing systems, and areas perceived to be problematic 
were also elicited in open, minimally structured discussion. 
\item Two of the engineers examined the same set of graphical outputs 
from the PTI PSS/E program
used with NMPC and NYPP engineers.  The engineers ``thought out loud'' so 
that the interviewer could code decision points in their process of 
determining a stable transfer limit.
\end{enumerate}

As an outcome of the interviews with the electric utility engineers, 
the IST team produced an initial decision model for determining 
transfer (stability) limits based on the PTI graphical outputs.  This 
model was presented to team members in charge of implementing the 
prototype expert system.


Richard Southwick of the IST team attended
the EPRI Conference on Expert System Applications for the Electric Utility 
Industry in Phoenix on December 8-10.
The theme of the conference was the use of 
Artificial Intelligence (AI) in the electric utility industry.  
A recurring theme at this conference was the potential new 
importance of competition within the electric utility industry with 
the 1992 NEPA.  Artificial Intelligence systems using expert system 
and/or neural network design were presented as increasingly 
important in this context. 



\subsection{The Expert System Implementation of the Decision Model}
\label{sec:ESImp} 

Here we give an outline of the expert system implementation of the 
decision model for Transient Stability Analysis. 
The Cosmic CLIPS expert system shell was used for this purpose.


Based on the interviews held with experts a decision model was deduced
by the IST team. The outline of the model is as follows:
\begin{enumerate}       
\item Start decision process from the maximum power output (MW) available
\item Check stability of ROTOR ANGLE for the Current MW under test --
      if not stable, repeat (2) for a lower power output 
\item Check stability of VOLTAGES for the Current MW under test -- 
      if not stable, repeat (2) for a lower power output 
\item Check stability of ACCELERATING POWER for the Current MW under
      test -- if not stable, repeat (2) for a lower power output 
\item Fix the HIGHEST SAFE LOAD LIMIT as the power output that is stable
      for all 3 parameters, minus a $10\%$ safety margin
\end{enumerate}       

Before discussing the implementation details it is necessary to understand
how the input data to the expert system was modeled, to serve as test cases. 

\medskip
\noindent
\underline{Test Cases:} 
\medskip

The waveforms that were modeled for serving as test cases are from 
the Central-East Interface. The specific waveforms considered were from 
the following sections of the PSS/E output (in order):
\newcounter{bean}
\begin{list}{(\roman{bean})}{\usecounter{bean}}
\item INTRFC SYS ROTOR ANGLE
\item INTRC SYS VOLTAGES
\item NE ACCELERATING POWERS
\end{list}
The implementation can be extended to analyze more input parameters. 

The modeling of the waveforms associated with the above parameters
were done as follows:
\begin{itemize}
\item  An aggregate behavior of the waveform for 0 -- 7.5 secs (s1) and
       7.5 -- 15 secs (s2) were determined visually from the graphs.
       (NOTE: This will be replaced by actual data from the
       transient stability analysis program when this is available)
\item  The peak-to-peak values at  7.5 (v1) and 15 secs (v2) were also
       determined from the graph.
\item  The behaviors s1 and s2 can be: 
       \begin{itemize}
       \item positive (+) damping 
       \item negative (-) damping 
       \item zero (0) damping  
       \end{itemize}
\end{itemize}


A typical waveform as an Expert system data (fact) will look like this:
\begin{verbatim}
        (MW  3200 parameter 1 waveform 2 positive 1 negative 2)
              |             |          |          |          |
             /              |          |          |           \
            /               |          |          |            \
           /               /           |           \            \
          /               /            |            \            \
  The MW output       Represents      Which    s1=positive    s2=negative
of the associated  the precendence  waveform        &              &     
    waveform       order of the      in the    v1=1 unit       v2=2 units
                     parameter      parameter
\end{verbatim}

The input data (hereby referred as facts) were analyzed in the order specified
by the parameter precedence field, which is made to coincide with the 
requirements of the decision model. 
For example in this specific implementation the parameter precedence number for
\vspace*{2mm}

	INTRFC SYS ROTOR ANGLE  will be 1

	INTRC SYS VOLTAGES  will be 2, and

	NE ACCELERATING POWERS  will be 3.

\vspace*{2mm}
\noindent
which is what the decision model calls for.
	
The decision on stability is determined as follows (this not a part of the 
decision model, but was generally agreed to be a suitable decision process for
demonstration purposes):
\vspace*{5mm}
\begin{centering}
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{ccc}
\hline %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\qquad\qquad  s1 \qquad & \qquad     s2  \qquad 
& \qquad Decision (`S'table/`U'nstable) \qquad\qquad \\
\hline %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\qquad\qquad  -  \qquad & \qquad  -  \qquad & \qquad          U             \qquad\qquad \\
\qquad\qquad  -  \qquad & \qquad  +  \qquad & \qquad  S if v2 $<$ THRESHOLD else U \qquad\qquad \\
\qquad\qquad  -  \qquad & \qquad  0  \qquad & \qquad          U             \qquad\qquad \\
\qquad\qquad  +  \qquad & \qquad  -  \qquad & \qquad 		U             \qquad\qquad \\
\qquad\qquad  +  \qquad & \qquad  +  \qquad & \qquad 		S             \qquad\qquad \\
\qquad\qquad  +  \qquad & \qquad  0  \qquad & \qquad  S if v2 $<$ THRESHOLD else U \qquad\qquad \\
\qquad\qquad  0  \qquad & \qquad  -  \qquad & \qquad 		U             \qquad\qquad \\
\qquad\qquad  0  \qquad & \qquad  +  \qquad & \qquad 		S             \qquad\qquad \\
\qquad\qquad  0  \qquad & \qquad  0  \qquad & \qquad  S if v2 $<$ THRESHOLD else U \qquad\qquad \\
\hline %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{tabular}
\end{centering}
\vspace*{5mm}

The value of the THRESHOLD can be varied for analysis.       
If all the waveforms in all the parameters are S then the corresponding
MW value will be considered as stable. From that the Highest Safe Load
Limit is fixed as MW -- 0.1MW ($10\%$ below MW).   

The decision model implemented chose 3200 MW as the stable output and
fixed the Highest Safe Load Limit as 2880 MW. This conforms with
decision taken by the majority of the experts (who were not ``conservative'').
The mean time taken for the decision process was 0.28 seconds 
(based on 10 sample runs that were made on the same set of facts).



\subsection{Future Work}
\label{sec:ESNext} 

Phase 2

Further work on developing the prototype expert system.

Use numerical (rather than graphical) transient stability data 
as input to the expert system. ETMSP 



