1 Introduction

Passenger vehicles with hybrid powertrains have gained a strong foothold in the automotive industry and can now be seen in the traffic. Scientific research on the potential and benefits of the hybrid vehicles has been very active since the latter half of the 1990s. On the system level, the research typically starts by specifying the system first and then studying the optimal energy management of the hybrid powertrain [1,2,3]. In research that has a wider scope, the focus has moved to the optimal design of hybrid powertrains either by retro-fitting components or by completely re-designing the system. In Ref. [4], the optimal design of a power system in a hybrid electric vehicle (HEV) includes (a) the system topology optimisation, (b) component technology and sizing optimisation, and (c) system control optimisation, all of which should be solved as a nested problem.

The fundamental design principles for hybrid power systems are the same for the marine and automotive industries, but the marine industry typically has less stringent requirements for the control of vessel dynamics and, in many cases, involves a less confined work environment. Hence, rather than using a time-dependent and variant duty cycles, as in the automotive industry, the starting point in a fuel-efficient vessel propulsion system design is typically testing the static operating points in specific sea trials. Such approach is equivalent to designing an efficient hybrid vehicle for only highway speeds, for example. Following the steps taken in the automotive industry, academic studies of hybrid power systems have emerged in the more conservative marine industry. Literature reviews regarding the optimal control and design of hybrid electric boats (HEBs) have been conducted in Refs. [5, 6].

The authors of the current article are developing a design tool called TOpti for the machinery integration designers in the marine industry. To help the engineers compare different system configurations and make the first baseline designs, a fairly low level of detail is used for system modelling. The ultimate goal is to be able to globally optimise the system design as a nested problem, as described in Refs. [4, 7]. Although the current market has commercial simulation softwares with individual component parameter optimisation and control optimisation features, to the authors’ best knowledge, these tools are missing the ability to numerically optimise the topology of the system. To optimise the topology, the energy management optimisation routine, which works at a lower level, must flexibly adapt to the design parameters regarding individual components and the system topology. This means that decisions, that are made automatically by the higher level optimisation routines or manually by the user, affect in the formulation of the energy management optimisation problem.

The current article creates a pathway for authors’ future articles on the design and control optimisation of propulsion systems by describing the energy management optimisation methodology to be used in TOpti. As a case study, energy management was optimised for two machinery designs of a fishing boat. The fuel consumption of a HEB with parallel configuration was compared with a baseline system that had a conventional diesel-mechanical (DM) power system. Improvement in fuel economy with the proposed optimisation method was benchmarked against the results achieved using a widely used dynamic programming (DP) algorithm, hence providing a global optimum. The goal in this article is not to fine-tune the parameters related to the system models, the used energy management strategies or the search algorithms, but rather the goal is to show that the proposed methodology is capable of flexibly optimising the energy management for different system topologies.

The system models for the baseline and hybrid systems are described in Sect. 2, after which the compared optimisation routines are explained in Sect. 3. The results and discussion are presented in Sect. 4.

2 Modelling a fishing boat power system with TOpti

The target in the development of the proposed optimisation tool is to give the system integration engineers the first estimates of which machinery system suits the intended duty cycle the best. In addition, marine vessels typically operate in conditions that have higher time scales compared with, for example, cars. Therefore, a high level of detail in the component modelling is not appraised here. Instead, static component models and averaged duty cycles of quasi-static operating conditions are considered sufficient.

The current article focuses on the energy management optimisation for predefined machinery systems. With TOpti, the user defines the essential components in the power system, such as propellers, diesel engines, gensets, electric propulsion motors, shaft generators, and batteries. The static characteristics of these components, such as nominal size, specific fuel consumption, efficiency, and operating limits, are often available in manufacturer data sheets and the literature. The user also specifies the component topology by defining the links between the components which modes each component can operate in. TOpti then optimises the machinery system usage for a specified duty cycle of the vessel.

A fishing boat was chosen as the target of the current case study; and here, the fuel consumption of two different machinery topologies is compared. A conventional DM topology was chosen to represent a reference system, and this is shown in Fig. 1a. An internal combustion engine (ICE) drives the controllable pitch propeller (CPP) through a reduction gearbox (GB). The electricity consumers (HOTEL/AUX) in the boat are fed by an alternate current (AC) electric grid (E-GRID). The power for the grid is generated in a diesel generator (GEN) and in a shaft generator (SG) when the GB is running in power take-off (PTO) mode.

Fig. 1
figure 1

Studied power system topologies for the fishing boat. a DM. b HEB

Table 1 Machinery specifications

The performance of the reference system is compared with a more complex parallel hybrid system. The main components in the HEB, as shown in Fig. 1b, were kept the same as in the baseline system. An energy storage system (ESS) is connected to the electric grid, and the SG is bi-directional, meaning that it can also draw power from the electric grid to power the propeller alone or together with the ICE. Table 1 shows the main specifications for the machinery.

Although only two example topologies are studied, the user can also create topologies for diesel-electric (DE), combined diesel-electric, and diesel-mechanical (CODED) configurations or only study the propulsion system or electric grid alone.

