Multi-Degree of Freedom Propeller Force Models Based on a Neural Network and Regression

: Accurate and efﬁcient prediction of the forces on a propeller is critical for analyzing a maneuvering vessel with numerical methods. CFD methods like RANS, LES, or DES can accurately predict the propeller forces, but are computationally expensive due to the need for added mesh discretization around the propeller as well as the requisite small time-step size. One way of mitigating the expense of modeling a maneuvering vessel with CFD is to apply the propeller force as a body force term in the Navier–Stokes equations and to apply the force to the equations of motion. The applied propeller force should be determined with minimal expense and good accuracy. This paper examines and compares nonlinear regression and neural network predictions of the thrust, torque, and side force of a propeller both in open water and in the behind condition. The methods are trained and tested with RANS CFD simulations. The neural network approach is shown to be more accurate and requires less training data than the regression technique.


Introduction
Accurately and efficiently determining the multi-degree of freedom forces on a propeller for a maneuvering vessel is challenging. Potential flow methods are inexpensive but can be less accurate than viscous methods when the propeller operates off-design. Viscous flow methods, like RANS, DES, or LES, can be more accurate than potential flow methods, but require a very small time step and require extra mesh discretization for the propeller. Common ways of modeling a discretized propeller are with the overset method or sliding mesh methods [1][2][3][4]. The cost can be prohibitive for CFD of a maneuvering vessel, especially in waves and at full scale [5]. Maintaining the accuracy of a viscous CFD method while decreasing the computational cost is desirable. One way to minimize computational cost is to determine the body force using a model. The body force can be applied to the flow and to the vessel equations of motion. This approach can be used with a constant body force [6], a database driven model [7], Boundary Element Models [8], semi-empirical methods [9,10], or by using Blade Element Momentum Theory [5,[11][12][13]. Methods that ignore viscous effects may not be as accurate as modeling a fully discretized propeller with CFD in off design conditions. Despite potential loss in accuracy in off-design conditions, Boundary Element Models and Blade Element Momentum Theory are less expensive than modeling a discretized rotating propeller with CFD [8].
This paper explores the use of data-driven models that are trained with RANS CFD. The intent is for the model to be as accurate as the CFD method used to train the model. When implemented as a body force in a maneuvering analysis the model has negligible cost. There are various methods for creating data-driven models for dynamical systems ranging from regression to neural networks. Hornik et al. [14] showed that neural networks can predict any function to any requisite level of accuracy, given adequate training and inputs. Neural networks have been applied to fluid dynamics problems ranging from improved turbulence modeling [15], to determining propeller forces for different advance coefficients [16]. This paper compares the ability for regression and a neural network to predict unsteady propeller forces due to prescribed motions. The thrust T, torque Q, and side force S of a propeller with unsteady forward velocity U, side velocity V, and propeller revolution rate n are examined in this paper. Both the open water and behind condition are considered. The objective of this paper is to evaluate the capabilities of regression compared to a neural network approach for predicting the unsteady three degree of freedom body force of a propeller undergoing unsteady motions. The goal is to train a model with a small amount of training data to limit the expense. Once the model is trained, it is tested on a variety of unsteady motions to evaluate the accuracy of the model. The intent of this method is to train an algorithm with limited data and implement the algorithm to apply the body force to the flow and the forces to the equations of motion for a vessel undergoing a maneuver. This method is especially useful when it is desired to model a vessel performing different maneuvers in a variety of sea states.
The propeller examined is the National Maritime Research Institute (NMRI) scale Kriso Container Ship (KCS) propeller. Details of the CFD setup as well as the derivation for a semi-empirical propeller force method can be found in the authors' previous work [9,17]. This paper examines both a nonlinear regression model and a neural network that are trained and tested on unsteady RANS CFD results to determine the three-degree of freedom force of the propeller in open water and the behind condition. This is an extension of the authors' prior work in which a neural network was used to determine the three-degree of freedom force of the propeller [18].

Methods
Three types of analysis are used in this paper. First, the RANS CFD setup and specification of unsteady motion is discussed. Second, the neural network framework is discussed. Third, the nonlinear regression modeling is discussed.

RANS CFD Setup & Specification of Unsteady Motion
The NMRI scale KCS propeller is examined in both open water and in the behind condition. The CFD used is very similar to that used by Knight & Maki [9,17], with the only difference of using an inlet condition on the sides of the domain when there is oblique flow. The OpenFOAM solver pimpleDyMFoam is used with the sliding mesh technique used for the unsteady rotating propeller simulations. The Moving Reference Frame approach is used to calculate the steady open water propeller forces using the OpenFOAM solver simpleFoam. The k − ω SST turbulence model is used with wall functions. For the behind condition case, a symmetry plane is used at the waterline. Therefore, a double body approximation is used. The mesh used in this study correlates to the coarse grid used by Knight & Maki [9,17]. The goal is for the model to be as accurate as the method that it is trained with. Therefore, the CFD used to train and test the model is treated as the truth with regards to evaluating the accuracy of the model. In this study, RANS CFD is used to train and test the models, but other techniques, such as experimental analysis or LES, could be used instead or in conjunction.
The motions of the vessel and the propeller are prescribed using a customized OpenFOAM six degree of freedom solver. The velocity is initially accelerated from rest to the average velocity over a time t r . In all cases the t r used is 0.0628 seconds. The general form of the velocity of the propeller after a time t r can be given by Equation (1). The unsteady motions are prescribed to be harmonic about the average velocity for each respective degree of freedom. Thus, the motions depend upon the average velocityẋ j , the amplitude of motion A j , the frequency of oscillation ω osc,j , and time t. The velocity amplitudeẋ j is the product of A j and ω osc,j . In this form, the general motions are given with subscript j. The specific degrees of motion of forward speed U, side velocity V, and revolution rate ω can be given by Equations (2)-(4), respectively. The equations are functions of the average velocities (U, V, and n), the velocity amplitudes (u , v , and n ), and time.

Set-Up of the Neural Network for Unsteady Propeller Forces
A single hidden layer neural network is used with a sigmoid activation function. The inputs to the neural network are snapshots of the advance ratio, J, and the oblique flow angle, α. Thus, the inputs are instantaneous feature vectors, where the feature vector includes polynomials of J and α. The forces on the propeller depend upon the diameter of the propeller D, the density of water ρ, n, U, and α. The diameter of the propeller examined is 0.105 m, and the density of the water is 997.66 kg/m 3 . Therefore, the output of the neural network is the instantaneous thrust coefficient, K T , the instantaneous side force coefficient, K S , and the instantaneous torque coefficient, K Q . The equations for K T , K S , K Q , J, and α are shown in Equations (5)- (9).
The particulars of the neural network used to determine the open water propeller forces is discussed first. Second, the extension of the open water neural network to the behind condition is discussed.

Open Water Neural Network
A feedforward neural network with a single hidden layer is programmed in MATLAB. The input to the neural network is a feature vector, x, for each snapshot in time. For each snapshot in time, the input feature vector, x, is shown by Equation (10). The feature vector is comprised of permutations of the instantaneous J, up to second order, and the absolute value of α, up to sixth order. A single hidden layer with k = 10 hidden neurons is used. The output layer has n = 3 neurons correlating to K T , K S , and K Q , which may be scaled and shifted to improve the accuracy of the neural network.
The snapshots for the training data are taken by incrementally sampling the time history of the observables of CFD simulations of an open water propeller with unsteady motions, U, V, and n.
The unsteady motions are prescribed, and thus are known. Therefore, the feature vector comprised of J and α can be determined. The observables from the CFD simulations include the thrust, side force, and torque. These are processed to give instantaneous values of K T , K S , and K Q . Similarly, J, α, K T , K S , and K Q can all be preprocessed for the test data from CFD simulations. The force coefficients from the CFD are treated as the truth.
Based upon Equation (10), the input matrix has m = 21 rows and the number of columns equal to the number of snapshots examined. A schematic of a single hidden layer neural network is shown in Figure 1. The left hand column of neurons is the input, the middle column of neurons is the hidden layer, and the right hand column of neurons is the output layer. A sigmoid activation function is used, which is defined by Equation (11). Two weight matrices and two bias vectors are used. The first weight matrix W 1 and bias vector b 1 are used between the input layer and the hidden layer. The second weight matrix W 2 and bias vector b 2 are used between the hidden layer and the output layer. The values of the weight matrices and bias vectors are determined using back propagation. The accuracy for a single snapshot i can be evaluated by the loss function L i defined in Equation (12), whereˆ y i is the prediction and y i is the truth for that snapshot.ˆ y i is calculated from Equation (13) which depends on the output of Equation (14).
The average loss function L across all snapshots is most indicative of the error. Therefore, the loss function of each snapshot in time is calculated. The loss functions for each snapshot are summed and divided by the number of snapshots N as shown by Equation (15). The program iterates until the loss function is below a user defined tolerance. Stochastic gradient descent is used to improve the speed of convergence. The stochastic gradient descent algorithm works by randomly selecting one of the snapshots and calculating the gradients of the weight matrices based on that snapshot. Once the neural network is trained, it is tested with data from other unsteady propeller CFD simulations. The accuracy of the neural network is evaluated by how accurate it is compared to the force coefficients calculated from the CFD.

Extension of Neural Network to Predict Unsteady Behind Condition Propeller Forces
The neural network for the behind condition propeller forces is similar to the open water propeller neural network. For the behind condition neural network, the feature vector defined by Equation (10) is modified; the |α| is changed to α. Therefore, the oblique flow angle maintains its sign. In the open water propeller case, the direction of motion did not have an effect except to determine the sign of the side force. However, in the behind condition the hull interacts with the propeller. The direction of α affects the propeller forces since the propeller is rotating in the wake of the hull. Equation (16) shows the feature vector used as input to the neural network for the behind condition for each snapshot in time. Note that J and α are calculated based upon the prescribed vessel velocities and n, just like the open water method. The high dimensionality of the feature vector allows for faster training of the model. Early stopping is used to avoid overtraining of the model. A study is performed while training the behind condition model to determine when the neural network is sufficiently trained and not overtrained.
The second difference between the behind conditional neural network and the open water neural network is the manner in which they are trained. As aforementioned, the open water neural network uses stochastic gradient descent. The open water neural network is also trained with the results of one unsteady open water propeller CFD simulation. However, the behind condition neural network uses gradient descent instead. Therefore, the average gradient of the weights and bias vector is used to correct the current weights. The behind condition propeller neural network is trained with two different types of simulations. It uses one unsteady CFD simulation of the propeller operating in the behind condition. It also uses steady state open water propeller coefficients which are extended into the behind condition in accordance with [9,17]. Knight & Maki used the thrust identity [19] to extend steady state open water K T and K Q into K T and K Q coefficients for the propeller operating in the behind condition if the same propeller is run in the behind condition at a single U and n. The KCS propeller has been simulated using a Moving Reference Frame approach at different J values in open water and a rotating propeller simulation was performed for the propeller operating in the behind condition with constant U and n at one speed to determine the Taylor Wake fraction w using the thrust identity [19]. This parameter has been found in [9,17]. Therefore, the behind condition case is trained with the results of one unsteady behind condition propeller simulation and the open water K T and K Q values extended into the behind condition using the thrust identity.

Nonlinear Regression for Unsteady Propeller Forces
MATLAB's non linear regression function "fitnlm" [20] is used to develop a regression model for K T , K Q , and K S . The same training data is used for the regression model and the neural network. Thus, snapshots of a feature vector of different permutations of J and α are used as input. To limit the propensity for overfitting a simpler feature vector than the neural network is used. The feature vector for the regression contains terms of J and α up to second order, as shown in Equation (17). In the case of the open water data the absolute value of α is used for the same reason as for the neural network. Equation (18) shows the form of the regression model to determine the force coefficients. "fitnlm" determines the a, b, and c coefficients. In the behind condition analysis, a study is performed in which different feature vectors are used to develop the regression model.

Training and Testing the Neural Network and Regression Model to Predict Unsteady Open Water Propeller Forces
The models to predict unsteady open water propeller forces are trained with the results of an open water unsteady propeller CFD simulation. Discrete snapshots are examined for the training data.
Before testing the neural network on a second unsteady propeller motion, a validation step is taken. The validation step examines the full time history of the unsteady propeller data that was used for training the algorithm. Once the models are trained and validated, they are tested on an unsteady propeller which undergoes a different unsteady motion. Table 1 shows the parameters that define the unsteady motion for each of the cases.

Training the Neural Network and Nonlinear Regression Model
Both the neural network and the nonlinear regression model are trained on a case that has unsteady velocity in all three degrees of freedom. The average forward velocity is U = 1.68 m/s, the average side velocity is V = 0 m/s, and the average propeller revolution rate is n = 32 rev/s. The amplitudes for each degree of freedom are A 1 = 0.2 m, A 2 = 0.213 m, and A 4 = 31.4 rad. The frequencies of oscillation are ω osc,1 = 4 rad/s, ω osc,2 = 4 rad/s, and ω osc,4 = 1 rad/s. The non-dimensionalized velocity amplitudes are u /U = 0.476, v /U = 0.500, and n /n = 0.156. The motion of the propeller in surge, sway, and rotational degrees of freedom is imposed in the customized OpenFOAM multi-degree of freedom solver. Similarly, since the motion is prescribed, Equations (1)-(4) can be used to extract the velocities for each degree of freedom. The first 0.1 seconds are neglected to account for the ramp time and the initial transient effects. After this time, the CFD forces are uniformly sampled to generate 70 snapshots. J and α for each of the snapshots are shown in Figure 2. The feature vector is generated as a function of these J and α values.
At each of these snapshots, the output matrix is extracted from the CFD results. As discussed earlier, each column of output from the neural network represents the predicted [K T K S K Q ] T of each snapshot. Similarly, the nonlinear regression model determines the values the values of K T , K S , and K Q . K Q is much smaller than K T . Additionally, as K S is zero at α = 0 rad, K S can be very small. Furthermore, K S oscillates about zero depending upon the direction of the sway velocity. Therefore, for both the training and testing of the open water unsteady propeller models, scaling is applied to the K Q and K S extracted from the forces calculated by the CFD. The value of K S is also shifted to improve the scaling. K S and K Q are recast in Equations (19) and (20), where the subscript u denotes unscaled coefficients, correlating to the original K S and K Q defined in Equations (6) and (7) respectively. The absolute value of K S,u is used as the input matrix contains functions of the absolute value of the oblique flow angle; thus, directionality is not accounted for. It was found that the neural network was more robust when directionality was omitted in the neural network. The sign of the side force is corrected after the models calculate K S . This is demonstrated when the models are tested. shows L versus the training iteration. As stochastic gradient descent is used, the loss function may increase on some iterations, but the loss function overall tends to decrease until reaching a floor. The training loss function is reduced to 3.1 × 10 −5 . To note, the neural network was examined with the same second order feature vector used by the nonlinear regression method. Using this lower order feature vector leads to similar prediction of the forces, but requires twice as many training iterations compared to the higher order feature vector.  Figure 4 shows the neural network prediction for the training data. This demonstrates that the neural network is trained sufficiently, as it does a good job predicting the data that it was trained with. The neural network can further be validated by examining the neural network prediction of the coefficients versus the CFD predictions for the whole time series, instead of the 70 discrete snapshots used to train the neural network. Figure 5 shows that the neural network does a good job of predicting the force coefficients from the CFD for the whole time series. Note that the side force predicted by the CFD has a high frequency oscillation due to the side force varying as a function of the rotation angle of the propeller. However, this oscillation is not modeled by the neural network since it was not trained with the rotational position of the propeller as a feature, nor were enough snapshots used to train the neural network to discern this characteristic. This oscillation is small and since the intent of the neural network is for use in vessel maneuvering this small oscillation is not necessary to capture.

Training the Nonlinear Regression Model for Unsteady Open Water Propeller Forces
The nonlinear regression fit determined using MATLAB for the prediction of K T , K S , and K Q for the open water propeller is given by Equation (21). Figure 6 shows the nonlinear regression prediction for the training data. The left hand figure illustrates how well the regression model would predict the training data if only first order terms were used and the regression model was trained neglecting the J 2 , α 2 , and Jα features. The right hand image shows an improvement if the second order terms are included. This demonstrates that the nonlinear regression model is trained sufficiently when the second order features are used.    Figure 8 shows the coefficients predicted by the neural network compared to those computed from the CFD. The average loss function is 6.56 × 10 −5 , the average L2 norm error of the K T is 0.0035, the average L2 norm error of the K S is 0.01015, and the average L2 norm error of the K Q is 0.0040. Thus, the neural network does a good job of predicting the coefficients for the case that it was not trained with. The coefficients can be expanded back into the forces using Equations (5)-(7), (19), and (20). The sign of the side force is determined with the knowledge that the force acts in the opposite direction that the vessel sways. The side force predicted by the CFD oscillates as a function of the azimuthal position of the propeller. This high frequency oscillation is ignored by the model, as the time scale of this oscillation and the low amplitude of this oscillation will have negligible effect on the maneuvering characteristics of a vessel. The thrust, side force, and torque are plotted in Figure 9. Good agreement is seen between the forces predicted by the CFD and the neural network.

Testing the Nonlinear Regression for Unsteady Open Water Propeller Force
The coefficients predicted by the nonlinear regression model are quite accurate compared to those computed from the CFD. The average loss function is 5.13 × 10 −5 , the average L2 norm error of the K T is 0.0038, the average L2 norm error of the K S is 0.00385, and the average L2 norm error of the K Q is 0.0077. Thus, the nonlinear regression also does a good job of predicting the coefficients of the test data. The average loss function and K S are predicted better using the nonlinear regression, but the K T and K Q are predicted better using the neural network. The differences in prediction between the neural network and the nonlinear regression are quite small in this case. The coefficients determined by nonlinear regression are expanded back into the forces using Equations (5)-(7), (19), and (20). The thrust, side force, and torque are plotted in Figure 10. Good agreement is seen between the forces predicted by the CFD and the nonlinear regression.

Training and Testing the Neural Network and Nonlinear Regression to Predict Unsteady Behind Condition Propeller Forces
The neural network and nonlinear regression model are used to predict unsteady behind condition propeller forces. First, the models are trained with the results of a behind condition unsteady propeller CFD simulation and the steady state open water coefficients extended to the behind condition. Discrete snapshots are examined for the training data. Once the models are trained they are tested with several different unsteady behind condition propeller CFD cases that have various motions. These three different cases are denoted "Test 1", "Test 2", and "Test 3". Table 2 shows the parameters that define the unsteady motion for each of the cases. Figure 11 shows α-J space for the validation and test cases compared to the training space.

Training the Models to Predict the Unsteady Behind Condition Propeller Force
The training data is split into two parts. The first part is the unsteady behind condition propeller training case. The average forward velocity is U = 1.68 m/s, the average side velocity is V = 0 m/s, and the average propeller revolution rate is n = 32 rev/s orẋ 4 The K S is assumed to be zero, as without drift the side force is small and this eliminates the need to perform additional behind condition simulations. This series is repeated twenty times so that the unsteady data and the steady data have similar data sizes for the determination of the training of the models.
The behind condition coefficients are scaled differently than for the open water case. K T is shifted up by 0.2 as shown by Equation (22). K S is multiplied by five and is shifted up 0.5 as shown by Equation (23). K Q follows the same scaling as in the open water modeling, shown by Equation (20).

Training the Neural Network for the Unsteady Behind Condition Propeller Force
As noted in the open water discussion, the feature vector defined by Equation (10) trains the neural network faster than a lower order feature vector. To avoid over training the neural network, different tolerances of L are examined and are evaluated by a single test case used to validate the model. As the tolerance of L decreases, it is expected that the accuracy of the model improves until it reaches a point where the neural network may become overtrained.
The "Validation" data set is used to validate the behind condition neural network to evaluate whether or not the model is overtrained. The average forward velocity is U = 1.68 m/s, the average side velocity is V = 0 m/s, and the average propeller revolution rate is n = 32 rev/s. The resulting velocity amplitudes are u = 0.81 m/s, v = 0.50 m/s, and n = 0 rev/s. The frequency of oscillation is ω osc,1 = ω osc,2 = 1 rad/s. This data set is used to validate the model since it incorporates both unsteady J and unsteady α. The validation results for five different tolerances of L are presented: 1 × 10 −3 , 5 × 10 −4 , 1 × 10 −4 , 8.3 × 10 −5 , and 7.7 × 10 −5 . The L as well as the L2 norm error of K T , K S , and K Q are shown in Table 3. The validation L is used to determine whether the neural network is appropriately trained. For these five different levels of tolerance for the training L, the optimal corresponds to a training L of 8.3 × 10 −5 . As L is a function of all three force coefficients, it can be seen that actually the K T and K S are better predicted if a lower L tolerance is used, but the K Q gets worse. Figure 12 shows the validation force coefficients, the thrust, side force, and torque as a function of time. Each row correlates to a different training L, with L = 0.001 in the top row, and the smallest L in the bottom row. This figure illustrates how the prediction of validation forces vary as a function of the tolerance on the L used for training. A better correlation between the neural network forces and the CFD forces can be seen as the training tolerance is reduced. However, both Table 3 and Figure 12 show that as the tolerance of the training L is reduced, some forces may be better predicted in the validation set at different levels of tolerance. One way to mitigate this would be to develop a neural network specifically to determine each force. However, for the purposes of implementation as a body force in a CFD simulation, this would be less desirable due to the increased training cost.
As noted, the best tolerance found from this validation study is for L = 8.3 × 10 −5 . Figure 13 shows the coefficients predicted by the neural network compared to those extracted from the CFD for the behind condition training case. The plot on the left shows the neural network prediction of the unsteady training data. The plot on the right shows the neural network prediction of the steady training data. Thus, this setting of L = 8.3 × 10 −5 leads to good results for both the training data as well as the validation test case and will be used to further test this neural network.

Training the Nonlinear Regression Model for the Unsteady Behind Condition Propeller Force
A study of how many features to incorporate into the regression model is performed. The validation case is used to verify the model is accurate and is used to select the number of features used to analyze the test cases. Four different forms of the regression are examined. The features examined in each of these include a second-order model, a third-order model, a fourth-order model, and a model using the neural network features. The feature vector for each of these is shown in Equation (24). Table 4 and Figure 14 are used to evaluate the different feature vectors for the regression. Table 4 shows the training L compared to the L2 error norms of the force coefficients and the L for the validation case. This table illustrates that even though the training loss function decreases as higher features are added, the model becomes overtrained and the accuracy of the regression model on the validation test case becomes worse. This phenomenon is shown graphically in Figure 14. The top row shows the force coefficients and the forces predicted by the second order regression, the second row shows the results for the third order regression, the third row shows the results for the fourth order regression, and the last row shows the results if the feature vector used by the neural network is used. As additional terms are added to the feature vector, the prediction of the validation test case become worse. Therefore, the second-order model is used to analyze the test cases. Note that Figure 14 also shows that even the second-order model does a poor job of predicting the thrust and torque for this validation case. More training data could be used to improve the model, but that would also increase the cost of implementing the model. Therefore, it can be seen that for this set of training data, the neural network is able to do a better job of predicting the validation test case than the regression approach.

Testing the Neural Network for the Unsteady behind Condition Propeller Force
The behind condition neural network is tested against three different CFD simulations, each of which have different prescribed motions as shown by Table 2. Test 1 examines a lower amplitude sway motion than the training case with J held constant at 0.5. Test 2 examines a case where the oblique flow angle is held constant at 0 rad, but U, and thus J, vary with time. Test 3 examines a case in which both α and J vary in time. In each of these cases, the first 0.5 seconds are neglected to allow the flow to develop.

Behind Condition Test 1
The average forward velocity for Test 1 is U = 1.68 m/s, the average side velocity is V = 0 m/s, and the average propeller revolution rate is n = 32 rev/s. Only the sway degree of freedom is unsteady, with an amplitude of A 2 = 0.11 m and a frequency of oscillation of ω osc,2 = 1 rad/s. This correlates to a sway velocity amplitude of v = 0.11 m/s. This case has a sway amplitude that is a quarter of the amplitude of the training case. The J is constant at 0.5. Figure 15 shows the coefficients predicted by the neural network compared to those computed from the CFD for Test 1. The average loss function is 3.43 × 10 −5 , the average L2 norm error of the K T is 0.0032, the average L2 norm error of the K S is 0.003, and the average L2 norm error of the K Q is 0.0067. Figure 16 shows the thrust, side force, and torque as a function of time. As the error in the coefficients is low, the predictions of the force by the neural network are also close to that of the CFD. This demonstrates that the neural network can correctly predict the forces when the amplitude of sway is less than it was trained with.   Figure 17 shows the coefficients predicted by the nonlinear regression compared to those computed from the CFD for Test 1. The average loss function is 3.43 × 10 −5 , the average L2 norm error of the K T is 0.003, the average L2 norm error of the K S is 0.004, and the average L2 norm error of the K Q is 0.0067. Figure 18 shows the thrust, side force, and torque as a function of time for the nonlinear regression predictions. These results are very similar and nearly indistinguishable compared to those predicted by the neural network. Therefore, both the nonlinear regression and the neural network do a good job of predicting the forces for this case.

Behind Condition Test 2
The average forward velocity for Test 2 is reduced to U = 1.1 m/s, the average side velocity is V = 0 m/s, and the average propeller revolution rate is n = 20.95 rev/s. Only the surge degree of freedom is unsteady, with an amplitude of A 1 = 0.0487 m and a frequency of oscillation of ω osc,1 = 6.72 rad/s. This frequency of oscillation was used in [9,17], and it represents the frequency of encounter if the vessel were to be in head seas with the wavelength equal to the length of the waterline. The α is constant at 0 rad. J as a function of time is shown in Figure 19. The top left of Figure 20 shows the comparison between the neural network coefficient predictions and the CFD predictions. The average loss function is 1.18 × 10 −4 , the average L2 norm error of the K T is 7.25 × 10 −3 , the average L2 norm error of the K S is 4.58 × 10 −3 , and the average L2 norm error of the K Q is 1.27 × 10 −2 . The oscillation in side force is caused by the azimuthal position of the propeller and the resulting force is around zero. The error for K T and K Q is higher than Test 1, but still quite accurate. Figure 20 show the thrust and torque respectively as a function of time. This demonstrates that the neural network can predict the forces well when J oscillates. The top left of Figure 21 shows the comparison between the nonlinear regression coefficient predictions and the CFD predictions. The average loss function is 1.18 × 10 −4 , the average L2 norm error of the K T is 8.25 × 10 −3 , the average L2 norm error of the K S is 4.56 × 10 −3 , and the average L2 norm error of the K Q is 1.38 × 10 −2 . Thus, the forces are predicted quite similarly to the forces predicted by the neural network. The top right and bottom plots of Figure 21 show the thrust and torque respectively as a function of time.

Behind Condition Test 3
Test three has both unsteady forward velocity as well as unsteady sway velocity. The average forward velocity is U = 1.68 m/s, the average side velocity is V = 0 m/s, and the average propeller revolution rate is n = 32 rev/s. Frequency of oscillation for both surge and sway is ω osc,1 = ω osc,2 = 1 rad/s. The amplitude of unsteady motion is A 1 = 0.8 m and A 2 = −0.5 m. Thus, the sway amplitude is larger than the training case and the sway direction is opposite of the Validation case. Figure 22 shows how J and α vary with time for Test 3. The top left of Figure 23 shows the comparison between the neural network force coefficient predictions and the CFD predictions. The average loss function is 7.30 × 10 −4 , the average L2 norm error of the K T is 1.52 × 10 −2 , the average L2 norm error of the K S is 2.76 × 10 −2 , and the average L2 norm error of the K Q is 2.16 × 10 −2 . The top right, bottom left, and bottom right plots of Figure 23 show the thrust, side force, and torque, respectively, as a function of time predicted by the neural network. Overall, good agreement is seen between the CFD and the neural network prediction. The largest error occurs in the prediction of the side force between three and four seconds when the J is low and the oblique flow angle is large. The top left of Figure 24 shows the comparison between the nonlinear regression force coefficient predictions and the CFD predictions. The average loss function is 2.66 × 10 −3 , the average L2 norm error of the K T is 4.32 × 10 −2 , the average L2 norm error of the K S is 1.72 × 10 −2 , and the average L2 norm error of the K Q is 5.63 × 10 −2 . Thus, the forces predicted by the nonlinear regression method are not as accurate as those predicted by the neural network in terms of the L, K T , and K Q . However, the regression model does outperform the K S neural network prediction. The top right, bottom left, and bottom right plots of Figure 24 show the thrust, side force, and torque, respectively, as a function of time. Figure 24. Behind condition coefficients, thrust, and torque for Test 3 as a function of time predicted by nonlinear regression.

Conclusions
A neural network and a nonlinear regression model have been trained and tested to determine the unsteady propeller forces due to unsteady motions. The first neural network examined is for open water and it takes a feature vector comprised of various permutations of the instantaneous J and |α| for each instant in time. A second-order nonlinear regression model was also trained using the instantaneous J and |α| for each instant in time. The models are extended to the behind condition. The neural network for the behind condition used a similar feature vector, but with the difference of using α instead of |α|. An early stopping procedure is used for the neural network to avoid overtraining. Different feature vectors are examined for the behind condition nonlinear regression, but the second order regression model is shown to be more accurate than higher order regression models that overfit the training data. Both the neural network and the regression approaches are able to predict the unsteady propeller forces for unsteady motions, but the neural network is more accurate for the cases examined. This study is a demonstration of how a neural network and nonlinear regression model can be trained and tested to predict the correct propeller forces for unsteady motion.
The behind condition models could be further improved by incorporating other features in the input. For example, the feature vector could be expanded to incorporate history terms to account for memory effects in the flow. Furthermore, probes could be placed upstream of the propeller plane and the effects of shed vortices from the hull or incident velocities could be accounted for.
The regression model could be improved by supplying additional training to the model. Latin hyper cube sampling could be used to generate training data to cover the full J-α space. However, additional training would clearly lead to increased training cost. Thus, for the cases examined, as the neural network tends to be more accurate than the nonlinear regression, it may be preferable since it can be more accurate than the regression model with limited training.
The models, especially the behind condition neural network, could be very useful for analyzing a maneuvering vessel. Instead of having to discretize the propeller and use a rotating mesh to simulate the viscous effects on the propeller, the neural network or regression model could be used. This could dramatically reduce the cost of a maneuvering calculation using CFD. Furthermore, the models could be trained with any type of training data whether it be experiments, potential flow calculations, RANS CFD, LES, or any combination of these. For example, LES could be used to train the neural network in off design circumstances and potential flow methods could be used to train the on design points.
Author Contributions: B.K. performed the analysis and wrote the paper. K.M. provided guidance for the paper and edited the paper. All authors have read and agreed to the published version of the manuscript.
Funding: This research was funded by the Office of Naval Research Grant N00014-16-1-2969.

Conflicts of Interest:
The authors declare no conflicts of interest.

Abbreviations
The following abbreviations are used in this manuscript: