Use of the Adjoint Method for Controlling the Mechanical Vibrations of Nonlinear Systems

In this work, the analytical derivation and the computer implementation of the adjoint method are described. The adjoint method can be effectively used for solving the optimal control problem associated with a large class of nonlinear mechanical systems. As discussed in this investigation, the adjoint method represents a broad computational framework, rather than a single numerical algorithm, in which the control problem for nonlinear dynamical systems can be effectively formulated and implemented employing a set of advanced analytical methods as well as an array of well-established numerical procedures. A detailed theoretical derivation and a comprehensive description of the numerical algorithm suitable for the computer implementation of the methodology used for performing the adjoint analysis are provided in the paper. For this purpose, two important cases are analyzed in this work, namely the design of a feedforward control scheme and the development of a feedback control architecture. In this investigation, the control problem relative to the mechanical vibrations of a nonlinear oscillator characterized by a generalized Van der Pol damping model is considered in order to illustrate the effectiveness of the computational algorithm based on the adjoint method by means of numerical experiments.


Introduction
This paper is focused on the development of an adjoint-based analytical and computational framework for the optimal design of open-loop and closed-loop control laws suitable for controlling nonlinear mechanical systems. In this section, background material, a concise literature review, the formulation of the problem of interest for this study, the scope and the contributions of this investigation, and the organization of the manuscript are provided.

Background and Significance
In different areas of structural and mechanical engineering, the study of the mechanical behavior of dynamical systems having a nonlinear nature represents an important field of research [1,2]. As discussed in detail in the scientific literature, this problem is relevant especially in the case of complex engineering systems in which the final design solution represents an engineering approximation subjected to a certain degree of uncertainty [3][4][5][6][7][8][9][10][11][12][13][14][15][16][17]. In order to develop effective control actions for controlling the dynamic evolution of a general nonlinear mechanical system, appropriate formulation procedures and computational strategies are needed. Therefore, the first step necessary for the development of a new control strategy for a given mechanical system is to construct a reliable dynamic model of the system itself that is able to correctly capture its intrinsic nonlinear physics. Afterward, the design problem concerning the development of a control strategy for the nonlinear mechanical system under consideration can be addressed using several approaches and methodologies available in the literature. For example, the classical control methods are based on the linearization of the dynamic equations of the mechanical system under examination. Such methods lead to a loss of information on the complex nonlinear dynamic behavior and work properly only when the time response of the mechanical system at hand evolves around a fixed point of the state space or in the proximity of a prescribed trajectory. However, this is not the case of several mechanical systems employed in engineering applications in which a fully nonlinear dynamic behavior is found and, therefore, more complex control strategies are required.

Literature Review
In engineering applications, the analysis and the synthesis of machines and structures subjected to nonlinear vibrations represent an important topic of research. Several different energy sources can induce undesired mechanical vibrations of a given structural system, which, in turn, can be dangerous for the system integrity and can lead to a progressive deterioration of the system performance. Consequently, in numerous industrial applications, the vibration control problem represents a fundamental issue. In order to solve this important problem, different analytical approaches, computational methods, and experimental solutions have been extensively developed and tested in recent years. For instance, the methods based on the State-Dependent Riccati Equation (SDRE), the feedback linearization method, the sliding mode control approach, and nonlinear control methods based on the control-Lyapunov function represent effective control strategies suitable for solving the vibration control problem associated with a nonlinear mechanical system [18][19][20][21][22][23][24][25][26][27][28][29]. Moreover, the vibration control problem is particularly challenging in the case of rigid-flexible multibody mechanical systems. A multibody system is a special type of mechanical system characterized by a set of rigid bodies, deformable components, kinematic joints, force elements, force fields, electromechanical sensors, and control actuators [30][31][32][33][34][35][36][37]. Among the others, mechanisms and machines, flexible robotic manipulators, ground vehicles, aerospace structures, and biomechanical systems are examples of rigid-flexible multibody mechanical systems [38][39][40][41][42][43]. In order to solve the vibration control problem associated with a multibody mechanical system, the correct analytical formulation and the consistent numerical solution of the equations of motion represent a fundamental step of primary importance that is a current topic of research [44][45][46][47][48][49][50][51]. To this end, several multibody formulation approaches based on the finite element method have been recently developed for modelling flexible continuum bodies that undergo large reference displacements and large deformations [52][53][54][55][56][57][58][59]. In particular, the simple algorithms based on the linearization of the dynamic equations are not suitable for controlling the nonlinear behavior of a flexible multibody mechanical system and more advanced control approaches and numerical procedures are required [60][61][62][63][64][65].

