## 2 The Baseline ECU Design and Numerical Models
### The Beta Model
#### 2.3.1 The Charging Model  
While the control system for this model is identical to the system presented and explained previously in Figure 4 in Section 2.2, a primary difference was the inclusion of electrical parameters and pump's motor inertia within the Variable Speed Drive (VSD) block [35; 36]. As a result of the introduction of inertia, the pump's speed had a ramp up which was different from the quasi-steady-state solution of the Alpha model since the controller gains affect speed transients and, thus, require tuning through the in-built MATLAB(r) PID tuner.  
Figure 5: A schematic showing the Pelton turbine’s iterative needle valve positioning while loop.  
Figure 6 presents the system modelled in SimscapeTM for the operation of the variable speed, multi-stage centrifugal pump charging the PCS at a constant, desired power. The output from the VSD is directly connected to the pump's motor, where the pump takes seawater in and pumps it to the PCS. The pump drivetrain (motor-shaft-load) is governed by Equation (10) presented hereunder [35]  
\[T_{e}=J\frac{d}{dt}\omega+F\omega+T_{m} \tag{10}\]  
where \(T_{e}\) is the electromagnetic torque, \(J\) is the motor inertia, \(F\) is the friction factor, \(\omega\) is the pump's motor rotational speed, and \(T_{m}\) is the mechanical torque. The centrifugal pump is modelled based on the charts presented in Figure 2 in Section 2.1. As a result, once the VSD outputs the desired speed (motor speed restriction between 0 and 3250 RPM) to obtain the desired power, Equations (11) and (12) are then used by SimscapeTM to obtain the pressure (\(p_{G}\)) and power (\(P_{S}\)) values produced by the pump at the desired speed, respectively.  
\[p_{G}=p_{G_{ref}}\times\left(\frac{\omega}{\omega_{ref}}\right)^{2} \tag{11}\]  
\[P_{S}=P_{S_{ref}}\times\left(\frac{\omega}{\omega_{ref}}\right)^{3} \tag{12}\]  
where \(\omega_{ref}\) is the angular velocity obtained based on the inputted pump curves, \(p_{G_{ref}}\), \(P_{S_{ref}}\) are the pump curve pressure and power values at \(\omega_{ref}\) and \(\omega\) is the speed outputted from the PID controller and input into the VSD. A pipe flow system was also added, with one pipe connecting the seawater to the pump's input and a second pipe connecting the pump's output to the PCS. The PCS was assumed to be at a sea depth of 100 m. The piping considered friction-generated pressure losses (\(p_{loss}\)) by implementing Equation (13) [37].  
\[p_{loss}=f\times\frac{(L+L_{r})}{D_{p}}\times\frac{\rho_{sw}}{2A_{p}^{2}} \times Q^{2} \tag{13}\]  
where \(f\) is the friction factor, \(L\) and \(L_{r}\) are the pipe length and equivalent length of resistances, respectively, [38], \(D_{p}\) is the pipe diameter and A\({}_{p}\) is the pipe cross-sectional area. The friction factor was evaluated through an iterative process by using the Moody Chart to evaluate head losses and selecting a pipe diameter. The latter was selected such that the head losses did not exceed 1%.  
Figure 6: A schematic showing the components and blocks required to perform charging simulations in SimscapeTM.  
A check valve was added at the PCS's inlet to prevent backflow, thus preventing the system pressure from dropping below the stipulated pre-charge pressure of 80 bar. The check valve was modelled based on the needle valve, shown in Equation (8) in Section 2, where the only difference is that the check valve opens fully once the pre-charge pressure is reached, while the needle valve has a variable position based on the needle valve position.