1 Introduction

Recently, low-power converters have used only the analogue control technique because digital technology did not allow the necessary fast computation. In the past, they have been controlled predominately by analogue integrated circuit technology with linear system design techniques [1,2,3]. Digital controller applications and their ability to incorporate advanced control schemes [4,5,6,7,8] have become very popular for controlling DC–DC converters. Fuzzy-logic control (FLC) is one of the more attractive and promising control methods from amongst many digital control approaches. FLC is a heuristic approach that embeds the knowledge and key elements of human thinking easily into the controller design procedure [9,10,11,12,13,14,15]. In order to avoid the need for expert knowledge, some neural-network approaches [16,17,18] and also the genetic algorithm (GA) approaches are suggested in [19, 20]. Implementations of FLC algorithms within DC–DC converters for control of inductor current and output voltage are described in [21,22,23,24,25].

Fig. 1
figure 1

The control system: a step-down DC–DC converter; b the converter state-space (\(i_L\), \(u_0\)) nonlinear model; c step-down DC–DC converter with synchronous switches; d the converter state-space (\(i_L\), \(u_0\)) linear model

The state controller is not used extensively in the control of DC–DC converters due to its sensitivity to parameter changes, causing the steady-state error and output voltage overshoot. The FLC-based adaptation algorithm for state controllers’ gains can improve these properties. The FLC membership functions are adjusted offline by a genetic algorithm. The FLC algorithm is performed in real time inside the FPGA. This state controller assures the control of output voltage and its’ derivative, by using only one voltage sensor.

Section 2 introduces a set of state controller gains that are calculated as [26] suggests with respect to buck converter input voltage and load changes. The obtained sets define the search range of the parameters for the GA and present the physical limitations for the FLC membership functions. Section 3 provides an interaction between the FLC membership function and GA. The FLC system’s performance is adjusted to provide an appropriate state controller’s gain, which minimises the steady-state error and output voltage overshoot. Tuning can be done with a GA where the parameters of the fuzzy system’s membership functions’ sets evolve by means of selection, mutation and recombination. The whole system is verified by the experimental results in Sect. 4.

Control structures are tested on sophisticated hardware processing platforms with the ability to realise an accurate and fast dynamic response of converter which serve as a basis for research with the ability of exploitation to the required final product design. Applications requiring accurate and fast dynamic responses can nowadays be found in the diversity of data centres where with the digital content and computing services which makes them fast growing electricity demanding loads [27, 28].

2 The model of the system

The structure of the control system is shown in Fig. 1a. It consists of the transistor (Tr), diode (D) and the filter elements an inductor L, resistance \(R_L\), a capacitor C and a load resistance R. The modelFootnote 1 can be described as:

$$\begin{aligned} \frac{\mathrm{d}{i}_L}{\mathrm{d}t}= & {} -\frac{R_L}{L}i_L-\frac{1}{L}u_0+\frac{U_d}{L}\delta (t) \\\frac{\mathrm{d}{u}_0}{\mathrm{d}t}= & {} \frac{1}{C}i_L-\frac{1}{RC}u_0, \end{aligned}$$
(1)

where \(i_L\) is the inductor current, \(u_0\) is the output voltage, and \(U_d\) represents the converter input voltage. The duty-cycle function is defined as pulse train function as follows:

$$\begin{aligned} \delta \left( t \right) = \left\{ \begin{array}{l} 1,~~\text{ when }~~Tr~~\text{ is } \text{ ON }\\ 0,~~\text{ when }~~Tr~~\text{ is } \text{ OFF }\\ \end{array} \right. . \end{aligned}$$

Figure 1b shows the dynamic nonlinear model of the system, which is extracted from (1), where the limits are included in an integrator in order to include the diode property. So when inductor current is positive over the whole interval \(T_s\), the converter operates in Continuous Current Mode (CCM, Fig. 2a) and when the current reaches zero inside the interval \(T_s\) it operates in Discontinuous Current Mode (DCM, Fig. 2b). When the system remains in CCM during the transient, it can be treated as a second-order system and when it enters into DCM, the structure changes to first order. After the transient during CCM the output voltage \(u_0\) reaches the same value at constant duty-cycle function. In the DCM the output voltage increases after the transient as shown in Fig. 2b. The voltage increasing during the DCM occurs because the capacitor cannot be discharged to the input voltage source due to the diode. This drawback can be removed from the system behaviour by introduction of the synchronous switches \(Tr1,~D1~\text{ and }~Tr2,~D2\) as shown in Fig. 1c. Based on this the model of synchronous switch dc–dc converter is also shown in Fig. 1d. Figure 2c shows the current response, so the capacitor (C) can be discharged by negative current. Such organised converter is also controllable, when the output converter terminals are opened.

Fig. 2
figure 2

DC–DC converter operation modes: a continuous mode of operation; b discontinuous mode of operation; c continuous mode of operation when synchronous switches are applied

In order to implement the state control where the current measurement could be avoided the state variables, \(i_L\) and \(u_0\), representing the process (1) should be replaced by another. By rearranging (1) and introducing new state variables, capacitor voltage \(x_1=u_0\) and its derivative \(x_2=\mathrm{d}u_0/\mathrm{d}t\) while observing these over the sampling time interval \(T_s\), using the average values as follows [29]:

$$\begin{aligned} \left\langle {x}\right\rangle =\frac{1}{T_s}\int _0^{T_s}x\mathrm{d}t \end{aligned}$$
(2)

the CCM state-space average model as proposed in [3, 29] can be rewritten in canonical form:

$$\begin{aligned} \frac{\mathrm{d}\left\langle {x_1}\right\rangle }{\mathrm{d}t}= & {} \left\langle {x_2}\right\rangle \\\frac{\mathrm{d}\left\langle {x}_2\right\rangle }{\mathrm{d}t}= & {} a_1\left\langle {x_1}\right\rangle +a_2\left\langle {x_2}\right\rangle +b_1\left\langle {\delta } \right\rangle , \end{aligned}$$
(3)

2.1 State control scheme

The A/D converter is used for measuring the output voltage (Fig. 1), and it is expected that such a system should be treated as a discrete time system, but after checking the eigenvalues of the systems from [29] and (3), they are:

$$\begin{aligned} \lambda _{1,2}=-\frac{1}{2}a_2\pm j\frac{1}{2}\sqrt{a_2^2+4a_1} \end{aligned}$$
(4)

which can be compare with second-order system response [30] as are:

$$\begin{aligned} \lambda _{1,2}=-\xi \omega _o \pm j\omega _o\sqrt{1-\xi ^2} \end{aligned}$$
(5)

where \(\xi \) is open-loop system damping ratio and the \(\omega _o\) is open-loop system natural frequency, which can be evaluated by using (4) and (5),Footnote 2 \(\omega _o\) for any load \(R\in [R_\mathrm{min},R_\mathrm{max}]\) Footnote 3 can be evaluated:

$$\begin{aligned} \omega _o=\sqrt{a_1+\frac{3}{4}a_2^2} \end{aligned}$$
(6)

After inspection:

$$\begin{aligned} \omega _o \ll \lambda _{Ts} \end{aligned}$$
(7)

it has been realised that the natural frequency \(\omega _o\) is significantly smaller than the switching frequencyFootnote 4 \(\lambda _{Ts}\) during the CCM operation [31]. So, the control system was treated as a continuous time system. Based on the control scheme proposed by [26] and shown in Fig. 3a the model (3) is expanded by state controller gains (\(K_{r1}\), \(K_{r2}\)) as follows:

$$\begin{aligned} \left\langle \delta \right\rangle = K_{pw} \left( { u_\mathrm{ref} - K_{r1} \left\langle x_1 \right\rangle - K_{r2} \left\langle x_2 \right\rangle } \right) , \end{aligned}$$
(8)

where \(K_{pw}\) is PWM attenuation (\(K_{pw}=1\)). After insertion of (8) into (3) it follows:

$$\begin{aligned} \frac{{\mathrm{d}\left\langle {{x_1}} \right\rangle }}{{\mathrm{d}t}}= & {} \left\langle {{x_2}} \right\rangle \nonumber \\ \frac{{\mathrm{d}\left\langle {{x_2}} \right\rangle }}{{\mathrm{d}t}}= & {} -\, {a_1}\left\langle {{x_1}} \right\rangle - {a_2}\left\langle {{x_2}} \right\rangle \nonumber \\&+\, {b_1}\left( {{K_{pw}}\left( {{u_\mathrm{ref}} - {K_{r1}}\left\langle {{x_1}} \right\rangle - {K_{r2}}\left\langle {{x_2}} \right\rangle } \right) } \right) \end{aligned}$$
(9)

The second-order transfer function is obtained from (9):

$$\begin{aligned} G(s)=k_\mathrm{DC}\frac{\omega _n^2}{s^2 + 2D\omega _n s + \omega _n^2}, \end{aligned}$$
(10)

where D is defined as the damping ratio, \(\omega _n\) is defined as the natural frequency, and \(k_\mathrm{DC}\) is defined as the DC gain. These parameters are:

$$\begin{aligned}&\omega _n^2 = \frac{{1 + \frac{{R_L }}{R} + U_d K_{pw} K_{r1} }}{{LC}} \end{aligned}$$
(11)
$$\begin{aligned}&2D\omega _n = \frac{{\frac{L}{R} + R_L C + U_d K_{pw} K_{r2} }}{{LC}} \end{aligned}$$
(12)

and

$$\begin{aligned} k_\mathrm{DC} = \frac{{RU_d K_{pw} }}{{R + R_L + RU_d K_{pw} K_{r1} }}. \end{aligned}$$
(13)

Feedback gains \(K_{r1}\) and \(K_{r2}\) were evaluated by using the system’s responses to certain input signals (step signal) as shown in Fig. 3b. The second-order system parameters, the rise time \(t_r\), overshoot \(A_{ov}\) and the steady-state error \(\varepsilon \) can be adjusted by controller gains \(K_{r1}\) and \(K_{r2}\).

Fig. 3
figure 3

Closed-control-loop: a state-space control scheme; b desired closed-loop step response for CCM operation

2.2 The gain \(K_{r1}\) analysis

The gains \(K_{r1}\) and \(K_{r2}\) can be evaluated by means of the prescribed dumping factor D and the natural frequency \(\omega _n\) [26, 30]. However, the criteria used in this case will be altered slightly by the steady-state error and overshooting considerations. The state controller always produces a steady-state error, from (11) to (13) follows:

$$\begin{aligned} \frac{\varepsilon }{u_\mathrm{ref}}= u_\mathrm{ref} - u_{0} \left( \infty \right) = 1-k_\mathrm{DC}, \end{aligned}$$
(14)

using (11) and (14) yields:

$$\begin{aligned}&\varepsilon = \frac{{1 + \frac{{R_L }}{R} + U_d K_{pw} K_{r1} - U_d K_{pw} }}{{1 + \frac{{R_L }}{R} + U_d K_{pw} K_{r1} }}. \end{aligned}$$
(15)
$$\begin{aligned}&{K_{r1}} = \frac{{{U_d}{K_{pw}} - \left( {1 - \varepsilon } \right) \left( {1 + \frac{{{R_L}}}{R}} \right) }}{{\left( {1 - \varepsilon } \right) {U_d}{K_{pw}}}} \end{aligned}$$
(16)

When a stabilised system is established, the load resistance R can change its value from the nominal value \(R_m\) to the open output terminal resistance \(R_M\),Footnote 5 as follows:

$$\begin{aligned} R \in [R_{m},R_{M}] \end{aligned}$$
(17)

whereby the input voltage \(U_d\) is also changeable within the boundaries:Footnote 6

$$\begin{aligned} U_d \in [U_{d_m},U_{d_M}]. \end{aligned}$$
(18)

The steady-state error must be kept within the prescribed area:

$$\begin{aligned} \varepsilon \in [\varepsilon _{m},\varepsilon _{M}]. \end{aligned}$$
(19)

So it follows from (15) that by changing the feedback gain \(K_{r1}\), it is possible to adjust the state variable \(x_1\) to remain within the prescribed area, as it is presented in Fig. 4b. All parameter combinations of the lower and upper limitations of R, \(U_d\), and \(\varepsilon \) as indicated in Table 1 are substituted in (15), whereby obtaining eight values for \(K_{r1_\varepsilon }\). The lower and upper limits of \(K_{r1_\varepsilon }\) are:

Table 1 The limits’ combinations for the set of \(K_{r1_\varepsilon }\) evaluation
Fig. 4
figure 4

Response parameters analysis: a the steady-state error function \((\varepsilon =f(K_{r1_\varepsilon }))\); b the overshoot consideration \((A_{ov}=f(K_{r1_A}))\); c calculation of the set of \(K_{r2} \in (K_{r2_m},K_{r2_M})\)

$$\begin{aligned} K_{r1_{\varepsilon m}}=\min \{K_{r1_{\varepsilon 1}},\ldots , K_{r1_{\varepsilon 8}}\}, \end{aligned}$$
(20)
$$\begin{aligned} K_{r1_{\varepsilon M}}=\max \{K_{r1_{\varepsilon 1}},\ldots , K_{r1_{\varepsilon 8}}\}. \end{aligned}$$
(21)

So the range of \(K_{r1_\varepsilon }\) which will keep the buck-converter output voltage inside the prescribed steady-state error is evaluated by:

$$\begin{aligned} K_{r1_\varepsilon }\in \left[ K_{r1_{\varepsilon m}}, K_{r1_{\varepsilon M}}\right] . \end{aligned}$$
(22)

The calculation (22) was conducted for system parameters as presented in Fig. 4b, where the steady-state error function \(\varepsilon =f(K_{r1_\varepsilon })\) is shown.

The gain \(K_{r1}\) must also be considered by the means of over/under shoot. The unit step response of the system (10) can be evaluated as the inverse Laplace transform as follows:

$$\begin{aligned} u_0(t)={L}^{-1} \left\{ G(s)u_\mathrm{ref}(s)\right\} . \end{aligned}$$
(23)

Assuming that the poles of G(s) (10) are complex, and as follows from [26], the result can be expressed as:

$$\begin{aligned} \left. u_0(t)\right| _{t=t_p}=U_{0_\mathrm{max}}=k_\mathrm{DC}\left( 1+e^{-D\pi /{\sqrt{1-D^{2}}}}\right) u_\mathrm{ref}. \end{aligned}$$
(24)

Therefore, the overshoot can be calculated from (24) and (24):

$$\begin{aligned} A_{ov}=k_\mathrm{DC}e^{-D\pi /{\sqrt{1-D^2}}}. \end{aligned}$$
(25)

By using (13) and (25), this yields:

(26)

In the presented case, it is necessary to define that the output overshoot can have any value between \(2\%\) (\(A_{ov_{m}}\)) to \(4~\%\), (\(A_{ov_{M}}\)):

$$\begin{aligned} A_{ov} \in [A_{ov_{m}},A_{ov_{M}}] \end{aligned}$$
(27)

and the damping factor is \(D=0.7\). The eight values for \(K_{r1_A}\) were obtained based on the parameter combinations shown in Table 2. Their minimal and maximal values are:

Table 2 The limits’ combinations for the set of \(K_{r1_A}\) evaluation
$$\begin{aligned} K_{r1_{Am}}= & {} \min \{K_{r1_{A1}},\ldots , K_{r1_{A8}}\} \end{aligned}$$
(28)
$$\begin{aligned} K_{r1_{AM}}= & {} \max \{K_{r1_{A1}},\ldots , K_{r1_{A8}}\}. \end{aligned}$$
(29)

So the set of \(K_{r1_A}\) is defined as:

$$\begin{aligned} K_{r1_A} \in [K_{r1_{Am}},K_{r1_{AM}}]. \end{aligned}$$
(30)

By using the system parameters’ combination indicated in Table 2 and (25), \(A_{ov}=f(K_{r1_A})\) was evaluated and is shown in Fig. 4c. The whole area of \(K_{r1}\) can be obtained as minimal and maximal values regarding the union of sets (22) and (30), as follows:

$$\begin{aligned} K_{r1_m}= & {} \min \{ \{K_{r1,_\varepsilon }\} \cup \{K_{r1,_A}\}\} \end{aligned}$$
(31)
$$\begin{aligned} K_{r1_M}= & {} \max \{ \{K_{r1,_\varepsilon }\} \cup \{K_{r1,_A}\}\}. \end{aligned}$$
(32)

The set ofFootnote 7 \(K_{r1}\) can be found from (31) and (32) :

$$\begin{aligned} K_{r1}\in \left[ K_{r1_m}, K_{r1_M}\right] . \end{aligned}$$
(33)

Within the members of the set (33), it is possible to find gains which will satisfy the steady-state error and overshoot requirements.

2.3 The gain \(K_{r2}\) analysis

In steady state, the derivative of the converter output voltage is zero. Hence the influence of the \(K_{r2}\) is invisible. This channel becomes active when some changes appear in the state variables. This can be caused by load resistance (R) or by input voltage (\(U_d\)) variation. Using (11) and (12) the \(K_{r2}\) can be evaluated as:

$$\begin{aligned} \begin{array}{rcl} K_{r2} &{}=&{} \frac{1}{{U_d K_{pw} }}\left( {\sqrt{4D^2 LC\left( {1 + \frac{{R_L }}{R} + U_d K_{pw} K_{r1\varepsilon } } \right) } } \right. \\ &{}&{}- \left. {\frac{L}{R} - R_L C} \right) . \end{array}\quad \end{aligned}$$
(34)
Table 3 The limits’ combinations for the set of \(K_{r2}\) evaluation

Based on (34), the limits of \(K_{r2}\) were evaluated by using the parameters’ combination in Table 3. The set of eight values for \(K_{r2}\) were calculated. The lower and upper limits of the set of \(K_{r2}\) were extracted from:

$$\begin{aligned} K_{r2_{m}}= & {} \min \{K_{r2_{1}},\ldots , K_{r2_{8}}\} \end{aligned}$$
(35)
$$\begin{aligned} K_{r2_{M}}= & {} \max \{K_{r2_{1}},\ldots , K_{r2_{8}}\}, \end{aligned}$$
(36)

so the set of \(K_{r2}\) is:

$$\begin{aligned} K_{r2} \in [K_{r2_{m}},K_{r2_{M}}]. \end{aligned}$$
(37)

The \(K_{r2}\) Footnote 8 was calculated from (34) by using the limits (17), (18) and (33). Figure 4d shows the results for a useful range of system parameters.

3 The FLC-GA state controller

The adaptive controller gains can be realised by the fuzzy-logic controllers [9, 10, 32,33,34,35]. The fuzzy-logic control is divided into three sections: Fuzzification, decision-making and defuzzification. During the fuzzification part the input data of \(u_0\) and its derivative \(\mathrm{d}u_0/\mathrm{d}t\) are classified into suitable linguistic values or sets. Based on the control rules and linguistic variable definition a fuzzy control action is derived in the decision section. In the defuzzification section a crisp control action of output \(K_{r1}\) and \(K_{r2}\) is obtained by conversion of inferred fuzzy control. The purpose of the fuzzy adaptation mechanism is to set the FLC initially in such a way that it would adjust the state controller gains \(K_{r1}\) and \(K_{r2}\) continuously based on the input values in order to fulfil the steady-state error (\(\varepsilon \)), overshoot (\(A_{ov}\)) and rise time (\(t_r\)) as the initial requirements. The search of most suitable settings of FLC based on initial requirements was done previously by the GA tuning process. Finally, the most suitable settings of the FLC were prepared for the end-implementation on a real system. A genetic algorithm is no longer used in the process of implementation on hardware .

Fig. 5
figure 5

FLC block diagram: a genetic algorithm tuning of the FLC; b triangular membership function with a reduced number of parameters

3.1 Fuzzy-logic algorithm

In the process of fuzzification the sampled output voltage is used to create two inputs for the FLC: output voltage (\(u_0\)) and its derivative (\(\mathrm{d}u_0/\mathrm{d}t\)). The output voltage difference is used instead of the output voltage derivative:

$$\begin{aligned} \Delta u_0= & {} u_0(t+T_s)-u_0(t)\Rightarrow \frac{\mathrm{d}u_0}{\mathrm{d}t}\approx \frac{\Delta u_0}{T_s} \end{aligned}$$
(38)
$$\begin{aligned} \Delta \tilde{x}_1= & {} x_1(t+T_s)-x_1(t) \end{aligned}$$
(39)

By using this approach, only one A/D converter and one voltage sensor are needed for control purposes. Both output voltage and (\(u_0\)) and derivative (\(\mathrm{d}u_0/\mathrm{d}t\)) are classified into fuzzy levels based on the resolution needed in an application. The input resolution increases with the number of triangular fuzzy sets, or membership functions. For the simulation and implementation, seven sets of input and output membership functionsFootnote 9 were chosen and defined as:

$$\begin{aligned} \mu _{Kr1i}= & {} (NB_{1i}, NM_{1i}, NS_{1i}, ZE_{1i}, PS_{1i}, PM_{1i}, PB_{1i})\\ \mu _{Kr1o}= & {} (NB_{1o}, NM_{1o}, NS_{1o}, ZE_{1o}, PS_{1o}, PM_{1o}, PB_{1o})\\ \mu _{Kr2i}= & {} (NB_{2i}, NM_{2i}, NS_{2i}, ZE_{2i}, PS_{2i}, PM_{2i}, PB_{2i})\\ \mu _{Kr2o}= & {} (NB_{2o}, NM_{2o}, NS_{2o}, ZE_{2o}, PS_{2o}, PM_{2o}, PB_{2o}), \end{aligned}$$

The triangular-shaped membership functions as shown in Fig. 5b are the most simple and efficient sets and were chosen deliberately to ease the GA tuning of the FLC process and final implementation. General knowledge of the converter behaviour is the base to derive the control rules that associate the fuzzy input and fuzzy output as \(K_{rx}=\{K_{r1},K_{r2}\}\)-set. The control rules for the fuzzy-inference system are shown in Table 4. The inferred output of each \(K_{r1}\) and \(K_{r2}\) is a linguistic result, where a defuzzification operation is required to obtain a crisp result. The most suitable way to perform defuzzification also for the implementation is with the centre of gravity method or modified version as presented in [33]. The process of adjusting the input and output of a \(K_{rx}\)-set based on initial system requirements is done by a GA.

Table 4 Fuzzy-logic rule tables

Triangular membership functions were chosen in advance intentionally to use and apply some degrees of membership for the linguistic variable. As with the use of fast processing capability with the FPGA the computational delays have been significantly reduced in the scope of the time fame of switching period. Triangular membership functions that have been used are organised and optimised towards singleton membership function use, but with some degree of membership. With the use of singleton membership functions, additional computational time optimisation could be achieved although some accuracy would be lost with the digitalization which could lead to additional chattering in the output voltage. So no additional computational optimisation was taken into consideration.

3.2 GA tuning process for state-FLC-gains (\(K_{r1}\), \(K_{r2}\))

The GA tuning process of an FLC must be optimised in such a way that several optimisation criteria are taken into consideration, thus enabling fast GA execution, simplification of end-implementation and execution of FLC. In order to satisfy these criteria, both processes have to be adjusted. The general structure of an FLC, tuned by a GA, is shown in Fig. 5a. In order to execute GA, three basic parts have to be defined:

  • The chromosome structure,

  • The fitness function on which parameter selection is determined and

  • The parameters for implementation of the genetic algorithms.

3.2.1 Definitions of chromosome coding

The chromosome was coded with a string of the real-valued membership boundaries of the FLC. The chromosome vector was defined as:

(40)

where elements of the vector are:

$$\begin{aligned} \text{ p }_{i1}= & {} [p1_{i1},p2_{i1},\ldots p7_{i1}],\\\text{ p }_{o1}= & {} [p1_{o1},p2_{o1},\ldots p7_{o1}],\\\text{ p }_{i2}= & {} [p1_{i2},p2_{i2},\ldots p7_{i2}],\\\text{ p }_{o2}= & {} [p1_{o2},p2_{o2},\ldots p7_{o2}]. \end{aligned}$$

Both the input and output parts of fuzzy-systems are set with 28 boundaries although, regarding the fact that the external and middle points are predetermined, the final number of chromosome strings is reduced to 16, as shown in Fig. 5b. Thus, the elements of chromosome vector in (40) are:

$$\begin{aligned} \text{ p }_{i1}= & {} [p2_{i1},p3_{i1},p5_{i1},p6_{i1} ],~\\\text{ p }_{o1}= & {} [p2_{o1},p3_{o1}, p5_{o1},p6_{o1}], \\\text{ p }_{i2}= & {} [p2_{i2},p3_{i2},p5_{i2},p6_{i2} ],~\\\text{ p }_{o2}= & {} [p2_{o2},p3_{o2}, p5_{o2},p6_{o2}]. \end{aligned}$$

The adequate system response to a load or voltage change is estimated through assessment of the fitness function. The fitness function is calculated for each set of membership boundaries of the FLC, as a measure of the controller’s performance. The fitness function for a GA is based on the required dynamic output voltage response to a step-change of the buck-converter’s reference voltage (\(u_\mathrm{ref}\)). The general form of fitness functions is expressed as:

$$\begin{aligned} f_{fit}(i)= & {} g_1 |A_{ov}'-A_{ov}(i)| + g_2|t_r '-t_r (i)|\nonumber \\&+\,g_3 |\varepsilon '-\varepsilon (i)|, \end{aligned}$$
(41)

where “\(\,'\)” denotes the prescribed parameters (overshoot, rising-time and steady-state error, respectively). Index i corresponds with each individual chromosome generated by the GA. The task of the GA is to find the vector (40), which will then minimise the fitness function defined in (41), as follows:

(42)

where \(\mathscr {S}\) is the set of all values for that are defined by the physical properties of the process.

Fig. 6
figure 6

The FLC membership function: a when the chromosome of “best objective function” was applied for \(K_{r1}\) and \(K_{r2}\); \(A'_{ov}=4\%\), \(t_r'= 100\,\upmu \)s, \(\varepsilon '=0\%\); b when the chromosome of “best objective function” was applied for \(K_{r1}\) and \(K_{r2}\); \(A'_{ov}=0\%\), \(t_r'= 100\,\upmu \)s, \(\varepsilon '=0\%\); and nonlinear gains c \(K_{r1}\) and \(K_{r2}\), when \(A'_{ov}=4\%\), \(t_r'= 100\,\upmu \)s, \(\varepsilon '=0\%\) was used (grey lines); and \(K_{r1}\) and \(K_{r2}\), when \(A'=0\%\), \(t_r'= 100\,\upmu \)s, \(\varepsilon '=0\%\) was used (black lines)

3.3 Offline chromosome calculation

The capability and feasibility of adjusting the state controller gains with a GA is demonstrated in this section. The search areas for the gains are defined by analysis of the feedback gains \(K_{r1}\) and \(K_{r2}\) done in Sect. 2. The condition (42) can be reached arbitrarily by using the appropriate fitness function. The GA technique is employed for tuning the membership functions of the FLC. This tuning approach employs the use of MATLAB m-files and functions to manipulate the fuzzy membership boundaries, run the Simulink-based simulation, check the resulting performance and modify the fuzzy system continuously a number of times during the search for adequate responses. The fitness function is evaluated by (41), where the weight factors are chosen equally (\(g_1=g_2=g_3=1/3\)). With the predefined dynamic parameters set as \(A_{ov}'=4\%\), \(t_r'= 100\,\upmu \)s, \(\varepsilon '=0\%\) the GA optimisation algorithm was run over 40 generations with each generation having a population size of 60. The average value of the fitness functions was calculated within every generation. Also, the best objective function was extracted from the set of 60 as the best objective function.

According to (26), the requirement \(A_{ov}=0\) causes \(K_{r1}\) to go towards infinity and such a gain is impossible to apply. The \(A_{ov}'\rightarrow 0\) can also be set as requirement whereby the GA will search for the setting where system response \(A_{ov}\) will be as close as possible to \(A_{ov}'\). So for the fitness function (41), the next presumption can be used:

$$\begin{aligned} |A_{ov}'-A_{ov}(i)|\rightarrow 0, \end{aligned}$$
(43)

which means that no overshoot is allowed during the start-up. Using this condition, the best chromosome was extracted, as in previous cases. The membership functions that correspond to the best chromosome are shown in Fig. 6. The centres of gravity (shaded areas) can be calculated from the arrangement of membership functions, which are indicated by \(K_{r1}\) and \(K_{r2}\), respectively. These can be evaluated for every input voltage (\(u_{o,\mathrm{sense}}\)), and the voltage difference \(\Delta u_0\). For certain operating point (Fig. 6a, b) \(K_{r1}\) and \(K_{r2}\) can be calculated as follows:

$$\begin{aligned} K_{r1}= & {} f(u_{o,\mathrm{sense}})=\frac{\mu _{Kr1a}\cdot p5_{o1}+\mu _{Kr1b}\cdot p6_{o1}}{\mu _{Kr1a}+\mu _{Kr1b}}\\\\\nonumber \\ K_{r2}= & {} f(\Delta u_{o,\mathrm{sense}})=\frac{\mu _{Kr2a}\cdot p3_{o2}+\mu _{Kr2b}\cdot p4_{o2}}{\mu _{Kr2a}+\mu _{Kr2b}}, \nonumber \\ \end{aligned}$$
(44)

where \(\mu _{Kr1a}\), \(\mu _{Kr1b}\), \(\mu _{Kr2a}\) and \(\mu _{Kr2a}\) represent the membership degree and \(p5_{o1}\), \(p6_{o1}\), \(p3_{o2}\) and \(p4_{o2}\) are the membership function centres. The nonlinear functions, for the state controller’s gains, are shown in Fig. 6c. The grey-line curves indicate \(K_{r1}\) and \(K_{r2}\) when \(A_{ov}\le 4\%\) is required and the black-line curves indicate \(K_{r1}\) and \(K_{r2}\) when \(A_{ov}\approx 0\%\) is required. Based on (44), the sets ofFootnote 10 \(K_{r1}\) andFootnote 11 \(K_{r2}\) have now bin modified regarding (33) and (37) as follows:

$$\begin{aligned} K_{r1}\in \left[ K_{r1_m}, K_{r1_M}\right] , \end{aligned}$$
(45)
$$\begin{aligned} K_{r2} \in \left[ K_{r2_{m}},K_{r2_{M}}\right] . \end{aligned}$$
(46)
Fig. 7
figure 7

Pole maps for: a when \(K_{r1}\) and \(K_{r2}\) are evaluated by (33) and (37); b when \(K_{r1}\) and \(K_{r2}\) are evaluated by (45) and (46).

Table 5 Performance metrics’ comparison between conventional and FLC adapted state controllers

3.4 Stability

It is well known from the linear system control theory that the stability of the system is guaranteed if all roots of its characteristic polynomial have a negative real parts. The characteristic polynomial of the state controlled buck converter where the control low is given by (8) can be written straightforward because the system (10) is written in the controllable canonical form:

$$\begin{aligned} Q\left( s \right)= & {} s^2 +\, {\frac{{\frac{L}{R} + R_L C + U_d K_{pw} K_{r2} }}{{LC}}} ~s \nonumber \\&+\, {\frac{{1 + \frac{{R_L }}{R} + U_d K_{pw} K_{r1}}}{{LC}}} \end{aligned}$$
(47)

As already stated, the desired closed-loop system dynamics is given by the prescribed damping factor D and frequency \(\omega _n\), so it can also be written:

$$\begin{aligned} Q_d (s) = s^2 + 2D\omega _n s + \omega _0^2 \end{aligned}$$
(48)

For the state controlled step-down converter that condition is fulfilled if all coefficients of the characteristic polynomial (47) are positive:

$$\begin{aligned}&\frac{{\frac{L}{R} + R_L C + U_d K_{pw} K_{r2}}}{{LC}} > 0 \end{aligned}$$
(49)
$$\begin{aligned}&\frac{{1 + \frac{{R_L }}{R} + U_d K_{pw} K_{r1}}}{{LC}} > 0 \end{aligned}$$
(50)

By rearranging (49) and (50) the conditions for state controller gains can be expressed as:

$$\begin{aligned} K_{r1} > - \left( {\frac{1}{{U_d K_{pw} }} + \frac{{R_L }}{{RU_d K_{pw} }}} \right) \end{aligned}$$
(51)
$$\begin{aligned} K_{r2} > - \left( {\frac{L}{{RU_d K_{pw} }} + \frac{{R_L C}}{{U_d K_{pw} }}} \right) \end{aligned}$$
(52)

Since the expressions in brackets are strictly positive and from analysis in previous sections the sets for gains \(K_{r1}\) and \(K_{r2}\) with strictly positive values have been obtained, it is obvious that the stability of the state controlled step-down converter is also guaranteed in case of its parameters’ variations. Based on the above analysis, the pole mapping was calculated and is shown in Fig. 7a, b. The placement of poles was calculated by considering the limits of sets (33), (37), (45) and (46) where the 16 different pole placement had been obtained for both cases, \(A_{ov}<4\%\) and \(A_{ov}\simeq 0\%\), respectively. Since the poles and zeros were strictly inside the unity circle, the asymptotic stability was guaranteed in both cases.

Fig. 8
figure 8

The output voltage responses when all the aspects of change have been applied \(U_d =U_{d_m},U_d =U_{d_M}\) and R changes to \(R_{m}\rightarrow R_{M} \rightarrow R_{m}\): a conventional state controller; b FLC when \(A_{ov}=4\%\) is demanded; c FLC when \(A_{ov}=0\%\) is demanded

3.5 Comments for GA optimisation

The adaptation of gains \(K_{r1}\) and \(K_{r2}\) by using FLC was first tested by simulation. Figure 8 shows three cases of state controller verification. Figure 8a shows the voltage responses when non-adaptive gains were applied, and Fig. 8b, c shows the voltage responses when FLC was applied with the required overshoot for \(A_{ov}\le 4\%\) and \(A_{ov}\approx 0\%\).

The performance metrics of these results are shown in Table 5. It can be seen from such optimisation of the fuzzy-logic controller that a desirable response performance can be obtained based on a predefined parameter set. When compared to the conventional state controller, the optimised FLC for 4% overshoot shows a comparable performance at the start-up and a better performance at the load change. With further improvements, the FLC is evaluated for 0% overshoot and exhibited a better response at the start-up than at the load change. The result of optimisation showed good performance in terms of achieving the desired overshoot value with small values of steady-state error, even by load changes, which is the main drawback of the conventional state controller.

4 Experimental results and discussion

All the conclusions and suggestions from the state controller analysis led to the implementation of the best results onto the laboratory-built buck converter, supported by the FPGA. Due to the necessity for fast computation, several references regarding FPGA application were considered [4, 6]. The whole FLC-GA algorithm was implemented onto the FPGA Cyclone II-ALTERA. The output voltage \(u_0\) was converted using an analogue–digital (A/D) converter with 8-bit resolution. The control algorithms were written in VERILOG language.

Fig. 9
figure 9

The output voltage (\(u_0\)) response under the input voltage (\(u_d\)) change at the maximal load condition \(R= 3.4\,\Omega \), x axis time 1 ms/div: a \(u_d\) changes from \(15\rightarrow 12\) V, y axis \(u_d\) 5 V/div, \(u_0\) 1 V/div; b \(u_d\) changes from \(9 \rightarrow 12\) V, y axis \(u_d\) 5 V/div, \(u_0\) 1 V/div; c closed-loop response, y axis current 0.5 A/div, voltage 1 V/div; \(u_\mathrm{ref}\) changed \(0\rightarrow 3.3~\rightarrow 5~\mathrm{V}\), and the load changed from \(\infty \rightarrow 6.8~\Omega \); d closed-loop response, y axis current 0.5 A/div, voltage 1 V/div ; \(u_\mathrm{ref}\) changed \(0\rightarrow 5\) V and the load changed from \(6.8~\rightarrow 3.4~ \rightarrow 6.8~\Omega \)

For FLC-GA implementation, the best offline calculated chromosome was chosen, when the \(A_{ov}=0\%\) was required. Figure 9a shows the output voltage response when input voltage was changed from \(15\rightarrow 12\) V and when the input voltage changed from \(9\rightarrow 12\) V, which is shown in Fig. 9b. In both cases the output voltage stayed constant at 5 V, without under- or overshoot.

Table 6 Performance indicators for the FLC-GA with adjustable \(K_{r1}\) and \(K_{r2}\) gains (\(A'_{ov}=0\%\)); experimental results (Fig. 9d)

Figure 9c shows the transient when the reference voltage was changed from 0 to 3.3 V and then to 5 V under no-load condition (\(R \rightarrow \infty \)), and further when a load of \(6.8~\Omega \) was applied. According to the buck-converter’s operational modes, this mode represents the worst case operation. The oscillogram of the operational mode, during the start-up and load change condition, is shown in Fig. 9d. When the reference voltage was changed from 0 to 5 V, the load was \(6.8~\Omega \). At a time-instant of \(t=5\) ms, the load resistance changed to \(3.4~\Omega \). These results were used in order to measure the performance indicators (Table 6).

5 Conclusion

The results presented in this paper show the convenience of applying fuzzy-logic control to DC–DC converter control as an alternative to conventional techniques. Genetic algorithms are a valuable tool for fuzzy controller tuning. An evolutionary strategy was applied to tune the input and output membership functions of a fuzzy controller. This algorithm was run under the MATLAB/genetic algorithm toolbox. The evaluated boundaries of the fuzzy sets function were, afterwards, implemented into the FPGA. The genetic tuning process was able to reduce the overshoots at the start-up and the over/under-shoots at the load change. The nonlinear gains (\(K_{r1}\) and \(K_{r2}\)) were calculated as the centre of gravity, of the chosen input and output membership functions, in real time. The FPGA unit spends 50–140 ns for this task. The presented process of control adaptation is demanding and requires additional skills to tune the process, but all the effort showed promising results by means of reducing the static and output voltage dynamic errors for the used state controller. The experimental set is open for testing other digital nonlinear controllers.