Skip to Content
  • Article
  • Open Access

20 January 2026

23 Pages

Control of Wave Energy Converters Using Reinforcement Learning

,
,
,
and
1
Department of Aerospace Engineering, Iowa State University, Ames, IA 50011, USA
2
Department of Electrical and Computer Engineering, Iowa State University, Ames, IA 50011, USA
*
Author to whom correspondence should be addressed.

Abstract

Efficient control of wave energy converters (WECs) is crucial for maximizing energy capture and reducing the Levelized Cost of Energy (LCoE). In this study, we employ a deep reinforcement learning (DRL) framework based on the Soft Actor-Critic (SAC) and Deep Deterministic Policy Gradient (DDPG) algorithms for WEC control. Our approach leverages a novel decoupled co-simulation architecture, training agents episodically in MATLAB to export a robust policy within the WEC-Sim environment. Furthermore, we utilize a rigorous benchmarking protocol to compare the SAC and DDPG agents against a classical Bang-Singular-Bang (BSB) optimal control benchmark. Evaluation under realistic, irregular Pierson-Moskowitz sea states demonstrates that the performance of the RL agents is very close to that of the BSB optimal control baseline. Monte Carlo simulations show that both the DDPG and SAC agents can perform even better than the BSB when the model of the BSB is different from the simulation environment.

1. Introduction

Ocean wave energy offers high power density and temporal complementarity to wind and solar, with global potential resource estimates of approximately 10 4 TWh/yr [1]. Despite this immense potential, the installed capacity of wave energy converters (WECs) remains far behind other renewable technologies. This gap is primarily driven by the high Levelized Cost of Energy (LCoE) and the engineering challenges of ensuring survivability in energetic seas [2]. To make wave energy economically viable, maximizing energy capture through advanced control strategies is essential. Control of the Power Take-Off (PTO) system is a critical mechanism: by shaping the applied force to remain in phase with the device velocity to achieve resonance, energy absorption can be significantly increased while respecting stroke, load, and electrical constraints [3].
Classical control approaches, such as impedance matching and proportional integral (PI) control, often perform suboptimally in irregular, realistic sea states. Model-based strategies, including Model Predictive Control (MPC) [4] and Bang-Singular-Bang control [5], have been widely investigated. However, their effectiveness depends heavily on the fidelity of hydrodynamic models. Performance may degrade under nonlinear effects and may require computationally demanding real-time wave forecasting.
In recent years, reinforcement learning (RL) has gained traction across the energy sector. Unlike model-based control, RL is a data-driven approach that optimizes a control policy through direct interaction with the environment. This enables the learning of complex, nonlinear control laws without requiring an explicit analytical model of the plant. RL has increasingly been applied to WEC control, offering more adaptive and efficient alternatives to traditional controllers. Several methodologies have emerged, evolving from discrete tabular methods to deep continuous control.
Early work by Anderlini et al. [6] employed standard tabular Q-learning for resistive control, discretizing the state space (significant wave height, wave period, and current damping) and action space (PTO damping) into grids. While effective for simple tuning, the curse of dimensionality inherently limits the ability of this method to handle the high-resolution states required for precise control.
In a related study, Anderlini et al. [7] applied Least Squares Policy Iteration (LSPI) to the reactive control of a point absorber. However, the study employed discrete state and action spaces, finding that performance was limited by the discretization of the PTO coefficients, which prevented precise tuning in irregular waves.
Trigueiro et al. [8] investigated this domain by applying the Deep Deterministic Policy Gradient (DDPG) algorithm to an oscillating water column plant. Leveraging a continuous actor–critic architecture, the study attempted to optimize generator torque and relief valve settings. Results revealed that DDPG suffered from significant value overestimation and training instability, ultimately yielding lower energy production than Twin Delayed DDPG (TD3) and Soft Actor–Critic (SAC) benchmarks. In the pursuit of more stable policy updates, Sarkar et al. [9] implemented the Proximal Policy Optimization (PPO) algorithm within a multi-agent framework. Unlike standard off-policy methods, which can suffer from divergence, PPO employs a clipped objective function to ensure monotonic improvement guarantees. Sarkar et al. [9] demonstrated that this stability was crucial for controlling a complex, multigenerator WEC, allowing the agent to satisfy structural constraints and maximize efficiency even in high-dimensional state spaces.
To address the value overestimation bias inherent in DDPG, Ye et al. [10] investigated the Twin Delayed DDPG (TD3) algorithm for the PTO control of an Oscillating Wave Surge Converter. By learning an adaptive policy for the PTO damping coefficient, the agent aimed to maximize energy extraction across varying sea states. However, their comparative analysis revealed that despite the theoretical stability improvements of TD3, it still exhibited slower convergence and higher instability compared to maximum entropy approaches like SAC when applied to the complex fluid–structure interaction dynamics of the device.
Most recently, while addressing the electromechanical constraints of direct-drive systems, Qin et al. [11] proposed a hybrid framework combining Deep Q-Networks (DQNs) with a Field-Weakening Optimization (FWO) mechanism. Their work highlights the importance of explicitly integrating electrical constraints such as voltage and current limits into the control loop. By optimizing damping and stiffness coefficients while respecting the safe operating envelope of the generator, they demonstrated that RL approaches can be effectively tailored to handle complex physical constraints in direct-drive WECs.
While these recent studies have successfully integrated specific electrical constraints into RL frameworks, the choice of the underlying learning algorithm remains critical for maximizing hydrodynamic efficiency in stochastic seas. Building on this foundation, the present study introduces a data-driven control framework for the RM3 wave energy converter using both the state-of-the-art Soft Actor–Critic (SAC) algorithm and the Deep Deterministic Policy Gradient (DDPG) algorithm. Both SAC and DDPG are compared to the conventional Bang-Singular-Bang baseline. To ensure numerical stability and computational efficiency, we implement an integration strategy that trains agents episodically in MATLAB and exports compiled, deterministic policies for execution within the environment. In this study, WEC Sim [12] is adopted as the environment. Finally, we evaluate the performance of all three controls in irregular sea states, using total absorbed energy as the primary evaluation metric.
Section 2 details the physical modeling of the RM3 device, the hydrodynamic equations of motion, and the formulation of the BSB and reinforcement learning control strategies. Section 3 describes the offline-to-online co-simulation framework, outlining the policy deployment mechanism and the training hyperparameter configuration. Section 4 presents the comparative results, quantifying performance in terms of heave motion response, force–velocity phasing, and total energy absorption.