The propeller was modelled with Wageningen B-series propeller characteristics (Fig. 2). Third-order polynomial coefficients were fitted to describe the thrust and torque coefficients as a function of the advance number J (\(K_T\) and \(K_Q\), respectively, in Eqs. 1a and 1b). The equations for the thrust generated by propeller T and for the torque affecting propeller shaft Q are shown in Eqs. 1c and 1d, respectively. The resistance, R, which is affecting the vessel body as it moves in the water, is modelled as \(R=C_R \cdot V^k\), where \(C_R\) is the resistance coefficient, V is the vessel velocity, and k is the integer exponent for velocity. By setting \(T=R\) in the equilibrium point and excluding the wake deduction at the propeller inlet flow, the open water efficiency of the propeller, \(\eta _{o}\), can be defined as a ratio of the towing power and the input power of the propeller (Eq. 1e). The operating point of the propeller is solved using Eqs. 1a1e by interpolating between the fitted propeller curves. Water density is \(\rho =1020\,{\text {kg}}/{\text {m}}^{3}\), the rotational speed of the propeller is \(n=153\,{\text {rpm}}\) and the propeller diameter is \(D=4.5 {\text {m}}\):

$$\begin{aligned} K_{T} = c_{T0} + c_{T1} \cdot J + c_{T2} \cdot J^2 + c_{T3} \cdot J^3, \end{aligned}$$
(1a)
$$\begin{aligned} K_{Q} = c_{Q0} + c_{Q1} \cdot J + c_{Q2} \cdot J^2 + c_{Q3} \cdot J^3, \end{aligned}$$
(1b)
$$\begin{aligned} T = K_{T} \cdot \rho \cdot n^2 \cdot D^4, \end{aligned}$$
(1c)
$$\begin{aligned} Q = K_{Q} \cdot \rho \cdot n^2 \cdot D^5, \end{aligned}$$
(1d)
$$\begin{aligned} \eta _{o} = \frac{R \cdot V}{Q \cdot 2\pi \cdot n}. \end{aligned}$$
(1e)
Fig. 2
figure 2

Characteristic curves of the CPP

The gearbox has two symmetrical shafts for the ICE and the SG, and the propeller is connected to the gearbox output with a reducing gear ratio of 4.9:1. A constant efficiency of 98% is used to model losses in each gear contact pair. The ICE and the combustion unit of the GEN are modelled with the static fuel consumption maps, as shown in Fig. 3. Both units are considered as four-stroke engines with constant speeds of 750 rpm and 1200 rpm, respectively. The generator unit in the GEN and the SG are both also modelled with the static efficiency maps, as shown in Fig. 3. For simplicity, the efficiency map of the SG also includes the losses of the variable frequency drive unit and the distribution losses to and from the AC grid.

Fig. 3
figure 3

Static efficiency maps of the main components

The ESS includes a lithium-ion battery pack and an inverter unit to control the current between the direct current (DC) within the battery pack and the AC grid. The available energy inside the ESS, which is typically referred to as the state of charge (SOC, see Eq. 2), is calculated from the initial level, \({\text {SOC}}_{0}\), and the change in stored energy using a simple Euler approximation of the time integral over instantaneous power. In quasi-static calculations, complex models of battery chemistry, thermal effects, and inverter power electronics are not relevant; therefore, the ESS efficiency, \(\eta _{{\text {ESS}}}\), is modelled using a constant value, and it presents a simplified and lumped efficiency for the battery pack, DC–AC converter and the distribution losses to and from the AC grid. The simple efficiency model is accurate enough as long as the allowed SOC limits are chosen within a range, where the battery characteristics are sufficiently linear. The Euler approximation is accomplished over the instantaneous time step length, \(\varDelta t\), and scaled to the nominal capacity of the battery, \(E_{{\text {nom}}}\). The instantaneous charging and discharging power, \(P_{{\text {ESS}}}\), are limited to 1400 kW, which is equivalent to a C rate of 2 C:

$$\begin{gathered} {\text{SOC}} = {\text{SOC}}_{0} - \frac{{\eta _{{{\text{ESS}}}} \cdot P_{{{\text{ESS}}}} \cdot \Delta t}}{{E_{{{\text{nom}}}} }}\cdot100\% \hfill \\ {\text{where}}\quad \eta _{{{\text{ESS}}}} = \left\{ {\begin{array}{*{20}l} {0.94} \hfill & {\quad {\text{charging}}} \hfill \\ {0.94^{{ - 1}} } \hfill & {\quad {\text{discharging}}.} \hfill \\ \end{array} } \right. \hfill \\ \end{gathered}$$
(2)

In the absence of standardised test cycles for fishing boats, a duty cycle is generated based on the two main operating modes of a trawler: trawling at a low speed and high resistance and a transit mode at a high speed and low resistance. In addition to these two modes, zero propulsion and low-speed transit modes are included. The duty cycle, shown in Fig. 4, defines the vessel velocity, V, vessel resistance coefficient, \(C_R\), and the power demand of HOTEL/AUX during the voyage. The duty cycle is applied for all the studied cases, regardless of machinery topology or optimisation algorithm. To simulate the optimal energy management of the system, a time step of 0.05 hours was used. To showcase the capabilities of the optimisation methodology, two different machinery shut-off strategies are simulated. In the first one, the ICE was only allowed to turn off at a zero propulsion period at the 2.5–3 h mark and in a low-speed transit period at the 4.5–5 h mark. GEN, however, was required to idle as a spinning reserve throughout the duty cycle for safety reasons. The second shut-off strategy allowed both the ICE and the GEN to shut off at any time if they were not loaded. The propeller speed was kept at a constant value of 153 rpm.

Fig. 4
figure 4

Quasi-static duty cycle for the simulated fishing boat

Rather than focusing on the accurate modelling of individual components, the focus of the current article is on describing the energy management optimisation methodology. Therefore, the parameters for the individual component models were not validated using measurements. Instead, reasonably chosen static model parameters were considered sufficient. Although dynamic load conditions are not modelled and studied, we acknowledge their effects and importance. The future development plans for TOpti include scaling factor maps for the static efficiency maps of combustion units and electric machines. This enables the possibility of studying the relative effects emerging from dynamic loads, such as wave or wind loads.

3 Optimisation problem

In the DM reference case, the propeller has a single power source feeding it. The electric grid, however, has two power sources: a GEN and an ICE, which is connected to the grid through the SG. The following question arises with parallel power sources: how can we most efficiently combine power production from the different sources? With the hybrid power system, this question is even more complex, because the propeller can now also be powered with the SG, and the addition of an ESS offers another power source to the electric grid. With a finite energy capacity, the ESS also introduces a time-dependent element to the question: When is it best to charge or discharge the battery? Next, the optimisation methods are described, and the optimisation problems are formulated.

3.1 Using the best of both worlds from local and global optimisation

Gradient-based algorithms are efficient as the search progresses towards the direction of the fastest change in the objective function. However, numeric problems emerge when the algorithm tries to define a gradient for discontinuities in the search space. In addition, gradient-based methods can only find a local optimum. If the search space is non-convex or too flat, the algorithm may converge to a local optimum, failing to find the global optimum.

To benefit from the effectiveness of a gradient-based algorithm and to prevent problems caused by gradient discontinuities, the authors applied a combination of a discrete mode layer and a local layer in the optimisation method. In short, the mode layer defines the direction for the power from each component, and the local layer finds the magnitude of the power. One way to view this is that the mode layer splits the overall search space into smaller sub-spaces, and each sub-space is then processed in the local layer using a local optimisation algorithm. A block diagram of the optimisation routine is shown in Fig. 5. Next, we look at the how the mode layer works.

Fig. 5
figure 5

Block diagram for the LT optimisation methodology

In Ref. [8], the fuel consumption of a hybrid electric tugboat was studied. Two objective functions were formulated for the discrete operating modes: one for the mode, where the ESS was charged with the electric motor in generator mode and one objective function for the discharging mode, where the electric motor worked in motoring mode and delivered power from the ESS to the gearbox. The lower of the two objective function’s minima was chosen to represent the minimum. We recognised the benefits of the approach in Ref. [8] and wanted to create a solution that automatically adjusts the problem formulation according to a generic system topology. Combining the approach of Ref. [8] with the combinatory control principle used in digital hydraulics in Ref. [9], a mode space for all possible mode combinations in a studied topology is created.

For the code to automatically create these combinations, the user must define an array of possible discrete operating modes for each component in the system. For example, for a diesel engine, the modes are inactive or active, and the discrete values for these would be 0 and 1, respectively. For electric motors or SGs, the possible modes would be motor or generate at − 1 and 1, respectively. Electric components also have an inactive mode, which marked with 0, to prevent numeric problems around discontinuities in the optimisation surface, something that may occur close to the zero usage region. For the DM, the mode space is smaller compared with the HEB, because it does not have the battery, and the SG can only operate in generating and inactive modes, whereas in the HEB, the SG can also work in motoring mode.

Then, a Cartesian product from the component-specific mode arrays generates an array of all the possible component mode combinations. In this two-dimensional mode array, each column represents a mode for the whole system, and within a column, each element describes the mode for an individual component. Figure 6 shows the Cartesian combination array for the HEB topology and highlights three examples of system modes. Mode #3, for example, represents a pure battery drive mode, where the ESS supplies power to both the propeller and the HOTEL/AUX, while the ICE and GEN are inactive.

Fig. 6
figure 6

Three example modes for the HEB from a Cartesian array of possible mode combinations

Before the search moves to process these independent system modes with a local optimisation algorithm, any infeasible modes are filtered out. This means that for each instantaneous time step in the duty cycle, a pre-processor checks which modes can guarantee that power can be supplied to the power consumers. An example of an infeasible mode is when a power consumer, such as a propeller, requests power, but all the possible sources are in inactive mode. This is done by first checking that there are active power sources available to feed the consumers. If a given mode passes this availability check, a coarse check is made to ensure that the active power sources have enough capacity to meet the power request within this mode.

After filtration, the optimisation routine moves from the discrete mode layer to the local optimisation layer. Here, a constrained optimisation problem is formulated for each feasible mode combination. A free and open-source optimisation package called NLopt in Ref. [10] was used for this purpose. A gradient-free algorithm for constrained problems, constrained optimisation by linear approximations (COBYLA), was used. In short, the algorithm creates successive linear approximations of the objective function and constraints via a simplex of N + 1 points (in N dimensions). Then, for each step, it optimises the approximations in a trust region. A more detailed description of the algorithm can be found in Ref. [11]. The numerical implementation allows for using inequality constraint equations, and because COBYLA is a gradient-free algorithm, it estimates the gradient when the user does not provide it. The algorithm also supports boundaries for the optimisation variables.

This two-layer power management optimisation methodology processes the duty cycle from beginning to end in discrete time steps and makes decisions pertaining to optimal power management only based on the current state of the system. Hence, it is here referred to as a local time (LT) method. Because the decision is made instantaneously without knowing the duty cycle a priori, the LT strategy is easier to implement for online control compared with a DP algorithm.

The novelty of the proposed two-layer method is its capability to automatically formulate the energy management optimisation problem according to the specified power system topology. Because the discrete mode layer splits the overall search space into smaller sub-spaces with fewer discontinuities, the ability to find the global optimum using a gradient-based algorithm is increased. Depending on component specifications, which are made by the user, these sub-spaces may still be non-convex and, therefore, not ideal for gradient-based algorithms. To prevent possible problems from using a gradient-based algorithm with non-convex sub-spaces, the LT method scatters a number of starting points for the search algorithm in each sub-space.

Open-source optimisation libraries also offer global algorithms. For instance, the selection of global algorithms in NLopt includes the dividing rectangles algorithm and the improved stochastic ranking evolutionary strategy algorithm. However, the minimal tuning effort required in the gradient-based algorithm and the fast convergence to a local optimum favoured the use of COBYLA in the proposed LT method. Although the use of the above-mentioned global algorithms are not studied in the present article, they are available for use in TOpti.

After all the feasible modes are processed in the local layer, the mode with the lowest objective function output is chosen to represent the optimum control of the system for this time step. This way, the code goes through all the time steps in the duty cycle.

3.1.1 Setting objectives for the gradient-based optimisation

In the current article, the main objective was to minimise the fuel consumption of the machinery. A secondary target, although not controlled by the feedback systems, was to start and end the simulation cycle for the HEB with a full battery. Because the use of shore power was also excluded from the study, the energy management optimisation focused only on improving the operating points of the on-board power sources.

In TOpti, the optimisation variables are set according to the machinery components. To ensure the genericity of the methodology, each component adds one variable to the problem, and this variable is the instantaneous output power of the component. This way, the problem formulation is directly scaled up or down directly according to defined topology. For the cases studied in the current article, the reference DM system has three variables: \(P_{{\text {ICE}}}\), \(P_{{\text {SG}}}\) and \(P_{{\text {GEN}}}\). For the HEB, the variables are \(P_{{\text {ICE}}}\), \(P_{{\text {SG}}}\), \(P_{{\text {GEN}}}\) and \(P_{{\text {ESS}}}\). In the literature, the problem dimension is often reduced using a power split ratio in the gearbox instead of, for example, setting the ICE load and the SG load as individual variables. We recognise the drawback of the increased computational load, which comes from having redundant variables in the optimisation problem. Because the aim was to create a methodology for optimising energy management in generic machinery topologies, improved flexibility for user-defined system topologies can be gained with the proposed way.

For the reference DM system, the objective function has a single element: the total fuel consumption rate of all the fuel consumers in (g/h) (Eq. 3). The brake-specific fuel consumption (BSFC) of each combustion unit at a given operating point power, \(P_{{\text {fc}}_{i}}\), is interpolated from the static consumption map:

$$\begin{aligned} {\text {minimise}} \quad \sum _{i = 0}^{1} ({\text {BSFC}}_{{\text {fc}}_{i}}(P_{{\text {fc}}_{i}}) \cdot P_{{\text {fc}}_{i}}) \quad {\text {where}} \quad {\text {fc}}_{i} = [{\text {ICE}}, {\text {GEN}}]. \end{aligned}$$
(3)

In studies related to HEVs, an equivalent consumption minimisation strategy (ECMS) is often used in online optimisation [12]. The objective function in an ECMS has two elements, as shown in Eq. 4. The first is the same as in Eq. 3 and describes the real fuel consumption in the system. In an ECMS, the power discharged from the battery is not considered as being free, which gives this strategy its charge-sustaining nature. To sustain the charge level, the energy used from the battery should be recharged later by converting combustion energy to electric power in a generator. Therefore, the objective function also includes a virtual fuel cost for battery energy, \(\dot{m}_{{\text {eq}}}\), which is shown in Eq. 5. There, s considers losses in the charging and discharging of the ESS, including the internal battery losses, the DC–AC conversion losses in the battery driver, and conversion losses from mechanical energy to electric energy in a generator. \({\text {BSFC}}_{{\text {eq}}}\) sets a reference value for the virtual fuel consumption. These parameters could be mapped according to different operating modes and conditions, where the ESS is utilised in the system, but the approaches in Refs. [13, 14] with only one or two parameter pairs for s and \({\text {BSFC}}_{{\text {eq}}}\) have also shown improvement in fuel efficiency. In Ref. [13], the author explains that equivalent fuel consumption could be mapped for multiple operating points in the system and both energy directions in the ESS:

$$\begin{aligned}&{\text {minimise}} \quad \sum _{i=0}^{1} ({\text {BSFC}}_{{\text {fc}}_{i}}(P_{{\text {fc}}_{i}}) \cdot P_{{\text {fc}}_{i}}) + \dot{m}_{{\text {eq}}} \quad {\text {where}} \quad {\text {fc}}_{i} = [{\text {ICE}}, {\text {GEN}}], \end{aligned}$$
(4)
$$\begin{aligned}&\dot{m}_{{\text {eq}}} = s \cdot {\text {BSFC}}_{{\text {eq}}} \cdot P_{{\text {ESS}}}. \end{aligned}$$
(5)

It should be noted that the HEB in the current study has two possible power sources for recharging the ESS: either directly supplying the grid from the GEN or from the ICE and through the gearbox in PTO mode. In addition, the power taken from the ESS can be consumed in both the propeller and HOTEL/AUX. Therefore, mapping the tuning parameters for all modes and operating conditions would increase the complexity of the method. A compromise was made using a pair of constant parameters. This simplifies the approach and suits the purpose of demonstrating the optimisation methodology.

In general, if the equivalent fuel cost of the ESS is tuned too low, the strategy depletes the ESS, because the energy in the ESS is considered cheaper than energy in combustion units. A value that is too high will discourage battery use because of high recharge costs. Therefore, the potential benefits of the ESS will be missed during the duty cycle. An ECMS was used for the energy management in the HEB when an LT methodology was used.

ECMS tuning was made based on the component efficiencies in the power conversion line from the ICE to ESS: the overall peak efficiency is better mainly because of the better fuel economy of the ICE compared with the GEN, even though additional transfer and conversion losses occur at the gearbox and SG. Thus, the reference factor for equivalent consumption was chosen as the peak efficiency of the ICE, \({\text {BSFC}}_{{\text {eq}}} = 182\,{\text {g}}/{\text {kWh}}\), and the conversion factor was tuned according to the peak efficiencies in the power conversion line from the ICE to ESS, \(s = 1.15\). With this tuning, the initial SOC level was sustained at the end of the duty cycle, and fuel efficiency was improved compared with the reference DM case, as later shown in Sect. 4. It must be noted that using an ECMS does not have a feedback controller to maintain a specified SOC level in the ESS. The SOC depends on \(P_{{\text {ESS}}}\) according to Eq. 2, where \(P_{{\text {ESS}}}\) is an optimisation variable that is controlled by the optimisation algorithm.

The code reduces the dimension of the local sub-spaces according to the processed mode combination. Only the active components are attended the optimisation problem as variables, whereas the inactive components are presented as static elements. For example, when a mode combination assigns the ICE to run in inactive mode, \(P_{{\text {ICE}}}\) is not added as a variable for the local COBYLA algorithm; instead, an idle consumption rate or zero consumption from engine shut-off, according to the user’s specification, replaces the fuel consumption rate in the objective function.

3.1.2 Constraining the problem

Constraint functions are defined to ensure that the required duty cycle is completed and to make sure that the allowed battery SOC limits are not exceeded. The propeller equations convert the requested duty cycle in to propeller power demand, \(P_{{\text {prop}},t}\), at a time instant t. This must be supplied with the power of the machines attached to the propeller gearbox input shafts, as described in Eq. 6. Because the optimisation variables represent the output power of the component, the gear contact efficiency, \(\eta _{{\text {GB}}}\), depends on the component’s operating mode. For the ICE, the gear efficiency is a constant 0.98. For the SG, it is 0.98 if it is motoring and \(0.98^{-1}\) if it is generating. The conversion efficiency, \(\eta _{{\text {conv}}}\), describes the lumped electrical-to-mechanical conversion losses and the distribution losses, as explained in Sect. 2. For the SG, it is interpolated from the efficiency map, as shown in Fig. 3. For the constraint equations, this conversion efficiency is piecewise defined based on the operating mode, because the variable \(P_{{\text {SG}}}\) describes the output power of the SG. This does not mean that the SG operates without losses in motoring mode, but rather that the internal conversion losses are pulled out of the electric grid, which is shown in Eq. 7. Here, the negative sign simply ensures that the summation on the right-hand side of gearbox power equilibrium is correctly formulated according to the operating mode of the SG.

Similarly, Eq. 7 is set to make sure that the requested load \(P_{{\text {hotel}},t}\) is supplied with the machinery in the electric grid. The electric output power from the GEN after conversion losses equals \(P_{{\text {GEN}}} \cdot \eta _{{\text {conv}}_{{\text {GEN}}}}\). The conversion losses in the SG, \(\eta _{{\text {conv}}_{{\text {SG}}}}\), in electric grid, are opposite from those of the gearbox.

The constraint functions for the DM topology and the HEB have two differences. The first is that in the DM, the SG does not work in motoring mode. The second difference is that in the HEB, the battery pack power \(P_{{\text {ESS}}}\) is appended to the energy balance calculation in Eq. 7.

The battery SOC needs to be maintained between the specified limits for the reasons stated in Sect. 2. Therefore, Eq. 8 is applied to the optimisation problem. The component operating power limits are maintained in the LT by defining the optimisation variable boundaries for the solver:

$$\begin{aligned}&\begin{aligned} P_{{\text {prop}},t} = P_{{\text {ICE}}} \cdot \eta _{{\text {GB}}_{{\text {ICE}}}} - P_{{\text {SG}}} \cdot \eta _{{\text {GB}}_{{\text {SG}}}} \cdot \eta _{{\text {conv}}_{{\text {SG}}}} \\ {\text {where}} \quad \eta _{{\text {GB}}_{{\text {SG}}}} = \left\{ \begin{array}{ll} 0.98 &{} \quad {\text {motoring}} \\ 0.98^{-1} &{} \quad {\text {generating}} \end{array} \right. \\ {\text {and}} \quad \eta _{{\text {conv}}_{{\text {SG}}}} = \left\{ \begin{array}{ll} -1 &{} \quad {\text {motoring}} \\ \eta _{{\text {SG}}}(P_{{\text {SG}}})^{-1} &{} \quad {\text {generating}}, \end{array} \right. \end{aligned} \end{aligned}$$
(6)
$$\begin{aligned}&\begin{aligned} \begin{array}{ll} P_{{\text {hotel}},t} = P_{{\text {GEN}}} \cdot \eta _{{\text {conv}}_{{\text {GEN}}}} - P_{{\text {SG}}} \cdot \eta _{{\text {conv}}_{{\text {SG}}}} &{} \quad ({\text {DM}}) \\ P_{{\text {hotel}},t} = P_{{\text {GEN}}} \cdot \eta _{{\text {conv}}_{{\text {GEN}}}} - P_{{\text {SG}}} \cdot \eta _{{\text {conv}}_{{\text {SG}}}} + P_{{\text {ESS}}} &{} \quad ({\text {HEB}}) \end{array} \\ {\text {where}} \quad \eta _{{\text {conv}}_{{\text {SG}}}} = \left\{ \begin{array}{ll} \eta _{{\text {SG}}}(P_{{\text {SG}}})^{-1} &{} \quad {\text {motoring}} \\ -1 &{} \quad {\text {generating}} \end{array} \right. \\ {\text {and}} \quad \left\{ \begin{array}{ll} P_{{\text {ESS}}} \ge &{} \quad {\text {charging}} \\ P_{{\text {ESS}}} \le &{} \quad {\text {discharging}}, \end{array} \right. \end{aligned} \end{aligned}$$
(7)
$$\begin{aligned}&40\% \le {\text {SOC}} \le 70\%. \end{aligned}$$
(8)

COBYLA supports the use optimisation variable boundaries. For the simulations in the current article, a \([0,{\text {MCR}}]\) boundary was set for each variable, where the MCR levels of each component can be seen in Table 1.

3.2 Benchmarking with the DP

DP algorithms are based on Bellman’s principle of optimality [15] and are a widely used method for numerical optimisation. These types of algorithms find the global optimum in the solution space and are suitable for non-linear systems with discontinuities, such as the marine vessel power system used in current study. Examples of using DP power management optimisation in HEVs can be found in Refs. [7, 16]. The downsides of DP algorithms is that the problem needs to be discretised. Furthermore, because of similarities with brute-force algorithms, the computational load suffers from the curse of dimensionality, which means that the computational load increases exponentially as the number of optimisation variables increases. Because the DP is suitable and a well utilised for control optimisation problems, it is adopted for the algorithm selection of TOpti.

In the present article, a backwards DP algorithm was used as a benchmark algorithm against the authors’ own implementation. An adaptation of an open-source DP algorithm called prodyn was used. This algorithm is written in Python and is available in GitHub [17]. The changes made to this algorithm involved the internal structure and data types. Part of the internal for-loops in the original code were replaced with array structures to allow for more efficient number-crunching. The original DataFrame-type array structures in the main loop were replaced with numpy-type arrays for their smaller memory usage.

In the current study, the non-causal backwards-stepping DP algorithm is only used for the HEB, because the reference DM system does not have time-dependent states, such as the SOC level of the battery. The DP algorithm knows the duty cycle a priori; therefore, the objective function in Eq. (3) can be used together with the HEB constraints set in Eqs. 6, 7 and 8. The discretisation of the system control is done for the fuel-consuming components ICE and GEN, as shown in Eq. 9. A Cartesian product of all possible discrete control combinations is generated from the member arrays, \(u_{{\text {member}}}\), in Eq. 9, and each control combination is studied for every time step and state of the discrete search space. The use of other components, the SG and ESS, are solved from the instantaneous loads \(P_{{\text {prop}},t}\), \(P_{{\text {hotel}},t}\) and the discretised controls of the ICE and GEN, as shown in Eqs. 10 and 11.

This way, the number of optimisation variables is reduced to two instead of four if the variable assignment is used as in the LT method. This is crucial for problems that suffer from the curse of dimensionality. The reason for choosing \(P_{{\text {ICE}}}\) and \(P_{{\text {GEN}}}\) as the subjects of discretisation is that they are the components affecting in the objective function, as shown in Eq. 3. In addition, by discretising the loads of the fuel consumers, we can ensure that the zero-load operating points (idle or shut-off) are studied for each fuel consumer. Battery SOC was chosen to represent the system state, \(x_{t}\), and it was discretised with steps of 0.02% between the allowed SOC limits:

$$\begin{aligned}&u_{{\text {member}}} = \left\{ \begin{array}{ll} P_{{\text {ICE}}} = [0\%, 0.1\%, .. , 99.9\%, 100\%] \cdot 3480\,{\text {kW}} \\ P_{{\text {GEN}}} = [0\%, 0.1 \%, .. , 99.9\%, 100\%] \cdot 1665\,{\text {kW}}, \\ \end{array} \right. \end{aligned}$$
(9)
$$\begin{aligned}&P_{{\text {SG}}} = \frac{P_{{\text {prop}},t} - P_{{\text {ICE}}} \times \eta _{{\text {GB}}_{{\text {ICE}}}}}{\eta _{{\text {conv}}_{{\text {GB}},{\text {SG}}}}}, \end{aligned}$$
(10)
$$\begin{aligned}&P_{{\text {ESS}}} = P_{{\text {hotel}},t} - P_{{\text {GEN}}} \times \eta _{{\text {conv}}_{{\text {GEN}}}} - P_{{\text {SG}}} \times \eta _{{\text {conv}}_{{\text {SG}}}}. \end{aligned}$$
(11)

To force the final SOC value to the same level as in the beginning of the duty cycle, a negative cost of − 1000 is set for \(x_{N,70\%}\), while the other final states have zero cost. For violations of the constraints presented in Sect. 3.1.2, the DP adds a penalty of 1000 to the objective function cost.

4 Results and discussion

This chapter presents the simulation results for the studied systems over the duty cycle, as shown in Fig. 4. First, the optimal usage of fishing boat machinery is studied with a shut-off strategy, which requires the GEN to run as a spinning reserve all the time. The ICE is allowed to shut down during 2.5–3.0 h and 4.5–5.0 h periods, which are the zero propulsion and the low-speed transit periods, respectively. Figure 7 shows the results for the three cases: the reference DM system (refDM), HEB system with LT optimisation (HEB_LT), and HEB system with DP optimisation (HEB_DP). The vessel operating points in Fig. 4 are first converted to propeller loads, as explained in Sect. 2. The propeller and hotel loads, which are shown in Fig. 7a, are same in all cases, because the propeller is run at a fixed speed after departure. Figure 7b–e shows the usage for each component when the fuel consumption of the machinery is optimised to the system loads, as shown in Fig. 7a. Finally, Fig. 7f shows the state of charge in the ESS. For the SG, the positive value in Fig. 7c means that it works in generating mode, and the negative value means that it works in a motoring mode. For the ESS, the positive value in Fig. 7e means that it is discharging, and the negative value means that it is charging.

Fig. 7
figure 7

Top: propeller and hotel loads, middle four: optimised component usage, bottom: battery SOC during voyage

In the refDM system, the propulsion load can only be supplied with the ICE, but the HOTEL/AUX load can be supplied from multiple sources. Therefore, the optimisation question is whether to feed the HOTEL/AUX request from the GEN, the SG or a combination of both. The results highlight three findings for refDM. First, because the SG can only work in generating mode, the ICE is always active when the propeller requires power. Second, because of its better BSFC characteristics, the ICE also supplies the E-GRID in PTO mode during transit phases at the beginning and end of the cycle. In Fig. 7, the pure PTO mode can be seen as a positive value in the SG load in Fig. 7c and that the GEN load is zero in Fig. 7d. Because of a higher load, the operating point of the ICE is improved, and the decreased fuel consumption now overcomes the expenses of an idling GEN and the additional transfer losses in the gearbox. During the transit phase between 4.5 and 5.0 h, however, both the propulsion and HOTEL/AUX loads are so low, that the PTO mode becomes more expensive compared with the shown optimum, where the ICE supplies the propeller load and the GEN supplies the HOTEL/AUX load, while the SG is inactive. In addition to the low transit period, the GEN supplies the grid during zero and heavy propulsion, either alone or as a sidekick when the PTO mode alone is insufficient. During a zero propulsion interval at the 2.5–3 h mark, the small hotel load and the permission to shut off the ICE favour the use of the GEN. As the third remark, the fairly low level of usage over the whole cycle shows that the chosen SG is too big for the DM topology for this duty cycle.

For the HEB, the results using the LT methodology are discussed first. The ESS starts with 70% capacity, and with the chosen ECMS parameters, the duty cycle ends with the initial 70% capacity. The first remark on the results is that the ESS is discharged (positive value in Fig. 7e) during heavy loads and recharged (negative value in Fig. 7e) when loads decrease and diesel-powered machinery have power reserves. The discharge power of the ESS is fairly low in Fig. 7e, which is a result of the machinery running close to their peak efficiency under high loads. This load levelling behaviour mainly affects the GEN usage. For instance, the ESS discharge between 1.0 and 2.5 h mark and the following recharge keeps the GEN operating at its peak efficiency. Excluding the time period between 4.0 and 5.0 h, the ESS does not have much influence on the usage of the ICE. This is a result of fairly high propulsion load, better fuel consumption characteristics compared with the GEN and, finally, due to energy conversion losses in the SG. Electric propulsion is only used during the low propulsion request at the 4.5–5.0 h mark. Even then, the battery is not utilised, but rather, the propulsion is powered from the GEN. The fairly low level of SG usage shows that it could be downsized in the HEB, as well to operate it at a higher efficiency.

HEB_DP in Fig. 7 shows the global optimum, which is found using the DP algorithm. The discretisation of the DP search grid appears to be feasible, because the forward simulation with the optimal trajectory does not violate the defined SOC limits, and the final SOC value is only 1.5% below the target value of 70%. As with the LT, the battery is drained under a heavy load and charged when fuel consumers have power reserves under low loads. The global optimum over the known future is found at the trajectory, which spreads the ESS usage over wider spans with lower recharging power and longer discharging segments. The DP algorithm shows that the ESS is best used for load levelling the GEN under heavy loads, while the ICE load is not influenced much. The SG is now only used in generating mode throughout the duty cycle. The most important outcome of this benchmarking is that, at a larger scale, the machinery usage is in line with the LT and DP methods.

Figure 8 shows the cumulative fuel consumption of the reference case and the cumulative difference in the fuel consumption of other cases against the reference DM system. Figure 8 shows a better view of the fuel savings that accumulate because of the battery usage in every charge–discharge cycle. The negative values in the lower graph in Fig. 8 indicate that the system has used less fuel compared with the reference case. This difference can increase instantaneously, but the final value should be negative to gain fuel savings over the duty cycle. Figure 8 shows that the hybrid system with a battery brings only a minimal improvement in fuel economy over the studied duty cycle. The idle fuel consumption of the spinning reserve and the losses in energy conversion are hard to compensate with load levelling in the power sources.

Fig. 8
figure 8

Top: cumulative fuel consumption of the reference system, bottom: cumulative fuel savings between the HEB and the reference DM system

Having spinning reserves on-board might not be a practical requirement when operating a fishing boat. Next, the same three simulation cases were studied, but this time, the ICE and GEN were allowed to shut off at any time in the studied duty cycle (the cases use notations ‘refDM_shut-off’, ‘HEB_LT_shut-off’‘, and ‘HEB_DP_shut-off’). Figure 9 shows the results for the three cases with the new shut-off strategy.

For DM topology with the new shut-off strategy, the only difference in optimal load shares between the components occurs during the low-speed transit phase from 4.5 to 5.0 h, where the pure PTO mode is now less expensive than the load shares, as shown in Fig. 7. Because the idle fuel consumption of the GEN does not add to the overall cost, the optimum is found for the system mode, where the GEN load equals to zero in Fig. 7d and the E-GRID is fed from the SG and the ICE.

Fig. 9
figure 9

Top: propeller and hotel loads, middle four: optimal component operating loads, bottom: battery SOC during voyage (ICE and GEN shut-off is allowed any time)

With HEB_LT_shut-off, the first noticeable difference compared with the original shut-off strategy is that after the ESS is fully charged between 2.5 and 2.7 h, cycling occurs in ESS and GEN usage until the zero speed phase ends at the 3 h mark. This cycling, which is shown in Fig. 9d, e, starts, because the ECMS tuning has not changed from the original shut-off strategy cases. Now, the absence of the idle fuel consumption of the GEN leads to a smaller objective function value with the shown machinery usage if it is compared with a usage, where the ESS was inactive and the E-GRID was fed with the GEN. The charging phase in the cyclic usage starts when the ESS can be charged with high enough power but without exceeding the maximum SOC limit. In other words, the ESS charging starts when the GEN can operate at higher efficiency for a span of one time step without overcharging the ESS. Cyclic usage occurs again between 4.3 and 4.5 h. Although the components are not shut-off here, three things lead to switching between the instantaneous and optimal operating modes: the used ECMS parameter tuning, the component efficiencies and the operation near the maximum SOC limit. From a practical point of view, this kind of cycling may not be ideal for a component’s life cycle or even system usability. Therefore, additional penalties should be added to the optimisation problem to avoid excessively frequent mode changing. The second difference compared with the original shut-off strategy is that the SG is only used in generating mode, even in the low-speed transit phase between 4.5 and 5.0 h.

The global optimum trajectory for HEB_DP_shut-off now proposes that the ESS is not used in load levelling for the GEN at the beginning of the duty cycle. Instead, ESS discharging is postponed until the zero propulsion period between 2.5 and 3.0 h, where both diesel fuel consumers are shut-off and the ESS supplies the needed electric power. The ESS is then gradually recharged towards the end of the duty cycle with only slow discharge periods under heavier loads.

Fig. 10
figure 10

Cumulative fuel savings compared with the original ‘refDM’

Figure 10 shows the cumulative fuel savings for the different cases when the ICE and the GEN are allowed to shut off any time. The cumulative difference in fuel consumption is calculated against the original refDM results from the top graph in Fig. 8. Compared with the original refDM, refDM_shut-off creates fuel savings by getting rid of the GEN’s idle consumption. HEB_LT_shut-off now shows very little fuel saving compared with refDM_shut-off. These savings cumulate from the beginning to the 3 h mark, after which the discharge–recharge cycles do not add fuel savings. Although shutting down redundant machinery saves fuel, the addition of the ESS and PTI mode is not highly beneficial for this type of duty cycle. The DP algorithm predicts more fuel savings for the HEB, as a global optimisation algorithm should.

As a summary of the results, Table 2 shows the fuel consumption and fuel savings compared with the reference DM system with the original shut-off strategy and the computation times to run the simulations. If the duty cycle is repeated 200 times per year, with a fuel price of 430 EUR/tonne, the annual savings between refDM and HEB_DP_shut-off equals \(200\,{\text {cycles}}/{\text {a}} \cdot (3784\,{\text {kg}} - 3727\,{\text {kg}}) \cdot 0.43\,{\text {EUR}}/{\text {kg}} = 4902 {\text {EUR}}\). Compared with the fuel savings reported in the automotive industry [18, 19], the savings here are very small. The standard test cycles in the automotive industry have a more variant velocity profile, whereas the duty cycle in this article mainly has two different load levels in which the power plants operate at fairly high part loads. Even the reference DM system can share the HOTEL/AUX load between the ICE and the GEN, which also lowers the potential savings from hybrid technology compared with cars with a single prime mover. In addition, the charge-sustaining energy management strategy decreases the potential of achieving fuel savings with the HEB.

Table 2 Summary of the results

As mentioned, assigning the operating power of each component as an optimisation variable makes the computation load heavy. Although the number of optimisation variables with the DP was reduced to half from the LT optimisation, the runtime for HEB with a DP algorithm is still twenty times longer compared with LT method. If the same principle of variable reduction was implemented to the refDM and HEB_LT, their computation times in Table 2 would likely decrease. This is subject to future studies for the authors of the current article. The central processing unit used for the simulations was an Intel Core i7-7700HQ run at 2.80 GHz.

5 Conclusions and future work

This study presented an optimisation method for energy management. It is an integral part of TOpti, a design optimisation tool that the authors are developing. The described method automatically formulates an optimisation problem to minimise the fuel consumption of the designed on-board machinery. Using a case study of a fishing boat and comparing conventional diesel-mechanical propulsion with the parallel hybrid system, the proposed method was shown to find fuel consumption savings with the local optimisation methodology proposed in this article. The fuel savings from the hybrid system were benchmarked with a widely used dynamic programming algorithm, which is also available in the proposed design tool. The fuel savings from a more complex hybrid machinery, however, were found to be minimal compared with the reference system.

The computational efficiency of the proposed method could be improved by detecting and removing duplicate mirror modes in symmetrical machinery layouts, such as those used for twin-propeller tugboats. The computation time could also be reduced by automatically detecting locations in a system topology, where two parallel optimisation variables could be replaced with a single split ratio between the two variables. Parallelising the optimisation tasks to different central processing unit cores would greatly improve the overall computation times. Obtaining more sophisticated initial guess generators and transforming badly scaled functions would improve the performance of the used gradient-based algorithm.

A future work will study the optimal energy management of different ship machinery topologies when propulsion is controlled with propeller pitch angle, speed, or both.