Formulation of the Problem of Interest for this Study
In order to face the challenges associated with the nonlinear control problem, the adjoint method was originally devised in the field of computational fluid dynamics [66,67]. The adjoint method represents a wide computational procedure, rather than a single method, in which the control problem of nonlinear mechanical systems is analyzed by using the optimal control theory and an approximate solution of the resulting set of differential-algebraic equations can be obtained employing a broad variety of numerical procedures [68,69]. For this purpose, the discrete-time solution of the continuous-time adjoint equations can be achieved by the formulation of a set of archetypical sub-problems that can be treated with some mathematical techniques already developed and optimized in the field of numerical analysis [70]. For example, the adjoint method for solving the nonlinear optimal control problem has been applied in different engineering areas such as structural design and shape optimization, structural mechanics, electromagnetics, fluid kinetics, and the stabilization of business cycles of finance agents [71][72][73][74]. Since this process is not unique and, therefore, several valid options are available, there is the need for defining in a clear perspective the structure of the adjoint method in order to facilitate the development of a more general computational framework in which the adjoint equations can be effectively formulated and solved.

Scope and Contributions of this Investigation
The research presented in this work represents an attempt to address the important nonlinear control problem by developing a general computational procedure based on the adjoint method. For this purpose, this investigation is focused on a general adjoint-based approach that can be tested in a virtual environment by means of dynamical simulations and can be subsequently implemented in a control system based on the feedforward and feedback control paradigms. Thus, the purpose of this paper is to use the analytical background to formulate the adjoint equations and, at the same time, to propose a viable path that can be followed step-by-step for the numerical solutions of the adjoint equations employing a reliable set of pre-established computational algorithms. On the other hand, in order to demonstrate the effectiveness and the feasibility of the adjoint-based approach for obtaining nonlinear control laws suitable for solving the optimal control problem for a general class of mechanical systems, the vibration control problem of a nonlinear oscillator is considered in this investigation as an illustrative example. As will be shown in future investigations, the nonlinear control method developed in this paper can be extended to the class of multibody mechanical systems by formulating and solving the adjoint equations for a differential-algebraic set of dynamic equations. This paper is part of a wider research plan that deals with the use of analytical methods and numerical techniques for solving the optimal control problem associated with the dynamic behavior of nonlinear mechanical systems. In such regard, the adjoint equations are analytically formulated in this work considering a general case of a nonlinear dynamical system. Afterward, an iterative procedure for performing the nonlinear optimization of the desired control laws is developed in this investigation. In the computational procedure elaborated in this study, the fourth-order explicit Adams-Bashforth method is used for numerically solving the direct dynamic problem as well as the inverse adjoint problem; the conjugate gradient method based on the Fletcher-Reeves numerical scheme is employed in the formulation of the line search strategy for computing the minimum of the cost functional; the golden section algorithm is implemented for bracketing the search interval of the minimum and for computing the line parameter corresponding to the minimum of the cost function. As demonstrated by using the numerical results obtained in the paper, the approach developed in this investigation allows for deriving effective open-loop and closed-loop control actions.

Organization of the Manuscript
The structure of this manuscript can be summarized as follows. In Section 2, the analytical derivation of the adjoint equations and their application to the optimal control problem are discussed. In particular, the optimal design of control actions based the open-loop and closed-loop strategies are analyzed in this section. In Section 3, the computational steps necessary for obtaining an optimal numerical solution of the adjoint equations are illustrated in the case of a simple demonstrative example. For this purpose, the problem of the vibration reduction of a nonlinear oscillator is considered in the paper for demonstrating the computer implementation of the adjoint-based approach. In Section 4, the summary of this investigation, the conclusions drawn in this paper, and some indications on the future directions of research are provided.