2. WEC Model

2.1. Physical Configuration of the Device

The wave energy converter investigated in this work is a heaving point absorber, representative of the widely studied Reference Model 3 (RM3) configuration. The system consists of a surface-piercing buoy connected to a fixed reference body through a vertical shaft and PTO system. Because the buoy is axisymmetric about its vertical axis, the dominant degree of freedom is heave. The rigid-body motions (surge, sway, roll, pitch, and yaw) are assumed to be negligible in the moderate sea states considered. This assumption is standard practice for control-focused studies, where isolating the heave mode allows the dynamics to be analyzed and controlled more effectively.
The buoy interacts directly with the free surface, where wave pressure fluctuations generate oscillatory vertical motion. The submerged portion of the buoy provides hydrodynamic stiffness and inertia, while the waterplane area determines the hydrostatic restoring force. The dynamic response of the buoy is influenced by wave energy input, energy radiated away in the form of outgoing waves, internal damping, and the power take-off force used to harvest energy.
Figure 1 shows a schematic representation of the device. The compact geometry and relative structural simplicity of point absorbers make them attractive for both laboratory-scale testing and real-world deployment. When operated near their natural resonance frequency, point absorbers can achieve high energy-capture efficiency relative to their size.
Figure 1. The heaving point absorber wave energy converter considered in this study. The buoy moves in the vertical (heave) direction in response to incident ocean waves. The PTO system converts the resulting relative motion into electrical power.

2.2. Hydrodynamic Forces and Heave Dynamics

The interaction between the oscillating body and the surrounding fluid governs the dynamics of the heaving buoy. When waves pass the buoy, they generate unsteady pressure distributions on its wetted surface, which induce motion. At the same time, buoy motion disturbs the surrounding water, generating radiated waves that give rise to added inertia and damping effects. The principal forces acting on the buoy in heave are illustrated in Figure 2.
Figure 2. Forces acting on the heaving buoy, including the wave excitation force F exc , hydrostatic restoring force C hs z , radiation damping and added mass effects represented through the convolution term ∫ 0 t K r ( t − τ ) z ˙ ( τ ) d τ , viscous damping B lin z ˙ , and the PTO reaction force F PTO .
The vertical motion of the buoy is modeled using the Cummins equation in the time domain, which provides a physically consistent representation of frequency-dependent radiation effects:
m + A ∞ z ¨ ( t ) + ∫ 0 t K r ( t − τ ) z ˙ ( τ ) d τ + C hs z ( t ) + B lin z ˙ ( t ) = F exc ( t ) − F PTO ( t ) .
Here,
  • z ( t ) is the heave displacement;
  • m is the dry mass of the buoy;
  • A ∞ is the added mass at infinite frequency, representing water entrained and accelerated with the buoy;
  • K r ( t ) is the radiation impulse-response function, capturing the memory effect associated with radiated waves;
  • C hs is the restoring stiffness, which includes hydrostatic ( ρ g A w ) and weight forces, where A w is the waterplane area;
  • B lin is an empirical linear viscous-damping term used to approximate drag;
  • F exc ( t ) is the wave excitation force produced directly by incident waves;
  • F PTO ( t ) is the reaction force applied by the PTO mechanism.
Hydrodynamic coefficients such as added mass, radiation damping, excitation-force transfer functions, and hydrostatic properties are obtained from a boundary-element method (BEM) solver and imported into WEC-Sim via the standard .h5 hydrodynamic data format. WEC-Sim uses these coefficients to solve for the buoy motion in the time domain.

Irregular Wave Representation

The device is evaluated in irregular, broadband ocean waves characterized by a fully developed sea spectrum. In this study, the Pierson–Moskowitz (PM) spectrum is used. While the PM spectrum is often defined by wind speed, this analysis utilizes the two-parameter formulation defined by the significant wave height H m 0 and peak wave frequency f p (where f p = 1 / T p ). The spectral density of the surface elevation is
S P M ( f ) = H m 0 2 4 ( 1.057 f p ) 4 f − 5 exp − 5 4 f p f 4 ,
where f is the wave frequency in Hertz. For numerical simulations in this paper, the wave environment is generated with a significant wave height of H m 0 = 2.5 m and a peak period of T p = 6 s.
WEC-Sim models the irregular waves as a linear superposition of harmonic components. The instantaneous incident wave elevation is
η ( x , y , t ) = ∑ i H i 2 cos ω i t − k i ( x cos θ i + y sin θ i ) + ϕ i ,
where H i is the component height, ω i is the angular frequency ( ω = 2 π / T ), k i is the wavenumber ( k = 2 π / λ ), θ i is direction, and ϕ i is phase.
Phases ϕ i are randomized but use a fixed seed of 42 for repeatability across control strategies. The excitation force F exc ( t ) in Equation (1) is computed in WEC-Sim from the imported excitation response amplitude operator (RAO) and the generated wave spectrum.

2.3. PTO Model: Electromechanical Rotary Generator

The power take-off (PTO) system is modeled using the ptoSim framework within WEC-Sim. As shown in the system diagram, the topology consists of a mechanical drivetrain that converts the linear heave motion of the buoy into rotational motion to drive a permanent-magnet synchronous generator (PMSG). This configuration allows for the use of standard rotary electrical machines coupled to the WEC via a mechanical linkage (e.g., a rack-and-pinion or ball screw).

2.3.1. Mechanical Drivetrain Dynamics

