Introduction

Model-Based Predictive Control, often known as MBPC or just MPC, does not specify a unique control approach but refers to a variety of control techniques1 that utilize a model to predict the system’s future outputs2. The primary strategy of this type of controller is based on a good knowledge of the model representing the system to be controlled and the minimization of a performance criterion defined usually by the quadratic error between the predicted response and the desired reference trajectory along a finite horizon3,4. The unifying principle across these varied techniques is the utilization of a predictive model to forecast future outputs of a system5,6. This predictive ability is not inherent to a single type of model; instead, it relies on the precise and accurate representation of the system through the model utilized7,8. The core methodology of MPC hinges on an intimate understanding of the system’s model9,10. The effectiveness of MPC is predicated on the fidelity and accuracy of this model in representing the dynamics of the system under control11,12. In practice, this means that the predictive model must be able to simulate future states of the system with high reliability, providing a foundation upon which control decisions can be made13,14. Furthermore, MPC operates on the principle of optimizing a predefined performance criterion, which is often expressed in terms of minimizing the quadratic error15,16. This error quantifies the difference between the system’s predicted output and the desired output, as defined by the reference trajectory17,18. The optimization is performed over a finite horizon, meaning that the controller seeks to minimize this error not just for the immediate next step, but for a series of future steps within a specified timeframe19,20. This approach allows for anticipatory adjustments in control actions, which are recalculated at each step based on updated predictions, thereby adapting to changes and disturbances affecting the system21,22. Overall, MPC’s reliance on a robust model and its forward-looking optimization strategy make it a powerful and flexible approach in the realm of control engineering, suitable for managing complex dynamic systems where future predictions and pre-emptive control actions are crucial for performance and stability23,24.

MPC is a control approach that has been around since the work of J. Richalet in the late 70’s25. This technique has been widely adopted by the academic and industrial world in various sectors, such as the chemical and petroleum industries, robotics, etc.26,27,28,29,30,31. The popularity of this type of controller is due to its ability to control a different kinds of processes, like multivariable or monovariable, with long delay times, unstable or non-minimal phase, and those with simple or complex dynamics32,33. Due to the use of various linear models to represent the different industrial processes, several MPC control algorithms have been approved, namely the Model Algorithmic Control (MAC) proposed by34, the Dynamic Matrix Control (DMC) suggested by35, the Extended Horizon Adaptive Control (EHAC) introduced by35 and in 1987 the work of Clarke proposed the Generalized Predictive Control (GPC)36,37,38 which has been very successful. Since then, several methods have been developed to improve the various MPC algorithms mentioned above26,39,40,41,42,43. Even while linear MPC controllers have proven their efficiency in a variety of industrial applications, they remain insufficient to ensure effective control of highly non-linear processes due to the difficulty of designing an accurate model representing the real system to be controlled18,44. Despite the proven efficacy of linear MPCs in numerous industrial settings, they are often inadequate for controlling highly nonlinear processes20,45. This limitation stems from the challenges associated with devising accurate models that can faithfully represent complex real-world systems22,46. This insufficiency has given rise to a nonlinear control strategy known as Nonlinear Model Predictive Control (NMPC)47,48,49,50. Various nonlinear modelling techniques have been used in NMPC, such as Volterra series51,52,53, Fuzzy models54,55,56 and Neural Network models (NN)57,58,59,60,61. Compared to conventional Nonlinear MPC techniques such as Volterra logic or fuzzy logic62,63, Neural Network based MPC (NNMPC) employs less processing power, memory and can accurately model complex dynamic effects, even with scant training data, providing it more efficient for applications requiring nonlinear control.

Using the NMPC approach means solving a constrained, non-convex, nonlinear optimization problem requiring long and tedious numerical calculation64,65,66. In order to solve such problem, several sub-optimal approaches have been proposed, such as stochastic optimization methods67,68,69, which include metaheuristic algorithms70. Due to the performances provided by this type of algorithm in terms of calculation time and finding the right solution, several works have been carried out to solve the non-convex NMPC problem using different types of metaheuristics algorithms like, Particle Swarm Optimization (PSO)71,72,73, Artificial Bee Colony (ABC)74,75, Evolutionary Algorithm (EA)76, Teaching Learning Based Optimization (TLBO)77,78 and Archimedes Optimization Algorithm (AOA)79.

The Driving Training Based Optimization (DTBO) algorithm, proposed by Mohammad Dehghani, is one of the novel metaheuristic algorithms which appeared in 202280. This algorithm is founded on the principle of learning to drive, which unfolds in three phases: selecting an instructor from the learners, receiving instructions from the instructor on driving techniques, and practicing newly learned techniques from the learner to enhance one’s driving abilities81,82. In this work, DTBO algorithm is used, due to its effectiveness, which was confirmed by a comparative study83 with other algorithms, including particle swarm optimization84, Gravitational Search Algorithm (GSA)85, teaching learning-based optimization, Gray Wolf Optimization (GWO)86, Whale Optimization Algorithm (WOA)87, and Reptile Search Algorithm (RSA)88. The comparative study has been done using various kinds of benchmark functions, such as constrained, nonlinear and non-convex functions.

Lyapunov -based Model Predictive Control (LMPC) is a control approach integrating Lyapunov function as constraint in the optimization problem of MPC89,90. This technique characterizes the region of the closed-loop stability, which makes it possible to define the operating conditions that maintain the system stability91,92. Since its appearance, the LMPC method has been utilized extensively for controlling a various nonlinear systems, such as robotic systems93, electrical systems94, chemical processes95, and wind power generation systems90. In contrast to the LMPC, both the regular MPC and the NMPC lack explicit stability restrictions and can’t combine stability guarantees with interpretability, even with their increased flexibility.