Mathematical Background
In this section, background material on the analytical formulation of the adjoint equations is reported. Subsequently, the principal steps for numerically solving the adjoint equations by means of a general solution framework are described. In order to achieve this goal, two general cases are considered. The first case is the design of an optimal open-loop controller, while the second case is the design of an optimal closed-loop controller.

Adjoint Equations for Constructing an Optimal Open-Loop Controller
In this subsection, the adjoint equations for the optimal construction of a feedforward control action are discussed. A feedforward control action is an open-loop control law characterized by a set of explicit functions of time [75,76]. In the case of the design of an optimal open-loop controller, consider a system of n differential equations featuring a nonlinear structure that mathematically describes a dynamical system: where t is the continuous time variable, z ≡ z(t) is a vector of dimension n that defines the system state, z 0 is a vector of dimension n denoting the initial conditions, f ≡ f(t, z, u, r) is a vector of dimension n representing the system state function, u ≡ u(t) is a vector of dimension m u that stands for the open-loop control action, and r ≡ r(t) is a vector of dimension m r representing the external inputs that are uncontrollable. In the case of the derivation of an optimal open-loop controller, one can assume a cost functional J u defined as: where T is a specified time horizon, h ≡ h(t, z) is called terminal cost function, and g ≡ g(t, z, u, r) is referred to as the current cost function [77]. In the case of the design of an optimal open-loop controller, one can introduce an augmented cost functional employing the mathematical expressions of the system state-space equations of motion (1) and the cost functional (2) by means of an adjoining process as follows: where v ≡ v(t) identifies the adjoint state vector. On the other hand, consider the Hamiltonian function H u ≡ H u (t, z, u, r) defined as: It can be proved that an optimal feedforward control action u * ≡ u * (t) can be obtained in correspondence of an unconstrained minimum of the Hamiltonian function [78]. To this end, one can write: The augmented cost functional (3) can be rewritten employing the integration by parts process as: The variation of the augmented cost functional (6) yields: One can considerably simplify the mathematical form of the first variation of the augmented cost functional (7) by introducing the following definitions: where A ≡ A(t, z, u, r) is the state matrix of dimensions n × n obtained by linearizing the system state function f around the current system state z, B ≡ B(t, z, u, r) is the input influence matrix of dimensions n × m u obtained by linearizing the system state function f around the current open-loop control action vector u, η ≡ η(t, z) is the perturbation vector having dimension n of the terminal cost function h referred to the system state z, ϕ ≡ ϕ(t, z, u, r) is the perturbation vector having dimension n of the current cost function g referred to the system state z, and ψ ≡ ψ(t, z, u, r) is the perturbation vector having dimension m u of the current cost function g referred to the open-loop control action vector u. Therefore, the first variation of the augmented cost functional δJ a u can be rewritten as: Assuming that the system initial state z 0 is fixed and considering a given time horizon T, the nonlinear set of equations that identify an optimal feedforward controller can be derived as follows: The resulting set of differential-algebraic equations given by Equation (10) forms the adjoint equations and constitutes a differential-algebraic nonlinear two-point boundary value problem representing the necessary conditions associated with an optimal feedforward control action [79].