The drivetrain is modeled as a rotational inertia subject to viscous friction. The relationship between the buoy’s linear heave velocity z ˙ ( t ) and the generator’s angular velocity ω ( t ) is governed by the kinematic conversion ratio N g :
ω ( t ) = N g · z ˙ ( t ) ,
where N g represents the transmission ratio (in rad/m). The rotational equation of motion for the generator rotor is given by
J ω ˙ ( t ) = τ mech ( t ) − τ em ( t ) − B ω ( t ) ,
where J is the total drivetrain inertia, B is the rotational viscous friction coefficient, τ mech is the mechanical torque applied by the buoy, and τ em is the electromagnetic control torque.

2.3.2. Electromagnetic Generator Model

The generator is modeled as a DC-equivalent permanent-magnet machine. The control torque τ em is proportional to the stator current i ( t ) :
τ em ( t ) = K t i ( t ) ,
where K t is the torque constant. The electrical dynamics of the stator winding are governed by
L s d i ( t ) d t + R s i ( t ) + K t ω ( t ) = V L ( t ) ,
where L s is the winding inductance, R s is the winding resistance, and V L is the terminal control voltage. The term K t ω ( t ) represents the back electromotive force (back-EMF).

2.3.3. PTO Reaction Force on the Buoy

To couple the rotary PTO dynamics back to the linear hydrodynamic equation of motion (Equation (1)), the electromagnetic torque is transformed into a linear force. Based on power conservation ( τ ω = F z ˙ ), the resulting PTO force is
F PTO ( t ) = N g · τ em ( t ) = N g K t i ( t ) .
This force F PTO acts as the control input opposing the wave excitation in the hydrodynamic model.

2.3.4. Parameterization

The parameters used in this study correspond to the rotary PTO configuration in WEC-Sim. Note that N g = 1 implies a direct 1:1 mapping between linear velocity (m/s) and angular velocity (rad/s) for this specific drivetrain setup:
K t = 100 Nm / A , N g = 1 rad / m , J = 10,000 kg · m 2 , B = 200 Nms / rad , R s = 0.5 Ω , L s = 0.05 H .

2.4. Optimal Control with Radiation States (Steady-State Implementation)

To account for the frequency-dependent radiation force in the Cummins equation (Equation (1)), the dynamics are augmented with radiation states. Following [5], we introduce the time state x 3 = t so that the non-autonomous excitation force can be written as F exc ( x 3 ) . Defining x 1 = z and x 2 = z ˙ , the augmented model becomes
x ˙ 1 = x 2 ,
x ˙ 2 = 1 m + A ∞ F exc ( x 3 ) − C r x r − C hs x 1 − B lin x 2 − u ,
x ˙ 3 = 1 ,
x ˙ r = A r x r + B r x 2 ,
The Hamiltonian for this case is written as
H = − u x 2 + λ 1 x 2 + λ 2 m + A ∞ F exc ( x 3 ) − C r x r − C hs x 1 − B lin x 2 − u + λ 3 + λ r T A r x r + B r x 2 ,
The optimality conditions consist of the state equations above and the following costate equations:
λ ˙ 1 = C hs m + A ∞ λ 2 ,
λ ˙ 2 = − λ 1 + u + B lin m + A ∞ λ 2 − λ r T B r ,
λ ˙ 3 = − λ 2 m + A ∞ ∂ F exc ( x 3 ) ∂ x 3 ,
λ ˙ r = λ 2 m + A ∞ C r T − A r T λ r ,
together with the stationarity (switching) condition:
x 2 + λ 2 m + A ∞ = 0 .

Laplace-Domain Solution and Steady-State Control

The coupled optimality conditions (9)–(12) can be solved by applying the Laplace transform, which converts the system of differential equations into algebraic equations in the s-domain [5].
The obtained optimal control force has the form
U ( s ) = U 1 ( s ) + U 2 ( s ) ,
where the steady-state term is [5]
U 1 ( s ) = N 1 ( s ) D 1 ( s ) ,
N 1 ( s ) = ( m + A ∞ ) s 2 + C r ( s I + A r ) − 1 B r − B lin s + C hs F exc ( s ) ,
D 1 ( s ) = s C r ( s I + A r ) − 1 B r − C r ( s I − A r ) − 1 B r − 2 B lin .
The term U 2 ( s ) = N 2 ( s ) / D 2 ( s ) is a transient term that depends only on the initial values of the costates and is independent of the excitation force. Therefore, for the steady-state solution, U 2 ( s ) is dropped and U ( s ) = U 1 ( s ) [5].

2.5. Simulink Implementation

The full WEC system is implemented in the WEC-Sim simulation framework, which runs on Simulink and MATLAB. WEC-Sim solves the buoy hydrodynamics by numerically integrating the Cummins equation (Equation (1)) using the imported hydrodynamic coefficients. At each simulation time step, WEC-Sim computes the buoy position z ( t ) , velocity z ˙ ( t ) , and acceleration z ¨ ( t ) in the heave direction.
The heave velocity z ˙ ( t ) is extracted from the WEC-Sim body motion output, and this signal is provided as input to the PTO block, which implements the direct-drive generator dynamics described in Section 2.3. The PTO block then computes the reaction force F PTO ( t ) according to Equation (8). This force is returned to WEC-Sim and directly influences the buoy motion.
This feedback constitutes a closed-loop physical and control coupling:
  • The incident wave field generates the excitation force F exc ( t ) .
  • WEC-Sim computes the buoy motion ( z ( t ) , z ˙ ( t ) , z ¨ ( t ) ) in heave.
  • The heave state z ( t ) , z ˙ ( t ) , z ¨ ( t ) is provided to the Bang-Singular-Bang (BSB) controller.
  • The BSB controller computes a commanded PTO force u cmd ( t ) according to the optimal control law in Section 2.4.
  • The commanded force is passed to the simple Direct-Drive PTO model, which, through its electromechanical dynamics, produces the actual reaction force F PTO ( t ) .
  • The reaction force F PTO ( t ) is fed back into the WEC-Sim hydrodynamic model.
  • The buoy motion is updated, and the cycle repeats at each simulation time-step.
