**4. Optimization Strategy**

Let us define an arbitrary optimization problem *φ* as in Equations (37)–(40), given a set of candidate solutions C, a set of solution S⊆C, an objective function *f*(*x*), and *ν* the optimization sense.

$$\phi = \langle \mathcal{C}, \mathcal{S}, \nu, f(\mathbf{x}) \rangle \tag{37}$$

$$\mathcal{C} = \mathbf{x} \quad \text{; } \mathbf{x} = \{ \mathbf{x}\_o, \dots, \mathbf{x}\_n \} \tag{38}$$

$$
\mathcal{S} = \mathfrak{x} \pm \delta \tag{39}
$$

$$\nu = \min \left\{ f(\mathbf{x}) \mid\_{\mathbf{x} \pm \delta} \right\} \tag{40}$$

where *x* corresponds to the system state and *δ* to the variation of the state introduced by the search direction of the optimization strategy.

The implemented optimization strategy is based on the use of the gradient vector *f*(*x*) as search direction for each iteration. Note that the gradient vector is orthogonal to the plane tangent to the contour surfaces of the function to optimize; *f*(*x*) = *g*(*x*)=[ *∂ f ∂ x*1 ... *∂ f ∂ xn* ]*T*. The gradient vector at a point *g*(*xk*) represents the direction of maximum rate of change, which is given by | *g*(*xk*)|

The optimization strategy searches for the point *xk*, where | *g*(*xk*)| ≤ *μg*, given an initial state *xo*; certain convergence parameters *μg* , *μa* , and *μg*; and a normalized search direction *pk*; given Equations (41) and (43)

$$p\_k = -\frac{g(\mathbf{x}\_k)}{|g(\mathbf{x}\_k)|}\tag{41}$$

$$
\pi\_{k+1} = \pi\_k + \mathfrak{a}\,\pi\_k \tag{42}
$$

for some *α* such that satisfies Equation (43)

$$\left| \left| f(\mathbf{x}\_{k+1}) - f(\mathbf{x}\_k) \right| \right| \le \mu\_a + \mu\_r \left| f(\mathbf{x}\_k) \right| \tag{43}$$

The search objective corresponds to the minimum CO2 emissions operating point of the diesel engine, and the function to optimize *f*(*x*), to the diesel engine emissions profile, given a a certain required output power. The result from the optimization problem is used as torque reference for the TFOC electric drive control scheme. Figure 6 shows the algorithm implementation.

**Figure 6.** Gradient-based optimization algorithm structure.