Adjoint Equations for Constructing an Optimal Closed-Loop Controller
In this subsection, the adjoint equations for the optimal derivation of a feedback control action are illustrated. A feedback control action is a closed-loop control law characterized by an explicit function of the system state [80,81]. In the case of the design of an optimal closed-loop controller, consider a system of n differential equations having a nonlinear structure, which mathematically represents a mechanical system: where t is the continuous time variable, z ≡ z(t) is a vector of dimension n that indicates the system state, z 0 is a vector of dimension n denoting the initial conditions, f ≡ f(t, z, u, r; γ) is a vector of dimension n representing the system state function, u ≡ u(t, z; γ) is a vector of dimension m u that describes the closed-loop control action defined in terms of a set of constant control parameters grouped in the parameter vector γ having dimension m γ , and r ≡ r(t) is a vector of dimension m r representing the external inputs that are uncontrollable. In the case of the construction of an optimal closed-loop controller, one can consider a cost functional denoted with J γ and defined as: where T is a given time interval, h ≡ h(t, z; γ) is referred to as the terminal cost function, and g ≡ g(t, z, u, r; γ) is called the current cost function [82]. In the case of the design of an optimal closed-loop controller, one can define an augmented cost functional using the analytical forms of the system equations of motion (11) and the cost functional (12) considering an adjoining process as follows: where v ≡ v(t) identifies the adjoint state vector. On the other hand, consider the Hamiltonian function H γ ≡ H γ (t, z, u, r; γ) given by: One can demonstrate that an optimal set of control parameters γ * associated with the feedback controller corresponds to an unconstrained minimum of the Hamiltonian function [83]. For this purpose, one can define: The augmented cost functional (13) can be reformulated using the integration by parts rule as: The variation of the augmented cost functional (16) produces: . (17) One can substantially simplify the analytical form of the first variation of the augmented cost functional (17) by introducing the following definitions: where A ≡ A(t, z, u, r; γ) is the state matrix of dimensions n × n obtained by linearizing the system state function f around the current system state z, B ≡ B(t, z, u, r; γ) is the input influence matrix of dimensions n × m γ obtained by linearizing the system state function f around the current closed-loop control parameter vector γ, η ≡ η(t, z; γ) is the perturbation vector having dimension n of the terminal cost function h referred to the system state z, ϕ ≡ ϕ(t, z, u, r; γ) is the perturbation vector having dimension n of the current cost function g referred to the system state z, and ψ ≡ ψ(t, z, u, r; γ) is the perturbation vector of dimension m γ of the current cost function g referred to the closed-loop control parameter vector γ. Thus, the first variation of the augmented cost functional δJ a γ can be rewritten as follows: Considering a given vector of initial conditions z 0 and assuming a fixed time interval T, the nonlinear set of equations that defines an optimal feedback controller can be obtained as follows: The resulting set of integro-differential-algebraic equations given by Equation (20) constitutes the adjoint equations and forms an integro-differential-algebraic nonlinear two-point boundary value problem representing the necessary conditions associated with an optimal feedback control action [84].

Iterative Adjoint-Based Computational Optimization Algorithm
In this subsection, the principal computational steps of the computer implementation of the adjoint equations are described. To this end, a numerical method for the derivation of an optimal open-loop controller as well as the construction of an optimal closed-loop control action are considered. In both the adjoint-based control optimization procedure and the adjoint-based parameter optimization procedure, a line search approach is used for searching for the minimum of the cost functional that corresponds to an optimal control law. For this purpose, in the case of the research of an optimal feedforward control action, the following structure of the control input can be assumed for implementing the iterative line search algorithm: where u k is the optimal control force vector at the iteration k, p k identifies the direction of the research of the minimum, and ξ k is a dimensionless parameter to be determined by means of a minimization process. On the other hand, in the case of the research of an optimal feedback controller, one can write in a similar way: where γ k is the optimal control parameter vector at the iteration k. There are several useful strategies available in the literature for selecting an optimal direction of research p k in the iterative minimization algorithm [85]. For instance, considering the conjugate gradient method, one can assume the following direction vector: where the parameter β k can be found using the following formula based on the Fletcher-Reeves method: where G k denotes the gradient vector of the cost functional, which can be obtained from the third equation of the systems (10) and (20), respectively, for an optimal feedforward and an optimal feedback control scheme. The dimensionless parameter ξ k , on the other hand, can be calculated using a standard minimization procedure for one-dimensional functions preceded by a process of bracketing of the interval in which a local minimum is collocated. In order to obtain the gradient of the cost functional G k at a given step k of the iterative procedure, one needs to solve the system equations of motion and, subsequently, the system adjoint equations that represent the first two equations of the systems (10) and (20). These two computational steps are respectively called solutions of the direct problem and solution of the inverse problem. The complete process continues iteratively until a tolerance is reached for the variation of the minimum of the cost functional obtained numerically. A schematic representation of the iterative computational procedure used for solving the adjoint equations is represented in Figure 1.
In Figure 1, denotes the tolerance set for the iterative minimization of the cost function J k . The computational procedure described in this subsection can be used for the computer implementation the adjoint method, which leads to a numerical solution for an optimal open-loop controller and an optimal closed-loop controller. In particular, the flowchart illustrated in Figure 1 describes the principal steps necessary for the computer implementation of the adjoint approach. It is important to note that all the computational steps of the adjoint-based iterative procedure can be implemented employing standard numerical methods. For this purpose, the solution of both the direct and inverse problems can be performed using the explicit and/or implicit Runge-Kutta algorithms as well as the explicit and/or implicit linear multistep schemes. Several numerical methods are also suitable for obtaining the line direction used in the search algorithm such as, for example, the simple steepest descent approach as well as the more advanced conjugate gradient algorithms and the quasi-Newton methods. Furthermore, both the bracketing of the minimum and the minimization of the cost function can be carried out employing the Fibonacci search approach, the golden section search algorithm, and the Brent search method. In this paper, on the other hand, the fourth-order explicit Adams-Bashforth method was used for solving both the direct and the inverse problems, the conjugate gradient method based on the Fletcher-Reeves algorithm was employed for computing the gradient-based search direction at each iteration of the minimization procedure, and the golden section approach was implemented for accomplishing both the bracketing of the minimum and the minimization of the cost function. As illustrated in the numerical result section of this investigation, the approach developed in this paper produces feedforward and feedback control laws that are efficient and effective.

