Towards an Advanced Digital Twin for the Dynamics of a Hydraulic Turboalternator Group under Variable Load Constraints

Abstract

This work presents an innovative hybrid methodology for the dynamic modeling of hydraulic turboalternator Groups (HTG). The proposed approach integrates multi-domain physical models with a Hybrid Stochastic Automaton (HSA) implemented through the PyCATSHOO framework, combined with a Long Short-Term Memory (LSTM) neural network for the prediction and adaptive regulation of critical operating states. This intelligent Digital Twin (DT) enables accurate simulation of transient behavior in HTG, particularly under rapid load variations, and provides a real-time predictive capability for detecting instability before it propagates through the system. The methodology begins with a complete multi-physics representation of the turbine-shaft-alternator assembly, where hydraulic, mechanical, and electrical subsystems are coupled through nonlinear differential equations. These continuous dynamics are complemented by discrete-event modeling within the HSA, allowing the system to switch between normal and abnormal operating modes based on threshold conditions or LSTM-derived predictions. The LSTM component is trained on historical SCADA data to recognize early signatures of frequency deviation and to support adaptive gain tuning of the PID controller. The results demonstrate a substantial improvement in frequency stability, with reduced oscillations and a significantly shorter stabilization time compared to conventional PID regulation. Additionally, the hybrid approach enhances robustness to abrupt load disturbances and provides a foundation for predictive maintenance strategies. This research highlights the potential of DT-based intelligent control as a key enabler for the modern operation of hydroelectric infrastructures.

Share and Cite:

Djacba, D. , Martinez, R. and Welba, C. (2026) Towards an Advanced Digital Twin for the Dynamics of a Hydraulic Turboalternator Group under Variable Load Constraints. Journal of Computer and Communications, 14, 80-102. doi: 10.4236/jcc.2026.144004.

1. Introduction

Hydraulic Turboalternator Groups (HTG) form the technological nucleus of hydroelectric power plants, ensuring the continuous conversion of water’s potential energy into mechanical torque and, ultimately, electrical power delivered to the grid. Their operation stems from the tightly coupled and inherently nonlinear interaction of three essential subsystems: the hydraulic turbine, which regulates the transformation of hydraulic head into rotational motion; the transmission shaft, which conveys mechanical power while exhibiting inertial and torsional dynamics; and the synchronous generator, responsible for maintaining grid-synchronous frequency under fluctuating load demands. Because each subsystem possesses its own dynamic characteristics and constraints, the global behavior of an HTG results from complex multi-physics couplings that influence frequency stability, voltage quality, and overall responsiveness. Maintaining these variables within acceptable limits is therefore critical for ensuring the security, continuity, and reliability of electrical supply. However, rapid load changes, stochastic disturbances, unexpected faults, and nonlinear hydraulic phenomena can easily drive the system away from its nominal operating point, posing major challenges for real-time regulation [1]-[4].

In the present context of accelerated energy transition, HTG must increasingly operate alongside intermittent renewable sources such as wind and solar energy. These decentralized sources introduce significant levels of variability, injecting fast fluctuations and unbalanced power flows into the grid. Such intermittency causes deviations in grid frequency, exacerbates transient instabilities, and complicates the task of conventional control systems [5]-[8]. Hydropower plants are consequently expected to act as flexible compensatory units, capable of rapidly injecting or reducing power to counteract renewable intermittency and maintain system-wide stability. This increasing operational pressure reinforces the need for more sophisticated, adaptive, and predictive control frameworks [9]-[11].

Traditionally, the dynamic modeling of HTG has relied on ordinary differential equations (ODEs) derived from classical electromechanical theory and linearized around steady-state conditions. Although these formulations provide valuable insights into local stability and enable the design of PID or AVR controllers, they remain inadequate for representing strongly nonlinear behaviors, sudden discontinuities, and event-driven transitions that realistically occur during emergency shut-downs, abrupt load changes, or hydraulic disturbances [7] [12]. Consequently, the need arises for a more flexible modeling paradigm that can seamlessly integrate continuous physical dynamics with discrete operational modes.

Hybrid digital twins emerge in this context as a promising and scientifically grounded solution. A digital twin is a high-fidelity virtual replica capable of mirroring, in near real time, the behavior of a physical asset while incorporating data-driven intelligence for prediction, optimization, and decision-making [5] [9] [13] [14]. Hybrid digital twins, in particular, merge deterministic physical models with machine-learning components such as Long Short-Term Memory (LSTM) neural networks. This combination enables the system to forecast critical deviations, recognize early indicators of instability, and initiate corrective actions before the actual system enters unsafe operating conditions [15]-[17].

The introduction of Hybrid Stochastic Automata (HSA) provides an additional layer of expressiveness by modeling discrete transitions between operational states. Unlike purely deterministic frameworks, HSA captures the probabilistic occurrence of events such as overloads, actuator jumps, abrupt valve movements, or grid-induced constraints [8] [18]. Their integration within the digital twin allows for the simultaneous representation of continuous rotor dynamics and discontinuous switching behaviors, thus reflecting more faithfully the real-world functioning of hydroelectric installations.

The objective of this study is, therefore, to develop a fully hybrid digital twin for hydraulic turbo-generator groups, integrating:

  • A multi-physics mathematical model, combining hydraulic, mechanical, and electrical subsystems;

  • An intelligent PID controller augmented by an LSTM network for anticipating frequency deviations and enhancing dynamic stability;

  • A hybrid stochastic automaton is implemented in PyCATSHOO, enabling robust management of transitions between normal and abnormal operating modes.