Figure 3 shows the signal flow diagram for the full WEC-Sim and PTO coupling. All hydrodynamic, mechanical, and electrical interactions are simulated simultaneously in the time domain, ensuring that energy transfer between the ocean, buoy, and generator is modeled accurately.
Figure 3. Simulink implementation of the WEC system using WEC-Sim and the simple Direct-Drive PTO model. The heave motion is supplied to the Bang-Singular-Bang controller, which generates the commanded PTO force. The PTO dynamics convert this command into the reaction force F PTO ( t ) , which is fed back into the hydrodynamic model to update the buoy motion.

2.6. Reinforcement Learning Architectures

In this work, the control of the WEC’s Power Take-Off (PTO) system is formulated as a continuous Markov Decision Process (MDP). Two distinct Deep Reinforcement Learning (DRL) algorithms, Deep Deterministic Policy Gradient (DDPG) and Soft Actor–Critic (SAC), were implemented to solve this control problem. Both algorithms are specifically adapted for continuous action spaces, making them suitable for controlling the continuous force exerted by the PTO system.

2.6.1. Problem Formulation and Reward Function

The RL agent interacts with the WEC environment at discrete time steps t. The state space is defined by the device’s heave motion dynamics. Specifically, the observation vector s t consists of the heave position z ( t ) , heave velocity z ˙ ( t ) , and heave acceleration z ¨ ( t ) :
s t = [ z ( t ) , z ˙ ( t ) , z ¨ ( t ) ] T
To facilitate efficient neural network training, these state variables are typically normalized to a zero-mean, unit-variance distribution before being fed into the agent.
The action a t represents the control command output by the agent. Since the neural networks output values within a bounded range (typically via a tanh activation), the action a t ∈ [ − 1 , 1 ] is scaled to the physical limits of the PTO force:
F P T O ( t ) = a t · F m a x
where F m a x is the maximum saturation force of the actuator (e.g., 1000 kN).
The core objective of the controller is to maximize the total electrical energy extracted from the waves. Consequently, the reward function is defined based on the instantaneous mechanical power absorbed by the PTO. At each time step, the reward r t is calculated as the product of the PTO force and the device velocity:
r t = P a b s o r b e d ( t ) = F P T O ( t ) · v ( t )
By maximizing the cumulative sum of these discrete rewards, R = ∑ t = 0 T γ t r t (where γ is the discount factor), the agent approximates the maximization of the continuous energy integral E = ∫ 0 T P ( t ) d t . A positive reward indicates successful energy extraction, while a negative reward implies the PTO is consuming energy (motoring mode) to condition the buoy’s motion for future waves (reactive control).

2.6.2. Deep Deterministic Policy Gradient (DDPG)

The Deep Deterministic Policy Gradient (DDPG) [13] is a model-free, off-policy, Actor–Critic algorithm that adapts the success of Deep Q-Networks (DQNs) to continuous control domains. It essentially performs “Approximate Policy Iteration” by concurrently learning a Q-function and a policy that maximizes it.
Network Architecture
DDPG utilizes a specific four-network architecture to stabilize the learning of the Q-function in continuous spaces:
  • Main Actor ( μ ): The policy network μ ( s | θ μ ) functions deterministically. It maps the state vector s directly to a specific scalar action value. Unlike stochastic policies which output probabilities, the DDPG actor outputs the exact force command intended to maximize the Q-value.
  • Main Critic ( Q ): The value network Q ( s , a | θ Q ) estimates the state-action value function. It serves as a critic by providing a differentiable performance metric (the Q-value) to the actor.
  • Target Networks ( μ ′ , Q ′ ): One of the primary sources of instability in Q-learning is that the network being updated is also used to calculate the target value. DDPG addresses this by maintaining time-delayed copies of both the actor and critic. These target networks break the temporal correlations in the target calculation.
Learning Process and Exploration
Since the policy μ is deterministic, it will always produce the same action for a given state, preventing the agent from discovering new strategies. Exploration is enforced by adding an external noise process N to the action during training:
a t = clip μ ( s t | θ μ ) + N t , − 1 , 1
In this work, we utilize Ornstein–Uhlenbeck (OU) noise, which generates temporally correlated noise. This is physically advantageous for WEC control, as it prevents highfrequency “chattering” in the control signal during the exploration phase.
The learning update involves the following:
1.
Critic Optimization: The critic is trained to minimize the Bellman error (Temporal Difference error). The loss function is the mean squared error between the predicted Q-value and the target y i :
L ( θ Q ) = 1 N ∑ i y i − Q ( s i , a i | θ Q ) 2
where y i = r i + γ Q ′ ( s i + 1 , μ ′ ( s i + 1 ) | θ Q ′ ) .
2.
Actor Optimization: The actor is updated via the deterministic policy gradient theorem. By applying the chain rule to the expected return J with respect to the actor parameters θ μ , the update direction is derived as
∇ θ μ J ≈ 1 N ∑ i ∇ a Q ( s , a | θ Q ) | s = s i , a = μ ( s i ) ∇ θ μ μ ( s | θ μ ) | s = s i
This effectively moves the policy weights in the direction that increases the critic’s estimated Q-value.
3.
Soft Updates: The target networks track the learned networks via Polyak averaging ( θ ′ ← τ θ + ( 1 − τ ) θ ′ ), where τ ≪ 1 (e.g., 0.005). This constrains the target values to change slowly, dampening oscillations.

2.6.3. Soft Actor–Critic (SAC)

