Keywords

1 Introduction

Power converters are electronic circuits that allow the electric power source (a battery, the electrical network, a solar panel, etc.) to be adapted to the needs of the receiver (an electric motor, an asynchronous machine, etc.). One way of classifying converters is with respect to the type of current accepted by the supply and the load: alternating current (AC) or direct current (DC). Hence, there are four possible combinations: DC to DC, DC to AC, AC to DC and AC to AC converters. DC-DC converters can be found in mobile phones, laptops, wind turbines, photovoltaic systems, electric cars, etc.

This chapter focuses on a type of DC-DC converters that are the easiest to model, namely buck converters. The circuit diagram of an open-loop buck converter is shown in Fig. 1. In continuous current mode (CCM), the transistor S is open and closed with a certain switching frequency, while the diode \(\overline{S}\) follows the opposite behavior (Fig. 2). Figure 3 shows the voltage drop over the transistor when assuming ideal switching (in reality, switching is not an instantaneous process). The switching frequency is much larger than the resonant frequency of the RLC filter to ensure correct functioning of the converter. The presence of the two semiconductor devices render the converter as a switched system. On the other hand, the periodic behavior of the two switches dictates the periodicity of the overall system. The output filter is a linear RLC circuit, hence, the buck converter can be regarded as a periodic switched linear (PSL) system.

Fig. 1
figure 1

Circuit diagram for the Buck converter

Fig. 2
figure 2

The Buck converter as a switched system

Fig. 3
figure 3

Ideal switching on two switching periods

Fig. 4
figure 4

Response of the Buck converter

The goal of this chapter is to model the buck converter in the frequency domain from physically realizable measurements. Using the small signal paradigm, an AC voltage of small amplitude and varying frequency is added to the DC input. An FFT analysis of the output reveals that, besides the perturbation frequency, other frequencies are also present (typically referred to as harmonic distortions [1]). These frequencies are predicted by the Harmonic Transfer Function (HTF), which was developed as a tool for analyzing periodic systems in the frequency domain. The HTF is expressed in terms of doubly-infinite state-space matrices containing the Fourier coefficients of the periodic state-space matrices. Based on the application, one decides on the number of relevant harmonics and can, thus, truncate the infinite matrices to only a few terms. From the spectral analysis of the response to a range of sinusoidal perturbations, measurements at the expected peaks are gathered, which represent, after post-processing, measurements of the HTFs. These can be employed, together with the Loewner framework [2], to identify the continuous-form of these few HTFs.

Typically, the buck converter is characterized by the average model [3]. This is a linear time-invariant model describing the dynamics of the system in terms of the average values for the current and voltage variables, neglecting effects due to switching. Hence, a plethora of works focus on the identification of these low order LTI average models, an example being [4]. Periodic switching causes the appearance of higher order harmonics and aliasing effects appear for perturbation frequencies larger than half of the switching frequency. Hence, the average model is valid only until one half of the switching frequency, before aliasing becomes an issue. High frequency harmonics are, therefore, not captured by the average model. Figure 4 shows the response to a DC input of the ideal buck converter detailed in Sect. 4.3. This response resembles that of a second-order system and is precisely the response predicted by the average model. However, when considering a time scale in the same order of magnitude as the switching frequency (Figs. 5 and 6), oscillations with the same frequency as the switching frequency can be detected. These oscillations cannot be captured by the average model.

Fig. 5
figure 5

Response between 0.0298 s and 0.03 s

Fig. 6
figure 6

Response between 0.1998 s and 0.2 s

To account for harmonics induced by the periodic behavior, the concept of Harmonic Transfer Functions (HTFs) was developed in [5], with one transfer function modeling each harmonic’s response. For an application consisting of a helicopter rotor, [6] showed that the theoretical HTFs match the quantities obtained from processing the Fourier transform of outputs and inputs. The work of [7] was the first to apply the harmonic state-space (HSS) framework from [5] to model a number of electrical systems from power electronics. In this framework, state-space matrices are doubly-infinite with entries given by the Fourier coefficients of the periodic state-space matrices. A common technique is to lift the system through the application of a Floquet transformation. This is a periodic similarity transformation which yields a constat system matrix \(\mathbf{A}\), thus facilitating the stability analysis of such systems. An identification algorithm for linear time-periodic (LTP) systems using Floquet transformations applied to the discretized LTP system is presented in [8]. The paper [9] provides a review of frequency-domain modeling of converters, including Floquet theory, Harmonic Transfer Functions and Equivalent Signal theory. Last, but not least, [10] assumes full state measurements and identifies the HSS matrices from input-output data.

The Loewner framework is typically employed for identifying a descriptor-form representation of linear time invariant (LTI) systems [2, 11] from frequency-domain measurements of their transfer function. Authors in [12] extended it to the class of linear switched systems. In particular, the data used in [12] consist of frequency domain samples of input-output mappings in the form of a series of multivariate rational functions obtained by taking the multivariate Laplace transform. However, it is not clear how to measure these quantities in practice.

This paper is structured as follows. Section 2 first recalls the problem of modeling LTI systems in the frequency domain in Sect. 2.1 and, afterwards, reviews the concept of harmonic transfer function for modeling periodic systems in Sect. 2.2. Section 3 provides a short review of the classical Loewner framework. Section 4 shows the application of the proposed methodology to an ideal buck converter, as well as when integrating the ON resistance of the switches into the model, together with the numerical experiments. Finally, Sect. 5 concludes the paper and presents directions for future research.

2 Modeling Periodic Systems in the Frequency Domain

This section discusses modeling dynamical systems in the frequency domain. First, the case of linear time-invariant systems is quickly reviewed. Afterwards, the theory of harmonic transfer functions is presented for periodic switched systems.

2.1 Linear Time-Invariant Systems in the Frequency Domain

For simplicity, we review the case of single-input single-output (SISO) systems. We seek to recover a descriptor realization consisting of matrices \(\mathbf{E}\in \mathbb {R}^{n \times n}\), \(\mathbf{A}\in \mathbb {R}^{n \times n}\), \(\mathbf{b}\in \mathbb {R}^{n \times 1}\), \(\mathbf{c}\in \mathbb {R}^{1 \times n}\) for an underlying linear time invariant (LTI) system of the form

