SYMAP - Symbolic Analysis Program Package for Power Electronics

Table of Contents

Introduction

Load The Package

Circuit Model

State - Space Modeling

Averaged Modeling

Ripple Estimation

Large - Signal Simulation

Linearization and Transfer Functions

Introduction					back to TOC

SYMAP is developed for automated modeling and analysis of power electronic circuits. It is in fact an add-on for Mathematica. The current version has been updated to work with Mathematica 3.0. If you are still running the old version of Mathematica (2.2), you may contact the author and obtain a copy of the package that works with Mathematica 2.2. The basic functions of the two versions are similar, but some features of the current version are not available in the old one.

The package can be used for various modeling, analysis, and design tasks in power electronics, such as state-space modeling, averaged modeling, ripple estimation, large-signal transient simulation, and small-signal analysis based on linearized averaged models. This tutorial will demonstrate each of these applications step-by-step by using a hard-switching PWM Boost converter as example.

Notice that cells with cyanic background color, such as this one, are inputs that depend on the converter being analyzed. Other input cells can be used for different converter topologies without any modification.

Notice also that input cells in this tutorial, except in sections large-signal transient simulation, and small-signal analysis, are sequential, which means that trying to evaluate a cell without having evaluated all preceding cells may not produce the desired results and will generate an error message.

Load the Package				back to TOC

The major functions of the package are implemented in three files:

"Nodal.m" for generating circuit equations from the netlist,
"Average.m" for converting the circuit equations into state-space model and averaging,
"KBM.m" for ripple estimation using KBM algorithm.

These files must be loaded before you can use any of the functions defined in them (but only once when you first start the kernel). Supposing that the files come in a floppy diskette A, they can be loaded as below. Depending on where you have put these files into your system, you need to modify the path accordingly. (You may use "Get File Path" under manual "Input" to get the path of these files.) The program Graphics.m has actually been developed by Wolfram Research and is included here for plotting Bode diagrams of the small-signal averaged model, see subsection Bode Diagrams.

<< NodAl.m
<< Average.m
<< KBM.m
<< Graphic.m

Circuit Model					back to TOC

The topology of a circuit to be analyzed is given by a NetList, each element of which corresponds to a component in the circuit. Each component of the converter circuit appears in NetList in the following format:
{ComponentType, {Node 1, Node 2}, Symbol}

ComponentType is the type of the component that can be VolatgeSource, Resistor, Inductor, Capacitor, or Switch, which represent the most commonly used components in power electronic circuits. By definition, a switch has two conduction states, ON and OFF, and can represent both controlled (BJT, IGBT, MOSFET, GTO, SCR, etc.) and uncontrolled (diode) switches. Notice that all these are two-terminal components; transformers and other components with more than two terminals will be implemented in the later version. (Transformers can be modeled in the current version by using their equivalent circuits.)

Node 1 and Node 2 are the two nodes to which the component is connected. If there are totally n nodes, they should be numbered as 0, 1, 2, ...., n-1; but the sequence at which they are numbered can be random. Also notice that for each component, the reference directions of current and voltage taken by the package are such that a positive current will enter the component from node 1 and leave it from node 2 (except for voltage source for which a positive current will leave node 1). The voltage across the component is taken as the potential of Node 1 minus that of Node 2.

Symbol is the symbol denoting the component that can be chosen arbitrarily. Notice that neither numerical parameter values nor the conduction states of switches need to be specified in  NetList.

The NetList for the example Boost converter is as follows. Notice that an ESR (equivalent series resistance) has been considered for the output capacitor. The two switches, S and D, represent the active switch and the diode respectively. Notice that  inside the package the branches are also numbered according to the sequence in which they appeared in the NetList.

Circuit Description - Boost Converter

\(\(NetList\  = \ {{VoltageSource, \ {1, \ 0}, \ 
            Vg}, 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {Inductor, \ {1, \ 2}, \ 
            L}, 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {Switch, \ {2, \ 0}, \ 
            S}, 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {Switch, \ {2, \ 3}, \ 
            D}, 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {Resistor, \ {3, \ 4}, \ 
            r}, 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {Capacitor, \ {4, \ 0}, \ 
            C}, 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {Resistor, \ {3, \ 0}, \ R}};\)\)

Converter Input

Supposing that the converter undergoes m topological states in each switching cycle, there will be m different state-space models:
	dx/dt = (Subscript[A, k]) x + (Subscript[B, k]) u		(k = 1, 2, ....., m)