Soft Actor–Critic (SAC) [14] is a modern, state-of-the-art algorithm designed to address the brittleness and hyperparameter sensitivity of DDPG. SAC operates under the framework of Maximum Entropy Reinforcement Learning. The objective is modified to maximize both the expected return and the entropy of the policy:
J ( π ) = ∑ t = 0 T E r t + α H ( π ( · | s t ) )
where H is the entropy (a measure of randomness) and α is the temperature parameter.
Why Entropy Matters for WEC Control
In WEC control, the environment is highly stochastic due to irregular waves. A deterministic policy (like DDPG) may overfit to specific wave patterns. By maximizing entropy, SAC is encouraged to explore widely and remain robust to disturbances. It prevents the policy from collapsing to a suboptimal mode too early in training.
Network Architecture
SAC employs a more complex architecture involving five networks:
  • Stochastic Actor ( π ): The policy outputs the parameters (mean μ and standard deviation σ ) of a Gaussian distribution. The action is sampled using the reparameterization trick: a = tanh ( μ + σ ϵ ) , where ϵ ∼ N ( 0 , 1 ) .
  • Twin Critics ( Q 1 , Q 2 ): To combat the “overestimation bias” inherent in Q-learning, SAC learns two independent Q-functions simultaneously. During the value update, the minimum of the two is used: min ( Q 1 , Q 2 ) . This implements a principle of “pessimism in the face of uncertainty.”
  • Target Critics ( Q 1 ′ , Q 2 ′ ): Soft-updated copies of the twin critics.
Learning Process
The learning dynamics of SAC include three key components:
1.
Soft Critic Update: The critics regress to a target that includes the entropy bonus. The target y i is computed as
y i = r i + γ min j = 1 , 2 Q j ′ ( s i + 1 , a i + 1 ) − α log π ( a i + 1 | s i + 1 )
The term − log π ( a | s ) represents the entropy contribution. States where the agent has more valid action options are valued higher.
2.
Actor Update with Squashing Correction: The actor minimizes the KL-divergence between the policy and the exponential of the Q-function. Crucially, because the unbounded Gaussian sample is passed through a tanh squash function to enforce action limits [ − 1 , 1 ] , the probability density must be corrected using the Change of Variables formula:
log π ( a | s ) = log μ ( u | s ) − ∑ i = 1 D log 1 − tanh 2 ( u i )
This correction is vital for stable gradient descent in bounded action spaces.
3.
Automatic Entropy Tuning: The temperature α is treated as a learnable parameter. The algorithm automatically adjusts α via gradient descent to maintain a minimum target entropy (heuristic: H ¯ = − dim ( A ) ). This allows the agent to explore highly in the beginning (high α ) and exploit naturally towards the end (low α ), removing the need for manual decay schedules.

3. Implementation of Reinforcement Learning in WEC-Sim

In this work, we integrate reinforcement learning in WEC-Sim to leverage its already available validated library. Here, WEC-Sim is treated as an external environment that is called episodically from MATLAB during the learning process. In each training episode, WEC-Sim simulates the heave dynamics of the buoy under a candidate control policy. The resulting observations, actions, and absorbed power values are returned to MATLAB, where the reinforcement learning algorithm (either SAC or DDPG) updates its policy parameters using the accumulated experience. All learning, replay buffer management, critic updates, and policy optimization, therefore, occur outside Simulink.
The development of the intelligent controller requires a robust integration between the hydrodynamic simulation environment and the deep reinforcement learning (DRL) algorithms. Since the hydrodynamic solver operates within a dynamic system simulation environment while the agent training loop is managed via high level scripting, a custom co-simulation interface was developed. This framework facilitates the exchange of state, action, and reward signals while managing the synchronization between the learning process and the physics engine.

3.1. Co-Simulation Architecture

The integration is designed as an episodic-style simulation where the RL agent acts as an external controller. The architecture consists of three primary components:
1.
The Supervisor (Training Loop): A master script that orchestrates the training process, manages the experience replay buffer, and performs the neural network gradient updates.
2.
The Environment (Hydrodynamic Solver): The numerical solver that computes the response of the WEC device, wave–structure interaction, and PTO dynamics.
3.
The Interface (Policy Deployment): An embedded function block within the simulation model that executes the agent’s policy in real time during the time steps.

3.2. Policy Deployment Mechanism

A critical challenge in integrating deep reinforcement learning with time-domain simulations is the computational overhead of querying complex neural networks at every simulation time step. To address this, we implemented a compiled policy approach rather than using standard interpreted execution blocks.
At the start of every training episode, the current state of the RL agent (specifically the actor network) is serialized and exported to a persistent binary file. Inside the hydrodynamic model, a specialized block loads this “frozen” policy into memory as a compiled object. This setup ensures that the control action calculation is deterministic within the episode and computationally efficient, effectively mimicking the deployment of an embedded controller on physical hardware.

3.3. Signal Flow and Control Loop

The closed-loop interaction proceeds as follows for each simulation time step t:
  • State Observation: The solver computes the instantaneous kinematics of the float. The heave position z ( t ) , velocity z ˙ ( t ) , and acceleration z ¨ ( t ) are extracted and concatenated into the observation vector.
  • Action Generation: The state vector is passed to the loaded policy object, which computes the control action:
    a t = π ( s t ) ∈ [ − 1 , 1 ]
    where π represents the loaded neural network.
  • Actuation: The normalized action a t is scaled by a gain factor to convert the neural network output into a physical force command F P T O ( t ) . This force is applied to the Translational PTO element, influencing the equation of motion for the next time step.
  • Data Logging: The resulting actual force applied (matching the command) and the resulting velocity are logged.

3.4. Training Workflow

The training is conducted episodically. In each iteration, the supervisor executes the following sequence:
  • Policy Export: The current exploration policy is serialized and saved to the simulation directory.
  • Simulation: The hydrodynamic model is executed for a fixed duration using a stochastic sea state.
  • Experience Collection: Upon simulation completion, the time series data (observations, actions, rewards) are parsed. The reward is computed post-simulation based on the logged physical variables (Force × Velocity) to ensure physical consistency with the work performed by the PTO.
  • Learning Update: The collected transitions are pushed to the experience replay buffer. The RL agent then samples mini-batches from this buffer to update its actor and critic networks via backpropagation.