$$\begin{aligned} \mathbf{E}\dot{\mathbf{x}}(t)&=\mathbf{A}\mathbf{x}(t)+\mathbf{b}u(t) \end{aligned}$$
(1)
$$\begin{aligned} y(t)&=\mathbf{c}\mathbf{x}(t). \end{aligned}$$
(2)

The excitation is u(t), while the response is denoted by y(t). The column vector \(\mathbf{x}(t)\in \mathbb {R}^n\left[ t\right] \) is an internal variable referred to as the state if the matrix \(\mathbf{E}\) is invertible. Equations (1)–(2) provide the time-domain representation, while the frequency-domain representation is given in terms of the transfer function obtained by taking the Laplace transform of (1)–(2) and computing the ratio between the Laplace transform of the output to that of the input. The transfer function is

$$\begin{aligned} \text {H}\left( \mathrm {s}\right) = \frac{\text{ Y(s) }}{\text{ U(s) }} = \mathbf{c}\left( \mathrm {s}\mathbf{E}-\mathbf{A}\right) ^{-1}\mathbf{b}, \end{aligned}$$
(3)

where \(\mathrm {s}\) is the Laplace variable, a complex number.

Remark 1

The descriptor-form representation (1)–(2) of an LTI system is more general than the state-space form

$$\begin{aligned} \dot{\mathbf{x}}(t)&=\mathbf{A}_{ss}\mathbf{x}(t)+\mathbf{b}_{ss} u(t) \end{aligned}$$
(4)
$$\begin{aligned} y(t)&=\mathbf{c}_{ss}\mathbf{x}(t)+d_{ss} u(t), \end{aligned}$$
(5)

as it can describe systems with a constant \(d_{ss}\), as well as higher-order polynomial terms, by incorporating these into \(\mathbf{b}\) or \(\mathbf{c}\) and making \(\mathbf{E}\) singular. If the matrix \(\mathbf{E}\) in (1) is invertible, then \(\mathbf{A}_{ss}=\mathbf{E}^{-1} \mathbf{A}\) and \(\mathbf{b}_{ss}=\mathbf{E}^{-1} \mathbf{b}\).

2.1.1 Review of Modeling LTI Systems from Frequency-Domain Measurements

Frequency-domain measurements are obtained by considering the input u(t) as a sinusoidal excitation \(u(t)=\cos \left( 2\pi f_j t\right) \) for a range of perturbation frequencies \(f_j\), \(j=1,\ldots ,P\). At steady state, the output is also a sinusoidal signal with the same frequency, but a different magnitude and phase: \(y_{ss}(t)=a \cos \left( 2\pi f_j t+\phi \right) \). The magnitude and phase-shift encode a complex number \(\text {H}_j=a \exp ^{\mathrm {i}\phi }\), where \(\mathrm {i}\) is the unit imaginary number. The quantity \(\text {H}_j\) represents the measurement at frequency \(f_j\), so, by collecting these pairs of points \(\left( f_j,\text {H}_j\right) \), \(j=1,\ldots ,P\), the goal is to recover the unknown transfer function such that, when evaluating \(\text {H}(\mathrm {s})\) for \(\mathrm {s}=\mathrm {i}2\pi f_j\), the result is close to the corresponding frequency response measurement \(H_j\). In other words, given the discrete points \(\left( f_j,\text {H}_j\right) \), \(j=1,\ldots ,P\), we wish to find the continuous-time rational transfer function \(\text {H}(\mathrm {s})\) such that the points are interpolated: \(\text {H}_j=\text {H}\left( \mathrm {i}2\pi f_j\right) \), or well approximated: \(\text {H}_j\approx \text {H}\left( \mathrm {i}2\pi f_j\right) \) (depending on the application).

2.2 Periodic Systems in the Frequency Domain

Due to the periodic opening and closing of the switches, the converter’s dynamics can be expressed as a periodic system in state-space form:

$$\begin{aligned} \dot{\mathbf{x}}(t)&=\mathbf{A}(t)\mathbf{x}(t)+\mathbf{b}(t)v_{in}(t) \end{aligned}$$
(6)
$$\begin{aligned} v_{out}(t)&=\mathbf{c}(t)\mathbf{x}(t)+d(t)v_{in}\left( t\right) \end{aligned}$$
(7)

where the state-space quantities \(\mathbf{A}(t)\), \(\mathbf{b}(t)\), \(\mathbf{c}(t)\), d(t) are periodic, with a fixed and known period \(T_s>0\), called the switching period, such that \(\mathbf{A}(t)=\mathbf{A}(t+mT_s)\), \(\forall m \in \mathbb {Z}\), and the same for \(\mathbf{b}(t)\), \(\mathbf{c}(t)\), d(t).

For a linear periodically time-varying (LPTV) system, a sinusoidal input with excitation frequency \(f_j\) produces an infinite sum of sinusoidal signals with different magnitudes and phase-shifts, at frequencies that are the sum of \(f_j\) and multiples of the switching frequency \(f_s\): \(f_i+m f_s\), \(\forall m\in \mathbb {Z}\). This can be visualized in Fig. 7 from the Fourier analysis of the converter’s response to a DC input and in Fig. 8 for an AC input with perturbation frequency \(f_i=5\) kHz superimposed to a DC signal. The converter is operating with switching frequency \(f_s=20\) kHz.

Fig. 7
figure 7

Fourier analysis of the buck converter’s response to a DC input

Fig. 8
figure 8

Fourier analysis of the buck converter’s response to a sum of DC and 5 kHz AC inputs (26)

