 Research
 Open Access
 Published:
Multirate PWM balance method for the efficient fieldcircuit coupled simulation of power converters
Journal of Mathematics in Industry volume 9, Article number: 8 (2019)
Abstract
The fieldcircuit coupled simulation of switchmode power converters with conventional time discretization is computationally expensive since very small time steps are needed to appropriately account for steep transients occurring inside the converter, not only for the degrees of freedom (DOFs) in the circuit, but also for the large number of DOFs in the field model part. An efficient simulation technique for converters with idealized switches is obtained using multirate partial differential equations, which allow for a natural separation into components of different time scales. This paper introduces a set of new PWM eigenfunctions which decouple the systems of equations and thus yield an efficient simulation of the fieldcircuit coupled problem. The resulting method is called the multirate PWM balance method.
Introduction
Switchmode power converters are used in various devices from smallscale applications like mobile phone chargers to industrial largescale applications like welding devices [7]. These converters use transistors to switch on and off the input voltage to produce an output voltage, which, in average, has the desired amplitude. A filter circuit is used to smoothen the output. The simulation of these devices is computationally expensive since, through the transistor switching, steep transients occur in the converter. Furthermore often a switchevent detection is necessary to avoid step size rejection or even solver failures [14]. A multirate method has been developed in [9, 10] which uses the concept of Multirate Partial Differential Equations (MPDEs) [3, 12] and a combination of a Galerkin ansatz and conventional time discretization to efficiently solve problems with pulsed excitation. The method is applicable to power converters in which the switching behavior is idealized and known apriori. It is particularly efficient in the case of linear elements. Some circuit elements may only be accurately represented by field models. For example the induced currents in the conducting materials of an inductor usually cause eddy current losses, which can easily be accounted for in a field model but not in a circuit model. In this paper the multirate method from [9, 10] is applied to a linear buck converter circuit (see Fig. 1) in which the inductor is represented by a 2D finite element model. This substantially increases the size of the strongly coupled system of equations. To still ensure an efficient simulation, a basis transformation is applied to the pulsewidth modulation (PWM) basis functions [5] leading to decoupled systems of equations which can be solved efficiently in parallel. The resulting method is called the multirate PWM balance method in analogy with the harmonic balance method where harmonic functions take the place of the PWM basis functions. Numerical results on the buck converter show the efficiency and accuracy of the proposed method in fieldcircuit coupled problems.
The paper is structured as follows. Section 2 introduces the concept of MPDEs and explains the solving procedure using Galerkin approach and conventional time discretization. Subsequently Sect. 3 presents the original PWM basis functions as described in [5]. In Sect. 4 the PWM eigenfunctions are developed and their advantageous properties for the solving process are highlighted. Finally Sect. 5 summarizes numerical results and compares the three different solution approaches, i.e., conventional time discretization and the MPDE approach with PWM basis functions on the one hand and PWM eigenfunctions on the other hand. The paper is concluded by summarizing its content in Sect. 6.
Multirate formulation
Let the fieldcircuit coupled model [13] of the converter be described by the system of ordinary differential or differentialalgebraic equations
where \(\mathbf {A}\in \mathbb{R}^{N_{\mathrm {s}}\times N_{\mathrm {s}}}\) is a possibly singular matrix, \(\mathbf {B}\in \mathbb{R}^{N_{\mathrm {s}}\times N_{\mathrm {s}}}\) is assumed to be a regular matrix, \(\mathbf {x}(t)\in \mathbb{R}^{N_{\mathrm {s}}}\) is the unknown solution, \(\mathbf {c}(t)\in \mathbb{R}^{N_{\mathrm {s}}}\) is the excitation, and \(t\in (0, \mathcal {T}]\) is the simulation interval. The initial state of the model is given by consistent [6] initial values \(\mathbf {x}(0)=\mathbf {x}_{0}\). The ideal pulsed excitation
is used as input of the power converter circuit. We denote by \(\tau (t) = \frac{t}{T_{\mathrm {s}}} \text{ modulo } 1\) the relative time, \(T_{\mathrm {s}}\) is the switching cycle and D is the duty cycle.
The system of Multirate Partial Differential(Algebraic) Equations (MPDEs or MPDAEs) with two time scales corresponding to (1) is given by [3, 11, 12]
where \(\mathbf {\widehat {x}}(t_{1}, t_{2})\) is the unknown multivariate solution and \(\mathbf {\widehat {c}}(t_{1},t_{2})\) is the multivariate excitation. Choosing the multivariate excitation such that \(\mathbf {\widehat {c}}(t,t)=\mathbf {c}(t)\), the solution of (1) and (3) are related by \(\mathbf {\widehat {x}}(t,t)=\mathbf {x}(t)\). Thus, the solution of (1) can be calculated solving the MPDEs and extracting the solution along a diagonal through the computation domain. To solve the MPDEs, additional conditions need to be specified. For the present application, a combination of initial and boundary values is applied. Initial values are supplied by \(\mathbf {\widehat {x}}(0,t_{2})=\mathbf {h}(t _{2})\), i.e., at \(t_{1}=0\), where h with \(\mathbf {h}(0)=\mathbf {x}_{0}\) is a function defining the initial values for all \(t_{2}\). The solution along the fast time scale \(t_{2}\) is periodic, i.e., \(\mathbf {\widehat {x}}(t_{1}, t_{2}+T_{\mathrm {s}}) = \mathbf {\widehat {x}}(t_{1}, t_{2})\). The multivariate righthand side is chosen as \(\mathbf {\widehat {c}}(t_{1}, t_{2})=\mathbf {c}(t_{2})\), i.e., the pulses of the excitation occur along the fast time scale. It is possible to use MPDEs with more than two time scales. However, in the applications of this paper, it is not necessary and furthermore often not feasible since the dimension of the computation domain increases and thus also the computational effort to calculate the solution.
To solve the MPDEs (3), a Galerkin approach and time discretization is applied [2, 10]. The jth solution component \({\widehat {x}}_{j}(t_{1}, t_{2})\) is approximated by expanding it into periodic basis functions \(p_{k}\) depending on the fast time scale \(t_{2}\) and coefficients \(w_{j,k}\) depending on the slow time scale \(t_{1}\)
where the periodicity of the basis functions is accounted for by using the relative time \(\tau (t_{2}) = \frac{t_{2}}{T_{{\mathrm {s}}}} \text{ modulo } 1\). Applying the Galerkin approach with respect to \(t_{2}\) and over one period of the excitation \([0,T_{\mathrm {s}}]\) leads to
with block matrices \(\boldsymbol {\mathcal {A}}=\boldsymbol {\mathcal {J}}\otimes \mathbf {A}, \, \boldsymbol {\mathcal {B}}=\boldsymbol {\mathcal {J}}\otimes \mathbf {B}+\boldsymbol {\mathcal {Q}}\otimes \mathbf {A}\), where
and righthand side
\(\bar{\mathbf{p}}\) denotes the complex conjugate of p and ⊗ denotes the Kronecker product.
PWM basis functions
The PWM basis functions developed in [5] are built up starting from the zeroth constant basis function \(p_{0}(\tau )=1\) and the piecewise linear basis function
which includes the duty cycle D of the excitation by construction. The higherorder basis functions \(p_{k}(\tau )\), \(2\leq k \leq N_{\mathrm {p}}\) are recursively obtained by integrating the basis functions of lower order \(p_{k1}(\tau )\) and orthonormalizing them using the Gram–Schmidt algorithm. The generated basis functions are depicted in Fig. 2.
For the PWM basis functions, the matrices \(\boldsymbol {\mathcal {J}}\) and \(\boldsymbol {\mathcal {Q}}\) from (6) are given by \(T_{\mathrm {s}}\) multiplied by the identity matrix (due to the orthonormality of the basis functions) and a square matrix with around 25% of nonzero entries, respectively. Solving the problem requires time stepping of the entire system (5).
PWM eigenfunctions
To enable an easy parallelization of the method, the equations (5) can be decoupled, for example by diagonalizing \(\boldsymbol {\mathcal {Q}}\), i.e., a basis transformation. We define new basis functions \(g_{k}(\tau )\) as linear combinations of the PWM basis functions, i.e.,
where \(v_{k,l}\) are unknown coefficients with \(k\in \{0, \dots , N_{\mathrm {p}}\}\), and \(g_{k}(\tau )\) are eigenfunctions of the time derivative operator
We enforce this property in a weak sense by a Galerkin approach, i.e.,
where integration by parts and the periodicity of the basis functions is used. Inserting the expansion of the basis functions into (11) gives
Since \(\boldsymbol {\mathcal {J}}\) is \(T_{\mathrm {s}}\) multiplied by the identity matrix (thanks to the orthonormality of the PWM basis functions), the \(\lambda _{k}\) and \(\mathbf {v}_{k}\) are the eigenvalues and eigenvectors of the matrix \(\boldsymbol {\mathcal {Q}}\), respectively. Furthermore since \(\boldsymbol {\mathcal {Q}}\) is realvalued and skew symmetric, and therefore a normal matrix, the eigenvectors \(\mathbf {v}_{k}\) are orthonormal. The new basis functions (complexvalued) are depicted in Fig. 3 for \(N_{\mathrm {p}}=4\). Note that the basis consists of pairs of conjugate complex basis functions.
Inserting the transformed basis functions instead of the PWM basis functions into (6) and (7) leads, using the orthonormality of the eigenvectors, to
where \(\boldsymbol {\mathcal {A}}\) as in (5),
and Λ is a diagonal matrix with diagonal entries \({\lambda _{0}, \lambda _{1}, \dots , \lambda _{N_{\mathrm {p}}}}\). Thus the resulting matrices in (13) are blockdiagonal and the degrees of freedom can be blockwisely decoupled. This leads to \(N_{\mathrm {p}}+1\) independent systems of equations given by
where \(\mathbf {w}=[\mathbf {w}_{0}^{\top }, \mathbf {w}_{1}^{\top }, \dots , \mathbf {w}_{N_{\mathrm {p}}} ^{\top }]^{\top }\). Note that if a diagonal entry in Λ is complex, there is also a complex conjugate counterpart. The solutions of the decoupled system of equations corresponding to this complex eigenvalue and its conjugate complex counterpart, are, as a result, complex conjugate to each other. Therefore it is sufficient to solve one of them. This is similar to harmonic balance methods in which the harmonic basis functions are given by pairs of complex conjugates leading to similar systems of equations. In analogy to “harmonic balance method”, we call the developed method the “multirate PWM balance method”.
Test case and numerical results
The method is applied to the buck converter from Fig. 1, where the pot inductor is represented by a 2D field model with conducting core material (ferrite, \(\sigma _{\mathrm{fe}}=250 \) S/m). The coils are modeled as stranded conductors. The simulation interval is given by \(\varPsi =[0,10] \) ms. The switching frequency is \(f_{\mathrm{s}}=\frac{1}{T_{\mathrm {s}}}=1000 \) Hz. For the pulsed excitation (2) we use \(V_{0}=24 \) V. All calculations are performed in MATLAB. The partial differential equations governing the magnetoquasistatic problem are given by
where r is the position vector, t is the time, \(\mathbf {A}_{ \mathrm{m}}\) is the modified magnetic vector potential [4], \(\mathbf {J}_{\mathrm {s}}\) are the imposed currents, \(\mu =4 \pi \times 10^{7} \) H/m is the magnetic permeability and σ is the conductivity which is only nonzero in the ferrite core (\(\sigma _{\mathrm{fe}}\)). The problem is considered on a 2D planar domain with homogeneous Dirichlet boundary conditions.
Correspondingly, the Finite Element magnetoquasistatic [13] discretization of the magnetoquasistatic inductor model is given by the differentialalgebraic system of equations [8]
where \(\mathbf {M}_{\sigma }\) is the singular conductivity matrix, K is the stiffness matrix, \(\mathbf {a}(t)\) gathers the degrees of freedom (DOFs) related to the magnetic vector potential, P is the discretization of the winding function [13] and \(i_{\mathrm{L}}(t)\) is the current through the inductor. The fieldcircuit coupling is expressed as follows. An additional variable is introduced for the magnetic flux linkage \(\varPhi (t)=\mathbf {P}^{\top }\mathbf {a}(t)\). All equations are coupled monolithically into the index1 differentialalgebraic system of equations [1]
which for the example in Fig. 1 contains a total of \(11\text{,}053\) DOFs. The initial conditions are given by \(v_{\mathrm {C}}(0)=0\), \(i_{\mathrm{L}}(0)=0\) and \(\mathbf {a}(0)=\mathbf{0}\).
The initial condition for the MPDEs (3) can be written as
where \(h_{j}\) is the jth element of h. It only has to satisfy the condition \(\mathbf {h}(0) = \mathbf {\widehat {x}}(0,0)=\mathbf {x}_{0}\). Consequently there is a high degree of freedom in choosing the initial values \(\mathbf {w}(0)\) for the system of equations (5). However not all choices lead to an efficient simulation, i.e., low dynamics in the slow time scale. The following choice of initial values has proven advantageous. First, the steadystate solution is calculated, i.e.,
Secondly, the initial coefficients for \(k=1,\dots , N_{\mathrm {p}}\) are extracted from the steadystate solution \(w_{j,k}(0)=w^{\,s}_{j,k}\) for all j. The remaining coefficients are calculated by solving the solution expansion (4) for \(w_{j,0}(0)\) and using the condition \(\mathbf {\widehat {x}}(0,0)=\mathbf {x}_{0}\). In summary the initial coefficients are given by
The initial conditions for the system of equations (13) are computed similarly using the PWM eigenfunctions. Other choices of initial values may still lead to the correct solution but might impair the efficiency of the method.
To calculate the reference solution with a conventional adaptive time discretization, the MATLAB solver ode15s is used. It is modified to restart the simulation at the known switching instances. Consistent initial values for the restart of the solver are calculated by using a Newton–Raphson algorithm to solve the set of algebraic equations. The required differential variables are taken from the solution at the end of the prior solution interval. After finding the new set of initial values, the initial slopes of the differential variables are calculated by solving the subsystem of ordinary differential equations for the slope.
The multivariate solution \(\mathbf {\widehat {x}}(t_{1},t_{2})\) calculated using the multirate PWM balance method, i.e., solving (13) with ode15s, is reconstruced using (4) and the multivariate voltage at the capacitor is depicted in Fig. 4. The corresponding solution component of the original system of equations (1) is extracted along a diagonal through the computation domain. Figure 5 shows the current through the inductor along with the reference solution. The agreement between the multirate PWM balance method solution and the reference solution is excellent. The Joule losses in the core material due to eddy currents are calculated by
where E is the electric field strength, Ω is the spatial computation domain, the superscript H denotes the Hermitian, i.e., the complex conjugate transposed, and \(\mathbf {e}(t)=\frac {{\mathrm {d}}}{{\mathrm {d}}t}\mathbf {a}(t)\) is the lineintegrated discrete electric field. The Joule losses are plotted as well in Fig. 5. Figure 6 depicts the solution of (13), i.e., the coefficients \(\mathbf {w}(t_{1})\), exemplary for the current through the inductor \(i_{\mathrm{L}}\). As one can see, using the initial values (25), only the coefficient \(w_{j,0}\) corresponding to the zeroth basis function varies and the others stay constant. To quantify the accuracy and efficiency of the multirate PWM balance method, it is compared to conventional time discretization and to the MPDE approach with the original PWM basis functions. Different settings are considered: To analyze the performance of the conventional time discretization, the relative and absolute tolerance setting of the solver is changed, i.e., \(\mathrm{abstol}=\mathrm{reltol} \in [10^{6}, 10^{1}]\); For the case of the multirate PWM balance method and the MPDE approach with the original PWM basis functions, relative and absolute tolerances are fixed at \(\mathrm{abstol}=\mathrm{reltol}=10^{7}\) and the number of basis functions \(N_{\mathrm {p}}\in \{1,\dots,10\}\) is changed. The accuracy is measured for the voltage output of the converter, i.e., the voltage at the capacitor. The relative \({\mathrm {L}^{2}}\) error is given by
where \(v_{\mathrm{C,ref}}\) is the reference solution and \(v_{ \mathrm{C}}^{\,h}\) is the solution using the multirate PWM balance method and the MPDE approach with the original PWM basis functions. The norm is approximated using midpoint quadrature. Figure 7 shows the error plotted as a function of the solution time, i.e., the time that ode15s needs. For conventional time discretization the time for solving consists of the time that is needed to calculate consistent initial values and slopes after switching, and the actual time that ode15s needs. The time to calculate consistent initial values and slopes depends on the number of switching instants and is thus constant if the switching frequency or simulation interval does not change. It is given by approximately 16 seconds. The total time displayed in Fig. 7 is the sum of both contributions.
As one can see the MPDE approach with the original PWM basis functions is considerably slower than conventional time stepping. This is due to the fact that the already large systems of equations (1) (due to fieldcircuit coupling) are even further increased in size through the Galerkin approach. The stagnation of the error at 10^{−6} in Fig. 7 for values larger than \(N_{\mathrm {p}}=7\) is caused by the chosen accuracy of ode15s. Furthermore one can see that when adding another basis function the error does decrease with every second basis function. This was already observed in [5, 10]. For this reason the error for the PWM eigenfunctions is only plotted for \(N_{\mathrm {p},\mathrm {pwmbal}}\in\{1,2,4,6,8,10\}\). Since the systems of equations resulting from the multirate PWM balance method are decoupled, they can be solved efficiently in parallel. For each basis function \(g_{k}\) with \(k=0,\dots ,N_{\mathrm {p}}\), a complexvalued initial value problem of the form (16) has to be solved. The size of these systems of equations is the same as that of the original system of equations (1). However, the time for solving is considerably smaller since less time steps are necessary for the same solution accuracy. Note that due to the choice of the initial values (25) most coefficients in (13) for this numerical example do not change and only those corresponding to the zeroth basis function vary. This means that only the decoupled system of equations which corresponds to the zeroth basis function takes considerable computational effort to solve. In a parallel computing environment one would choose as many processor cores as basis functions (\(N_{\mathrm {p}}+1\)). The overall runtime is then determined only by the initial value problem that takes the longest to integrate. For this numerical example it is \(k=0\). The communication overhead between processors is not taken into account since it is highly implementation and machine dependent. The slightly decreasing time to solution when \(N_{\mathrm {p},\mathrm {pwmbal}}>1\) is owed to the fact that initial values according to (25) take more apriori information into account which leads to smaller number of time steps and faster simulation. The overall accuracy of the method is problemspecific and always depends on both the tolerance for the solver and the number of basis functions. An apriori determination of the number of basis functions and the solver tolerance is not yet available. An aposteriori estimator can be constructed by increasing the number of basis functions and comparing the solutions. The resulting error is also related to the time stepping error.
The MPDE approach works also for nonlinear problems. However, similarly as for the harmonic balance case, the decoupling is not straightforward anymore. Furthermore the PWM basis functions and thus also the PWM eigenfunctions might not be able to represent the solution of problems with nonlinear elements [10]. If the amplitude of the ripples is small compared to the amplitude of the envelope, the particular efficient approach described in [9] can be applied. It uses only the slowly varying envelope to evaluate the nonlinearities. Although the assembly of the field model matrices for a new envelope cannot be parallelized, the matrices in (13) can still be decoupled and calculations to obtain the following time step can be run in parallel.
Conclusion
A new efficient technique was presented for fieldcircuit coupled models of DCDC power converters, in which the switches are idealized and the filtering circuit is linear. The already existing MPDE technique with PWM basis functions splits the solution into fast varying and slowly varying parts. In this paper this method has been improved by introducing a new set of PMW basis functions which decouple the systems of equations similar as in the harmonic balance method. The new method, now called multirate PWM balance method, enables a parallel solution of all PWM modes resulting in a speedup amounting to a factor 4 for the test example.
Abbreviations
 DOFs:

degrees of freedom
 PWM:

pulsewidth modulation
 MPDE:

multirate partial differential equation
References
 1.
Bartel A, Baumanns S, Schöps S. Structural analysis of electrical circuits including magnetoquasistatic devices. Appl Numer Math. 2011;61:1257–70. https://doi.org/10.1016/j.apnum.2011.08.004.
 2.
Bittner K, Brachtendorf HG. Adaptive multirate wavelet method for circuit simulation. Radioengineering. 2014;23(1):300–7.
 3.
Brachtendorf HG, Welsch G, Laur R, BunseGerstner A. Numerical steady state analysis of electronic circuits driven by multitone signals. Electr Eng. 1996;79(2):103–12. https://doi.org/10.1007/BF01232919.
 4.
Emson CRI, Trowbridge CW. Transient 3d eddy currents using modified magnetic vector potentials and magnetic scalar potentials. IEEE Trans Magn. 1988;24(1):86–9. https://doi.org/10.1109/20.43862.
 5.
Gyselinck J, Martis C, Sabariego RV. Using dedicated timedomain basis functions for the simulation of pulsewidthmodulation controlled devices – application to the steadystate regime of a buck converter. In: Electromotion 2013. Romania: ClujNapoca; 2013. https://dipot.ulb.ac.be/dspace/bitstream/2013/152135/1/Electromotion2013_JG_PWMBF.pdf.
 6.