This architecture ensures that the RL agent learns from valid hydrodynamic data without compromising the numerical stability or speed of the solver.

3.5. Training Configuration and Hyperparameters

To ensure reproducibility and stable convergence, specific hyperparameters were selected for the training process. The simulation time step was fixed at Δ t = 0.1 s to capture the relevant wave dynamics while maintaining computational efficiency. Each training episode consisted of a 300 s simulation.
The reinforcement learning agents were trained using a Mini-batch Stochastic Gradient Descent (SGD) approach. To balance computational cost with learning stability, the networks were not updated at every single time step. Instead, gradient updates occurred every 5 time steps (0.5 s). Key hyperparameters shared between both DDPG and SAC architectures, as well as algorithm-specific settings, are summarized in Table 1. The discount factor γ was set to 0.99 to encourage long-term energy maximization. All algorithms and simulations were implemented in MATLAB R2025b and Simulink R2025b. The hydrodynamic and multibody dynamics of the wave energy converter were modeled using the WEC-Sim toolbox (v6.0). Reinforcement learning training was performed on a Dell Precision 5570 laptop (Intel Core i7-12700H, 32 GB RAM) using GPU acceleration. The total training time was approximately 10 h for DDPG, while SAC required roughly twice as long (about 20 h), reflecting the higher computational cost of the SAC updates.
Table 1. Hyperparameters used for DDPG and SAC training.
To validate the selected hyperparameters and assess the stability of the learned policies, the cumulative reward per episode was monitored throughout the 500-episode training session on a single random phase wave.
The SAC agent training progression is shown in Figure 4. It demonstrates rapid policy improvement, escaping the initial exploration phase within the first 25 episodes and converging to a high-reward plateau of approximately 12.0 × 10 8 MJ. The entropy regularization inherent to SAC successfully allowed the agent to explore high-force strategies without destabilizing.
Figure 4. The training curve for the SAC agent.
The DDPG agent training progression is shown in Figure 5. Similar to the SAC training behavior reported in Figure 4, the DDPG agent demonstrates clear policy improvement and is able to identify highly efficient control laws for the RM3 WEC. Through systematic hyperparameter optimization (Table 1), the DDPG agent reached a peak reward magnitude of 10 8 , approaching the maximum performance levels achieved by the SAC agent. While the DDPG learning curve exhibited late-stage volatility, a characteristic often observed in deterministic policy gradient methods under stochastic hydrodynamic excitation, this study utilized the best performing policy checkpoint for deployment. The results confirm that DDPG’s deterministic nature can discover aggressive, high-efficiency damping strategies that effectively maximize energy capture. Consequently, when the most proficient policy is preserved, DDPG provides a robust baseline for continuous PTO control, achieving performance close to that of maximum-entropy methods in this RM3 irregular-wave setting.
Figure 5. The training curve for the DDPG agent.

4. Numerical Results

The performance of the three Power Take-Off (PTO) controllers, BSB, Soft Actor–Critic (SAC), and Deep Deterministic Policy Gradient (DDPG), is evaluated under irregular wave conditions with a single-phase seed realization (42). The environment utilizes the Pierson–Moskowitz spectral distribution with a significant wave height of H s = 2.5 m and a peak period of T p = 6 s. A 300 s simulation window is used to compare heave motion, control forces, instantaneous power, and cumulative absorbed energy.

4.1. Instantaneous Power Absorbed

Figure 6 shows the instantaneous power absorbed under the BSB, SAC, and DDPG controllers. The SAC agent maintains strong positive power bursts throughout the simulation, indicating consistent and effective energy capture. While the BSB controller achieves high peak power values, it also exhibits significant intervals of negative power due to its aggressive switching structure and lack of integrated electrical dynamics. The DDPG agent produces a slightly lower power response; although its motion dynamics resemble those of the SAC agent, it fails to match the peak power output of the entropy-regularized policy.
Figure 6. Instantaneous power absorbed under the BSB, SAC, and DDPG controllers.

4.2. Cumulative Absorbed Energy

Figure 7 illustrates the accumulated energy over the 300 s simulation. For this specific wave realization, the SAC agent and BSB baseline perform similarly, with the BSB controller capturing 9.26 × 10 8 J and the SAC agent capturing 9.24 × 10 8 J. The DDPG agent follows with a cumulative energy of 9.04 × 10 8 J. The BSB results are competitive for this single seed.
Figure 7. Cumulative absorbed energy for the BSB, SAC, and DDPG controllers over the 300 s duration.

4.3. Heave Motion Response

Figure 8 demonstrates that the SAC and DDPG controllers do not produce identical heave trajectories. Specifically, the SAC agent generates consistently larger oscillation amplitudes during several intervals of the simulation, with peaks approaching 4 m. This behavior indicates that the SAC policy actively amplifies the buoy motion to increase the available mechanical energy for harvesting. In contrast, the BSB controller relies on a more rigid switching logic that does not always maximize the resonance potential of the combined hydrodynamic and electrical system.
Figure 8. Heave displacement response for the BSB, SAC, and DDPG controllers.

4.4. Heave Velocity Response

Figure 9 shows the heave velocity response under the BSB, SAC, and DDPG controllers. The heave velocity profiles reinforce the distinction between the two reinforcement learning methods. SAC produces significantly higher velocity peaks, frequently exceeding ± 4 m / s . Meanwhile, the DDPG velocity remains closer to the wave-driven envelope with more moderate excursions. These high-velocity peaks achieved by SAC correlate with the larger instantaneous power bursts required for high energy capture.
Figure 9. Heave velocity response for the BSB, SAC, and DDPG controllers.

4.5. Control Force Behavior

Figure 10 shows the applied control force for the three algorithms. It is observed that all three controllers consistently reach the saturation limit of ± 1.5 × 10 6 N. The control force generated by the SAC controller is very close in switching frequency and magnitude to the BSB algorithm. The DDPG controller also maintains a similar temporal behavior, suggesting that all agents have learned to utilize the maximum available actuation force to excite the system dynamics.
Figure 10. PTO control force profiles for the BSB, SAC, and DDPG controllers.