The periodic switched system changes between different discrete modes with period \(T_s=\frac{1}{f_s}\), the switching period. For simplicity, and because it fits the case of the buck converter operating in continuous conduction mode (as will be explained in Sect. 4), we will discuss the simple case of two modes, but results are equally applicable to systems with more than two discrete modes.

  1. 1.

    When the switch is ON, the first mode is activated. This lasts for \(DT_s\), where \(D<1\) is the duty cycle (the percentage of time that the switch is ON), in the time interval \( t\in \left[ {mT_s,(m+D)T_s}\right) \), \(\forall m\in \mathbb {Z}\). The system dynamics can be expressed in terms of the state-space matrices \(\mathbf{A}^{(1)}\), \(\mathbf{b}^{(1)}\), \(\mathbf{c}^{(1)}\), \(d^{(1)}\).

  2. 2.

    The second mode is activated when the switch is OFF, lasting for the remaining \((1-D)T_s\), namely for \(t\in \left[ (m+D)T_s,(m+1)T_s\right) \), with state-space matrices \(\mathbf{A}^{(2)}\), \(\mathbf{b}^{(2)}\), \(\mathbf{c}^{(2)}\), \(d^{(2)}\).

This yields the following expression for \(\mathbf{A}(t)\), and similarly for \(\mathbf{b}(t)\), \(\mathbf{c}(t)\) and d(t):