The proposed method, named Lyapunov-based neural network model predictive control using metaheuristic optimization approach (LNNMPC-MOA), includes Lyapunov -based constraint in the optimization problem of the neural network model predictive control (NNMPC), which is solved by the DTBO algorithm. The suggested controller consists of two parts: the first is responsible for calculating predictions using a neural network model of the feedforward type, and the second is responsible to resolve the constrained nonlinear optimization problem using the DTBO algorithm. This technique is suggested to solve the nonlinear and non-convex optimization problem of the conventional NMPC, ensure on-line optimization in reasonable time thanks to their easy implementation and guaranty the stability using the Lyapunov function-based constraint. The efficiency of the proposed controller regarding to the accuracy, quickness and robustness is assessed by taking into account the speed control of a three-phase induction motor, and its stability is mathematically ensured using the Lyapunov function-based constraint. The acquired results are compared to those of NNMPC based on DTBO algorithm (NNMPC-DTBO), NNMPC using PSO algorithm (NNMPC-PSO), Fuzzy Logic controller optimized by TLBO (FLC-TLBO) and optimized PID controller using PSO algorithm (PID-PSO)95.

This paper is structured like this: Sect. “Driving training based optimization algorithm” presents the DTBO algorithm. Section “Lyapunov-based neural network model predictive control using DTBO algorithm” describes the proposed LNNMPC-MOA using the DTBO algorithm (LNNMPC-DTBO); Section “Stability analysis” proves the stability of the suggested controller mathematically. Section “Simulation study” gives the system model’s under study, and several simulation results are presented and discussed. Finally, in Sect. “Conclusion and future research directions” the conclusion is given.

Driving training based optimization algorithm

Driving training based optimization is a recent metaheuristic algorithm, inspired by the human activities of driver training in driving schools. It is based on a population of learners and instructors that are considered as candidate solutions. They are updated throughout the optimization process until the best solution is obtained, which ensures the best value of the cost function.

This search process can be modelled into three phases: phase1, also known as the training by the driving instructor phase, is used to select the instructors who will teach the learners-drivers how to drive. Phase 2 is referred to as learner driver modelling, during which the student drivers replicate the instructor’s gestures and manoeuvres. Phase3, which is the personal practice phase, is designed to enhance each learner driver’s progress and improve his driving skills through individual practice.