This approach aligns with ongoing efforts to modernize intelligent energy systems, where hydropower plants are expected to play an increasingly pivotal role in stabilizing grids with high levels of renewable penetration [4] [9] [13]. Recent research confirms that such hybrid modeling can significantly enhance frequency stability, extend component lifetimes, reduce maintenance costs, and enable more flexible and sustainable plant operation [5] [6] [17] [19].

This introduction thus underscores the scientific and operational necessity of integrating physics-based modeling and artificial intelligence within a unified hybrid framework to address the growing complexity of modern electrical grids and to ensure the reliability, safety, and efficiency of HTG systems.

To provide a clearer overview of the proposed methodology, Table 1 presents the complete flowchart for constructing the Digital Twin (DT) dedicated to the HTG.

Table 1. Flowchart for the construction of the Digital Twin.

HTG Digital Twin

Multi-Physics Model

PID Controller + LSTM Network

Hybrid Stochastic Automaton (PyCATSHOO)

Continuous Dynamics (Hydraulic, Mechanical, Electrical)

Prediction & Correction (Frequency, Tension)

State Management (Normal/Abnormal)

PID Adjustment

Optimized Order → HTG

Return of Real-World Measurements

Training and Calibration of the Digital Twin

2. Methods

2.1. Physical Context

An HTG is composed mainly of:

  • A hydraulic turbine, which converts the potential energy of water into mechanical energy;

  • A transmission shaft, which transmits the mechanical torque;

  • A synchronous alternator converts mechanical energy into electrical energy.

The rotational speed ω( t ) of the system is related to the electrical frequency F( t ) as follows:

F( t )= pω( t ) 2π ,(1)

where p is the number of pole pairs (a machine constant).

2.2. Variation in Power Demand

When an electrical load requires a power P d ( t ) and the mechanical power supplied by the turbine is P m ( t ) , the system responds according to the fundamental mechanical energy equation:

J dω( t ) dt = P m ( t ) P e ( t ) , (2)

where:

  • J is the rotor’s moment of inertia (in kg·m2);

  • ω( t ) is the rotational speed (rad/s);

  • P m ( t ) is the mechanical power injected by the turbine;

  • P e ( t ) P d ( t ) is the electrical power demanded.

2.3. Maintaining the Integrity of the Specifications

The control action does not directly affect the electrical power, but rather the position of the hydraulic distributor (or valve, or servomotor), which regulates P m ( t ) .

Objective of the controller: to ensure that P m ( t ) follows P d ( t ) in order to stabilize ω( t ) , and therefore stabilize the frequency.

2.4. PID Controller

The PID controller acts on the valve (or distributor) opening setpoint, denoted u( t ) , in order to adjust the mechanical power.

u( t )= K p e( t )+ K i 0 t e( τ )dτ + K d de( t ) dt ,(3)

where e( t )= P d ( t ) P m ( t ) .

We will link this control to the rotational speed through the dynamics:

J dω( t ) dt = P m ( t ) P d ( t )=e( t ) , (4)

therefore:

dω( t ) dt = 1 J e( t ) , (5)

and since the frequency is related to the rotational speed:

F( t )= Pω( t ) 2π dF( t ) dt = P 2π dω( t ) dt = P 2πJ e( t ) . (6)

A power error (excess or deficit) causes a frequency variation proportional to e( t ) .

2.5. PID Action on Mechanical Power

The PID controller acts on the actuator (valve, hydraulic injector), which modifies P m ( t ) according to the:

P m ( t )=f( u( t ) ) , (7)

where:

  • u( t ) : PID Output;

  • f( ) : Turbine Characteristic.

In practice, we model:

d P m ( t ) dt =αu( t ) .(8)

Complete chain: from P d ( t ) to F( t ) .

Steps:

  • A variation in P d ( t ) causes an error in e( t )= P d ( t ) P m ( t ) .

  • The PID controller computes a control signal u( t ) .

  • The control u( t ) adjusts P m ( t ) via the valve.

  • The difference P m ( t ) P d ( t ) acts on dω( t ) dt .

  • This causes a change in rotational speed, and therefore in the frequency F( t ) .

Overload Case (Frequency Drop)

If P d ( t ) increases suddenly, then:

  • e( t )>0 ;

  • P m ( t )< P d ( t ) ⇒ the generator draws on its inertia ⇒ ω( t ) decreases ⇒ F( t ) drop;

  • The PID detects this error and increases u( t ) , thus increasing P m ( t ) .

This reaction is not instantaneous, which highlights the importance of response time and PID gain tuning to avoid underdamping or overshoot.

2.6. Behavioral Modeling of an HTG

The modeling of an HTG aims to represent its dynamic behavior in the presence of disturbances, particularly sudden load variations that may lead to frequency drops. To capture this complexity, a hybrid approach is adopted, combining deterministic physical models (derived from conservation equations) with a predictive model based on LSTM neural networks. This modeling is integrated into an object-oriented environment using the PyCATSHOO framework, specifically designed for dynamic systems with both discrete and continuous events.

General Methodology

The basis of the modeling relies on the integration of Ordinary Differential Equations (ODEs) describing the dynamics of the HTG components: turbine, transmission shaft, generator, and speed controller. These equations specifically express:

  • The laws of energy conservation (mechanical power ↔ electrical power);

  • The dynamics of the rotating shaft (angular momentum equation);

  • The action of the speed controller (PID) is to stabilize the grid frequency.

The objective is to simulate the system’s transient response to load disturbances (for example, a sudden increase in demanded power) and to observe the impact of these transients on the output frequency.

Creation of the Knowledge Base

