Hostname: page-component-74656f9884-j7cmm Total loading time: 0 Render date: 2026-11-06T05:26:13.283Z Has data issue: false hasContentIssue false

Learn to flap: foil non-parametric path planning via deep reinforcement learning

Published online by Cambridge University Press:  27 March 2024

Z.P. Wang
Affiliation:
School of Engineering, Westlake University, Hangzhou, Zhejiang 310024, PR China School of Mechanical and Material Engineering, Queen's University, Kingston, ON K7L 3N6, Canada
R.J. Lin
Affiliation:
University of Chinese Academy of Sciences, Beijing 100049, PR China Institute of Automation, Chinese Academy of Sciences, Beijing 100190, PR China
Z.Y. Zhao
Affiliation:
University of Chinese Academy of Sciences, Beijing 100049, PR China Institute of Automation, Chinese Academy of Sciences, Beijing 100190, PR China
X. Chen
Affiliation:
Taihu Laboratory of Deepsea Technological Science, Wuxi, Jiangsu 214000, PR China
P.M. Guo*
Affiliation:
School of Engineering, Westlake University, Hangzhou, Zhejiang 310024, PR China School of Mechanical and Material Engineering, Queen's University, Kingston, ON K7L 3N6, Canada
N. Yang*
Affiliation:
University of Chinese Academy of Sciences, Beijing 100049, PR China Institute of Automation, Chinese Academy of Sciences, Beijing 100190, PR China
Z.C. Wang
Affiliation:
Laboratory of Ocean Energy Utilization of Ministry of Education, Dalian University of Technology, Dalian 116024, PR China School of Energy and Power Engineering, Dalian University of Technology, Dalian 116024, PR China
D.X. Fan*
Affiliation:
School of Engineering, Westlake University, Hangzhou, Zhejiang 310024, PR China

Abstract

To optimize flapping foil performance, in the current study we apply deep reinforcement learning (DRL) to plan foil non-parametric motion, as the traditional control techniques and simplified motions cannot fully model nonlinear, unsteady and high-dimensional foil–vortex interactions. Therefore, a DRL training framework is proposed based on the proximal policy optimization algorithm and the transformer architecture, where the policy is initialized from the sinusoidal expert display. We first demonstrate the effectiveness of the proposed DRL-training framework, learning the coherent foil flapping motion to generate thrust. Furthermore, by adjusting reward functions and action thresholds, DRL-optimized foil trajectories can gain significant enhancement in both thrust and efficiency compared with the sinusoidal motion. Last, through visualization of wake morphology and instantaneous pressure distributions, it is found that DRL-optimized foil can adaptively adjust the phases between motion and shedding vortices to improve hydrodynamic performance. Our results give a hint of how to solve complex fluid manipulation problems using the DRL method.

Information

Type
JFM Papers
Copyright
© The Author(s), 2024. Published by Cambridge University Press
Figure 0

Figure 1. Sketch of DRL framework and data flow. The arrows indicate the control sequence. Before the active learning process, the policy net is first pretrained by the expert data (selected sinusoidal motion) as an imitation learning. In each episode, the agent enquires about the states via observation $o$ from 10 parallel simulation environments where the foil is free to heave and pitch in the uniform inflow. Then the agent sends actions $a$ ($\hat {V}_{\theta }$, $\hat {V}_y$) adjusted by $\hat {\mathcal {L}}$. We implement the XML-RPC (extensible markup language remote procedure call) protocol to enable cross-platform communication between the environment (computational fluid dynamics (CFD) solver) and DRL agent (Python).

Figure 1

Algorithm 1 The DRL-based foil non-parametric path planning with PPO.

Figure 2

Figure 2. (a) Reward over 200 episodes of different combinations of RL algorithms and NN structures, and the parameters in the reward function are selected as $(\beta _C, \beta _{\mathcal {P}}, C_T^m, C_{\mathcal {P}}^m) = (0.1, 1/3000, 10, 3000)$. The solid line and shadow represent the mean and variance of three repeated training results, respectively. The inset $C_T$ and $\eta$ plots are selected for the TPPT agent. Note that the agents of MLP+PPO 1 and MLP+PPO 50 have the same NN structure but use the current observation or 50 history data collection as the state, respectively. (b) From left to right: the mean wake velocity profiles; instantaneous vorticity magnitude; the time traces (same time interval of 1) of actions $(\hat {V}_y, \hat {V}_{\theta })$; and forces coefficients $(C_T, C_L)$ for three cases denoted as red dots in panel (a) where (A) is the 14th episode, $\bar {C}_T = 1.93$ and $\eta = 0.12$; (B) is the 104th episode, $\bar {C}_T = 4.0$ and $\eta = 0.13$; (C) is the 182th episode, $\bar {C}_T = 3.52$ and $\eta = 0.16$.