Lamour R, März R, Tischendorf C. Differentialalgebraic equations: a projector based analysis. Differentialalgebraic equations forum. Heidelberg: Springer; 2013. https://doi.org/10.1007/9783642275555.
 7.
Mohan N, Undeland TM, Robbins WP. Power electronics: converters, applications and design. 3rd ed. New York: Wiley; 2003.
 8.
Nicolet A, Delincé F. Implicit Runge–Kutta methods for transient magnetic field computation. IEEE Trans Magn. 1996;32(3):1405–8. https://doi.org/10.1109/20.497510.
 9.
Pels A, Gyselinck J, Sabariego RV, Schöps S. Solving nonlinear circuits with pulsed excitation by multirate partial differential equations. IEEE Trans Magn. 2018;54(3):1–4. https://doi.org/10.1109/TMAG.2017.2759701.
 10.
Pels A, Gyselinck J, Sabariego RV, Schöps S. Efficient simulation of DCDC switchmode power converters by multirate partial differential equations. IEEE J Multiscale Multiphys Comput Tech. 2019;4(1):64–75. https://doi.org/10.1109/JMMCT.2018.2888900.
 11.
Pulch R, Günther M, Knorr S. Multirate partial differential algebraic equations for simulating radio frequency signals. Eur J Appl Math. 2007;18(6):709–43. https://doi.org/10.1017/s0956792507007188.
 12.