where x is the vector of state variables, and u is the vector of input variables. In most cases, a converter has only the input voltage as its input. This is specified by another list called InputVars, as given below for the example Boost converter:

InputVars = {Vg};

State-Space Modeling			back to TOC

Conduction States of Switches

Since the state-space models have different system and input matrices in different topological states, they need to be derived individually. The topological states for which state-space models are to be derived are specified by a list called SwitchStates. For the example Boost converter, there are two different topological states when the converter operates in continuous conduction mode (CCM): S-ON/D-OFF and S-OFF/D-ON. Hence the list SwitchStates is

SwitchStates  =  {{S  ->  1,  D  ->  0},  {S  ->  0,  
            D  ->  1}};

State-Space Models

Based on the converter circuit description, the package derives a state-space model for the converter in each topological state in four steps:

1) Derive a set of circuit equations from the NetList by using the function NodalAnalysis defined in "Nodal.m", which is based on a method similar to the modified nodal analysis technique;
2) Eliminating all variables except inductor currents and capacitor voltages (which are retained as state variables) by using function StateSpace;
3) Rearranging the remaining equation in the form of standard state-space model as
	(Subscript[dx, i])/dt = (Subscript[a, i1]) (Subscript[x, 1]) + (Subscript[a, i2]) (Subscript[x, 2]) + .... + (Subscript[a, in]) (Subscript[x, n]) +  (Subscript[b, i]) u;
4) Determining both system matrix (Subscript[A, k]) = [aij] and input matrix (Subscript[B, k]) = [bi].

The results are put in two lists, a list of system matrices A = {(Subscript[A, 1]), (Subscript[A, 2]), ...., (Subscript[A, m])} and a list of input matrices B = {(Subscript[B, 1]), (Subscript[B, 2]), ...., (Subscript[B, m])}. These are performed by using the function StateSpaceModel, as illustrated below. The function also returns a list (StateVars), that shows the correspondance between the selected state space variables and the circuit variables (inductor currents and capacitor voltages).

{A,  B,  StateVars}  =  
      StateSpaceModel[NetList,  InputVars,  SwitchStates]

For the example Boost converter, the results are:

A

B

Averaged Modeling				back to TOC

The averaging method implemented in the package is a general one which is based on partitioning the converter model into a slow subsystem and a fast subsystem. The slow subsystem contains the main energy-storage elements of the converter as well as its input and output sections, while switching devices and the associated resonant tank (and snubber circuits, when need to be considered) comprise the fast subsystem Reference [1]. Based on the partitioning, an averaged model is then derived in three steps:

1) Relaxation: The fast subsystem is first analyzed by assuming that the slow variables are constant over a switching cycle; the results are closed-form solutions for the fast variables over one switching cycle.

2) Decoupling: The analytical solutions for fast variables calculated in 1) are substituted into the state-space model of the slow variables. This leads to a model for the slow subsystem which is decoupled from the fast subsystem and can be analyzed separately.

3) Averaging: The resulting slow subsystem model is time-varying due to the presence of time-varying solutions of the fast variables solved in 1). The time-varying terms can be removed by averaging the model over one switching cycle. This last step then yields the desired time-invariant, continuous, nonlinear averaged model describing the slow dynamic of the converter.

Details on this general averaging method can be found in Reference [1].

Additional Inputs

In addition to the state-space model, the package needs some other inputs for deriving the averaged model. These additional information are provided by lists SlowFast, BCs, and IV.

SlowFast = {SlowVarIndex, FastVarIndex} tells the package which state variables are slow variables (SlowVarIndex) and which are fast (FastVarIndex). Both SlowVarIndex and FastVarIndex are again lists of the sequence numbers of the slow and fast variables as they appear in the state variable vector x. For the example Boost converter, both state variables (Subscript[i, L ])and (Subscript[v, C]) are slow variables, hence

SlowFast  =  {{1,  2},  {}};

The list BCs specifies the boundary conditions under which the circuit changes its topological state (switching). Three different types of boundary conditions can be implemented:

Absolute Time: The switching takes place at a fixed time measured from the beginning of a switching cycle. In this case, the corresponding element in BCs is a number, a symbol, or an expression representing the time. For example, the first and the last element of BCs are usually 0 and Ts, respectively, indicating the beginning and the end of a switching cycle, Ts being the switching period of the converter.