Numerical Results and Discussion
In this section, a demonstrative example is used for testing the effectiveness of the analytical methods developed in this paper employing dynamical simulations. This section is also used for illustrating the main steps of the numerical implementation of the adjoint-based approach. To this end, the performance of the adjoint equations for the design of optimal feedforward and feedback controllers are analyzed below.

Description of the Demonstrative Example
In this subsection, the demonstrative example considered as a case study is described. To this end, consider the mechanical system represented in  The mechanical system considered as a demonstrative example is a nonlinear oscillator with one degree of freedom indicated with x ≡ x(t), where x represents the displacement of the point mass. In Figure 2, m is the mass of the mechanical system, k represents the stiffness of the linear spring, whereas a, b, and c denote the constant coefficients of the nonlinear damper. The mechanical oscillator is connected to a nonlinear dashpot device based on the generalized Van der Pol damping model [86]. The force generated by the nonlinear damper is denoted with F c ≡ F c (t, x,ẋ) and is given by: The nonlinear device shown in Figure 2 is based on the generalized Van der Pol damping model described by the force law given in Equation (25). Therefore, this component alternatively provides and drains mechanical energy from the nonlinear oscillator leading to a limit cycle in the system dynamical behavior. By using the analytical methods of classical mechanics, the nonlinear equation of motion of the mechanical oscillator can be readily written as follows: where F i = −mẍ is the inertia force, F k = −kx represents the elastic force, and F e = u denotes a control force associated with a control actuator collocated on the mechanical oscillator. In this way, one can explicitly rewrite the system equation of motion as: In particular, two general cases are considered, namely a feedforward controller described by the control action u ≡ u(t) and a feedback controller described by the control action u ≡ u(t, x,ẋ). In the case of a pure open-loop controller, the control action is an arbitrary function of time. In the case of a pure closed-loop controller, on the other hand, a simple linear structure is assumed for the control action given by: where γ 1 and γ 2 are constant parameters defining the linear structure of the feedback controller, which can be groped in a two-dimensional parameter vector γ as follows: Therefore, the feedback controller considered in this demonstrative example is based on the proportional-derivative control scheme. In the dynamical simulations, the following set of initial conditions is assumed for the nonlinear oscillator: where x 0 represents the initial displacement of the particle and v 0 identifies the initial velocity of the point mass. In particular, a nonzero initial displacement x 0 and a zero initial velocity v 0 are selected for the nonlinear oscillator in order to set the initial configuration of the nonlinear system outside the region of the limit cycle that appear in the state-space diagram. Consequently, when there is no control action applied to the dynamical system, its spontaneous evolution is towards the limit cycle. The numerical data employed for performing the dynamical simulations are reported in Table 1. Furthermore, in the numerical solution of the dynamic equation that describes the motion of the nonlinear oscillator, the dynamical simulations are performed considering a time interval equal to T = 30 (s) and a time step equal to ∆t = 10 −2 (s). The numerical integration scheme employed for the numerical solution of the dynamic equation is the well-known fourth-order Adams-Bashforth method that represents a classical multistep explicit numerical integration algorithm.