Roychowdhury J. Analyzing circuits with widely separated time scales using numerical PDE methods. IEEE Trans Circuits Syst I, Fundam Theory Appl. 2001;48(5):578–94. https://doi.org/10.1109/81.922460.
 13.
Schöps S, De Gersem H, Weiland T. Winding functions in transient magnetoquasistatic fieldcircuit coupled simulations. Compel. 2013;32(6):2063–83. https://doi.org/10.1108/COMPEL0120130004.
 14.
Tant J, Driesen J. On the numerical accuracy of electromagnetic transient simulation with power electronics. IEEE Trans Power Deliv. 2018;33(5):2492–501. https://doi.org/10.1109/TPWRD.2018.2797259.
Acknowledgements
This work is supported by the “Excellence Initiative” of German Federal and State Governments and the Graduate School CE at TU Darmstadt. The authors thank Johan Gyselinck for fruitful discussions. Further thanks go to Jonas Bundschuh and Erik Skär for their contribution to the first implementation of the PWM eigenfunctions.
Availability of data and materials
Not yet available publicly. It is, however, planned to make the code, which is used to generate the results, publicly available in the near future.
Funding
No funding to report.
Author information
Affiliations
Contributions
All authors have jointly carried out the research and worked together on the manuscript. The numerical tests have been conducted by the first author. All authors read and approved the final manuscript.
Corresponding author
Correspondence to Andreas Pels.
Ethics declarations
Competing interests
There are no competing interests to report.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Pels, A., De Gersem, H., Sabariego, R.V. et al. Multirate PWM balance method for the efficient fieldcircuit coupled simulation of power converters. J.Math.Industry 9, 8 (2019). https://doi.org/10.1186/s1336201900658
Received:
Accepted:
Published:
Keywords
 Finite element methods
 Numerical analysis
 Partial differential equations
 Linear circuits
 DCDC power conversion