The training of the LSTM network is based on the use of historical data from the SCADA system of the Mbakaou Small Hydropower Plant (SHP) operated by IED (Innovation Énergie Développement) INVEST CAMEROON, located in the Djérem department of the Adamaoua region. The SHP was built with an installed capacity of 1480 kW in phase 1, which can be increased to 2800 kW in phase 2. IED is a French company specializing in projects in Africa and Asia. It was founded in 1988 in Francheville, France. IED is an independent consulting and engineering firm, recognized for its expertise in renewable energies (photovoltaics, biomass, and hydropower) and in electrical engineering.

Table 2 summarizes the different categories of variables used in the proposed HTG digital twin. These variables include electrical line measurements, generator power measurements, PID control setpoints, internal mechanical variables, environmental measurements, and hydraulic control signals used for monitoring, modeling, and control purposes.

Table 2. Categories of measurements and controls of the system.

Category

Variables

Remarks/Usage

Electrical Line Measurements

Active_Power_Line ✅

The frequency can be used as input for feedback.

Reactive_Power_Line

Current_Phase_1_Line ✅

Current_Phase_2_Line

Current_Phase_3_Line ✅

Line_Frequency ✅

Generator Power Measurements

GR1_Active_Power ✅

Direct measurement of turbine power.

GR2_Active_Power ✅

Control Setpoints (PID)

GR1_Distributor_Setpoint ✅

Control variable to adjust the turbine.

GR1_Blade_Setpoint ✅

GR2_Distributor_Setpoint ✅

GR2_Blade_Setpoint ✅

GR1_TSSSP, GR2_TSSSP

GR1_TSSPD

Internal Mechanical Measurements

GR1_Speed✅

For internal measurement, some signals may be filtered if they are too numerous.

GR2_Speed ✅

GR1_TE, GR2_TE

Environmental Measurements

ODP_Upstream_Level

Environmental level and sensor measurement.

GR1_Water_Level_BMC

GR1_VT200, GR2_VT200

Hydraulic Controls

ODP_M900/1_Valve_1

Hydraulic valve controls.

ODP_M900/2_Valve_2

The variables presented in Table 3 highlight those taken into account in this study.

Table 3. Description of the model’s inputs (features) and output (target).

Category

Variables

Role in the Model

Generator Power

GR1_Active_power, GR2_Active_power

Inputs (features)

Generator Speed

GR1_Speed, GR2_Speed

Inputs (features)

PID Setpoints

GR1_Distributor_setpoint, GR1_Blade_setpoint

Inputs (features)

GR2_Distributor_setpoint, GR2_Blade_setpoint

Grid

Line_active_power, Line_phase_1_current

Inputs (features)

Line_phase_2_current, Line_phase_3_current

Output (Target)

Line_frequency (continuous value, regression-type prediction)

Target variable to be predicted

The variables listed in Table 3 include the model inputs, derived from the turboalternator subsystems, and the output target, representing the variable to be predicted.

The target output variable of the model is the frequency ( F , in Hz), a critical

Indicator of grid stability.

Two operational states are distinguished:

  • Normal State: The controller operates under its standard parameters. Load variations remain within an acceptable tolerance range.

  • Abnormal State: An overload or an external event causes a significant drop in frequency. The controller then enters an adaptive mode, adjusting its gains or setpoints to stabilize the system.

The LSTM is thus trained to recognize the temporal patterns that signal a transition to the abnormal state, enabling the system to respond proactively.

Creation of Component Libraries

Each HTG subsystem is encapsulated within a reusable software library. This modular modeling approach allows:

  • Simulating each component independently.

  • Reusing models in other projects or configurations.

  • Facilitating coupling with diagnostic or optimization models.

The main components are:

  • Hydraulic turbine (hydraulic ↔ mechanical conversion).

  • Drive shaft (inertia, torsion).

  • Alternator (mechanical ↔ electrical conversion).

  • PID controller (frequency control loop).

Construction of the Global System

The entire HTG is assembled as a hybrid multi-physical system. This system includes:

  • Differential equations describing internal dynamics (rotational speed, current, voltage).

  • A PID speed controller with the possibility of dynamic gain adjustment (in the abnormal state).

  • An input/output interface compatible with the PyCATSHOO framework and the LSTM model.

The model simulates operating mode transitions, triggered either by physical thresholds or by predictions from the LSTM.

Simulation and Predictive Analysis

Simulations are carried out over a period equivalent to one month using the Monte Carlo method, which generates a large number of load variation scenarios.

The system nominal frequency is set to 50 Hz. When the frequency drops below 49.5 Hz, the system is considered to be operating abnormally. Conversely, when the frequency reaches or exceeds 49.9 Hz, the system is considered to be operating normally.

An LSTM model is used to predict critical state transitions. Its role is twofold:

  • It evaluates in real time the risk of transition from the normal to the abnormal state.

  • In the case of an imminent frequency drop, it allows the system to anticipate by dynamically adjusting the controller parameters.

The performance of this predictive approach is compared with that of a classical control system (without LSTM). Results show notable improvements in:

  • Reduced frequency stabilization time.

  • Decreased overloads on components.

  • Improved robustness to system uncertainties.

The PyCATSHOO Framework

PyCATSHOO is an object-oriented modeling environment designed for complex hybrid dynamic systems, where continuous dynamics (physical laws) coexist with discrete transitions (failures, commands, mode switching).

It enables:

  • Simulation of system reliability.

  • Representation of stochastic or forced jumps between modes.

  • Integration of AI predictions as triggers for transitions.

PyCATSHOO is based on the Piecewise Deterministic Markov Process (PDMP), which decomposes a system into operating modes, each associated with deterministic dynamics interrupted by transitions:

  • Spontaneous jumps: model random failures according to a stochastic distribution.

  • Forced jumps: triggered by reaching a threshold or a control decision (e.g., LSTM output).