4.6. Commanded and Applied PTO Force for the BSB

Figure 11 compares the commanded BSB force with the actual applied force resulting from the Direct-Drive Power Take-Off model. The two profiles show good agreement, while the inset highlights how the electrical Power Take-Off dynamics smooth the sharp corners of the square-wave command. These differences arise because the electrical winding inductance and generator constraints prevent instantaneous force changes.
Figure 11. A comparison between commanded and applied PTO force for the BSB controller.
Quantitatively, the energy results in Figure 7 indicate that all controllers achieve comparable energy capture for this specific phase seed. The BSB baseline attains the highest total absorbed energy, E BSB = 9.26 × 10 8 J. The Soft Actor–Critic (SAC) controller reaches E SAC = 9.24 × 10 8 J, which is within 0.22 % of BSB. The DDPG controller achieves E DDPG = 9.04 × 10 8 J, representing a 2.38 % reduction relative to BSB. Unlike earlier results where DDPG collapsed to a low energy policy, the present evaluation shows that DDPG remains close to the benchmark performance under the same sea state and Power Take-Off constraints.

4.7. Quantitative Comparison

The results in Table 2 indicate that all three controllers achieve comparable levels of energy extraction under the considered irregular sea state. The BSB controller attains the highest total absorbed energy, followed very closely by the Soft Actor–Critic (SAC) controller, with a relative difference of less than 0.3 % . The DDPG controller exhibits slightly lower performance, capturing approximately 2.4 % less energy than BSB, but it remains within the same overall energy regime.
Table 2. Absorbed energy and average power for the three PTO controllers under an irregular Pierson–Moskowitz sea state with H s = 2.5 m and T p = 6 s over the full simulation period (0–300 s).
Consistent with the heave and velocity responses, SAC and BSB both induce relatively large motion envelopes and apply stronger PTO forces, resulting in higher instantaneous power levels. The SAC controller achieves this using smooth and continuous control actions, which remain well aligned with the buoy velocity over time. In contrast, the BSB controller relies on high-amplitude switching forces associated with its Bang-Singular-Bang structure, which can introduce short intervals of negative power.
Although the DDPG policy produces more conservative control forces and slightly reduced motion amplitudes, its performance in this scenario does not collapse to a lowenergy regime, as observed in earlier studies. Instead, DDPG maintains stable operation and achieves energy capture that is only marginally lower than the benchmark controllers. These results suggest that, under the present operating conditions and PTO constraints, the dominant factor governing energy extraction is the overall force–velocity alignment rather than the specific control architecture.

4.8. Monte Carlo Simulations

To better assess the robustness of the reinforcement learning (RL) controllers, a Monte Carlo analysis comprising 3000 independent simulations was conducted using randomized wave phase seeds. All simulations were performed under the same irregular Pierson–Moskowitz sea state ( H s = 2.5 m, T p = 6.0 s) over a duration of 300 s. By utilizing identical phase seeds for each controller within this ensemble, a direct head-to-head comparison was achieved. This methodology ensures that the reported performance metrics are not biased by a particular wave realization, providing a statistically meaningful assessment of controller behavior under stochastic wave excitation.
The performance of the SAC agent is illustrated in Figure 12 and Figure 13. The energy histogram in Figure 12 exhibits a unimodal distribution centered at a mean total absorbed energy of approximately 958.41 MJ with relatively narrow dispersion. The corresponding energy versus seed plot in Figure 13 shows a dense, stationary cloud of realizations around the mean value, indicating consistent energy extraction across all phase seeds without signs of instability or divergence. These results demonstrate that the SAC controller generalizes well to different wave phase realizations and maintains stable performance over a large number of stochastic trials.
Figure 12. A histogram of total absorbed energy for the SAC agent over 3000 different seeds.
Figure 13. Superimposed time series traces for the SAC agent over 3000 different seeds.
Similarly, the DDPG agent displays robust behavior, as shown in Figure 14 and Figure 15. In contrast to a preliminary single-phase test, the energy distribution for the 3000-seed run (Figure 14) shows convergence to a high performance policy ( μ ≈ 957.88 MJ). The corresponding time series traces in Figure 15 demonstrate consistent control actions comparable to the SAC agent. This confirms that when tested against the same phase seeds as the baseline, the DDPG agent does not suffer from high variance or stagnation in suboptimal local minima.
Figure 14. A histogram of total absorbed energy for the DDPG agent over 3000 different seeds, over 3000 random wave phase seeds.
Figure 15. Superimposed time series traces for the DDPG agent, showing consistent power generation.
For comparison, the performance of the BSB controller is presented in Figure 16 and Figure 17. While the BSB controller remains a powerful and stable theoretical benchmark for hydrodynamic resonance, its mean energy capture is lower than that of the RL agents. This is because the BSB formulation does not include the electrical generator model, whereas the RL agents successfully learned to maximize energy while accounting for both the hydrodynamics and the electromechanical Power Take-Off system.
Figure 16. A histogram of total absorbed energy for the BSB controller over 3000 random wave phase seeds.
Figure 17. Total absorbed energy versus random seed for the BSB controller over 3000 Monte Carlo realizations.
Table 3 quantifies these results over the 3000 random seeds. Both RL controllers achieve higher mean performance than the BSB baseline under identical wave conditions. Specifically, SAC attains a mean average power of 3194.70 kW, while DDPG achieves 3192.93 kW. These results, validated through identical phase seeds, prove that the RL agents can effectively outperform classical model-based laws by discovering policies that are better suited for the complete electromechanical system.
Table 3. Statistical performance metrics over 3000 random seeds ( H s = 2.5 m, T p = 6.0 s, duration = 300 s).

5. Conclusions

