\section{Introduction}


Power converters\index{power converters} have seen a surge of new trends and novel
applications due to their widespread use in renewable energy systems
and emerging hybrid and purely-electric vehicles. More efficient
simulation techniques for power converters are urgently needed to meet
more design constraints.  In this chapter, we present a novel
envelope-following parallel transient analysis method for the general
switching power converters. The new method first exploits the
parallelisim in the envelope-following method and parallelize the
Newton update solving part, which is the most computational expensive,
in GPU platforms to boost the simulation performance.  To further
speed up the iterative GMRES\index{iterative method!GMRES} solving for Newton update equation in the
envelope-following method, we apply the matrix-free\index{matrix-free}
Krylov subspace\index{Krylov subspace} basis
generation technique, which was previously used for RF simulation.
Last, the new method also applies more robust Gear-2 integration to
compute the sensitivity matrix instead of traditional integration
methods.

Over the past decades, power electronics\index{power electronics} and especially switching
power converters have seen a surge of new trends and novel applications
--- from the growing significance of PWM (pulse-width modulation)
rectifiers and multilevel inverters to their widespread use in
renewable (like solar and wind) energy systems, smart grids and emerging
electric and hybrid vehicles~\cite{Trzynadlowski:Book'10}.

This requires more efficient simulation techniques for power
electronics to meet the new application and demanding design
constraints. To facilitate the design of typical power electronics
circuits, many special-purpose simulation algorithms and
tools were developed.  Among them is the envelope-following
method~\cite{Kundert:ICCAD'88,White:TPE'91,Feldmann:ICCAD'96}, %,Bose:TIE'09
which is able to calculate the slowly changing contour, or
envelope, of a carrier waveform with a much higher
switching frequency\index{switching frequency}.
This is the case for switching power converters,
which have fast switching currents to convert powers
from one level to another level.
In those switching power converters, it is the envelope,
which is the power voltage delivered,
not the fast switching waves in every cycle,
that is of interest to the designers.
As shown in Figure~\ref{fig:ef1}, the solid line is
the waveform of the output node in a Buck
converter~\cite{Krein:book'97}, the dots are the simulation points
of SPICE\index{SPICE}, and the appended dash line is the envelope.

Obviously, traditional SPICE will incur an extraordinarily high
simulation time for this task, since it has to integrate the
circuit's differential equation with many time points in every
clock cycle to get the accurate details of the carrier.  For
switching power converters, the waveform of the carrier in
consequent cycles does not change much, envelope-following method
is an approximation analysis method, which skips over several
cycles (the dash line in Figure~\ref{fig:ef2}), the so called
envelope step, without simulating them, and then carries out a
correction, which usually contains a sensitivity-based Newton
iteration or shooting until convergence, in order to begin the
next envelope step.

% \begin{figure}[!b]
%   \resizebox{.5\textwidth}{!}{\input{./matlab/ef_intro.pstex_t}}
%   %\includegraphics[width=.45\textwidth]{./matlab/ef_intro_ppt.eps}
%   \caption{Transient envelope-following analysis.
%     (This figure reflects a backward-Euler style envelope-following.)}
%   \label{fig:ef_intro}
% \end{figure}
\begin{figure}
  \centering
  \subfigure[Illustration of one envelope skip.]
       {\resizebox{.8\textwidth}{!}{\input{./Chapters/chapter16/figures/ef_intro.pdf_t}}
            \label{fig:ef1} }
  \subfigure[The envelope changes in a slow time scale.]
       {\resizebox{.9\textwidth}{!}{\input{./Chapters/chapter16/figures/envelope.pdf_t}}
            \label{fig:ef2} }
  \caption{Transient envelope-following\index{envelope-following} analysis.
    (Both two figures reflect backward Euler\index{Euler!backward Euler} style envelope-following.)}
  \label{fig:ef_intro}
\end{figure}

%\IEEEpubidadjcol

Also, iterative GMRES\index{iterative method!GMRES} solver is typically used in the
envelope-following method to compute the solution of Newton update
due to its efficiency compared to direct LU\index{LU} method.
However, as the Jacobian matrix\index{Jacobian matrix}
or the sensitivity matrix\index{sensitivity matrix}
in the equation to be solved is dense,
explicit computing of the Jacobian is a very expense process.
Recently, the matrix-free\index{matrix-free} GMRES
was proposed~\cite{Telichevesky:DAC'95}
for RF shooting based simulation.
The new method leads to significant
savings due to its implicit calculation of new basis vectors
without the explicit formulation of the sensitivity matrix.


Modern computer architecture has shifted towards designs that employ
so called multi-core processor or chip-multiprocessors (CMP)~\cite{IntelMC'06,AMDMC'06}.
The family of graphic processing units (GPU) are among the most
powerful many-core computing systems in mass-market use~\cite{nvidia}.
For instance, the state-of-the-art NVIDIA Tesla T10 chip has a peak
performance of over 1~TFLOPS versus about 80--100~GFLOPS of Intel i5
series Quad-core CPUs~\cite{Kirk:Book'10}.
In addition to the primary
use of GPUs in accelerating graphics rendering operations, there has
been considerable interest in exploiting GPUs for general purpose
computation (GPGPU)~\cite{gpgpu}. The introduction of new parallel
programming interfaces for general purpose computation, such as
Computer Unified Device Architecture (CUDA),
Stream SDK, and OpenCL~\cite{cuda,streamSDK,openCL},
has made GPUs an attractive choice
for developing high-performance scientific computation tools
and solving practical engineering problems.
Hence, the applications with GPGPUs are rapidly growing in a broad
variety of parallel numerical computation works~\cite{CUDA_Zone}.

%For this correction to be efficient and precise, it is critical
%for the Newton iteration to converge fast and yield accurate
%result.

%Switching power converters and RF (radio-frequency) circuits are
%typically stiff systems where
%the fast signals (switching signals or carrier signals) and
%the slow moving signals (the output voltage waveforms and user signals)
%coexist.
%However, it is challenging to simulate the stiff systems
%using the traditional integration method such as
%Backward Euler and Trapezoidal method~\cite{Iserles:Book'96}.
%It has been shown that Gear-2 is more suitable
%for many practical problems such as stiff problems
%where one have different time constants
%(fast ones with large poles and slow ones with small poles)~\cite{Vlach:Book'94}.

%GMRES is a Krylov-subspace based method for solving linear
%equation, which guarantees convergence and is efficient if the
%eigenvalues are tightly clustered together~\cite{Golub:Book'96}.
%Fortunately, most problems arising from the shooting method and
%the envelope-following method satisfy naturally the convergence
%criterion of GMRES~\cite{Nastov:ProcIEEE'07} (or after
%preconditioners applied if not).


%\item Newton update equation for envelope-following is formed with
%    the sensitivity matrix derived from the Gear-2 integration rule for
%    better stability.
%   \item Detailed mathematical derivations to show
%      the relationship between the sensitivity matrix and
%      the information extracted from transient steps.

After the basic algorithm of envelope-following is briefly reviewed
and Newton update equation is derived in Section~\ref{sec:ef}.  In
Section~\ref{sec:gmres} presents the new parallel envelope method
where the CPU parallelization, matrix-free GMRES and Gear-2
integration will be discussed. We will show the parallelization of the
Newton update, which is the most time consuming step, in the
envelop-follow method, in GPU platforms.  We will also present the new
GMRES solver using matrix-free Jacobian-vector multiplication and the
Gear-2 integration for sensitivity based Newton update equation.
Numerical examples are shown in Section~\ref{sec:exp}, and finally,
this chapter is summarized in Section~\ref{sec:summary}.