Description Symbols Data (Units)
System Mass m 1 (kg) Spring Stiffness

Development of an Open-Loop Optimal Controller
In this subsection, the development of an optimal controller based on a feedforward control strategy is carried out for the nonlinear oscillator used as a demonstrative example employing the adjoint-based control optimization method. To this end, one can define a state vector for the mechanical oscillator given by: By doing so, in the case of the design of an optimal open-loop controller, the equations of motion and the initial conditions can be represented in the state-space as follows: where f denotes the system state function and z 0 identifies the vector of initial conditions that are respectively defined in the case of an open-loop control action as follows: In the case of an open-loop control architecture, the sensitivity matrices A and B can be readily calculated by evaluating the Jacobian matrices of the system state function f as follows: where A and B denote respectively the state matrix and the input influence matrix obtained by linearizing the system state function f around the current system state z and the current open-loop control force u. The open-loop controller is a feedforward control scheme. The goal of the feedforward control action is to reduce the magnitude of the mechanical vibrations of the nonlinear oscillator without using an excessive amount of external energy associated with the control actuator. For this purpose, the terminal cost function h and the current cost function g can be simply constructed employing the following quadratic forms: where Q T , Q z , and Q u are diagonal matrices that define the weights of the terminal cost function h and the structure of the current cost function g. The numerical data used for the entries of the weight matrices necessary for the design of the optimal feedforward controller are Q T,1 = Q T,2 = 1, Q z,1 = Q z,2 = 5, and Q u = 1. Considering the analytical definitions of the terminal cost function h and of the current cost function g, one can readily determine the sensitivity vectors η, ϕ, and ψ associated with the feedforward controller as follows: where η is the perturbation vector of the terminal cost function h referred to the system state z, ϕ is the perturbation vector of the current cost function g referred to the system state z, and ψ is the perturbation vector of the current cost function g referred to the open-loop control vector u. Employing the sensitivity matrices and vectors defined before, the adjoint equations for the optimal design of a feedforward controller are analytically implemented and numerically solved by using a computer program developed in MATLAB (R2013a version). The initial guess for the feedforward control action used in the control optimization algorithm based on the adjoint approach is u 0 = sin(t). Figure 3 shows the time law of the optimal feedforward control force resulting from the iterative numerical solution of the adjoint equations.     In Figure 4a,b, the dashed lines represent the time responses of the nonlinear oscillator when the control action is absent, whereas the solid lines represent the time responses of the mechanical oscillator when the optimal feedforward controller is active. The state-space representation of the dynamic evolution of the mechanical oscillator subjected to the action of the open-loop controller is shown in Figure 5. In Figure 5, the dashed line represents the time response of the nonlinear oscillator when the open-loop control action is absent, whereas the solid line represents the time response of the mechanical oscillator when the optimal open-loop controller is active. As shown in Figures 4 and 5, the feedforward control action represented in Figure 3 leads to a substantial attenuation of the mechanical vibrations of the nonlinear oscillator. In order to quantify the reduction of the mechanical vibrations, the Root-Mean-Square (RMS) deviations of the dynamical responses from the zero reference trajectory are computed with and without the action of the feedforward controller and the numerical results obtained are reported in Table 2. Table 2 shows that the optimal open-loop control action obtained by using the control optimization procedure based on the adjoint approach effectively yields the desired vibration suppression.