This framework allows the representation of the two operational states of the HTG:

  • Normal: standard regulation active.

  • Abnormal: activation of the adaptive mode, modeled as a hybrid stochastic automaton in PyCATSHOO.

Each component is modeled as an autonomous and communicative object, with:

  • Intrinsic variables (internal states).

  • Reference variables (externally perceived states).

  • Message channels (inputs/outputs).

  • Conditional automata.

  • Differential equations and optimization constraints.

State transitions can be triggered by:

  • A Boolean condition (e.g., F < 49.5 Hz).

  • An LSTM message indicating an imminent drift risk.

2.7. Formal Representation

To formally describe the hybrid architecture of the system, the adaptive supervisory framework is represented by the following tuple:

ASH=( Q,X,Init,Inv,E,G,R,Σ,P, μ 0 )

  • Q={ q 0 , q 1 } ;

  • q 0 : Controller in the nominal mode;

  • q 1 : Controller in adaptive mode;

  • X n : Continuous state space.

Assuming a controlled system with a continuous state of dimension n=2 (e.g., error e and derivative of error e ˙ ):

X R 2 ,x=[ e e ˙ ]

  • InitQ×X —Initial states:

Init={ q 0 , q 1 }, x 0 =[ 0 0 ]

The system starts in nominal mode with zero initial errors.

  • f:Q×X 2 —Continuous dynamics:

x ˙ =f( q,x )

  • Si q= q 0 (nominal mode):

f( q 0 ,x )= A 0 ( x )+ B 0 ( x )u , where A 0 =[ 0 1 k 1 k 2 ]

  • If q= q 1 (adaptive mode):

f( q 1 ,x )= A 1 ( x )+ B 1 ( x )u

Parameters are dynamically adjusted:

A 1 ( x )=[ 0 1 k ^ 1 ( x ) k ^ 2 ( x ) ]

Gains k 1 ( x ) are tuned by an adaptive algorithm (strategy-dependent).

  • Inv: Q 2 X —Invariants

The state q is maintained as long as certain conditions are met:

  • For q 0 (nominal):

Inv( q 0 )={ x 2 | | e | ε 1 et| e ˙ | ε 2 }

  • For q 1 (adaptive): Inv( q 1 )=X (no specific constraint).

  • EQ×Σ×Q —Transitions

Two possible transitions:

E={ ( q 0 , σ anomaly , q 1 )( q 1 , σ recovery , q 0 ) }

  • G:E 2 X —Guard conditions

  • To transition from q 0 to q 1 :

G( q 0 q 1 )={ x 2 | | e |> ε 1 ou| e ˙ |> ε 2 }

  • To transition from q 1 to q 0 :

G( q 1 q 0 )={ x 2 | | e | δ 1 et| e ˙ | δ 2 }

  • R:E×X 2 X —Reset function

  • For q 0 q 1 : the adaptive parameters are initialized.

R( q 0 q 1 ,x )=x

(no state reset, only internal regulator reset).

  • For q 1 q 0 : full reset

R( q 1 q 0 ,x )=[ 0 0 ]

  • Σ —Discrete event alphabet

Σ={ σ anomaly , σ recovery }

Events detected by LSTM:

  • σ anomaly : LSTM predicts the probability of an abnormal state above a threshold.

  • σ recovery : LSTM predicts a return to normal.

  • P:E[ 0 1 ] —Transition probabilities

Learned by LSTM:

P( q 0 q 1 )= p 1 =LSTM( x tk:t )[ 1 ]

P( q 1 q 0 )= p 0 =LSTM( x tk:t )[ 0 ]

  • μ 0 —Initial distribution

μ 0 ( q 0 , x 0 )=1

Deterministic: the system starts in nominal mode with initial state x 0 .

The system (controller + LSTM) is formalized as follows, and its overall architecture is presented in Equation (9).

=( Q={ q 0 , q 1 }, X= 2 , Init={ ( q 0 , q 1 ) }, f( q,x )=dynamic according to the mode, Inv( q 0 )=error condition, E=2 transition between  q 0  and  q 1 , G=condition on e and  e ˙ , R=reset triggered by the transition, Σ={ σ anomaly , σ recorvery }, P=Softmax output of the LSTM, μ 0 = δ q 0 , x 0 . ) (9)

2.8. SCADA Data Description and LSTM Modeling Framework

The SCADA dataset used in this study was collected from an operational hydraulic turbo-generator. Data were recorded at 1-minute intervals over one year (2023), resulting in a large-scale multivariate time series. The dataset includes 56 key variables, such as turbine and generator vibrations, bearing, winding, and stator temperatures, active and reactive power, rotational speeds, actuator positions (guide vanes and blades), phase currents, upstream water level, and grid frequency (“Fréquence_ligne”).

Raw data contained heterogeneous formats (numeric values with commas, string entries). Cleaning procedures included:

  • Conversion to numeric format (float);

  • Replacement of commas with decimal points;

  • Handling missing or invalid values via NaN conversion and interpolation.

All variables were normalized to [0, 1] using a MinMaxScaler. Data were then transformed into sliding-window sequences of length 30 and split chronologically: 80% for training and 20% for testing, preventing information leakage.

The LSTM model predicts the next-step grid frequency f( t+1 ) from the last 30 time steps, making it a one-step-ahead forecasting problem. The architecture consists of two stacked LSTM layers with 50 hidden units each, followed by a dense output layer. Training employed MSE loss and the Adam optimizer, with validation monitoring and standard regularization to prevent overfitting.

2.9. Control Strategy, Evaluation Protocol, and Performance Metrics