This paper presents the implementation of reinforcement learning for the control of wave energy converters. Two continuous-action reinforcement learning agents based on Deep Deterministic Policy Gradient (DDPG) and Soft Actor–Critic (SAC) were investigated and compared to the Bang-Singular-Bang (BSB) model-based optimal control strategy. The overall conclusion is that both SAC and DDPG achieve performance comparable to BSB under the studied sea state and PTO constraints. These results suggest that reinforcement learning is a suitable approach for wave energy converter control.
The results also highlight an important advantage of RL over BSB. BSB is a modelbased approach, and its optimality depends on the fidelity of the model used to derive the control law. The Monte Carlo simulations show that SAC and DDPG can produce slightly higher absorbed energy than BSB for several phase realizations (approximately 3 % ). This performance difference can be attributed to mismatch between the simplified model used to derive BSB and the higher-fidelity WEC-Sim environment used for training and evaluation. In particular, the BSB formulation does not explicitly include the electrical generator and power electronics dynamics, whereas the WEC-Sim model does. The RL agents adapt their policies to the environment dynamics and therefore can outperform BSB under the same conditions. These observations suggest that RL control may generalize better to real ocean operation than purely model-based control when unmodeled electromechanical dynamics are present.

Author Contributions

O.R.B.H. developed the BSB control and the hydrodynamic modeling, Z.K. developed the two SAC and DDPG methods, M.S. developed the environment for the RL methods to link with WEC-Sim, A.G. supervised the RL developments, and O.A. supervised the development of this research work. All authors have read and agreed to the published version of the manuscript.

Funding

This material is based upon work supported by the National Science Foundation (NSF), USA, under Grant Number 2023436.

Data Availability Statement

The data presented in this study are available from the corresponding author upon reasonable request.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

WECwave energy converter
RLreinforcement learning
PTOPower Take-Off
SACSoft Actor–Critic
DDPGDeep Deterministic Policy Gradient
BSBBang-Singular-Bang
PMPierson–Moskowitz

References

  1. Gunn, K.; Stock-Williams, C. Quantifying the global wave power resource. Renew. Energy 2012, 44, 296–304. [Google Scholar] [CrossRef] [Scilit]
  2. Astariz, S.; Iglesias, G. The economics of wave energy: A review. Renew. Sustain. Energy Rev. 2015, 45, 397–408. [Google Scholar] [CrossRef] [Scilit]
  3. Falnes, J. Ocean Waves and Oscillating Systems: Linear Interactions Including Wave-Energy Extraction; Cambridge University Press: Cambridge, UK, 2002. [Google Scholar]
  4. Ringwood, J.V.; Bacelli, G.; Fusco, F. Energy-Maximizing Control of Wave-Energy Converters: The Development of Control System Technology to Optimize Their Operation. IEEE Control Syst. Mag. 2014, 34, 30–55. [Google Scholar] [CrossRef] [Scilit]
  5. Zou, S.; Abdelkhalik, O.; Robinett, R.; Bacelli, G.; Wilson, D. Optimal control of wave energy converters. Renew. Energy 2017, 103, 217–225. [Google Scholar] [CrossRef] [Scilit]
  6. Anderlini, E.; Forehand, D.I.M.; Stansell, P.; Xiao, Q.; Abusara, M. Control of a Point Absorber Using Reinforcement Learning. IEEE Trans. Sustain. Energy 2016, 7, 1681–1690. [Google Scholar] [CrossRef] [Scilit]
  7. Anderlini, E.; Forehand, D.I.; Bannon, E.; Abusara, M. Constraints implementation in the application of reinforcement learning to the reactive control of a point absorber. In Proceedings of the International Conference on Offshore Mechanics and Arctic Engineering; American Society of Mechanical Engineers: New York, NY, USA, 2017; Volume 57786, p. V010T09A026. [Google Scholar]
  8. Trigueiro, J.; Botto, M.A.; Vieira, S.; Henriques, J. Control of a wave energy converter using reinforcement learning. In Proceedings of the APCA International Conference on Automatic Control and Soft Computing; Springer: Berlin/Heidelberg, Germany, 2022; pp. 567–576. [Google Scholar]
  9. Sarkar, S.; Gundecha, V.; Shmakov, A.; Ghorbanpour, S.; Babu, A.R.; Faraboschi, P.; Cocho, M.; Pichard, A.; Fievez, J. Multiobjective reinforcement learning controller for multi-generator industrial wave energy converter. In Proceedings of the NeurIPs Tackling Climate Change with Machine Learning Workshop, Virtual, 14 December 2021; Volume 2. [Google Scholar]
  10. Ye, M.; Zhang, C.; Ren, Y.; Liu, Z.; Haidn, O.J.; Hu, X. Adaptive optimization of wave energy conversion in oscillatory wave surge converters via SPH simulation and deep reinforcement learning. Renew. Energy 2025, 246, 122887. [Google Scholar] [CrossRef] [Scilit]
  11. Qin, C.; Tang, Y.; Li, W.; Jiang, A.; Wu, F. Reinforcement Learning Control of Direct-Driven Wave Energy Converter Incorporating Constrained Field Weakening Optimization. IEEE Access 2025, 13, 144226–144240. [Google Scholar] [CrossRef] [Scilit]
  12. Ruehl, K.; Keester, A.; Forbush, D.; Grasberger, J.; Husain, S.; Shabara, M.A.; Leon, J.; Ogden, D. WEC-Sim v7.0.0, Version v7.0.0; Zenodo (CERN): Geneva, Switzerland, 2025. [CrossRef]
  13. Lillicrap, T.P.; Hunt, J.J.; Pritzel, A.; Heess, N.; Erez, T.; Tassa, Y.; Silver, D.; Wierstra, D. Continuous control with deep reinforcement learning. arXiv 2015, arXiv:1509.02971. [Google Scholar]
  14. Haarnoja, T.; Zhou, A.; Abbeel, P.; Levine, S. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In Proceedings of the International Conference on Machine Learning; Pmlr: Cambridge, MA, USA, 2018; pp. 1861–1870. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.