Development of a Closed-Loop Optimal Controller
In this subsection, the development of an optimal controller based on a feedback control strategy is performed for the nonlinear oscillator used as a demonstrative example employing the adjoint-based parameter optimization method. For this purpose, one can define a state vector for the mechanical oscillator given by: By doing so, in the case of the design of an optimal closed-loop controller, the equations of motion and the initial conditions can be rewritten in the state-space as follows: where f identifies the system state function and z 0 denotes the vector of initial conditions that are respectively defined in the case of a closed-loop control action as follows: In the case of a closed-loop control architecture, the sensitivity matrices A and B can be easily derived by evaluating the Jacobian matrices of the system state function f as follows: where A and B indicate respectively the state matrix and the input influence matrix obtained by linearizing the system state function f around the current system state z and the current parameter vector γ that defines the structure of the closed-loop controller. The closed-loop controller is a feedback control scheme. The objective of the feedback control action is to reduce the entity of the mechanical vibrations of the nonlinear oscillator without using a large amount of external energy associated with the control actuator. To this end, the terminal cost function h and the current cost function g can be readily defined employing the following quadratic forms: where Q T , Q z , and Q u are diagonal matrices that describe the structure of the terminal cost function h and the weights of the current cost function g. The numerical data used for the entries of the weight matrices necessary for the design of the optimal feedback controller are Q T,1 = Q T,2 = 1, Q z,1 = Q z,2 = 5, and Q u = 1. Assuming the mathematical definitions of the terminal cost function h and of the current cost function g, one can readily determine the sensitivity vectors η, ϕ, and ψ associated with the feedback controller as follows: where η is the perturbation vector of the terminal cost function h referred to the system state z, ϕ is the perturbation vector of the current cost function g referred to the system state z, and ψ is the perturbation vector of the current cost function g referred to the parameter vector γ that defines the structure of the closed-loop controller. By using the sensitivity matrices and vector described above, the adjoint equations for the optimal design of a feedback controller are analytically implemented and numerically solved employing a computer program developed in MATLAB. The initial guess for the feedback control parameters used in the parameter optimization algorithm based on the adjoint approach are γ 0 1 = 1 and γ 0 2 = 1. Figure 6 shows the time law of the optimal feedback control force resulting from the iterative numerical solution of the adjoint equations. The optimal feedback controller represented in Figure 6 corresponds to the following optimal vector of control parameters γ * obtained by means of the numerical implementation of the parameter optimization procedure based on the adjoint approach: Figure 7a,b respectively show the displacement and velocity time histories relative to the mechanical oscillator used for testing the performance of the feedback control action.
In Figure 7a,b, the dashed lines represent the time responses of the nonlinear oscillator when the control action is absent, whereas the solid lines represent the time responses of the mechanical oscillator when the optimal feedback controller is active. The state-space representation of the dynamic evolution of the mechanical oscillator subjected to the action of the closed-loop controller is shown in Figure 8.  In Figure 8, the dashed line represents the time response of the nonlinear oscillator when the closed-loop control action is absent, whereas the solid line represents the time response of the mechanical oscillator when the optimal closed-loop controller is active. As shown in Figures 7 and 8, the feedback control action represented in Figure 6 leads to a considerable mitigation of the mechanical vibrations of the nonlinear oscillator. In order to quantify the reduction of the mechanical vibrations, the Root-Mean-Square (RMS) deviations of the dynamical responses from the zero reference trajectory are computed with and without the action of the feedback controller and the numerical results obtained are reported in Table 3.  Table 3 shows that the optimal closed-loop control action obtained by using the parameter optimization procedure based on the adjoint approach effectively produces the requested vibration attenuation.