The DTBO algorithm with its three phases is given in the following steps:

  • 1. Initialization: Before starting the execution of the three DTBO phases, an initialization step is necessary to define the values of the subsequent parameters: the population size \((N)\), the number of problem variables for the optimization problem \((m)\), the bounds of the variables \(({L}_{b},{U}_{b})\) with dimension (m), the number of iterations \((T)\). The position of the population \(({X}_{i})\) is initialized randomly respecting their bounds using Eq. (1), the corresponding cost function \(({F}_{i})\) is assed and the best solution \(({{X}_{i}}^{best})\) is selected according to the best value of the cost function \(\left({{F}_{i}}^{best}\right)\).

    $${X}_{i}={L}_{b}+r\left({U}_{b}-{L}_{b}\right),$$
    (1)

    with \(i=\text{1,2}, ..., N\) and \(r\) is a random number from 0 to 1.

  • 2. Phase1: Training by the driving instructor phase: During this phase, the driving instructors \({N}_{DI}\), represented by the \(DI\) matrix of dimension \([{N}_{DI},m]\), are calculated using Eq. (2).

    $${N}_{DI}=0.1{\text{N}}-\left(1-\frac{{\text{z}}}{\text{T}}\right),$$
    (2)

    where \(\text{z}=1,..,\text{T}\) is the counter of iterations.

    As shown in Eq. (2), \({N}_{DI}\) are selected among DTBO population depending on their cost function values, and the remaining members are classified as learner drivers. Then the new position for each candidate solution in phase1 \((P1)\) is calculated using Eq. (3) and updated using Eq. (4).

    $$X_{i}^{{P1}} = \left\{ {\begin{array}{*{20}c} {X_{i} + r\left( {DI_{{ki}} - IX_{i} } \right),} & {F_{{DI_{{ki}} }} < F} \\ {X_{i} + r\left( {X_{i} - DI_{{ki}} } \right),} & {Otherwise} \\ \end{array} } \right.$$
    (3)
    $$X_{i} = \left\{ {\begin{array}{*{20}c} {X_{i}^{{P1}} ,~~} & {F_{i}^{{P1}} < F_{i} } \\ {X_{i} ,~} & {Otherwise} \\ \end{array} } \right.,$$
    (4)

    where the \({X}_{i}^{P1}\) is the new position with dimension \((m)\), for \(ith\) element of the population, \({F}_{i}^{P1}\) is its corresponding cost function value, \(I\) is a random number from 1 to 2, \(ki\) is a random number from 1 to \({N}_{DI}\), \({DI}_{ki}\) is the selected driving instructor and \({F}_{{DI}_{ki}}\) is its corresponding cost function value.

    In this phase, the DTBO algorithm is in the exploration phase, moving its population into various regions of the search area to select the driving instructors and teach the learner drivers.

  • 3. Phase2: learner driver modelling phase (exploration): During this phase, the learner driver imitates all the instructor’s movements and skills. This patterning is represented by the index P given by Eq. (5).

    $$P=0.01+0.9\left(1-\frac{z}{T}\right).$$
    (5)

    This process increases the DTBO’s capacity of exploration by moving its elements to different locations in the search area. To model this phase a new position \({X}_{i}^{P2}\) is calculated by the linear combination of each learner driver and instructor using Eq. (6).

    $${X}_{i}^{P2}=P{X}_{i}+\left(1-P\right){DI}_{ki}.$$
    (6)

    This new position takes the place of the old one if it enhances the value of the cost function using Eq. (7).

    $$X_{i} = \left\{ {\begin{array}{*{20}c} {X_{i}^{{P2}} ,~} & {F_{i}^{{P2}} < F_{i} } \\ {X_{i} ,} & {Otherwise} \\ \end{array} } \right.$$
    (7)
  • 4. Phase 3: Personal practice phase: In this part, each learner driver progresses and improve his driving skills through individual practice. Throughout this period, each driver learner tries to get closer to his maximum capabilities. This enables each member to find a better position by performing a local search near their current position. This step illustrates how DTBO can benefit from local search exploitation. This phase is modelled in such a way that a random position is firstly generated near each learner driver using Eq. (8).

    $${X}_{i}^{P3}={X}_{i}+\left(1-2r\right)R\left(1-\frac{z}{T}\right){X}_{i},$$
    (8)

    with \(R=0.05\) is a constant.

    The position of \({i}^{th}\) leaner driver is updated using the Eq. (9), as follows:

    $$X_{i} = \left\{ {\begin{array}{*{20}c} {X_{i}^{{P3}} ,} & {F_{i}^{{P3}} < F} \\ {X_{i} ,} & {Otherwise} \\ \end{array} } \right..$$
    (9)
  • 5. Updated the best solution \(({{X}_{i}}^{best})\) according to the best value of the cost function.

  • 6. This process is repeated until the number of iterations is reached.

The flow chart of the DTBO algorithm is given in Fig. 1.

Figure 1
figure 1

Flow chart of the DTBO.

Lyapunov-based neural network model predictive control using DTBO algorithm

Principle of neural network model predictive control using DTBO algorithm Consider the following system:

Consider the system described by the Eq. (10), as follows:

$$\left\{ {\begin{array}{*{20}c} {x\left( {k + 1} \right) = f\left( {x\left( k \right),u\left( k \right),v\left( k \right)} \right)} \\ {y\left( k \right) = g\left( {x\left( k \right),u\left( k \right)} \right)~} \\ \end{array} } \right.,$$
(10)

where \(x\), \(u\), and \(y\) are the state vectors, input and output, respectively, \(v\) is the disturbance\(, and f\) and \(g\) are nonlinear functions.

The NNMPC is an advanced control approach that requires two essential steps as follows:

First, a neural model representing the process to be controlled is established. This model predicts the system’s future behaviour along a prediction horizon defined by the interval \(\left[{N}_{1},{N}_{2}\right]\).

Second, a control sequence along the control horizon \(\left({N}_{u}\right)\) is determined and its initial element (\(u\left(k\right)\)) is employed to control the system under study. In this step, the NNMPC minimization problem given in Eq. (11) is solved using the DTBO algorithm.

$$\underset{ u\left(k\right)}{\text{min}}J\left(\Delta u\left(k\right),\widehat{y}\left(k\right),{y}_{r}\left(k\right)\right)=\sum_{i={N}_{1}}^{{N}_{2}}\left[{\left({y}_{r}\left(k+i\right)-\widehat{y}\left(k+i/k\right)\right)}^{T}Q\left({y}_{r}\left(k+ i\right)-\widehat{y}\left(k+ i/k\right)\right)\right]+\sum_{i=1}^{{N}_{u}}[\Delta {u}^{T}(k+i-1)R\Delta u(k+i-1)].$$
(11)

Subject to:

$$y_{min} < \hat{y}\left( {k + i} \right) < y_{max} ,\,{\kern 1pt} i = N_{1} , \ldots ,{ }N_{2}$$
$$u_{min} < u\left( {k + i} \right) < u_{max} ,\,i = O, \ldots ,{ }N_{u} - 1$$
$$\Delta {u}_{min}<\Delta u\left(k+i\right)<\Delta {u}_{max} , i=O,\dots , {N}_{u}-1$$
$$\Delta u\left( {k + i - 1} \right) = 0{ }\,{\text{For }}i > N_{u} ,$$

where \(\Delta u\left(k\right)=u\left(k\right)-u\left(k-1\right)\) is the control increment, \(\widehat{y}\left(k+i/k\right)\) is the predicted output, \({y}_{r}\) is the desired reference trajectory, \(Q\) is a positive semidefinite matrix and \(R\) is a positive definite matrix.

Lyapunov-based neural network model predective control using DTBO algorithm

In order to ensure stable control and maintain the system within an acceptable operating range while respecting its safety conditions and physical limits, several constraints have been proposed. The constraints used in the proposed LNNMPC-DTBO are the input, the output and the Lyapunov function-based constraints, which are implemented in the constrained minimization problem defined in Eq. (12), as follows:

$$\underset{u\left(k\right)}{\text{min}}J\left(\Delta u\left(k\right),\widehat{y}\left(k\right),{y}_{r}\left(k\right)\right)=\sum_{i={N}_{1}}^{{N}_{2}}\left[{\left({y}_{r}\left(k+i\right)-\widehat{y}\left(k+i/k\right)\right)}^{T}{\Gamma }_{y}\left({y}_{r}\left(k+i\right)-\widehat{y}\left(k+i/k\right)\right)\right]+ \sum_{i=1}^{{N}_{u}}[\Delta {u}^{T}(k+i-1)R\Delta u(k+i-1)].$$
(12)

Subject to

$${y}_{min}<\widehat{y}\left(k+i\right)<{y}_{max}, i={N}_{1},\dots , {N}_{2}$$
(12.a)
$${u}_{min}<u\left(k+i\right)<{u}_{max}, i=O,\dots , {N}_{u}-1$$
(12.b)
$$\Delta {u}_{min}<\Delta u\left(k+i\right)<\Delta {u}_{max} , i=O,\dots , {N}_{u}-1$$
(12.c)
$$\Delta u\left(k+i-1\right)=0 For i>{N}_{u}$$
(12.d)
$$\frac{\partial V}{\partial x}f\left(x\left(k\right),u\left(k\right),v(k)\right)\le \frac{\partial V}{\partial x}f\left(x\left(k-1\right),u\left(k-1\right),v\left(k-1\right)\right),$$
(12.e)

where \(u(k)\) is the actual input control, \({\Gamma }_{y}\left(y\right)\) is the output-dependent weight function, and \(V\) represents the continuous differentiable Lyapunov function.

Constraints handling

The constraints used in the minimization problem of the LNNMPC-DTBO are handled as follow:

  • The input constraints are defined in Eqs. (12.b), (12.c), and they are handled by limiting the search space of the DTBO algorithm.

  • The output constraints are handled using the penalty function \({\Gamma }_{y}\left(y\right)\) given by Eq. (13) below:

    $${\Gamma }_{y}\left(y\right)=\left[\begin{array}{ccc}{\Gamma }_{{y}_{1}}{(y}_{1})& 0& \begin{array}{cc}\dots & 0\end{array}\\ 0& {\Gamma }_{{y}_{2}}{(y}_{2})& \begin{array}{cc}\dots & 0\end{array}\\ \begin{array}{c}\vdots \\ 0\end{array}& \begin{array}{c}\vdots \\ 0\end{array}& \begin{array}{c}\begin{array}{cc}\ddots & \vdots \end{array}\\ \begin{array}{cc}\cdots & {\Gamma }_{n}{(y}_{n})\end{array}\end{array}\end{array}\right]$$
    (13)

And:

$$\Gamma _{{yi}} \left( {y_{i} } \right) = \left\{ {\begin{array}{*{20}c} {\Gamma _{{yi}} \left( 0 \right)~} & {~if~y_{{i_{{\min }} }} \le y_{i} \le y_{{i_{{\max }} }} } \\ {\Gamma _{{yi}} \left( 0 \right)\left[ {1 + C_{{iy}} } \right]~} & {if~y_{i} \ge y_{{i_{{\max }} }} ~or~y_{i} \le y_{{i_{{\min }} }} } \\ \end{array} ,} \right.$$

with \({C}_{iy}\) is employed to define the penalization degree, \(i=\text{1,2},. . .,n\) where \(n\) is the number of system outputs and \({y\left(k\right)=\left[{y}_{1}\left(k\right), {y}_{2}\left(k\right), . . . ,{y}_{n}\left(k\right)\right]}^{T}\).

  • The Lyapunov function-based constraint given in Eq. (12.e) is handled by adding a penalization of the Lyapunov function derivative to the cost function defined in Eq. (12). This technique ensures that the Lyapunov function derivative will be less than or equal to zero as long as the Lyapunov function derivative of the current control \((u)\) is less than that of the previous control.

Control algorithm

The suggested LNNMPC-DTBO stapes’s are given as follows:

Step1: Initialization

  • Determine the MPC and DTBO parameters \({(N}_{1}, {N}_{2}, {N}_{u} , N,T,m,{U}_{b},{L}_{b})\).

  • Considering that \({X}_{i}\) with dimenssion \(m\) are the control inputs at sampling time \(k\) where \(m\) is the control inputs number.

Step2: Select the initial solution

  • Set a desired reference trajectory along \(k+{N}_{1}\) to \(k+{N}_{2}\).

  • Initialize the position of the population \({X}_{i}\) using Eq. (1).

  • Calculate the predicted outputs of the system for the initial position of the population, by utilizing the neural network model.

  • Evaluate the cost function \({F}_{i}\) using Eq. (12).

  • Select the best solution \({X}_{i}^{best}\) that corresponds to the best value of the cost function.

Step3: Optimization loop

For \(z=1:T\)

For \(i=1:N\)

  • Determine the driving instructor using Eq. (2) and calculate the new position \({X}_{i}^{p1}\) for the DTBO population using Eq. (3).

  • Calculate the predicted outputs of the system by utilizing the neural network model and \({X}_{i}^{p1}\).

  • Compute the new value of the cost function \({F}_{i}^{p1}\) using the new position \({X}_{i}^{p1}\).

  • Update \({X}_{i}^{p1}\) using Eq. (4).

  • Calculate the patterning index according to Eq. (5).

  • Compute the new position \({X}_{i}^{p2}\) using Eq. (6).

  • Calculate the predicted outputs of the system by utilizing the neural network model \({X}_{i}^{p2}\).

  • Compute the new value of the objective function \({F}_{i}^{p2}\) using the new position \({X}_{i}^{p2}\).

  • Update \({X}_{i}^{p2}\) using Eq. (7).

  • Compute the new position of the DTBO population \({X}_{i}^{p3}\) with Eq. (8).

  • Calculate the predicted outputs of the system by utilizing the neural network model and \({X}_{i}^{p3}\) .

  • Update \({X}_{i}^{p3}\) using Eq. (9).

End for (i).

  • \({X}_{i}^{best}\)

End for \((z)\).

Step4:

  • Apply the first element of the best solution \({X}_{i}^{best}\) to the system, which is the optimal control inputs.

  • Go back to the step 2 for the next sampling time \((k=k+1)\).

Stability analysis

This section uses the stability analysis performed by90 in continuous time to prove the proposed controller’s closed-loop stability.

Knowing that the optimization criterion of the proposed controller, defined in Eq. (12), can be written in continuous time with Eq. (14), as follows:

$$\underset{u}{\text{min}}{\int }_{{t}_{k}}^{{t}_{k}+N}{\left({y}_{r}\left(\tau \right)-\widehat{y}\left(\tau \right)\right)}^{T}{\Gamma }_{y}\left({y}_{r}\left(\tau \right)-\widehat{y}\left(\tau \right)\right) d\tau +{\int }_{{t}_{k}}^{{t}_{k}+{N}_{u}}{\left(\Delta u\left(\tau \right)\right)}^{T}R\left(\Delta u\left(\tau \right)\right) d\tau .$$
(14)

Subject to:

$${y}_{min}<\widehat{y}\left(t\right)<{y}_{max}, t\le {t}_{k}+N$$
(14.a)
$${u}_{min}<u\left(t\right)<{u}_{max}, t\le {t}_{k}+{N }_{u}$$
(14.b)
$$\Delta {u}_{min}<\Delta u\left(t\right)<\Delta {u}_{max} , t\le {t}_{k}+{N }_{u}$$
(14.c)
$$\Delta u\left(t\right)=0 For t>{N}_{u}$$
(14.d)
$$\frac{\partial V\left(x\left({t}_{k}\right)\right)}{\partial x}f\left(x\left({t}_{k}\right),u\left({t}_{k}\right),v({t}_{k})\right)\le \frac{\partial V\left(x\left({t}_{k}\right)\right)}{\partial x}f\left(x\left({t}_{k}\right),h\left(x\left({t}_{k}\right)\right),v\left({t}_{k}\right)\right),$$
(14.e)

where \(h\) is the previous nonlinear feedback control, \(u({t}_{k})\) is the actual input control, \(N={N}_{2}\) is the prediction horizon, \(t\in \left[{t}_{k}, {t}_{k+1}\right]\) with \({t}_{k}=k{t}_{s}\) and \({t}_{s}\) is the sampling time.

Assumption 1:

Assuming that at the nominal operating point, the asymptotic stability of the closed-loop system is assured, all state constraints are satisfied in the stability region with respect to the existing feedback control input \(u=h(x)\in U\) for all \(x \in {X}_{e}\), where \(U\) and \({X}_{e}\) are the space where the control \(u\) and the state is defined, respectively. Therefore, the inequalities bellow, given by Eqs. (15), (16), (17) are valid for the inverse Lyapunov theorem-based nominal closed-loop system96.

$${\alpha }_{1}\left(\left|x\right|\right)\le V\left(x\right)\le {\alpha }_{2}\left(\left|x\right|\right)$$
(15)
$$\frac{\partial V\left(x\right)}{\partial x}f\left(x,h\left(x\right),v\right)\le {-\alpha }_{3}\left(\left|x\right|\right)$$
(16)
$$\left|\frac{\partial V\left(x\right)}{\partial x}\right|\le {\alpha }_{4}\left(\left|x\right|\right),$$
(17)

where \({\alpha }_{i=\text{1,2},\text{3,4}}\) are the \(\mathcal{K}-\) function.

In this study, let’s denote \(S\) as the region where the controlled system is stable under the input law \(u=h(x)\) and \({S}_{\delta }\) the Lyapunov-based stability zone given by

$$S_{\delta } = \left\{ {x \smallint X_{e} :V\left( x \right) < \delta } \right\},$$

with \(\delta\) is a constant.

Lemma:

The inequalities bellow, given by Eqs. (18), (19) and (20) are hold if there exist positive constants \(C, {L}_{x},{L}_{\omega }, {\overline{L} }_{x}\) and \({\overline{L} }_{\omega }\), such that the constraints are satisfied for all \(x\) and \(u\).

$$\left|f\left(x,u,v\right)-f(\overline{x },u,\overline{v })\right|\le {L}_{x}\left|x-\overline{x }\right|+{L}_{v}\left|v-\overline{v }\right|$$
(18)
$$\left|f\left(x,u,v\right)\right|\le C$$
(19)
$$\left|\frac{\partial V\left(x\right)}{\partial x}f\left(x,u,v\right)-\frac{\partial V\left(\overline{x }\right)}{\partial x}f(\overline{x },u,\overline{v })\right|\le {\overline{L} }_{x}\left|x-\overline{x }\right|+{\overline{L} }_{v}\left|v-\overline{v }\right|,$$
(20)

where \(\overline{x }=x\left({t}_{k}\right)\) and \(\overline{v }=v\left({t}_{k}\right)\).

Proof:

The Eqs. (18)–(20) can be easily deduced by using the Lipschitz property of the function \(f\) and the continuous differentiability of the Lyapunov function \(V(x)\), that’s why the details are omitted, and the proof is considered complete.

Assumption 2

Assuming that the following scalar exists and is defined by the Eq. (21), as follows:

$${\delta }_{min}=max\left\{V\left(x\left(t+{t}_{s}\right)\right):V(x(t)\le {\delta }_{s})\right\},$$
(21)

where \({\delta }_{s}\) is a constant and \({\delta }_{min}\) is the maximum value of \(V(x(t+{t}_{s}))\) at the next sampling time when \(V(x(t))\) is less than the constant \(\delta\).

Theorem

For the closed-loop system given in Eq. (10) controlled by solving the criterion shown in Eq. (12), if it exists \(x\left({t}_{0}\right)\in {S}_{\delta }\), \(\varepsilon >0\) and \(\delta >{\delta }_{s}>0\) where \(\varepsilon\) is a constant, the inequality given by Eq. (22) can be hold assuming that the Eqs. (15)–(17) are satisfied.

$$- \alpha_{3} \left( {\alpha_{2}^{ - 1} \left( {\delta s} \right)} \right) + \overline{L}_{x} Ct_{s} + \overline{L}_{v} \varphi \le - \frac{\varepsilon }{{t_{s} }},$$
(22)

where for all \(t\ge {t}_{0}\) there exists \(\left(\delta >{\delta }_{min}>0\right)\) guaranteeing the maintaining of states \(x(t)\) in the stability region and \(\varphi\) is the upper limit of disturbance variation over a sampling period.

Proof :

The time-derivative of the Lyapunov function can be computed using Eq. (23), taking into account the closed-loop system at time \(t \in \left[{t}_{k} , {t}_{k+1}\right]\):

$$\dot{V}\left(x\left(t\right)\right)=\frac{\partial V\left(x\left(t\right)\right)}{\partial x}f\left(x\left(t\right),u\left(t\right),v\left(t\right)\right).$$
(23)

The following inequality can be extended from Eq. (23) based on the constraint (14.e) as follow:

$$\dot{V}\left(x\left(t\right)\right)\le \frac{\partial V\left(x\left(t\right)\right)}{\partial x}f\left(x\left(t\right),u\left(t\right),v\left(t\right)\right) -\frac{\partial V\left(x\left({t}_{k}\right)\right)}{\partial x}f\left(x\left({t}_{k}\right),u\left({t}_{k}\right),v\left({t}_{k}\right)\right)+\frac{\partial V\left(x\left({t}_{k}\right)\right)}{\partial x}f\left(x\left({t}_{k}\right),h\left(x({t}_{k)}\right),v\left({t}_{k}\right)\right).$$
(24)

Using Eqs. (20), (24) can be written with this manner:

$$\dot{V}\left(x\left(t\right)\right)\le \frac{\partial V\left(x\left({t}_{k}\right)\right)}{\partial x}f\left(x\left({t}_{k}\right),h\left(x\left({t}_{k}\right)\right),v\left({t}_{k}\right)\right) +{\overline{L} }_{x}\left|x\left(t\right)-x\left({t}_{k}\right)\right|+{\overline{L} }_{v}\left|v\left(t\right)-v\left({t}_{k}\right)\right|.$$
(25)

The formula below can be written according to Eq. (19) and during a sampling period where \(x(t)\) is continuous:

$$\left|x\left(t\right)-x({t}_{k})\right|\le C{t}_{s}.$$
(26)

It is deduced from Eq. (16) that:

$$\frac{\partial V\left(x\left({t}_{k}\right)\right)}{\partial x}f\left(x\left({t}_{k}\right),h\left(x\left({t}_{k}\right)\right),v\left({t}_{k}\right)\right)\le -{\alpha }_{3}\left({\alpha }_{2}^{-1}\left({\delta }_{s}\right)\right).$$
(27)

Replacing Eqs. (26) and \* MERGEFORMAT Eq. (27) in Eq. (25), the Eq. (28) bellow can be deduced:

$${\dot{V}}_{(x(t))}\le -{\alpha }_{3}\left({\alpha }_{2}^{-1}\left(\delta s\right)\right)+{\overline{L} }_{x}C{t}_{s}+{\overline{L} }_{v}\varphi .$$
(28)

If Eq. (22) is fulfilled, then there is a \(\varepsilon > 0\) for which the subsequent inequality given by the Eq. (29) bellow is applied.

$$\dot{V}\left(x\left(t\right)\right)\le -\frac{\varepsilon }{{t}_{s}}.$$
(29)

The function \(V(x(t))\) continues to decrease at \(t\in [{t}_{k},{t}_{k+1}]\), as demonstrated by the previous inequality. By integrating it from \({t}_{k}\) to \({t}_{k+1}\), the Eq. (30) bellow is obtained:

$$V\left(x\left({t}_{k+1}\right)\right)\le V\left(x\left({t}_{k}\right)\right)-\varepsilon .$$
(30)

Therefore, if \({x}_{{t}_{k}}\in {\text{S}}_{\delta }\), then at time \(t\ge {t}_{k}\), all states of \(x(t)\) remain in the stable area \({\text{S}}_{\delta }\). Furthermore, over a finite number of sampling times, the states \(x\left(t\right)\) will progressively converge to \({\text{S}}_{\delta min}\) and remain in this stable area for all of future periods.

This proof can be applied in discrete time to ensure that the controlled system is stable.

Simulation study

Several simulations are carried out to demonstrate the efficiency of the proposed LNNMPC-DTBO controller, using as application a highly nonlinear system: the squirrel cage induction motor. A comparison study is conducted between the suggested controller and the NNMPC-DTBO, NNMPC-PSO, FLC-TLBO and PID-PSO.

Squirrel cage induction motor model

The squirrel cage induction motor is one of the three-phase induction motors currently used in industry in various applications, such as pumps, conveyors, turbines and so on97,98. This kind of motor represents an excellent application for scientific research thanks to the number of nonlinearities it contains. The state model of this type of motor99,100 is given by Eq. (31), as follows:

$$\left\{\begin{array}{c}{\dot{x}}_{1}={w}_{b}\left({U}_{ds}+\frac{{w}_{e}}{{w}_{b}}{x}_{2}+\frac{{R}_{s}}{{X}_{is}}\left({\frac{{X}_{ml}}{{X}_{ir}}x}_{3}+\left(\frac{{X}_{ml}}{{X}_{is}}-1\right){x}_{1}\right) \right) \\ {\dot{x}}_{2}={w}_{b}\left({U}_{qs}-\frac{{w}_{e}}{{w}_{b}}{x}_{1}+\frac{{R}_{s}}{{X}_{is}}\left({\frac{{X}_{ml}}{{X}_{ir}}x}_{4}+\left(\frac{{X}_{ml}}{{X}_{is}}-1\right){x}_{2}\right) \right) \\ {\dot{x}}_{3}={w}_{b}\left({U}_{dr}+\frac{\left({w}_{e}-{w}_{r}\right)}{{w}_{b}}{x}_{4}+\frac{{R}_{r}}{{X}_{ir}}\left({\frac{{X}_{ml}}{{X}_{is}}x}_{1}+\left(\frac{{X}_{ml}}{{X}_{ir}}-1\right){x}_{3}\right) \right) ,\\ {\dot{x}}_{4}={w}_{b}\left({U}_{qr}-\frac{\left({w}_{e}-{w}_{r}\right)}{{w}_{b}}{x}_{3}+\frac{{R}_{r}}{{X}_{ir}}\left({\frac{{X}_{ml}}{{X}_{is}}x}_{2}+\left(\frac{{X}_{ml}}{{X}_{ir}}-1\right){x}_{4}\right) \right) \\ y={w}_{r} \\ \end{array}\right.$$
(31)

where the state vector \(x={\left[{F}_{ds} {F}_{qs} {F}_{dr} {F}_{qr}\right]}^{T}\) are the stator and rotor flux linkages in the reference frame dq axis. The \(dq\) axis stator voltages are the control inputs vector \({{u= [U}_{ds} {U}_{qs}]}^{T}\) and \({U}_{dr}={U}_{qr}=0\) are the rotor \(dq\) axis voltages. \({w}_{b}=2\pi {f}_{b}\) Is the motor’s angular electrical base frequency, \({w}_{e}\) is the angular speed of the reference frame, and \({w}_{r}\) is the angular speed of the rotor. \({X}_{ml}\) ,\({X}_{is}\), \({X}_{ir}\), \({X}_{m}\) and \({\dot{w}}_{r}\) are given by Eqs. (32), (33), (34), (35), (36), respectively.

$${X}_{ml}=\frac{1}{\frac{1}{{X}_{is}}+ \frac{1}{{X}_{ir}}+ \frac{1}{{X}_{m}}},$$
(32)
$${X}_{is}={w}_{b}{L}_{is},$$
(33)
$${X}_{ir}= {w}_{b}{L}_{ir},$$
(34)
$${X}_{m}={w}_{b}{L}_{m},$$
(35)
$${\dot{w}}_{r}=\left(\frac{P}{2J}\right)\left({T}_{e}-{T}_{r}\right),$$
(36)

where \({T}_{e}\) is the electrical output torque, \({T}_{r}\) is the load torque, \({L}_{is}\) is the stator phase inductance , \({L}_{ir}\) is the rotor phase inductance and \({L}_{m}\) is the mutual inductance.

The electrical parameters of the considered squirrel cage induction motor are given in the table bellow:

System identification

In this work, four feed forward neural networks are used to identify the rotor and stator fluxes, which are utilized to compute the angular speed. The neural network models have the same following structure:

  • $$\left[{U}_{ds}\left(k-1\right){, U}_{ds}\left(k\right){, U}_{qs}\left(k-1\right), {U}_{qs}\left(k\right){, F}_{i}\left(k-1\right), {F}_{i}(k)\right],$$

where \(i=\left\{ds,qs,dr,qr\right\}\).

  • One hidden layer containing fifteen neurons and using a sigmoid activation function.

  • An output layer corresponding to \(\left({F}_{ds},{F}_{qs}, {F}_{dr}\right)\) and \({F}_{qr}\), with a linear activation function.

A dataset is generated with random inputs using the state model given in Eq. (31).

The test results of the obtained neural network models for each predicted output are shown in Fig. 2, and the prediction errors are shown in Fig. 3. The values of the Root Mean Square Error (RMSE), Mean Square Error (MSE), Mean Absolute Error (MAE) and determination coefficient \({(R}^{2})\) for each model are gathered in Table 1. These values show that the obtained models are accurate.

Table 1 Metrics of the NNs prediction models.
Figure 2
figure 2

Fluxes NN model test. (a) Flux ds (continuous line) and NN model output (dashed line). (b) Zoom of (a). (c) Flux qs (continuous line) and NN model output (dashed line). (d) Zoom of (c). (e) Flux dr (continuous line) and NN model output (dashed line), (f) Zoom of (e). (g) Flux qr (continuous line) and NN model output (dashed line), (h) Zoom of (g).

Figure 3
figure 3

Error of Fluxes NN model test. (a) Error between neural and model output of flux ds. (b) Zoom of (a). (c) Error between neural and model output of flux qs. (d) Zoom of (c). (e) Error between neural and model output of flux dr, (f) Zoom of (e). (g) Error between neural and model output of flux qr. (h) Zoom of (g).

Control implementation

Figure 4 illustrates the control diagram of the proposed LNNMPC-DTBO. Two simulation cases are performed using the neural network models defined above and the parameters mentioned in Table 2.

Figure 4
figure 4

Induction motor speed control block diagram.

Table 2 Induction motor parameters.

In the initial case, no overshoot constraint is considered, and the multistep reference trajectory is used to evaluate the performances of the proposed controller. The parameters of the NNMPC, PSO, and DTBO are presented in Tables 3, 4, 5, respectively. The results are compared to those obtained from PID-PSO, FLC-TLBO, NNMPC-PSO, and NNMPC-DTBO, as shown in Fig. 5. The values of the MAE, MSE, and RMSE are given in Table 6. These values demonstrate that the proposed controller (LNNMPC-DTBO) gives the best tracking accuracy with the MAE enhancement percentage of \(1.57\%\), \(51.57\%\), \(89.16\%\) and \(88.23\%\) comparing to the NNMPC-DTBO, NNMPC_PSO, FLC-TLBO and PID-PSO, respectively.

Table 3 NNMPC parameters.
Table 4 PSO parameters.
Table 5 DTBO parameters.
Table 6 MAE, MSE, RMSE values without constraint.

In the second case, a 1% overshoot constraint is applied to the output of the predictive controllers (NNMPC-DTBO, NNMPC-PSO and LNNMPC-DTBO) for the multistep and sinusoidal reference trajectories.

Figure 5
figure 5

Performances of induction motor speed control with multistep trajectory, without constraint. (a) Reference trajectory and actual angular speed. (b) Error between reference trajectory and actual angular speed.

The obtained results for the second case, using multistep and sinusoidal reference trajectories, respectively, are presented in Figs. 6, 7, 8 and the control efforts signals are given in Figs. 7, 9. To evaluate the efficiency of the proposed controller, the values of the MAE, MSE, RMSE and computing time were calculated and are given in Table 7 for the multistep and sinusoidal reference trajectories. From these values and the enhancement percentages of the MAE for the multistep and sinusoidal reference trajectories, which are \(15.99\) and \(30.48\%\) compared to the NNMPC-DTBO and NNMPC-PSO, respectively, for the first reference, and 24.72 and 31.24% compared to the NNMPC-DTBO and NNMPC-PSO, respectively, for the second reference, it can be seen that the LNNMPC- DTBO gives the best tracking accuracy with minimal computing time and without overshoot (respecting the limit of the overshoot constraint and sampling time) to the NNMPC-PSO and NNMPC-DTBO.

Table 7 MAE, MSE, RMSE values with overshoot constraint.
Figure 6
figure 6

Performances of induction motor speed control with multistep trajectory, with overshoot constraint. (a) Reference trajectory and actual angular speed. (b) Error between reference trajectory and actual angular speed.

Figure 7
figure 7

Control effort in the case of multistep trajectory, with overshoot constraint. (a) Control effort Uds. (b) Control effort Uqs.

Figure 8
figure 8

Performances of induction motor speed control with sinusoidal trajectory and overshoot constraint. (a) Reference trajectory and actual angular speed. (b) Error between reference trajectory and actual angular speed.

Figure 9
figure 9

Control efforts in the case of sinusoidal trajectory and overshoot constraint. (a) Control effort Uds. (b) Control effort Uqs.

Effect of external disturbances and measurement noise

In order to show the LNNMPC-DTBO controller’s proficiency to reject external disturbances and compensate for measurement noise, several simulation cases were proposed.

In the first case, a measurement noise of \(10\) (tr/min) amplitude, mean value of \(0.4955\) and variance of \(0.0854\) is applied to the system output throughout the simulation.

For the second case, two different disturbance types were used with the multistep and sinusoidal reference trajectories, respectively. A pulse of \(-25\%\) of the input is added to the control input during the interval \([1.5 s,2.5 s]\). An output disturbance with an amplitude of \(+30\%\) of the output is added during the interval \([1.5 s,2.5 s]\).

In the third case, different perturbations are applied by changing the values of the load torque \({T}_{r}\) as follows:\({T}_{r}=0Nm\), \({T}_{r}=5Nm\), \({T}_{r}=10Nm\) and \({T}_{r}=25Nm\) illustrated in Table 8.The system’s response is illustrated in Figs. 16, 17 with multistep and sinusoidal reference trajectories, respectively, considering the last value of the load torque where the perturbation is significant.

Table 8 RMSE, MSE, and MAE values for different load torques.

After applying various disturbances to the induction motor with multistep and sinusoidal desired reference trajectories, as illustrated in the (Figs. 10, 11) for white noise measurement, in the (Figs. 12, 13) for the input disturbance, in the (Figs. 14, 15) for the output disturbance, in the (Figs. 16, 17) for the load torque variation, and based on the results gathered in Tables 9, 8, the proposed controller demonstrates its robustness with respect to disturbance rejection and less sensitivity to noise measurement.

Table 9 RMAE, MSE, and MAE values for different disturbances and noise.
Figure 10
figure 10

Performance of the induction motor speed control with measurement noise and multistep trajectory. (a) Reference trajectory and actual angular speed. (b) Error between reference trajectory and actual angular speed.

Figure 11
figure 11

Performance of the induction motor speed control with measurement noise and sinusoidal trajectory. (a) Reference trajectory and actual angular speed. (b) Error between reference trajectory and actual angular speed.

Figure 12
figure 12

Performance of the induction motor speed control with input disturbance and multistep trajectory. (a) Reference trajectory and actual angular speed. (b) Error between reference trajectory and actual angular speed.

Figure 13
figure 13

Performance of the induction motor speed control with input disturbance and sinusoidal trajectory. (a) Reference trajectory and actual angular speed. (b) Error between reference trajectory and actual angular speed.

Figure 14
figure 14

Performance of the induction motor speed control with output disturbance and multistep trajectory. (a) Reference trajectory and actual angular speed. (b) Error between reference trajectory and actual angular speed.

Figure 15
figure 15

Performance of the induction motor speed control with output disturbance and sinusoidal trajectory. (a) Reference trajectory and actual angular speed. (b) Error between reference trajectory and actual angular speed.

Figure 16
figure 16

Performance of the induction motor speed control with load torque Tr = 25Nm and multistep trajectory. (a) Reference trajectory and actual angular speed. (b) Error between reference trajectory and actual angular speed.

Figure 17
figure 17

Performance of the induction motor speed control with load torque Tr = 25Nm and sinusoidal trajectory. (a) Reference trajectory and actual angular speed. (b) Error between reference trajectory and actual angular speed.

Conclusion and future research directions

In this work, a new control method called Lyapunov-based neural network model predictive control using metaheuristic optimization approach was suggested. The efficiency of this approach is due to the use of neural network models on the one hand, known for their simplicity and ability to model complex and highly nonlinear systems, and the use of the DTBO optimization algorithm, known for its fast convergence, to optimize the cost function of predictive controller, on the other hand. The stability of the proposed technique was mathematically proved, and the carried out simulations demonstrated that the proposed controller can successfully manage the imposed constraints during the optimization process and offers better results in terms of robustness, accuracy and computation time than the others controller such as optimized PID by PSO algorithm, fuzzy logic using TLBO algorithm, NNMPC based on PSO and DTBO. Considering the obtained results, it can be concluded that the LNNMPC-DTBO can be used to control highly nonlinear, multivariable, and constrained systems with fast dynamics.

The promising results obtained from the Lyapunov-based neural network model predictive control employing metaheuristic optimization suggest several avenues for future research. First, further investigation into alternative metaheuristic algorithms could provide insights into optimization efficiency and control accuracy, particularly under varying system dynamics and noise conditions. Additionally, expanding the application scope of LNNMPC to other complex and nonlinear systems such as aerospace or biological systems could demonstrate the versatility and robustness of this control strategy. Another critical area involves enhancing the model’s predictive capabilities through the integration of deep learning techniques, which could improve the handling of large-scale data and complex variable interactions. Moreover, the development of real-time implementation strategies for LNNMPC that address computational constraints is crucial for its adoption in industry-critical applications. Lastly, exploring the theoretical aspects of stability and robustness within the framework of Lyapunov’s direct method could solidify the theoretical underpinnings of the control strategy and enhance its appeal in safety–critical applications. These efforts would not only extend the current capabilities of predictive control but also broaden the impact of LNNMPC in practical and industrial settings.