3.2.2. Fuzzy Adaptive Filter

The fuzzy adaptive filter integrates a fuzzy logic controller with a first-order inertia filter. By using the self-adaptability of the fuzzy controller to automatically adjust the filter coefficient, the output power can be smoothed with the *SOC* in a permissive range. Figure 8 shows the smoothing process based on the fuzzy adaptive filter.

**Figure 7.** Flow chart of adaptive smoothing power following the energy management strategy.

**Figure 8.** Schematic diagram of smoothing power based on the fuzzy adaptive filter.

The variables in Figure 8 can be expressed as

$$
\Delta SOC = SOC - \left( SOC\_{\text{hi}} + SOC\_{\text{lo}} \right) / 2 \,\text{.}\tag{25}
$$

$$P\_{\rm ds}^{\prime} = P\_{\rm ds}(t) - P\_{\rm ds}(t-1),\tag{26}$$

where Δ*SOC* is the deviation of *SOC*; *SOC*hi and *SOC*lo are the high and low threshold value, respectively; *P* ds is the difference of the demand power; and *P*ds is the demand power.

The first-order inertia filter can be developed by

$$P\_{\rm ds}'(t) = \beta P\_{\rm ds}(t) + (1 - \beta)P\_{\rm ds}'(t - 1),\tag{27}$$

where *P*∗ ds is the filtered demand power and β is the filter coefficient.

The *SOC* deviation and the demand power difference are normalized as the fuzzy logic inputs, which can be shown as

$$
\Delta SOC\_{\rm in} = \Delta SOC / \max(\Delta SOC), \tag{28}
$$

$$P\_{\rm ds,in}^{\prime} = P\_{\rm ds}^{\prime} / \max(P\_{\rm ds}^{\prime})\_{\prime} \tag{29}$$

where Δ*SOC*in and *P* ds,in are the normalized *SOC* deviation and demand power difference, respectively.

The degree of membership (DOM) values of input and output variables of the fuzzy logic controller are defined as shown in Figure 9. Because the filter will introduce a delay effect of input signals, the *SOC* deviation is entered here in order to prevent the *SOC* from exceeding its limits. Table 3 shows the fuzzy logic rules in the knowledge base. The basic formulation principle of the rule table is that the demand power is filtered and the *SOC* is kept within the predetermined range as much as possible.

**Figure 9.** Membership function of input and output variables.

**Table 3.** Fuzzy logic rules.


By employing the min-max inference approach of the Mamdani type and the centroid method for defuzzification, the output map of the fuzzy inference system, that is, the fuzzy control table, can be achieved, as shown in Figure 10. The control map is a symmetrical valley type about its center, since the filtering function can be as large as possible within the *SOC* limits when the difference in the demand power and the deviation of *SOC* are opposite in sign.

### 3.2.3. Correctional Optimal Efficiency Map

The module of optimal efficiency control of the genset is the other crucial part of ASPF, as shown in Figure 11. This module takes the demand power of generation and the pressure of the hydraulic pump as inputs to calculate the generator target torque and the engine target speed as outputs. The input mechanical power of the generator can be calculated by

$$P\_{\mathfrak{g,m}} = \frac{P\_{\mathfrak{g}}}{\eta\_{\mathfrak{k}}(T\_{\mathfrak{g,est}}, n\_{\mathfrak{g,est}})},\tag{30}$$

where *P*g,m is the input mechanical power of the generator; *P*g is the generating electric power; *T*g,est and *n*g,est are the estimated torque and speed, respectively; and η<sup>g</sup> is the efficiency interpolation function.

**Figure 10.** Output map of the fuzzy inference system.

**Figure 11.** Control principle of the genset based on the optimal efficiency map.

The optimal efficiency map is the core of this module. The problem of searching the optimal efficiency map can be converted into a problem of searching the optimal curves under different input torques of the hydraulic pump by using Equation (30). The consumed torque of the hydraulic pump can be calculated by Equation (19). Through changing the hydraulic pump torque continuously and searching each optimal efficiency curve of the genset at each torque value, the optimal efficiency map can finally be obtained, as shown in Figure 12.

**Figure 12.** Optimal efficiency map of the genset.

The relationship between the input torque of the generator, the engine torque, and the hydraulic pump torque can be expressed as

$$T\_{\rm g} = T\_{\rm e} - T\_{\rm hp\prime} \tag{31}$$

where *T*g is the input torque of the generator.