$$\begin{aligned} \mathbf{A}(t) = \left\{ \begin{array}{l} \mathbf{A}^{(1)},~~ t\in \left[ mT_s,(m+D)T_s\right) \\ \mathbf{A}^{(2)},~~t\in \left[ (m+D)T_s,(m+1)T_s\right) \end{array} \right. , \forall m\in \mathbb {Z}. \end{aligned}$$
(8)

As for any periodic signal, we can express \(\mathbf{A}(t)\) in terms of its Fourier Series

$$\begin{aligned} \mathbf{A}(t) =\sum _{j=-\infty }^{\infty }\mathbf{A}_j \exp ^{\mathrm {i}j \omega _s t}, ~~\omega _s=2 \pi f_s, \end{aligned}$$
(9)

and similarly for \(\mathbf{b}(t)\), \(\mathbf{c}(t)\) and d(t). The Fourier coefficients \(\mathbf{A}_j\) can be computed with the classical formula

$$\begin{aligned} \mathbf{A}_j = \frac{1}{T_s}\int _0^{T_s} \mathbf{A}(t) \exp ^{-\mathrm {i}j\omega _s t} dt \end{aligned}$$
(10)

which reduces to

$$\begin{aligned} \mathbf{A}_j&= \frac{1}{T_s}\int _0^{DT_s} \mathbf{A}^{(1)} \exp ^{-\mathrm {i}j\omega _s t} dt+\frac{1}{T_s}\int _{DT_s}^{T_s} \mathbf{A}^{(2)} \exp ^{-\mathrm {i}j \omega _st} dt \end{aligned}$$
(11)
$$\begin{aligned}&=\left( \mathbf{A}^{(1)}-\mathbf{A}^{(2)}\right) \frac{1-\exp ^{-\mathrm {i}2 \pi j D}}{\mathrm {i}2 \pi j}, \text{ for } j\ne 0 \end{aligned}$$
(12)

and

$$\begin{aligned} \mathbf{A}_0&= \frac{1}{T_s}\int _0^{T_s} \mathbf{A}(t) dt =D \mathbf{A}^{(1)}+(1-D) \mathbf{A}^{(2)}, \end{aligned}$$
(13)

after taking into account the two switching phases in Eq. (8). Similar expressions are available for the Fourier coefficients of the \(\mathbf{b}\), \(\mathbf{c}\) and d quantities. Substituting into (6)–(7), we obtain

$$\begin{aligned} \dot{\mathbf{x}}(t)&=\sum _{j=-\infty }^{\infty }\mathbf{A}_j \exp ^{\mathrm {i}j \omega _s t}\mathbf{x}(t)+\sum _{j=-\infty }^{\infty }\mathbf{b}_j \exp ^{\mathrm {i}j \omega _s t}v_{in}(t) \end{aligned}$$
(14)
$$\begin{aligned} v_{out}(t)&=\sum _{j=-\infty }^{\infty }\mathbf{c}_j \exp ^{\mathrm {i}j \omega _s t}\mathbf{x}(t)+\sum _{j=-\infty }^{\infty }d_j \exp ^{\mathrm {i}j \omega _s t}v_{in}\left( t\right) \end{aligned}$$
(15)

which, after applying the Fourier Transform, becomes

$$\begin{aligned} \mathrm {i}\omega \mathbf{X}(\mathrm {i}\omega )&=\sum _{j=-\infty }^{\infty }\mathbf{A}_j \mathbf{X}(\mathrm {i}\omega -\mathrm {i}j \omega _s) +\sum _{j=-\infty }^{\infty }\mathbf{b}_j V_{in}(\mathrm {i}\omega -\mathrm {i}j \omega _s) \end{aligned}$$
(16)
$$\begin{aligned} V_{out}(\mathrm {i}\omega )&=\sum _{j=-\infty }^{\infty }\mathbf{c}_j \mathbf{X}(\mathrm {i}\omega -\mathrm {i}j \omega _s)+\sum _{j=-\infty }^{\infty }d_j V_{in}\left( \mathrm {i}\omega -\mathrm {i}j \omega _s\right) . \end{aligned}$$
(17)

Fourier Series can also be used for the time-domain signals \(\mathbf{x}(t)\), \(v_{in}(t)\) and \(v_{out}(t)\) in (14)–(15), yielding more complicated equations in (16)–(17) which are omitted here. Eventually, they can be re-written compactly in matrix-form:

$$\begin{aligned} \mathrm {s}\mathcal {X}(\mathrm {s})&=\left( \mathcal {A}-\mathcal {N}\right) \mathcal {X}(\mathrm {s}) +\mathcal {B} \mathcal {V}_{in}(\mathrm {s}) \end{aligned}$$
(18)
$$\begin{aligned} \mathcal {V}_{out}(\mathrm {s})&=\mathcal {C} \mathcal {X}(\mathrm {s}) +\mathcal {D} \mathcal {V}_{in}(\mathrm {s}), \end{aligned}$$
(19)

by defining infinite vectors \(\mathcal {X}\), \(\mathcal {V}_{in}\) and \(\mathcal {V}_{out}\):

$$\begin{aligned} \mathcal {X}(\mathrm {s}) = \left[ \begin{array}{c} \vdots \\ \mathbf{X}_{-1}(\mathrm {s}+\mathrm {i}\omega _s)\\ \mathbf{X}_{0}(\mathrm {s})\\ \mathbf{X}_{1}(\mathrm {s}-\mathrm {i}\omega _s)\\ \vdots \end{array} \right] ,\mathcal {V}_{in}(\mathrm {s}) = \left[ \begin{array}{c} \vdots \\ V_{{in}_{-1}}(\mathrm {s}+\mathrm {i}\omega _s)\\ V_{{in}_{0}}(\mathrm {s})\\ V_{{in}_{1}}(\mathrm {s}-\mathrm {i}\omega _s)\\ \vdots \end{array} \right] ,\mathcal {V}_{out}(\mathrm {s}) = \left[ \begin{array}{c} \vdots \\ V_{{out}_{-1}}(\mathrm {s}+\mathrm {i}\omega _s)\\ V_{{out}_{0}}(\mathrm {s})\\ V_{{out}_{1}}(\mathrm {s}-\mathrm {i}\omega _s)\\ \vdots \end{array} \right] , \end{aligned}$$
(20)

where \(\mathbf{X}_{j}\), \(V_{{in}_{j}}\), \(V_{{out}_{j}}\), \(j=-\infty ,\ldots ,\infty \) are the Fourier coefficients of the corresponding time-domain signals in the \(\omega _s\)-basis. Moreover, \(\mathcal {A}\), \(\mathcal {B}\), \(\mathcal {C}\), \(\mathcal {D}\) are doubly-infinite matrices:

(21)
(22)

These are block Toeplitz matrices generated by \(T_s\)-periodic functions \(\mathbf{A}(t)\), \(\mathbf{b}(t)\), \(\mathbf{c}(t)\) and d(t), respectively, containing their Fourier coefficients. Last, but not least, \(\mathcal {N}\) is the block diagonal matrix

$$\begin{aligned} \mathcal {N} = \left[ \begin{array}{ccccc} \ddots &{}&{}&{}&{}\\ &{}-\mathrm {i}\omega _s \mathbf{I}&{}&{}&{}\\ &{}&{}\mathbf{0}&{}&{}\\ &{}&{}&{}\mathrm {i}\omega _s \mathbf{I}&{}\\ &{}&{}&{}&{}\ddots \end{array} \right] . \end{aligned}$$
(23)

Finally, the Harmonic Transfer Function (HTF), relating harmonics of the output to harmonics of the input signal: \(\mathcal {V}_{out}(\mathrm {s}) = \mathcal {H}(\mathrm {s}) \mathcal {V}_{in}(\mathrm {s})\), is defined as

$$\begin{aligned} \mathcal {H}(\mathrm {s})&=\mathcal {C}\left( \mathrm {s}\mathbf{I}-\left( \mathcal {A}-\mathcal {N}\right) \right) ^{-1} \mathcal {B}+\mathcal {D} \end{aligned}$$
(24)
(25)

The HTF involves infinite state-space matrices, which cannot be implemented on a machine without truncation. Unfortunately, it may be possible that low frequency behavior is affected by truncation because the matrix inverse \(\left( \mathrm {s}\mathbf{I}-\left( \mathcal {A}-\mathcal {N}\right) \right) ^{-1} \) may result in wrapping high frequency components back to low frequency. Truncation effects are significant when the dynamics matrix \(\mathbf{A}(t)\) contains an impulse. The Fourier components of an impulse do not roll off (they are constant), causing significant truncation errors and [5] noted that the number of harmonic components needed to produce a good match is larger for systems with discontinuous dynamics equations. However, when the converter is operating in continuous current mode, as shown in [13], truncation does not cause large modeling errors. Hence, in our application, only a limited number of harmonics are of interest (say N), so the infinite quantities are truncated to dimension \(2N+1\), and HTFs in Eq. (25) range from \(-N\) to N.

2.2.1 Modeling the Buck Converter from Frequency-Domain Measurements

For DC-DC converters, the load requires a constant supply voltage with minimal disturbance, so a small signal analysis should be considered. In this setting, the input is taken as a constant voltage together with an AC component with amplitude one or several orders of magnitude smaller than the DC voltage:

$$\begin{aligned} v_{in}\left( t\right) =v_{DCin}+v_{ACin} \cos (2\pi f_j t)=v_{DCin}+\frac{v_{ACin}}{2} \left( \exp ^{\mathrm {i}\omega _j t}+\exp ^{-\mathrm {i}\omega _j t}\right) , \end{aligned}$$
(26)

with \(f_j\), the perturbation frequency of choice, and \(v_{DCin}\gg v_{ACin}\). In the Laplace domain, this corresponds to the vector

$$\begin{aligned} \mathcal {V}_{in}(\mathrm {s}) = \left[ \begin{array}{c} \vdots \\ 0\\ V_{{in}_{0}}(\mathrm {s})=\frac{v_{DCin}}{\mathrm {s}}+v_{ACin}\frac{\mathrm {s}}{\mathrm {s}^2+\omega _j^2}\\ 0\\ \vdots \end{array} \right] . \end{aligned}$$
(27)

The response is a superposition of the output due to the DC input and the output due to the AC input: \(v_{out}(t) = v_{DCout}(t)+v_{ACout}(t)\). The DC output contains, besides the 0-frequency, harmonics at integer multiples of the switching frequency (as shown in Fig. 7):

$$\begin{aligned} v_{DCout}\left( t\right) =v_{DC0}+\sum _{\begin{array}{c} m=-\infty \\ m\ne 0 \end{array}}^{\infty } v_{DCm}\cos (2\pi m f_s t+\phi _{DCm}). \end{aligned}$$
(28)

Similarly, the AC output, contains, besides \(-f_j\) and \(f_j\), harmonics at \(-f_j-m f_s\) and \(f_j+m f_s\), \(m\in \mathbb {Z}\) (recall Fig. 8):

$$\begin{aligned} v_{ACout}\left( t\right) =v_{AC0}\cos (2\pi f_k t+\phi _{AC0})+\sum _{\begin{array}{c} m=-\infty \\ m\ne 0 \end{array}}^{\infty }v_{ACm}\cos (2\pi (f_k+m f_s) t+\phi _{ACm}). \end{aligned}$$
(29)

In the Laplace domain, this amounts to expressing \(\mathcal {V}_{out}(\mathrm {s}) = \mathcal {H}(\mathrm {s}) \mathcal {V}_{in}(\mathrm {s})\), namely

$$\begin{aligned} \mathcal {V}_{out}(\mathrm {s}) = \left[ \begin{array}{c} \vdots \\ V_{{out}_{-1}}(\mathrm {s}+\mathrm {i}\omega _s)\\ V_{{out}_{0}}(\mathrm {s})\\ V_{{out}_{1}}(\mathrm {s}-\mathrm {i}\omega _s)\\ \vdots \end{array} \right] =\left[ \begin{array}{c} \vdots \\ \text {H}_{-1}(\mathrm {s})\\ \text {H}_{0}(\mathrm {s})\\ \text {H}_{1}(\mathrm {s})\\ \vdots \end{array} \right] V_{{in}_{0}}(\mathrm {s}) \end{aligned}$$
(30)

In practice, only the information contained in the AC output will be used, for different perturbation frequencies \(f_j\). Depending on the number of HTFs to be identified (e.g., N), the perturbation frequencies should contain enough points and span at least N multiples of \(f_s\). However, values that are equal to multiples of the switching frequency should be avoided, as components add up. Through an FFT analysis of the output, the amplitude and phase of the harmonics are determined and the measurement of the HTF established:

$$\begin{aligned} H_m(\mathrm {i}\omega _j)=\frac{v_{ACm}}{v_{ACin}}\exp ^{\mathrm {i}\phi _{ACm}}, m=-N,\ldots ,0,\ldots ,N. \end{aligned}$$
(31)

3 Review of the Loewner Framework

This section reviews the Loewner framework as a tool for solving the problem of modeling LTI systems in the frequency domain introduced in Sect. 2.1 for SISO systems. Here, we consider the general case of multiple-input multiple output (MIMO) systems with p inputs and q outputs. Given pairs of the form \((f_j,\mathbf{H}_j)\), \(j=1,\ldots ,P\), where \(\mathbf{H}_j \in \mathbb {C}^{q \times p}\) is the matrix measured at \(f_j\), we partition the set of points \(\left\{ \mathrm {i}\omega _1,\ldots ,\mathrm {i}\omega _P\right\} = \left\{ \lambda _1,\ldots ,\lambda _{P/2}\right\} \cup \left\{ \mu _1,\ldots ,\mu _{P/2}\right\} \) into right \(\lambda _k\), \(k=1,\ldots ,\frac{P}{2}\) and left points \(\mu _h\), \(h=1,\ldots ,\frac{P}{2}\). We select right tangential directions as column vectors \(\mathbf{r}_k\) and left directions as row vectors \(\mathbf{l}_h\). They can be chosen, for simplicity, as vectors of the identity matrix [11]. Matrix data \(\mathbf{H}_j\) are converted to right vector data \(\mathbf{H}_k \mathbf{r}_k=\mathbf{w}_k\) and left vector data \(\mathbf{l}_h \mathbf{H}_h =\mathbf{v}_h\). These quantities are collected into matrices \(\boldsymbol{\Lambda } =\text{ diag } \left[ \begin{array}{ccc} \lambda _1&\ldots&\lambda _{\frac{P}{2}} \end{array}\right] \), \(\boldsymbol{M}= \text{ diag }\left[ \begin{array}{ccc} \mu _1&\ldots&\mu _{\frac{P}{2}} \end{array}\right] \), \(\mathbf{R}=\left[ \begin{array}{ccc} \mathbf{r}_1&\ldots&\mathbf{r}_{\frac{P}{2}} \end{array}\right] \), \(\mathbf{W}=\left[ \begin{array}{ccc} \mathbf{w}_1&\ldots&\mathbf{w}_{\frac{P}{2}} \end{array}\right] \), \(\mathbf{L}=\left[ \begin{array}{ccc} \mathbf{l}_1&\ldots&\mathbf{l}_{\frac{P}{2}} \end{array}\right] ^T\), \(\mathbf{V}=\left[ \begin{array}{ccc} \mathbf{v}_1&\ldots&\mathbf{v}_{\frac{P}{2}} \end{array}\right] ^T\). Next, the Loewner and shifted Loewner matrices are defined entry-wise as

$$\begin{aligned} \mathbb {L}_{hk} = \frac{\mathbf{v}_h \mathbf{r}_k-\ell _h \mathbf{w}_k}{\mu _h-\lambda _k},~~~\sigma \mathbb {L}_{hk} = \frac{\mu _h\mathbf{v}_h \mathbf{r}_k-\lambda _k\ell _h \mathbf{w}_k}{\mu _h-\lambda _k},~~h,k=1,\ldots ,\frac{P}{2}. \end{aligned}$$
(32)

We can write a (non-minimal) descriptor realization as in (1)–(2) of the transfer function model

$$\begin{aligned} \mathbf{H}(\mathrm {s}) = \mathbf{W}\left( \sigma \mathbb {L}-\mathrm {s}\mathbb {L} \right) ^{-1} \mathbf{V}\end{aligned}$$
(33)

satisfying the right and left interpolation conditions \(\mathbf{H}(\lambda _k) \mathbf{r}_k=\mathbf{w}_k\) and \(\mathbf{l}_h \mathbf{H}(\mu _h)=\mathbf{v}_h\) [2]. To obtain a minimal realization, we perform a singular value decomposition (SVD) of a linear combination of the Loewner and shifted Loewner matrices:

$$\begin{aligned}{}[\mathbf{Y},\Sigma ,\mathbf{X}] = \text{ svd }(\sigma \mathbb {L}- x \mathbb {L}),~~x \in \{f_i\}. \end{aligned}$$
(34)

Choosing n as the singular value where the largest drop between two consecutive singular values takes place (n is application-dependent), we truncate the SVD and define (in Matlab notation) \(\mathbf{X}_n = \mathbf{X}(:,1:n)\) and \(\mathbf{Y}_n = \mathbf{Y}(:,1:n)^*\). The model of size n in descriptor form is

$$\begin{aligned} \mathbf{E}= -\mathbf{Y}_n \mathbb {L} \mathbf{X}_n,~\mathbf{A}= -\mathbf{Y}_n \sigma \mathbb {L} \mathbf{X}_n,~\mathbf{B}= \mathbf{Y}_n \mathbf{V}, ~\mathbf{C}= \mathbf{W}\mathbf{X}_n, \mathbf{D}=\mathbf{0}. \end{aligned}$$
(35)

4 Analysis of the Buck Converter as a PSL System

The Buck converter is a hybrid dynamical system with the continuous behavior dictated by the linear time-invariant elements (resistor, capacitor, inductor) and the discrete behavior given by the two switches. Figure 1 shows the topology of a Buck converter which supplies a passive load resistor with voltage \(v_{out}\). The switch is controlled by a binary input signal S: when S is ON, the switch is closed (conducting), and for S OFF, the switch is non-conducting (open), as illustrated in Figs. 2 and 3. We consider the converter to be operating in continuous conduction mode (CCM), meaning that the current through the inductor never reaches zero, hence there are two linear working modes: S ON, \(\overline{S}\) OFF in the time interval \( t\in [mT_s,(m+D)T_s]\) and S OFF, \(\overline{S}\) ON for \(t\in [(m+D)T_s,(m+1)T_s]\), \(\forall m \in \mathbb {Z}\).

4.1 Ideal System

This section covers the case of ideal switches, which turn ON or OFF instantaneously. The circuit can be modeled by differential equations involving the capacitor’s voltage \(v_{C}(t)\) and the inductor current \(i_{L}(t)\). Equation (36) describes the dynamics of the Buck converter in each working mode \(i=1,2\) in state-space form:

$$\begin{aligned} \dot{\mathbf{x}}(t)=\mathbf{A}\mathbf{x}(t)+\mathbf{b}^{(i)}v_{in}(t),~ \mathbf{x}(t)=\begin{bmatrix} V_{C}(t) \\ I_{L}(t) \end{bmatrix},~ \mathbf{A} = \begin{bmatrix}-\frac{1}{RC} &{} \frac{1}{C} \\ -\frac{1}{L} &{} 0 \end{bmatrix}, ~ \mathbf{b}^{(1)} = \begin{bmatrix} 0 \\ \frac{1}{L} \end{bmatrix},~ \mathbf{b}^{(2)} = \begin{bmatrix} 0 \\ 0 \end{bmatrix}. \end{aligned}$$
(36)

The response is \(v_{out}(t)=v_{C}(t)\), yielding \(\mathbf{c}= \begin{bmatrix}1&0 \end{bmatrix}\) and \(d=0\) for the output equation \(v_{out}(t) =\mathbf{c}\mathbf{x}(t)+d v_{in}(t)\). In terms of the analysis described in Sect. 2.2 for periodic systems, we notice that \(\mathbf{A}\), \(\mathbf{c}\) and d are the same for both modes. This allows to simplify the matrices appearing in the HTF: \(\mathcal {A} = \text{ blkdiag }\left[ \ldots ,\mathbf{A},\mathbf{A},\mathbf{A},\ldots \right] \), \(\mathcal {C} = \text{ blkdiag }\left[ \ldots ,\mathbf{c},\mathbf{c},\mathbf{c},\ldots \right] \), \(\mathcal {D} = \mathbf{0}\), while \(\mathcal {B}\) is full with Fourier coefficients given by \(\mathbf{b}_0=D \mathbf{b}^{(1)}\) and \(\mathbf{b}_j=\mathbf{b}^{(1)}\frac{1-\exp ^{-\mathrm {i}2 \pi j D}}{\mathrm {i}2 \pi j}\), for \(j\ne 0\). This allows to decouple the different HTFs we seek to identify: \(\text {H}_{j}(\mathrm {s}) = \mathbf{c}\left( \mathrm {s}\mathbf{I}-\left( \mathbf{A}-\mathrm {i}j \omega _s \mathbf{I}\right) \right) ^{-1}\mathbf{b}_j\). One could attempt to identify each of the HTFs separately.

Remark 2

The average model is precisely the HTF \(H_0(\mathrm {s})=\mathbf{c}\left( \mathrm {s}\mathbf{I}-\mathbf{A}\right) ^{-1}D \mathbf{b}^{(1)}\) for this ideal system.

4.2 Integrating the ON Resistance of the Semiconductor Devices

Semiconductor devices are not perfect open circuits when OFF and, similarly, they are not perfect short circuits when ON. In practice, their equivalent circuits would contain resistors, inductors and capacitors. In this section, we account for the small resistance \(R_{on}\) when devices are ON. Figure 9 shows the updated circuit diagram when considering \(R_{ton}\), the ON resistance for the transistor, and \(R_{don}\), the ON resistance for the diode. They are each in series with the corresponding ideal switch. The effect of \(R_{ton}\) can be seen in Fig. 10, from the voltage across the transistor, with the switching no longer being instantaneous.

Fig. 9
figure 9

Updated circuit diagram of the Buck converter

Fig. 10
figure 10

Influence of \(R_{ton}\) on switching

In terms of the model in state-space form, accounting for the resistances \(R_{on}\) results in different \(\mathbf{A}\) matrices for each discrete mode:

$$\begin{aligned} \mathbf{A}^{(1)} = \begin{bmatrix}-\frac{1}{RC} &{} \frac{1}{C} \\ -\frac{1}{L} &{}-\frac{r_{ton}}{L} \end{bmatrix} \text{ and } \mathbf{A}^{(2)} = \begin{bmatrix}-\frac{1}{RC} &{} \frac{1}{C} \\ -\frac{1}{L} &{}-\frac{r_{don}}{L} \end{bmatrix}, \end{aligned}$$
(37)

while the rest of the matrices stay unchanged from Sect. 4.1. In this case, the doubly-infinite matrix \(\mathcal {A}\) in (21) appearing in the HTF is no longer block-diagonal, but full, with Fourier coefficients equal to

$$\begin{aligned} \mathbf{A}_0=D \mathbf{A}^{(1)}+(1-D) \mathbf{A}^{(2)} \text{ and } \mathbf{A}_j=\left( \mathbf{A}^{(1)}-\mathbf{A}^{(2)}\right) \frac{1-\exp ^{-\mathrm {i}2 \pi j D}}{\mathrm {i}2 \pi j} \text{ for } j\ne 0. \end{aligned}$$
(38)

Hence, the HTFs can no longer be decoupled, as it was the case for ideal switches, and the harmonic transfer functions should be modeled altogether.

4.3 Numerical Experiments

A Matlab 2019a [14] Simulink/Simscape Electrical model [15] (Fig. 11) of a Buck converter with parameters: \(L=1\) mH, \(C=500\,\upmu \)F, \(R=12\,\Omega \), \(f_s = 20\) kHz, \(v_{DCin}=12\) V and duty cycle \(D=\frac{1}{2}\) was employed for the numerical experiments. When integrating the \(R_{on}\) resistance of the semiconductor devices in the simulation, the chosen values are \(R_{ton}=0.2\) and \(R_{don}=0.01\).

Fig. 11
figure 11

Matlab simulink/simscape electrical model for the buck converter

The output for several perturbation frequencies: 10 Hz, 20 Hz, \(\ldots \), 100 Hz, 200 Hz, \(\ldots \), 1000 Hz, 2000 Hz, \(\ldots \), 19000 Hz, 19100 Hz, \(\ldots \), 19900 Hz, 19910 Hz, 19920 Hz, \(\ldots \), 19990 Hz, yielding a total of 54 frequencies, was saved to files for subsequent post-processing. A large number of frequencies were considered, from low up to just below the switching frequency, despite the low order model we expect to identify, to ensure that all dynamics are modeled accurately. From Fig. 8, which shows the magnitude of the FFT of \(v_{out}\) for \(v_{in}\left( t\right) =12+\cos (2\pi \cdot 5000\cdot t)\), we notice that components at frequencies 0, 20 kHz, 40 kHz, etc., are present, together with components at frequencies 5 kHz, \(20-5=15\) kHz, \(20+5=25\) kHz, \(40-5=35\) kHz, \(40+5=45\) kHz, etc. Using the insight from Fig. 8, the magnitude of AC components superior to 35 kHz are below \(-100\) dB, typically considered as engineering precision. Hence, the infinite sum in the HTF is truncated to \(N=1\), leading to the following HTFs to be identified: \(H_{-1}(\mathrm {s})\), \(H_{0}(\mathrm {s})\) and \(H_{1}(\mathrm {s})\) from the FFT analysis of \(V_{{out}_{-1}}(\mathrm {i}\omega _j+\mathrm {i}\omega _s)\), \(V_{{out}_{0}}(\mathrm {i}\omega _j)\) and \(V_{{out}_{1}}(\mathrm {i}\omega _j-\mathrm {i}\omega _s)\) in (30), respectively. Moreover, recall that, for our application, the converter is operating in continuous current mode and truncation of the infinite HSS matrices does not cause large errors. This fact is verified in Tables 1 and 2, where the \(N=100\) truncation offers no improvement or only a slight improvement in the accuracy with respect to the \(N=1\) truncation.

Making use of the complex conjugate information from the negative frequencies

$$\begin{aligned} \left\{ \begin{array}{ll} V_{{out}_{-1}}(-\mathrm {i}\omega _j+\mathrm {i}\omega _s)=\overline{V_{{out}_{1}}(\mathrm {i}\omega _j-\mathrm {i}\omega _s)}&{} \text{ together } \text{ with } \text{(30) } \Rightarrow H_{-1}(-\mathrm {i}\omega _j)=\overline{H_{1}(\mathrm {i}\omega _j)}\\ V_{{out}_{0}}(-\mathrm {i}\omega _j)=\overline{V_{{out}_{0}}(\mathrm {i}\omega _j)} &{} \text{ together } \text{ with } \text{(30) }\Rightarrow H_{0}(-\mathrm {i}\omega _j)=\overline{H_{0}(\mathrm {i}\omega _j)}\\ V_{{out}_{1}}(-\mathrm {i}\omega _j-\mathrm {i}\omega _s)=\overline{V_{{out}_{-1}}(\mathrm {i}\omega _j+\mathrm {i}\omega _s)}&{} \text{ together } \text{ with } \text{(30) }\Rightarrow H_{1}(-\mathrm {i}\omega _j)=\overline{H_{-1}(\mathrm {i}\omega _j)}. \end{array}\right. \end{aligned}$$

and applying the output transformation [10]

$$\begin{aligned} \mathbf{T}_y = \left[ \begin{array}{rrr} 1&{}0&{}1\\ 0&{}1&{}0\\ -\mathrm {i}&{}0&{}\mathrm {i}\end{array} \right] \Rightarrow \mathbf{T}_y \left[ \begin{array}{c} H_{-1}(\mathrm {s})\\ H_{0}(\mathrm {s}) \\ H_{1}(\mathrm {s})\end{array} \right] = \left[ \begin{array}{c} H_{-1}(\mathrm {s})+H_{1}(\mathrm {s})\\ H_{0}(\mathrm {s}) \\ -\mathrm {i}H_{1}(\mathrm {s})+\mathrm {i}H_{1}(\mathrm {s}) \end{array} \right] \triangleq \hat{\mathbf{H}}(\mathrm {s}) \end{aligned}$$
(39)

yields the usual complex conjugate relationship for \(\hat{\mathbf{H}}\): \(\hat{\mathbf{H}}(-\mathrm {i}\omega _j)=\overline{\hat{\mathbf{H}}(\mathrm {i}\omega _j)}\), allowing one to obtain state-space matrices with real entries from the single input multiple output measurements \(\hat{\mathbf{H}}_j\). In the Loewner framework (Sect. 3), frequencies with odd indices together with their negatives are used as right data, while those with even indices and their negatives as left data. We expect a system of order 6, due to the matrix \(\mathcal {A}-\mathcal {N}\) having size 6, when truncating (21) such that the HTF contains only \(H_{-1}(\mathrm {s})\), \(H_{0}(\mathrm {s})\) and \(H_{1}(\mathrm {s})\). Figures 12 and 13 show the singular value drop of the matrices \(\mathbb {L}\), \(\sigma \mathbb {L}\) and a linear combination thereof, exhibiting a drop of several orders of magnitude after the \(6{\text{ th }}\) singular value (more clear for the system with parasitics). This allows to identify an order 6 system, as expected. The final realization is obtained by applying the inverse of the output transformation and premultiplying the resulting \(\mathbf{C}\) matrix with \(\mathbf{T}_y^{-1}\).

Fig. 12
figure 12

SVD drop of the Loewner matrix pencil for the ideal system

Fig. 13
figure 13

SVD drop of the Loewner matrix pencil for the system with parasitics

Figures 14, 15 and 16 show the magnitude of the three HTFs \(H_{-1}(s)\), \(H_{0}(s)\) and \(H_{1}(s)\) in the ideal case, plotted only for positive frequencies. The recovered models match the data, as well as the theoretical HTFs.

Fig. 14
figure 14

\(H_{-1}(\mathrm {s})\) in the ideal case

Fig. 15
figure 15

\(H_{0}(\mathrm {s})\) in the ideal case

Fig. 16
figure 16

\(H_{1}(\mathrm {s})\) in the ideal case

The same good agreement is noticed in Figs. 17, 18 and 19 from the magnitude of the three HTFs \(H_{-1}(s)\), \(H_{0}(s)\) and \(H_{1}(s)\) when taking into account the ON resistance of the switches. The effect of these resistances can be seen in the damping of the low frequency resonance of \(H_{0}(s)\) and in the appearance of dips at the same low frequency resonance in the response of \(H_{-1}(s)\) and \(H_{1}(s)\). The increase in damping can also be explained from the pole plots of the two systems in Figs. 20 and 21. While the imaginary parts of the poles remain largely unaffected (on the default scale), the real part has decreased from taking into account parasitics.

Fig. 17
figure 17

\(H_{-1}(\mathrm {s})\) with parasitics

Fig. 18
figure 18

\(H_{0}(\mathrm {s})\) with parasitics

Fig. 19
figure 19

\(H_{1}(\mathrm {s})\) with parasitics

Remark 3

Since the HTFs can no longer be decoupled as in the ideal case, modeling each HTF individually would not allow to recover the system of order 6.

Fig. 20
figure 20

Pole plot for the ideal system

Fig. 21
figure 21

Pole plot for the system with parasitics

Remark 4

Even though the true model obtained by truncating the infinite harmonic state-space matrices matches the data in Figs. 14, 15, 16, 17, 18 and 19, when computing the errors

$$\begin{aligned} \mathcal {H}_{\infty } \text{ error } = \frac{ \displaystyle \max _{j=1\ldots P} \left( \mathbf{H}_j - \mathbf{H}(\mathrm {i}\omega _j) \right) }{\displaystyle \max _{j=1\ldots P} \left( \mathbf{H}_j \right) } \end{aligned}$$
(40)

and

$$\begin{aligned} \mathcal {H}_{2} \text{ error } = \sqrt{\frac{ \displaystyle \sum _{j=1\ldots P} \Vert \mathbf{H}_j - \mathbf{H}(\mathrm {i}\omega _j) \Vert _F^2}{\displaystyle \sum _{j=1\ldots P} \Vert \mathbf{H}_j \Vert _F^2}}, \text{ where } \Vert \mathbf{H}(\mathrm {i}\omega _j) \Vert _F^2 = \displaystyle \sum _{m=-N\ldots N} |\mathbf{H}_m (\mathrm {i}\omega _j) |^2, \end{aligned}$$
(41)

we obtain the values displayed in the last two rows of Table 1 for the ideal system and Table 2 for the system with parasitics. Surprisingly, these errors are rather large. For the ideal system, increasing the number of terms in the truncation to \(N=100\) yields precisely the same errors as with \(N=1\). For the system with parasitics, increasing the number of terms in the truncation to \(N=100\) improves the errors marginally with respect to the truncation with \(N=1\) discussed in this paper. Last, but not least, the accuracy of the models built with the Loewner framework from data is in the order of the first neglected singular value (the \(7{\text{ th }}\) in our case), as seen from Figs. 12 and 13, namely \(10^{-4}\) for the ideal system and \(10^{-7}\) for the system with parasitics.

Table 1 Errors for the ideal system
Table 2 Errors for the system with parasitics

5 Conclusion and Future Work

This chapter presents a first step towards modeling periodic switched linear systems from frequency domain measurements which can be physically achievable. The theory presented relies on the identification of harmonic transfer functions in the Loewner framework.

While the descriptor-form of the model can be used in simulations, the realization for the vector of HTFs is of the form (35) and can no longer be interpreted physically in terms of Fourier coefficients. Hence, future work involves applying suitable similarity transformations to retrieve matrices from which the Fourier coefficients of the periodic state-space matrices \(\mathbf{A}(t)\), \(\mathbf{b}(t)\), \(\mathbf{c}(t)\) and d(t) can be easily identified. Unfortunately, as shown by the errors in Tables 1 and 2, data obtained from the Fourier analysis of the output signals from Simulink do not perfectly match the harmonic transfer function model and the need to obtain direct, instead of simulation measurements, is evident.

This chapter focused on the open-loop Buck converter as an application case. In practice, the system is typically operating in closed-loop, with the switching signal obtained through Pulse Width Modulation, by comparing state variables to the clocking carrier waveform. The control signal can be taken into consideration as an extra input [16] and a similar analysis through the HTF can be performed. In future work, we will also account for the control-to-output transfer function in the modeling procedure. Moreover, more realistic models integrating high-frequency parasitic elements of the semiconductor devices and of the output filter will be considered.