Relative Time: The next switching is delayed by a certain time from the previous one. The corresponding element in BCs is a list of single element representing the delay time. For example, for hard-switching PWM converters in continuous conduction mode and with duty-cycle control, BCs can be written either as
	BCs = {0, d*Ts, {(1-d)*Ts}}
where 0 and d*Ts are absolute times and {(1-d)*Ts} represents a relative time, or
	BCs = {0, d*Ts, Ts}
where all times are absolute, i.e., measured from the beginning of the switching cycle.

Implicit Conditions: This is the case when switching is dependent of state variables. For example, the conduction of a diode depends on the polarity of the voltage across it. In this case, the corresponding element in BCs is a list of two expressions: {exp1, exp2}, and the switching instant is to be solved from the equation exp1 = exp2. Both expressions may be functions of slow variables, and at least one is dependent of the fast variables. The solution is a relative time, i.e., it represents the delay from the previous switching.

As discussed before, BCs for the example Boost converter is

BCs  =  {0,  (d Ts),  Ts};

Beside SlowFast and BCs, it is also necessary to specify the initial values of the fast state variables at the beginning of the switching cycle (by the list IV). Each initial value can be given as either a number, a symbol, or a function dependent of slow variables and converter inputs. Since there is no fast variables in the example Boost converter, IV is given as an empty list:

IV  =  {};

Averaged Modeling

With the additional inputs given above and the state-space models in all topological states, an averaged model will be derived using three major functions: Relaxation, Decoupling, and Averaging. The Mathematica inputs for carrying out these are as follows, which can also be used for other converters without any modifications. Note that you MUST go through all these inputs, even the relaxation and decopuling steps may seem not to be necessary for converter topologies.

ns  =  Length[SlowFast[[1]]];
nf  =  Length[SlowFast[[2]]];
SlowVars  =  
        Table[StateVars[[SlowFast[[1,  i]]]]  /.  {t  ->  
                t0},  {i,  1,  ns}];
\(\(FastVars\  = \ 
        If[nf == 0, \ {}, 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ Table[
            StateVars[\([SlowFast[\([2, \ i]\)]]\)], \ {i, \ 1, \ 
              ns}]];\)\)

Relaxation

FastSolus  =  
        Relaxation[A,  B,  InputVars,  SlowFast,  SlowVars,  FastVars,  
          BCs,  IV];

This input may generate some error messages if the 2nd element of SlowFast is an empty list, in other words, when all state variables are slow variables, such as in the case of hard-switching PWM converters. But they will not affect the final results.

Decoupling

\(\(SlowEqus\  = \ 
        Decoupling[FastSolus, \ A, \ B, \ 
          SlowFast, 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ SlowVars, \ InputVars, \ FastSolus[\([3]\)]];\)\)

Averaging

It is assumed here that the last element in BCs is Ts, the period of one switching cycle.

AveragedModel  =  
        Averaging[SlowEqus, BCs[[-1]]];

The final averaged model is contained in the list AveragedModel whose ith element is the righthand-side function, (Subscript[f, i])(x, u), of the averaged model d(Subscript[(OverBar[x]), i])/dt = (Subscript[f, i])(x, u) for the ith slow variable (Subscript[x, i]).

For the example Boost converter, both state variables x[1] (the inductor current, (Subscript[i, L])) and x[2] (the capacitor voltage, (Subscript[v, C])) are slow variable. By substituting x[1] with (Subscript[i, L]) and x[2] with (Subscript[v, C]), the righthand sides of the averaged model become

Simplify[
      AveragedModel  /.  {x[1][t0]  ->  iL,  x[2][t0]  ->  
            vC}]

which means that the averaged model of the converter is

	((Subscript[di, L])/dt)= (((-1+d) (Subscript[i, L]) r R+(-1+d) R (Subscript[v, C])+(r+R) Vg)/(L (r+R))),   ((Subscript[dv, C])/dt)= (((Subscript[i, L]) (R - d R)-(Subscript[v, C]))/(C (r+R)))

Notice that this model is the same as the conventional state-space averaged model. In fact, it can be shown that the conventional state-space averaging is the special case of the general method applied to hard-switching PWM DC/DC converters.

Ripple Estimation				back to TOC