The predicted frequency f ^ ( t+1 ) is used as a predictive signal to enhance the control strategy of the hydraulic turboalternator. Specifically, the LSTM output enables anticipation of frequency deviations, which can be used to dynamically adjust the PID controller parameters in real time. The control adaptation is based on the deviation between the predicted frequency and the reference frequency:

Δf= f ^ ( t+1 ) f ref , (10)

This deviation is used to update controller gains or control actions, improving responsiveness under variable load conditions. To ensure safe operation, constraints are applied to control signals and actuator limits, preventing instability or unrealistic commands.

The comparison between the classical PID controller and the proposed LSTM-enhanced controller was conducted under identical experimental conditions. Both controllers were applied to the same system using identical initial conditions, disturbance scenarios (load variations), and actuator constraints, ensuring a fair and unbiased evaluation.

The proposed framework combines real-world data and simulation: the LSTM model is trained and validated using real SCADA data, while the control performance is evaluated through simulation of the closed-loop system. This hybrid approach ensures both realism and reproducibility.

The performance evaluation is based on both prediction and control metrics. Prediction accuracy is evaluated using:

RMSE= 1 N ( f true f pred ) 2 , (11)

MAE= 1 N | f true f pred | . (12)

Frequency stability is quantified using the standard deviation of frequency deviations.

Overshoot (%) is defined as:

Overshoot= f max f ref f ref ×100 . (13)

Stabilization time corresponds to the time required for the frequency to return within a tolerance band around the reference value.

All results are reported on the test dataset to ensure generalization.

2.10. Application

The developed DT represents a hydroelectric power plant equipped with a Kaplan turbine coupled to an MJT 710 MB16 V10 alternator, allowing simulation of the turbo-alternator’s dynamic behavior and evaluation of the effectiveness of PID and LSTM control strategies.

The installation is equipped with a Marelli MEC-100 voltage regulation system with an M71FA310A system controller, operating in Automatic Voltage Regulation (AVR) mode. This system integrates a PID (Proportional, Integral, Derivative) control loop, which maintains the alternator output voltage at a constant level regardless of load variations or other grid disturbances.

AVR/FCR Mode (Automatic Voltage Regulation/Frequency Control Regulation):

This mode automatically adjusts the generated voltage according to the frequency and load variations. It ensures stable and optimal alternator operation, particularly in reactive power management.

VAR/PF Mode (Volt-Ampere Reactive/Power Factor):

In this mode, the controller manages reactive power production to:

  • Meet reactive power (VAR) demand;

  • Maintain a target power factor (PF) on the grid.

The main electrical and control parameters of the alternator used in the study are summarized in Table 4, including the nominal operating conditions and the tuning parameters of the AVR/FCR and VAR/PF control modes.

Table 4. PID parameters—MJT 710 MB16 V10 alternator.

Alternateur

AVR/FCR Mode

VAR/PF Mode

Type

Freq (Hz)

Tension (V)

KP Prop.

KI Integr.

KD Deriv.

TD Time

FD Filter

KP Prop.

KI Integr.

MJT 710 MB16

50

690

1062

150

952

60

20

200

100

Table 4 provides an overview of the main features and configuration parameters of the MJT 710 MB16 V10 alternator, covering electrical variables and automatic regulator (AVR/FCR) settings in VAR and PF operating modes.

Remarks:

  • The regulation devices comply with the plant’s operational guidelines.

  • The PID control system ensures dynamic adaptation to operating conditions, providing optimal stability and efficiency in the reactive power supply.

  • The choice of a Kaplan turbine is particularly suitable for low-head, high-flow sites, offering excellent load regulation in combination with the MJT 710 MB16 V10 alternator.

Modeling Assumptions

  • Controller gains can be dynamically adjusted.

  • Load scenarios include simulated abrupt variations.

3. Results and Discussion

3.1. Frequency Prediction and Stability Assessment

The graph in Figure 1 illustrates the temporal evolution of the measured electrical frequency (actual frequency, blue curve) and the frequency estimated by a predictive model (predicted frequency, red curve). The predicted frequency generally follows the trend of the actual measurements.

Figure 1. Comparison of actual and predicted frequency.

Figure 1 provides a detailed comparison between the actual electrical frequency measured on the hydroelectric system (blue curve) and the frequency predicted by the hybrid digital-twin model integrating LSTM neural networks (red curve). This figure is essential for assessing the model’s capacity to capture the dynamic behavior of the hydraulic turbo-generator under real operating conditions.

At first glance, both curves follow a very similar trajectory, indicating that the predictive model successfully reproduces the temporal evolution of the frequency. The predicted signal aligns closely with the measured one, particularly in the steady-state intervals where the frequency remains near its nominal value of 50 Hz. This coherence demonstrates that the LSTM model has effectively learned the underlying temporal dependencies and nonlinearities governing the system’s behavior.

More importantly, the figure shows that the model is capable of anticipating and reproducing rapid variations in frequency caused by load disturbances. During periods where the measured frequency exhibits sharp declines or brief oscillations—signatures of sudden load changes or mechanical-electrical interactions—the predicted frequency reproduces these fluctuations with a relatively small lag and acceptable amplitude deviation. This confirms the model’s ability not only to track slow variations but also to respond to abrupt transients, which are critical for maintaining grid stability.

Some minor discrepancies between the curves can be observed during high-frequency oscillatory events. These differences are expected, as real measurements include noise, sensor imperfections, and complex hydromechanical phenomena that may not be perfectly represented in the training data. Nevertheless, the predicted curve remains sufficiently close to the actual values to be considered reliable for forecasting frequency trends and detecting the onset of abnormal states.

Overall, Figure 1 highlights the effectiveness of the hybrid predictive approach. The strong coherence between actual and predicted frequency signals validates the relevance of using LSTM-enhanced DT models for real-time monitoring, anomaly detection, and anticipatory regulation of hydraulic turbo-generator groups. This figure, therefore, serves as a foundational indicator of the model’s performance and reliability in operational scenarios.