Conclusions
The research of the authors is mainly focused on the development and the improvement of analytical methods and computational procedures for the nonlinear dynamic analysis of mechanical systems, for performing the experimental parameter identification of structural systems, and for the design of effective control strategies applicable to multibody systems [87][88][89][90]. For this purpose, the relationship between three different disciplines are exploited, namely the theory of nonlinear control, the numerical methods of applied system identification, and the analytical techniques of multibody system dynamics [91][92][93][94][95].
This work represents a study on the analytical derivation and the computer implementation of the adjoint method. The adjoint method can be effectively employed for constructing optimal control actions suitable for solving the regulation and tracking problems of a large class of nonlinear dynamical systems. In particular, the numerical solution of the nonlinear control problem addressed in this investigation is focused on two adjoint-based control methodologies. To this end, the iterative adjoint-based control algorithms discussed in this paper lead to the development of a nonlinear control optimization procedure and to the construction of a nonlinear parameter optimization procedure. The analytical derivation and the numerical implementation of the adjoint-based computational algorithms are illustrated in detail in this work. Furthermore, a demonstrative example is used in this paper for proving the effectiveness of the proposed method employing numerical experiments. For this purpose, the vibration control problem of the nonlinear oscillations of a mechanical system characterized by a generalized Van der Pol damping model is considered. The numerical results presented in the paper show that both the optimal feedforward and feedback controllers designed employing the proposed adjoint-based approach lead to a large reduction of the mechanical vibrations of the nonlinear oscillator that serves as a simple illustrative example.
In the field of nonlinear control, several complex algorithms have been developed in the recent years such as, for example, the methods based on the State-Dependent Riccati Equation (SDRE), the feedback linearization method, the sliding mode control approach, and nonlinear control methods based on the control-Lyapunov function. In general, the design of a nonlinear controller is a challenging task that may require the use of an iterative procedure, which cannot be directly implemented in real-time. This is also the case of the adjoint method developed in this investigation. However, for all the nonlinear control methods mentioned before, the underlying idea is that the development of a given control law can be performed offline by means of dynamical simulations. Subsequently, the control strategy developed employing extensive dynamical simulations can be implemented and tested online in a particular engineering application using an experimental test rig. By doing so, the computational complexity of the selected control strategy does not represent an issue because this calculation is performed only in advance in a virtual environment, which allows also to test the robustness and the effectiveness of the nonlinear control design. This concept is well-known in the control engineering community and represents one of the fundamental motivations behind the development of this investigation. Therefore, the nonlinear control method proposed in this paper is effectively applicable for solving actual engineering problems.
An important consideration that is worth emphasizing herein is the focus on the combined use of a feedforward control law with a feedback control strategy. This concept is another key idea commonly used in the control engineering community for the development of nonlinear controllers. Following this approach, an open-loop controller is at first designed employing a nonlinear dynamical model of a mechanical system that is the object of the control problem. Afterward, a closed-loop controller is designed in order to cope with the uncertainties of the model, the unavoidable presence of noise, and the incomplete measurement information on the state of the dynamical system. This approach represents a robust control paradigm that is widely accepted and used for nonlinear control applications and this paper is based on this background idea. Furthermore, this investigation proposes a complex control algorithm that can be tested on simple dynamical systems in order to allow other researchers to reproduce the numerical results proposed in the paper and compare the performance of the adjoint-based approach with the effectiveness of other viable control strategies.
An additional important aspect of the optimal control problem associated with nonlinear mechanical systems concerns the process noise and the measurement uncertainties arising from the interaction between the mechanical system and the external world modelled as a stochastic environment. This challenging problem directly involves the use of a state estimator referred to as an observer. This complex scenario can be handled with the methodology proposed in the paper in conjunction with the mathematical tools of the modern optimal estimation and control theory. To this end, the adjoint-based procedure can be effectively used to derive optimal control actions for a nominal model of the mechanical system under examination. Subsequently, the nonlinear behavior of the mechanical system can be linearized around the operational trajectory obtained from the control action applied to the nominal system. Thus, an optimal controller together with an optimal observer can be designed using the linearized dynamical model. For this purpose, several control and estimation algorithms can be employed considering the linearized dynamical model. For example, the Linear-Quadratic-Gaussian (LQG) control and estimation method based on the Kalman filtering technique can be employed in order to effectively accomplish this task. By doing so, an optimal compensation controller can be obtained in order to adjust the difference in the dynamical behavior of the nominal dynamic model with respect to the actual mechanical system on which the controller is implemented. Following this alternative approach suitable for handling practical engineering problems, the combination of the nominal controller designed employing the adjoint-based procedures with the compensation controller obtained using the LQG technique can lead to a robust control strategy capable of coping with the power limit in the actuators, the presence of noise in the system process and in the measurements, and the lack of information on the system state.
This paper represents a step further in a wider research plan devised by the authors and focused on the use of the optimization approach for solving the nonlinear control problem in the case of the dynamic behavior of mechanical systems. Future research efforts will be devoted to the development of effective adjoint-based nonlinear control actions for differential-algebraic dynamical systems, such as the multibody mechanical systems, by using advanced analytical techniques tested employing numerical simulations. Moreover, the experimental validation of the numerical results obtained for attenuating the nonlinear mechanical vibrations of complex dynamical systems commonly employed in engineering applications such as machines and structures will be performed in future investigations.
Author Contributions: This research paper was principally developed by the first author (Carmine Maria Pappalardo). The detailed review carried out by the second author (Domenico Guida) considerably improved the quality of the work.
Funding: This research received no external funding.

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