Averaged models of switching power converters have proved to be very useful for fast transient response analysis and for control loop design. However, they do not provide any details for the current and voltage waveform within each switching cycle. To overcome this problem, the classical method of Krylov-Bogoliubov-Miltropolsky (KBM) Reference [2] can be used to find ripple corrections for the slow state variables as well as other variables of interests.

For a variable x(t), the KBM method can be applied to calculate a series of ripple functions \(x\&^\^1\)(t),  \(x\&^\^2\)(t), ......, \(x\&^\^i\)(t), ......, such that
	x(t) = \(TraditionalForm\`x\&_\)(t) + \(x\&^\^1\)(t) + \(x\&^\^2\)(t) + ...... + \(x\&^\^i\)(t) + ......
where \(TraditionalForm\`x\&_\)(t) is the local average of x(t) over one switching cycle, as determined by the averaged model. Function \(x\&^\^i\)(t) (i = 1, 2, ......) is piecewise continuous and is an ith-order polynomials in each topological state, hence it is also called the ith-order ripple correction/estimation for x(t). See Reference [2] and Reference[3] for details of the KBM method and the ripple estimation procedure.

The function KBM defined in file KBM.m implements the KBM method and requires four arguments: the decoupled model of the slow subsystem (SlowEqus), the averaged model (AveragedModel), the definition of slow variables (SlowVars), and the required order of ripple corrections (n). Since all SlowEqus, AveragedModel, and SlowVars have been defined in the previous section for averaged modeling, no new inputs are needed for using the function KBM. 
The following input cell determines the first and the second ripple corrections (n = 2) and put the results in Ripple:

Ripple  =  
        KBM[SlowEqus,  AveragedModel, SlowVars,  2];

The format of the output of the function KBM (here assigned to Ripple) is as follows:
{{{1st-order corrections of slow state variables in the 1st topological state}, 
   {1st-order corrections of slow state variables in the 2nd topological state}, ......,
   {1st-order corrections of slow state variables in the last topological state}},
  {{2nd-order corrections of slow state variables in the 1st topological state}, 
   {2nd-order corrections of slow state variables in the 2nd topological state}, ......,
   {2nd-order corrections of slow state variables in the last topological state}},
  ......,
 {{nth-order corrections of slow state variables in the 1st topological state}, 
   {nth-order corrections of slow state variables in the 2nd topological state}, ......,
   {nth-order corrections of slow state variables in the last topological state}}}

For the example Boost converter, the output with n = 2 is as follows where the ESR of the capacitor is set to 0 in order to limit the length of the expressions and the internally used state variables x[1] and x[2] are replaced by their corresponding current (Subscript[i, L]) and voltage (Subscript[v, C]) for easy understanding. Also notice that the time variable, t, is reset to zero at the beginning of each switching cycle.

Simplify[
      Ripple  /.  {r  ->  0,  x[1][t0]  ->  
            iL,  x[2][t0]  ->  vC}]

Ripple estimations extend the use of averaged models to the design of converter power stage. Using the estimated ripple functions, proper values can be determined for the main energy-storage LC elements of the converter to satisfy the design specifications for current and voltage ripples. The estimated ripple functions also provide information about peak current and voltage of each power semiconductor device, allowing optimal selection of device ratings and more accurate estimation of their switching and conduction losses. Please refer to Reference [4] for more details.

As demonstrated in Reference [3], the estimated ripple functions can also be used to derive frequency-dependent averaged models for PWM DC/DC converters that correctly predict the stability property of closed-loop system when linear state feedback control is applied. The essence of the approach is a more accurate model for the pulse-width modulator that takes into account the ripple components of the state feedback signals, not just their average values. Other applications of ripple estimations in converter modeling and analysis will be reported soon by the author (Reference [5]).

Large-Signal Simulation			back to TOC

This section demonstrates the applications of Mathematica for large-signal transient response simulation using both continuous averaged model and discontinuous switching model. The Boost PWM converter is used again as example. Since only built-in functions of Mathematica are used, no detailed explanations will be provided.

Large-Signal Nonlinear Averaged Model

The righthand sides of the averaged model ((Subscript[di, L])/dt = (Subscript[f, i]), (Subscript[dv, C])/dt = (Subscript[f, v])) are defined here as functions of state variables (Subscript[i, L]) and (Subscript[v, C]), the input voltage (Subscript[V, g]), and the control variable d. or easy understanding, the genetic state variables are replaced by the circuit variables they represent ((Subscript[i, L]) and  (Subscript[v, C]) in the example Boost converter)

fi[iL_,  vC_,  Vg_,  d_]  :=  
      AveragedModel[[1]]  /.  {x[1][t0]  ->  
            iL,  x[2][t0]  ->  vC}
fv[iL_,  vC_,  Vg_,  d_]  :=  
      AveragedModel[[2]]  /.  {x[1][t0]  ->  
            iL,  x[2][t0]  ->  vC}

Parameters

The parameters of the converter are required for numerical simulation and are given below.  Notice that the ESR of the capacitor is assumed to be zero in this section for simplicity.

Param1  =  {Vg  ->  5,  L  ->  50 10^-6,  
          C  ->  4.4 10^-6,  R  ->  10,  r  ->  0.0,  
          d  ->  0.3,  Ts  ->  10^-5};

Averaged Model Simulation

The initial values (\(TraditionalForm\`i\&_\_L\)(0) = 0.5 A, \(TraditionalForm\`v\&_\_C\)(0) = 5 V) correspond to the steady-state response of the converter when the duty ratio d is equal to 0. Hence the simulated responses correspond to the start-up transient of the converter (with d increased from 0 to 0.3, as given above in Param).

T0  =  0.4 10^-3;
ResAve  =  
        NDSolve[{iL'[t]  ==  
                fi[iL[t],  vC[t],  Vg,  d],  vC'[t]  ==  
                fv[iL[t],  vC[t],  Vg,  d], iL[0]  ==  5/10,  
              vC[0]  ==  5}  /.  Param1, {iL,  vC},  {t,  0,  T0}, 
          MaxSteps  ->  2 10^4];

Here are the simulated average response of the inductor current, (Subscript[i, L])

iLAve  =  
        Plot[Evaluate[iL[10^-3 t]  /.  ResAve], {t,  0,  
            10^3 T0},  PlotRange  ->  All,  
          PlotStyle  ->  {{AbsoluteThickness[0.001],  
                RGBColor[0,  0,  1]}}];

and the capacitor voltage, (Subscript[v, C])

vCAve  =  
        Plot[Evaluate[vC[10^-3 t]  /.  ResAve], {t,  0,  10^3 T0}, 
          PlotRange  ->  All,  
          PlotStyle  ->  {{AbsoluteThickness[0.001], 
                RGBColor[0,  0,  1]}}];

1st-Order Ripple Correction

Ripple corrections can be added to the above averaged responses. Using the ripple estimation results obtained before, the 1st-order ripple component of (Subscript[i, L]) and (Subscript[v, C]) are defined first as functions of time t: (Future versions of the package will be able generate these functions automatically from the ripple estimation results given before.)

iLRip1[t_]  :=  
      If[Mod[t,  Ts] < 
              d Ts, (d  -  1) (-2 Mod[t,  Ts]  +  d Ts), 
            d (-2 Mod[t,  Ts]  +  Ts  +  d Ts)]*
          vC[t]/(2 L)  /.  Param1
vCRip1[t_]  :=  
      If[Mod[t,  Ts] < 
              d Ts,  (-1  +  d) (2 Mod[t,  Ts]  -  
                  d Ts),  d (2 Mod[t,  Ts]  -  Ts  -  d Ts)]*
          iL[t]/(2 C)  /.  Param1

Transient responses of the averaged model with 1st-order ripple corrections can now be obtained by adding the ripple to the averaged responses calculated before:

iLCor  =  
        Plot[Evaluate[iLRip1[10^-3 t]  /.  ResAve]  + 
            Evaluate[iL[10^-3 t]  /.  ResAve], {t,  0,  10^3 T0},  
          PlotPoints  ->  200, 
          PlotStyle  ->  {{AbsoluteThickness[0.001],  
                RGBColor[1,  0,  1]}}];

vCCor  =  
        Plot[Evaluate[vCRip1[10^-3 t]  /.  ResAve]  +  
            Evaluate[vC[10^-3 t]  /.  ResAve], {t,  0,  10^3 T0},  
          PlotPoints  ->  200,  
          PlotStyle  ->  {{AbsoluteThickness[0.001], 
                RGBColor[1,  0,  1]}}];

Switching Model Simulation

The start-up transient can also be simulated based on the discontinuous switching model. For a better comparison with the responses given by the averaged model, the initial values for switching-model simulation are obtained by adding the corresponding 1st-order ripple corrections to the previous average initial values (\(TraditionalForm\`i\&_\_L\)(0) = 0.5 A, \(TraditionalForm\`v\&_\_C\)(0) = 5 V).

iL0  =  Evaluate[
            iLRip1[0]  +  iL[0]  /.  ResAve][[1]];
vC0  =  Evaluate[
            vCRip1[0]  +  vC[0]  /.  ResAve][[1]];

ResSwi  =  
        NDSolve[{iL'[t]  ==  
                If[Mod[t,  Ts] < d Ts,  
                  Vg/L, (Vg  -  vC[t])/L], vC'[t]  ==  
                If[Mod[t,  Ts] < d Ts, -vC[t]/(R C), 
                  iL[t]/C  -  vC[t]/(R C)], iL[0]  ==  iL0,  
              vC[0]  ==  vC0}  /.  Param1, {iL,  vC},  {t,  0,  
            T0},  MaxSteps  ->  2 10^4];

iLSwi  =  
        Plot[Evaluate[iL[10^-3 t]  /.  ResSwi], {t,  0,  
            10^3 T0},  PlotPoints  ->  500, 
          PlotStyle  ->  {{AbsoluteThickness[0.001], 
                RGBColor[1,  0,  0]}}];

vCSwi  =  
        Plot[Evaluate[vC[10^-3 t]  /.  ResSwi], {t,  0,  
            10^3 T0},  PlotPoints  ->  500,  
          PlotStyle  ->  {{AbsoluteThickness[0.001], 
                RGBColor[1,  0,  0]}}];

Comparison of Responses

The three responses (averaged, averaged with 1st-order ripple correction, and switching model) now can be compared with each other. As can be seen, the responses of the averaged model (blue lines) agree very well with the one-cycle moving average of the switching model responses (red lines), and the averaged responses with 1st-order ripple correction (green lines) are almost identical to switching model responses.

Show[iLAve,  iLCor,  iLSwi,  PlotRange  ->  All];

Show[vCAve,  vCCor,  vCSwi,  PlotRange  ->  All];

Linearization and Transfer Functions	back to TOC

The large-signal, nonlinear averaged model can be linearized to generate a small-signal linear model around an operation point and to derive various transfer functions.

Parameters

The ESR of the capacitor has been set zero in the previous large-signal analysis. To include the ESR for small-signal analysis, we redefine the parameters as follows.

Param2  =  {Vg  ->  5,  L  ->  50 10^-6,  
          C  ->  4.4 10^-6, R  ->  10,  r  ->  0.05,  
          d  ->  0.3,  Ts  ->  10^-5};

Small-Signal Linearization

The small-signal linearized model is written as
	(d/(dt))(({{(Subscript[(OverTilde[i]), L])}, {(Subscript[(OverTilde[v]), C])}})) = (Subscript[A, p])(({{(Subscript[(OverTilde[i]), L])}, {(Subscript[(OverTilde[v]), C])}})) + (Subscript[B, p])(({{\(V\&~\_g\)}, {(OverTilde[d])}}))
where (Subscript[(OverTilde[i]), L]), (Subscript[(OverTilde[v]), C]), \(TraditionalForm\`V\&~\_g\), and (OverTilde[d]) denote the small-signal pertubations of the corresponding variables. Matrices (Subscript[A, p ])and (Subscript[B, p]) can be obtained by calculating the Jacobian matrix of the averaged model with respect to the state variables and the input and control variables {(Subscript[V, g]), d}, respectively.

jacob[funs_List,  vars_List]  :=  
        Outer[ D,  funs,  vars];
Ap  =  
        jacob[{fi[iL,  vC,  Vg,  d], fv[iL,  vC,  Vg,  d]}, {iL,  
            vC}];
Bp  =  
        jacob[{fi[iL,  vC,  Vg,  d],  fv[iL,  vC,  Vg,  d]}, {Vg, 
            d}];

Operation Point

The small-signal model is dependent of the operation point of the converter, which corresponds to the steady-state solution of the averaged model and can be solved for given input voltage (Subscript[V, g]) and control variable d as follows:

OP  =  
      Solve[{fi[iL,  vC,  Vg,  d], fv[iL,  vC,  Vg,  d]}  ==  
          0, {iL,  vC}]

Output Voltage

Because the ESR of the capacitor is considered in the small-signal analysis, the average output voltage, (Subscript[v, 0]), is not equal to (Subscript[v, C]), but is
	(Subscript[v, 0]) = (R/(R  +  r))[(Subscript[v, C]) + r (1 - d) (Subscript[i, L])].
Hence \(TraditionalForm\`v\&~\_0\) = ((Subscript[C, p])^T)(({{\(i\&~\_L\)}, {\(v\&~\_C\)}})), with (Subscript[C, p]) = (({{((R r (1 - d))/(R  +  r))}, {(R/(R  +  r))}}))

Cp  =  {R r (1  -  d)/(R  +  r),  
          R/(R  +  r)};

Transfer Functions

Various transfer functions can now be determined using (Subscript[A, p]), (Subscript[B, p]), and (Subscript[C, p]). For example, the input-to-output transfer function, (Subscript[g, io])(s),  and control-to-output transfer function, (Subscript[g, co])(s), are given by
	(({{(Subscript[g, io])(s)}, {(Subscript[g, co])(s)}})) = (Subscript[C, p])(((sI - (Subscript[A, p])))^(-1))(Subscript[B, p])

gio[s_]  := 
        Part[Cp  .  Inverse[s IdentityMatrix[2]  -   Ap]  .  Bp,  
            1]  /.  OP[[1]];

gco[s_]  := 
        Part[Cp  .  Inverse[s IdentityMatrix[2]  -  Ap]  .  Bp,  
            2]  /.  OP[[1]];

In an analytic form, these two transfer functions can be simplifies as follows

Simplify[gio[s]]

Simplify[gco[s]]

The parameters of the converter defined before can also be substituted to give numerical results:

Simplify[gio[s]  /.  Param2]

Simplify[gco[s]  /.  Param2]

Bode Diagrams

Bode diagrams can be generated using the additional graphics functions BodeMagnitudePlot and BodePhasePlot defined in the file Graphic.m provided by Wolfram Research. A copy of Graphic.m has been included in this package. Usages of the two functions have been explained in that file. The package has been loaded at the beginning of this tutorial (see Load the Package)

Input-To-Output Transfer Function

BodeMagnitudePlot[
        gio[2 Pi I s]  /.  Param2, {s,  1,  100000},  
        Frame  ->  True, PlotStyle  ->  RGBColor[0,  0,  1], 
        PlotRange  ->  {{0,  5},  {-40,  20}}, 
        GridLines  ->  {LogGridMinor,  Automatic}];

BodePhasePlot[gio[2 Pi I s]  /.  Param2, {s,  1,  100000},  
        Frame  ->  True, PlotRange  ->  {{0,  5},  {0,  -180}}, 
        DisplayFunction  ->  Identity, 
        PlotStyle  ->  RGBColor[0,  0,  1], 
        GridLines  ->  {LogGridMinor,  Automatic}];

Control-To-Output Transfer Function

BodeMagnitudePlot[
        gco[2 Pi I s]  /.  Param2, {s,  1,  100000},  
        Frame  ->  True, PlotStyle  ->  RGBColor[0,  0,  1], 
        PlotRange  ->  {{0,  5},  {-5,  30}}, 
        GridLines  ->  {LogGridMinor,  Automatic}];

BodePhasePlot[gco[2 Pi I s]  /.  Param2, {s,  1,  100000},  
        Frame  ->  True, PlotRange  ->  {{0,  5},  {0,  -270}}, 
        DisplayFunction  ->  Identity, 
        PlotStyle  ->  RGBColor[0,  0,  1], 
        GridLines  ->  {LogGridMinor,  Automatic}];

References					back to TOC

J. Sun and H. Grotstollen, "Symbolic analysis methods for averaged modeling of switching power converters," IEEE Trans. on Power Electronics, vol. 12, no. 3, pp. 537-546, May 1997.

N. N. Bogoliubov and Y. A. Mitropolsky, Asymptotic Methods in the Theory of Nonlinear Oscillations, NY: Gordon and Breach Science Pub., 1961.

B. Lehman and R. M. Bass, "Switching frequency dependent averaged models for PWM DC-DC Converters," IEEE Trans. Power Electronics, vol.11, no. 1, pp.89-98, Jan. 1996.

J. Sun and R. M. Bass, "Automated ripple analysis using KBM methods," in Proceedings of IEEE IECON'97.

J. Sun and R. M. Bass, "A new approach to averaged modeling of PWM converters with current-mode control," in Proceedings of IECON'97.