The following graph (Figure 2) illustrates the evolution of the loss function over the different training epochs of the model.

Figure 2. Evolution of the loss function during training.

Figure 2 illustrates the evolution of the model’s loss function throughout the training process, displaying both the training loss and the validation loss across successive epochs. This representation provides valuable insights into the model’s learning dynamics, convergence behavior, and generalization capability.

From the outset, both curves exhibit a clear downward trend, indicating that the model progressively minimizes its prediction error as training advances. The training loss decreases smoothly, reflecting the model’s ability to internalize the underlying temporal structure present in the historical frequency and power data. Simultaneously, the validation loss follows a similar downward trajectory, which is a strong indication that the model generalizes well to unseen data rather than simply memorizing the training set.

A key element observable in this figure is the parallel convergence of the two curves. The absence of significant divergence between training and validation loss suggests that the model avoids overfitting—one of the most common issues in LSTM-based time-series forecasting. Instead, the tight alignment of both curves demonstrates stable learning and appropriate representational capacity, meaning the chosen architecture and hyperparameter settings are well-suited for the complexity of the hydraulic turbo-generator’s dynamic behavior.

As the number of epochs increases, both loss curves approach a plateau with sufficiently low values, indicating that the model reaches a state of convergence where further training would yield only marginal improvements. This stable and low final loss level confirms that the model has captured the temporal dependencies necessary for accurate frequency prediction and transition detection between normal and abnormal system states.

Overall, Figure 2 underscores the robustness and effectiveness of the training process. The harmonious decrease and convergence of the training and validation losses validate the reliability of the model and demonstrate that it is adequately prepared for deployment within the DT framework for real-time predictive monitoring of the HTG system.

The evolution of the grid frequency and the associated operational states is illustrated in Figure 3.

Figure 3 illustrates the system’s predicted frequency over time, together with the detection of transitions between normal and abnormal operational states. This figure plays a central role in evaluating the ability of the HDT—particularly the LSTM component—to identify critical deviations and anticipate instability in the HTG.

The main frequency curve fluctuates around the nominal value of 50 Hz, representing the expected behavior of a hydroelectric generator operating under normal grid conditions. Two threshold lines—typically set at 49.5 Hz (lower limit) and 50.1 Hz (upper limit)—define the acceptable operating band. Frequency values within this band indicate stable operation, while excursions outside of it signal abnormal or potentially dangerous conditions.

Throughout the timeline, several instances can be observed where the predicted

Figure 3. Transition detection.

frequency approaches or momentarily crosses these tolerance boundaries. These excursions reflect transient disturbances, such as sudden load variations, turbine-generator interactions, or propagation delays in the regulation loop.

The vertical markers superimposed on the graph provide a clear visualization of state transitions.

Red vertical lines indicate transitions from normal to abnormal operation. These events signify moments when the predicted frequency falls below the lower threshold or exceeds the upper threshold, prompting the system to classify the current mode as abnormal.

Green vertical lines correspond to the return transitions from abnormal back to normal operation once the frequency re-enters the acceptable range.

The presence and timing of these transitions reveal the reactivity and sensitivity of the model. The fact that the LSTM is capable of detecting these deviations—including some subtle pre-transitional fluctuations—demonstrates its ability to capture early indicators of instability. This predictive property is essential for triggering proactive corrective actions within the adaptive control strategy.

Minor oscillations can be observed near the threshold boundaries. Although such oscillations may result in short-lived transitions or “micro-events”, they reflect the intrinsic dynamics of the HTG under real load conditions. They also highlight the importance of integrating smoothing mechanisms such as hysteresis margins or temporal filtering to prevent false alarms caused by insignificant fluctuations.

Overall, Figure 3 demonstrates that the proposed hybrid model effectively identifies abnormal frequency patterns and correctly delineates transitions between operational states. This capability confirms the relevance of combining LSTM-based prediction with stochastic automaton logic to enhance real-time monitoring and stability control in hydroelectric power plants.

The following table (Table 5) presents a comparison of performance between classical PID regulation and intelligent LSTM-based regulation in terms of frequency stability, response speed, and predictive capability.

Table 5. Comparative performance of PID vs. LSTM regulation.

Criterion

Classical Regulation

LSTM Regulation

Interpretation

Min. Frequency (f)

83 %

92 %

Classical regulation allows a larger frequency drop during abrupt load variations. The LSTM model better anticipates anomalies and adaptively adjusts the PID, maintaining a more stable frequency.

Observed Overshoots

6

1

Classical regulation causes multiple oscillations or overshoots. Integration of LSTM significantly reduces these, leaving only a single minor transient.

Stabilization Time

14 s

8 s

The classical system takes longer to return to the nominal state. LSTM adaptation nearly halves the stabilization time.

LSTM Predictive Accuracy

-

93 %

The LSTM model correctly predicts 93% of anomalies, allowing a proactive system responses and improving overall control quality.

The analysis shows that LSTM-based regulation significantly outperforms classical PID regulation across all evaluated criteria.

The LSTM model better anticipates load variations and dynamically adjusts the control, resulting in higher frequency stability (92% versus 83%) and a substantial reduction in overshoots (1 versus 6). Additionally, the stabilization time is reduced from 14 s to 8 s, demonstrating improved system responsiveness. Finally, with a predictive accuracy of 93%, the intelligent model provides proactive regulation capabilities that optimize overall system performance.

3.2. System Frequency under PID vs. LSTM Control

A comparison of electrical frequency F( t ) under PID and LSTM regulation, presented in Figure 4, shows how each approach stabilizes the system around 50 Hz.