Figure 3

Figure 3. Scatters of $\bar {C}_T$ and $\eta$ for sinusoidal (blue) and TPPT agent (red) optimized motions. Note that the big red dots have different rewards tuples and the small red dots are acquired by adjusting $\hat {\mathcal {L}}$ after the training is finished. The inset figures plot instantaneous vorticity, the $\hat {V}_y$ (red) and $\hat {V}_{\theta }$ (blue) time trace of the selected three cases. In scenario I, $\bar {C}_T = 0.562$, $\eta = 0.28$, the reward tuple is $(0.08, {1}/{3000}, 8, 3000)$ and $\hat {\mathcal {L}} = [0.49,0.49]$. In Scenario II, $\bar {C}_T = 4.40$, $\eta = 0.184$, the reward tuple is $(0.1, {1}/{3000}, 10, 3000)$ and $\hat {\mathcal {L}} = [0.5,0.5]$. In Scenario III, $\bar {C}_T = 14.3$, $\eta = 0.14$, reward tuple is $(0.1, {1}/{3000}, 10, 3000)$ and $\hat {\mathcal {L}} = [0.58,0.58]$. In Scenario IV, $\bar {C}_T = 25.7$, $\eta = 0.08$, the reward tuple is $(0.1, {1}/{3000}, 30, 3000)$ and the $\hat {\mathcal {L}} = [0.5,0.5]$.

Figure 4

Figure 4. Instantaneous vorticity, pressure distributions and time trace of action and force over three vortex shedding periods for (a) the TPPT Scenario I and (b) its statistically equivalent sinusoidal motion. (c–f) Four foil posture moments are selected to show complete pressure distribution change along the foil (the blue arrow represents the negative pressure region, while the red arrow represents the positive pressure region). For better visualization, the foil shown here is NACA 0020 instead of NACA 0016, and the $C_p$ is scaled to 1/2 from its original value.

Figure 5

Figure 5. (a) Vorticity plot of one entire vortex shedding and motion period of TPPT Scenario I. (b) Vorticity plot of one entire vortex shedding and motion period of sinusoidal counterpart. (c) The foil posture versus its pitching velocity for TPPT Scenario I. The blue quivers represent hydrodynamic force at that moment. (d) The foil posture versus its pitching velocity for sinusoidal counterpart of Scenario I. The blue quivers represent forces’ magnitude and direction at that moment. (e) Time trace of motion ($\hat {V}_{\theta }$ and $\hat {V}_y$) and power coefficient ($C_{\mathcal {P}}$) for (i) TPPT Scenario I and (ii) its statistically equivalent sinusoidal motion.

Figure 6

Figure 6. Instantaneous vorticity, pressure distributions, mean wake velocity at three chord lengths away from trailing edge, time trace of action and force over four vortex shedding periods for (a) TPPT Scenario IV and (b) its statistically equivalent sinusoidal motion. (c–f) Four foil posture moments are selected to show complete pressure distribution change along the foil (the blue arrow represents the negative pressure region, while the red arrow represents the positive pressure region). For better visualization, the foil shown here is NACA 0020 instead of NACA 0016, and the $C_p$ is scaled to 1/10 from its original value. The plots of foil posture versus pitching velocity for (g) Scenario IV and (h) its counterpart are shown here. Note that the blue quivers represent scaled forces’ magnitude and direction at that moment.

Figure 7

Figure 7. Instantaneous vorticity, pressure distributions and time trace of action and force over two vortex shedding periods for (a) TPPT Scenario III and (b) its statistically equivalent sinusoidal motion. (c–f) Four foil posture moments are selected to show complete pressure distribution change along the foil (the blue arrow represents the negative pressure region, while the red arrow represents the positive pressure region). For better visualization, the foil shown here is NACA 0020 instead of NACA 0016, and the $C_p$ is scaled to 1/10 from its original value.

Figure 8

Figure 8. (a) Mesh convergence results of $\bar {C}_T$, $\bar {C}_p$ and $\eta$. Simulation is conducted under $\theta _0 = 10^{\circ }$, $A_C = 0.2$, $\phi = {\rm \pi}$, $S_r = 0.25$. The mesh density is defined by how many grids per foil chord. (b) The comparison result of thrust coefficient neutral line between our simulation and Lagopoulos et al. (2019).

Figure 9

Figure 9. The identical Pareto front as figure 3. Addition of new TPPT training cases (green) of the adding lift force constraining term in the reward function.