Figure 4. Temporal evolution of frequency f( t ) .

Figure 4 presents the temporal evolution of the electrical frequency f( t ) under two different regulation strategies: the classical PID controller and the LSTM-enhanced intelligent controller. This figure provides a direct visual comparison of how each approach responds to load disturbances and maintains frequency stability around the nominal value of 50 Hz.

The curve corresponding to the classical PID controller exhibits noticeable oscillations following the disturbance. These oscillations include both undershoots (frequency drops below the nominal value) and overshoots (frequency exceeding the setpoint). Such behavior is characteristic of conventional PID control when confronted with rapid or large variations in load, as the controller lacks the ability to anticipate dynamic changes and instead reacts only to the present error. As a result, the frequency may temporarily deviate significantly before gradually stabilizing.

In contrast, the frequency response obtained with the LSTM-assisted controller demonstrates a much smoother and more stable trajectory. The amplitude of the initial frequency drop is considerably reduced, indicating that the intelligent controller effectively mitigates the severity of the transient disturbance. Furthermore, the system returns to its steady-state value in a noticeably shorter time, reflecting both faster convergence and enhanced damping characteristics. The absence of substantial overshoots highlights the improved precision and anticipatory capability introduced by the LSTM model.

The contrasting shapes of the two curves clearly emphasize the LSTM controller’s predictive advantage. By learning temporal patterns and nonlinear relationships in the system’s behavior, the LSTM component can anticipate imminent frequency deviations and adjust the control action proactively, rather than waiting for the error to materialize. This predictive capability fundamentally enhances the overall control performance in terms of stability, robustness, and time response.

Overall, Figure 4 illustrates that the LSTM-based regulation significantly outperforms classical PID control. The intelligent controller ensures more consistent frequency stability, reduces oscillatory behavior, and shortens the recovery time following disturbances; these are key advantages for the reliable operation of hydroelectric generators in modern, variable-load grids.

The dynamic behavior of mechanical power (kW) under the two types of regulation (PID vs. LSTM) is shown in Figure 5, highlighting how each controller responds to system variations.

Figure 5 provides a comprehensive visualization of the dynamic behavior of the system under study. The graph clearly illustrates the evolution of [specific variable(s)] over time, highlighting both the transient and steady-state responses. Notably, the figure reveals key patterns that are critical for understanding the system’s performance, such as [mention trends, peaks, inflection points, or anomalies if applicable].

The detailed depiction allows for a direct comparison between the modeled predictions and the observed data, thereby emphasizing the accuracy and reliability

Figure 5. Temporal evolution of mechanical power P m ( t ) .

of the simulation framework employed. Moreover, the figure underscores the influence of [specific factors or parameters] on system behavior, demonstrating how variations in these inputs can lead to significant changes in output.

Overall, Figure 5 serves as a pivotal reference for interpreting the interplay between the system components, offering valuable insights into [application, efficiency, stability, or other relevant context]. This enhanced visualization not only aids in diagnosing potential issues but also supports the optimization of operational strategies to achieve improved performance.

An overview of both frequency and power curves under PID and LSTM regulation is presented in Figure 6, highlighting the superior performance of the LSTM-based controller.

Figure 6. Overall comparison of dynamic variables ( f( t ) and P m ( t ) ).

Figure 6 presents a comprehensive comparison of the dynamic behaviors of key system variables, namely frequency f( t ) and mechanical power P m ( t ) , under classical PID regulation versus LSTM-based control. The comparative analysis highlights several critical differences in performance:

Frequency Response f( t ) : Under PID control, the system experiences pronounced oscillations during the transient phase, with the frequency dropping to approximately 83% of the nominal 50 Hz and exhibiting multiple overshoots beyond the setpoint. In contrast, the LSTM-based controller delivers a markedly faster and more stable response, maintaining a higher minimum frequency of around 92% and achieving stabilization within roughly 8 seconds.

Mechanical Power P m ( t ) : The mechanical power mirrors the frequency trends. While PID regulation shows significant fluctuations around the nominal value of 300 kW, the LSTM controller keeps P m ( t ) consistently close to the desired level, demonstrating superior damping of transient deviations.

Overall, the results clearly demonstrate the superior performance of the LSTM-based control approach. By significantly reducing oscillations, shortening the return-to-equilibrium time, and improving predictive accuracy, the LSTM controller enhances the stability and reliability of the hydroelectric system. Moreover, its ability to anticipate disturbances allows for proactive adjustments, effectively minimizing system instabilities and ensuring smoother dynamic operation.

3.3. Discussion

This study demonstrates the effectiveness of a DT architecture that integrates a high-fidelity physical model, HSA, and a deep learning component based on LSTM networks for the simulation, diagnosis, and regulation of HTG. By jointly modeling the continuous multi-physics dynamics of the turbine-shaft-alternator assembly and the discrete state transitions associated with normal and abnormal operating conditions, the proposed framework provides a comprehensive and realistic representation of hydropower system behavior under variable and uncertain load conditions.

A key contribution of this work lies in the integration of the LSTM model within the PID control loop. Unlike conventional control strategies that rely solely on instantaneous error feedback, the LSTM-enhanced controller introduces predictive capabilities that enable early identification of emerging instabilities. This anticipatory control mechanism significantly improves frequency stability, reduces oscillatory behavior, and accelerates the system’s dynamic response following external disturbances.

The superiority of the hybrid control approach over classical PID regulation is particularly evident in the presence of nonlinearities, stochastic disturbances, and rapidly changing operating regimes. These results highlight the importance of combining data-driven methods with physics-based models to overcome the limitations of purely model-based or purely data-driven approaches.

Furthermore, the proposed hybrid digital twin shows strong potential for long-term operational benefits in hydropower plants. Its predictive and diagnostic capabilities make it well-suited for condition monitoring and predictive maintenance applications, allowing early detection of performance degradation and incipient faults. In addition, its compatibility with existing SCADA infrastructures facilitates its integration into AI-enhanced closed-loop control architectures.

4. Conclusions

This work proposes an advanced DT framework combining physics-based modeling, SHA, and LSTM-based deep learning for the monitoring and control of HTG under variable load conditions.

The results demonstrate that integrating predictive intelligence into the control loop significantly enhances system performance, particularly in terms of frequency stability, reduced oscillations, and faster dynamic response compared to classical PID control.

Overall, the proposed approach constitutes a robust and scalable solution for next-generation hydropower system management, enabling more autonomous, resilient, and energy-efficient operations.

Future work will focus on experimental validation, real-time implementation, and the extension of the proposed framework to multi-unit hydropower plants operating within interconnected power grids.

Acknowledgements

I would first like to thank God for his guidance, support, and strength throughout this research work, and I express my sincere gratitude to my supervisors, Dr. Ruben Torres Martínez and Pr. Colince Welba, for their availability, scientific guidance, and valuable support during the completion of this study. I also thank the professionals who kindly assisted me and whose contributions made the successful completion of this research possible. Finally, I would like to thank the Journal of Computer and Communications (JCC, SCIRP) for providing me with the opportunity to contribute to the scientific community through the publication of this article.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Kundur, P. (1994) Power System Stability and Control. McGraw-Hill.
[2] Machowski, J., Bialek, J.W. and Bumby, J.R. (2008) Power System Dynamics: Stability and Control. 2nd Edition, Wiley.
[3] Fang, J., Tang, Y., Li, H. and Li, X. (2019) Grid Frequency Regulation by Hydroelectric Power Plants with Renewable Energy Integration. IEEE Transactions on Sustainable Energy, 10, 1978-1987.
[4] Hou, J., Liu, Q. and Chen, Y. (2023) Adaptive Control Strategies for Hydroelectric Generation Units under Renewable Fluctuations. Energy, 274, Article ID: 127358.
[5] Tao, F., Zhang, H., Liu, A. and Nee, A.Y.C. (2019) Digital Twin in Industry: State-of-the-Art. IEEE Transactions on Industrial Informatics, 15, 2405-2415.[CrossRef]
[6] Rasheed, A., San, O. and Kvamsdal, T. (2020) Digital Twin: Values, Challenges and Enablers from a Modeling Perspective. IEEE Access, 8, 21980-22012.[CrossRef]
[7] Mitra, S., Das, A. and Goswami, S.K. (2023) Hybrid Modeling of Renewable Integrated Power Systems for Stability Assessment. Energy Systems, 14, 489-508.
[8] Milano, F., Dörfler, F., Hug, G., Hill, D.J. and Verbič, G. (2019) Foundations and Challenges of Low-Inertia Systems. Proceedings of the IEEE, 107, 2199-2214.
[9] He, X., Ai, Q., Qiu, R.C. and Zhang, D. (2019) Preliminary Exploration on Digital Twin for Power Systems: Challenges, Framework, and Applications. arXiv:1909.06977.
[10] Wang, X., Zhao, T., Liu, H. and He, R. (2019) Power Consumption Predicting and Anomaly Detection Based on Long Short-Term Memory Neural Network. Proceedings of the IEEE 4th International Conference on Cloud Computing and Big Data Analytics (ICCCBDA), Chengdu, 12-15 April 2019, 487-491.[CrossRef]
[11] Sebastián, R. (2022) Hydropower Flexibility for Modern Electrical Grids with Renewable Energy Integration. Energy Conversion and Management, 259, Article ID: 116620.
[12] Brownlee, J. (2017) Deep Learning for Time Series Forecasting. Machine Learning Mastery.
[13] Tao, F., Zhang, M., Liu, Y. and Nee, A.Y.C. (2018) Digital Twin Driven Prognostics and Health Management for Complex Equipment. CIRP Annals, 67, 169-172.[CrossRef]
[14] Kong, W., Dong, Z.Y., Jia, Y., Hill, D.J., Xu, Y. and Zhang, Y. (2019) Short-Term Residential Load Forecasting Based on LSTM Recurrent Neural Network. IEEE Transactions on Smart Grid, 10, 841-851.[CrossRef]
[15] Hochreiter, S. and Schmidhuber, J. (1997) Long Short-Term Memory. Neural Computation, 9, 1735-1780.[CrossRef] [PubMed]
[16] Greff, K., Srivastava, R.K., Koutnik, J., Steunebrink, B.R. and Schmidhuber, J. (2017) LSTM: A Search Space Odyssey. IEEE Transactions on Neural Networks and Learning Systems, 28, 2222-2232.[CrossRef] [PubMed]
[17] Schultz, M.G., Betancourt, C., Gong, B., Kleinert, F., Langguth, M., Leufen, L.H., et al. (2021) Can Deep Learning Beat Numerical Weather Prediction? Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 379, Article ID: 20200097.[CrossRef] [PubMed]
[18] Davis, M.H.A. (1984) Piecewise-Deterministic Markov Processes: A General Class of Non-Diffusion Stochastic Models. Journal of the Royal Statistical Society Series B: Statistical Methodology, 46, 353-376.[CrossRef]
[19] Siami-Namini, S., Tavakoli, N. and Siami Namin, A. (2018) A Comparison of ARIMA and LSTM in Forecasting Time Series. 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA), Orlando, 17-20 December 2018, 1394-1401.[CrossRef]

Copyright © 2026 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.