The Interconnection and Damping Assignment Passivity-Based Control Synthesis via the Optimal Control Method for Electric Vehicle Subsystems

The interconnection between optimal control theory and the theory of energy-shaping control is described in our paper. For linear and nonlinear systems, the application of the theory of optimal control for the synthesis of parameters of energy-shaping control matrices is demonstrated in detail. The use of a Riccati equation allows us to form an optimality criterion and to synthesize the energy-shaping control system that provides the desired transient processes. The proposed approach was applied to the synthesis of control influences for electric vehicle subsystems, such as a two-mass system and a permanent magnets synchronous motor. The results of computer simulation studies, as well as those conducted on real experimental installations, are given in this paper.


Introduction
In recent decades, there has been a significant gap between the development of the theory of automatic control and the practical application of the established methods of the synthesis of control influences in technical systems. Modern systems, including electromechanical ones, are complex nonlinear objects. The use of nonlinear control theory [1][2][3] methods in such systems (especially feedback linearization, backstepping, and passivitybased control, as shown in [4][5][6]) creates new opportunities to synthesize effective control algorithms and to improve the dynamic and static characteristics of the systems themselves. At the same time, the mentioned methods of control systems synthesis are quite complex from a mathematical point of view, requiring specialist knowledge for their understanding and application; thus, their widespread use has declined for the time being. A common feature of the above-mentioned methods is the formation of control influences based on state variables [1,7], which will ensure the stability of the synthesized system. In the first case, the control coefficients based on the full state vector are in the new coordinate basis where the system is linear, and then there is a transition to the main coordinate basis. In the other two, the control synthesis is based on the iterative process [8,9]. In the backstepping method, synthesis occurs by increasing the complexity of the system and using a special type of Lyapunov function. In the passivity-based control method, synthesis is performed by splitting the trajectory into individual sections and finding optimal control over this time interval based on the application of the Fréchet derivative [10]. Unlike the methods of feedback linearization and backstepping, the method of passivity-based control, as a representative of energy-based approaches, is based on the physical laws of energy transfer and conversion [11]. This makes its application promising in electromechanical systems, particularly in electric vehicles [12,13], where the energy flow control system is at the core. As noted in [14] the main difficulties in the application of energy-shaping control are both the structure selection of the matrices of interconnections between subsystems and damping and the synthesis of the parameters of these matrices. For a linear system, as described in [15], the relationship between the theory of optimal control and interconnection and damping assignment passivity-based control (IDA-PBC) is shown, and the problems that need to be solved are formulated. In [11], for the synthesis of the control influence, the Ricatti equation for a single point in the state space was applied to form the control as a combination of the control influences obtained at individual points. The formulation of the problem of energy-shaping control synthesis, based on the theory of optimal control for a linear system, is caused primarily by the fact that the nonlinear theory of optimal control for the synthesis of control influence requires solving the Hamilton-Jacobi-Bellman equation [16], which is also difficult in complex systems. The linear theory of optimal control makes it possible to obtain a solution to the problem in the form of a matrix of feedback on state variables. These variables correspond to the principles of energy-shaping control. At the same time, the application of fuzzy set theory makes it possible to consider certain classes of nonlinear systems, including electromechanical systems, as a family of dynamic linear systems, and to synthesize a fuzzy controller based on the methods of classical control theory [17]. Thus, the synthesis of IDA-PBC via the linear theory of optimal control and its extension to nonlinear systems is an important task, especially for electric vehicles.
Due to the permanent development of electric vehicles in recent years [18], electric vehicles can be chosen as an example onto which we can apply the proposed ideas. In a modern electric car, the most crucial factor is an effective use of the battery charge [19][20][21], which is an energy management challenge that can be correctly formulated and solved with energy-based approaches. An electric vehicle is a complex electromechanical system which consists of different types of subsystems, and each of them is important, particularly the wheels, shaft, electric motor, inverter, traction battery, internal combustion engine, generator, etc. [22]. The mechanical parts of the whole powertrain (whether they be wheels, hubs, motors, or shafts), can be considered constitutive of a two-mass subsystem [23]. Despite the use of different types of motors in electrical vehicles (Direct Current Motor, Brushless Direct Current Motor, Alternating Current Motor, and Switched Reluctance Motor) [24], the most popular is a Permanent Magnet Synchronous Motor (PMSM). This is because of its high power rating and efficiency. The PMSM is a nonlinear system that requires a more complex control system design [25].
Considering the feasibility of passivity-based control in electromechanical systems, where providing optimal energy efficiency and energy flow management are key issues, this article aims to solve the problem of synthesis for control system interconnection and damping matrices with the use of the classical theory of optimal control.

Synthesis of Energy-Shaping Control in the Case of a Linear System
A linear system in well-known state-space representation is the following: and, when moving to a desired state, it transforms to: where x z -desired state vector and u z -desired input vector.
In this case, for the integral quality criterion, we obtain the following expression: where R 1 and R 2 are positive definite matrixes and λ(t)-indefinite Lagrange multiplier.
Taking that x * = x − x z and u * = u − u z , and also given that dx z (t) dt = 0, the formed criterion (2) can be written as follows: When t 1 → ∞, an optimal control of the object can be formulated in the form of a linear law u * = −K · x * , where the matrix of feedback coefficients K is determined by the formula K = R where P is the only non-negative symmetric solution of the algebraic Riccati equation: Then, the optimal control, which transits the system from any arbitrary state to a desired state, is determined as follows: In the case of energy-shaping control (in particular IDA-PBC), when considering the system as port-controlled Hamiltonian (PCH), the model of the linear system will look like: where J = −J T -skew-symmetric matrix that reflects the interconnections in the controlled object; R = R T ≥ 0-symmetric positive matrix that reflects the loss (damping) in the controlled object; H = 1/2 · x1 T · D −1 · x1-total energy function (Hamiltonian); x1-a state vector in PCH representation, the elements of which are various energy impulses; D-diagonal matrix of inertia coefficients; G-port matrix in PCH representation. According to the IDA-PBC procedure, the control system synthesis is reduced to determining the structures of the new internal energy interconnections J a and damping R a that provide the necessary behavior of the system [26]. The introduction of additional interconnections is carried out in order to change the flow of energy between the subsystems. It will lead to new forces that will move the system to a given point of equilibrium. The introduction of damping is carried out for the purpose of natural redistribution of energy, which leads to the damping of oscillations in the system and ensures its asymptotic stability. The model of the desired asymptotically stable closed-loop Hamiltonian control system is described by the following equation: where J d = J + J a = −J d T -matrix that reflects the interconnections in the desired system; R d = R + R a = R d T ≥ 0-matrix that reflects the loss (damping) in the desired system; )-the energy function of the desired closed-loop control system for the equilibrium point x1 0 .
Then, the equation for the control influences of the control system of partial derivatives will look like: Given that x1 = D·x and x1 0 = D·x z , while ∂H ∂x1 = x and ∂H d ∂x1 = x − x z , we will receive: and In order to find the control according to the energy-shaping approach, the expression should be multiplied by D −1 : Taking into account that u z = −B −1 · A · x z by analogy with the system of optimal control, the control influence, which transits the system from any arbitrary state to a desired state, can be written as follows: It should be noted that the state of the system with optimal control and energy-shaping control is determined by different state vectors: in the first case, the coordinates of the state, and in the second, energy pulses. Given the relationship between the vector of energy pulses and the coordinates of the state, it can be written as K = D −1 · K1, and then: Let W = J a − R a = −G · D · R −1 2 · B T · P. Then, taking into account that J a = −J T askew-symmetric matrix and R a = R T a ≥ 0-symmetric matrix, we will receive: In energy-shaping control, the matrix J a forms energy flows between individual subsystems. If we were to take for a linear system that J a = 0, then the damping matrix is defined as follows: Thus, IDA-PBC provides the formation of optimal control influences. In the case of the control object being a linear system, it could be synthesized using the theory of optimal control.

Study of the Efficiency of Synthesized Control in a Two-Mass System
Consider the application of the proposed approach to the synthesis of a control system for a two-mass subsystem for the electrical vehicle. The traditional model of a two-mass system looks like this [6]: where J 1 and J 2 -moments of inertia of the motor's rotor and the mechanism, respectively; ω 1 and ω 2 -angular velocities of the engine and mechanism, respectively; M-torque of the drive mechanism (electromagnetic moment of the motor); M c1 and M c2 -static moments acting on the motor itself and the mechanism, respectively; b 1 and b 2 -coefficients of external viscous friction of the motor and mechanism; c-transmission stiffness factor; ∆φ-twist angle; β-coefficient of internal viscous friction.
There is a more accurate representation of the last equation in (9) using the Caputo-Fabrizio operator, where elastic moment is formed in the following way: From another hand, our system is not a positional system which, according to [27], allows us to use the traditional representation of a two-mass system (9). As follows, in vector-matrix form (1), the model of a two-mass system (9) will take the form: When writing a controlled object as a PCH (5), the system model will look like: The Hamiltonian of the system will be as follows: Then given ∂H ∂x1 = ω 1 ω 2 ∆ϕ T : and accordingly, based on (6), the following matrices can be found: Thus, the matrix of control influences B (9), which is obtained from the model in PCH representation, differs from the traditional one obtained from the representation of the system in the state-space form. The presence of fictitious control influence 1 c · 0 allows, unlike writing the system in the form of state variables, for the finding of u z as the solution of the system A · x z + B · u z = 0. It is also worth noting that, in the energy-based approach, the control influence is formed as the sum of all influences that operate at a given point in the system, taking into account the sign. Given the above, a model of the system (9) in the form of state variables can be written as: or, separating the control and perturbing influences traditionally used in the synthesis of control systems, this model can be represented as: Given that the system has only one control influence, the quality criterion (3) will take the following form: Assume that R 1 -identity matrix. Then, Riccati's Equation (4) will take the form: The matrix of feedback coefficients, based on (7), will have the form: Let the investigated two-mass system have the parameters [28]: J 1 = 1 kg·m 2 , J 2 = 3 kg·m 2 , c = 20,000 N·m, b 1 = 0.25 N·m·s, b 2 = 0.25 N·m·s, and β = 10 N·m·s. Then, based on (11), the matrix P for α = 0.5 will be the following: and the matrix of synthesized coefficients based on state variables (12) will appear accordingly as: Given that x z = −A −1 B · u z , the synthesized control influence will be equal: Figures 1 and 2 show the change of system state coordinates for u z = 10 and coefficients, synthesized based on system state variables via optimal control theory.
In the case of energy-shaping control, based on (8), we obtain the following matrices of the control system:   and general control system, synthesized using the general IDA-PBC approach [26] with the selected structure of matrices Ja and Ra, will have the form: . Figures 1 and 2 show the change of system state coordinates for uz = 10 and coefficients, synthesized based on system state variables via optimal control theory.
In the case of energy-shaping control, based on (8), we obtain the following matrices of the control system: and general control system, synthesized using the general IDA-PBC approach [26] with the selected structure of matrices Ja and Ra, will have the form:    Received energy-shaping control (13) provides the same behavior, as shown in Figures 1 and 2. time, sec time, sec Received energy-shaping control (13) provides the same behavior, as shown in Figures 1 and 2.

Synthesis of Optimal Control Based on the Riccati Equation Written in Terms of Energy-Shaping Control
The main problems in the synthesis of optimal control are related to the selection of matrices R 1 and R 2 and finding the solution to the algebraic Riccati equation-matrix P.
In the case of energy-shaping control, the algebraic Riccati equation for finding the matrix P can be represented as follows: Given the transposition properties of the matrices, the Riccati equation can be written as: If taken as a partial case, P = γ · D, Riccatti's equation will take the form: and, accordingly: and, accordingly: Taking into account the fact that the control signal is supplied to only one port, then: Let R 2 -identity matrix, and R 1-for the studied two-mass system has the following form: Then, the solution of the algebraic Riccati equation is: In the case of energy-shaping control, the matrix of new internal energy interconnection J 2 = 0 and the matrix of formed damping is equal to: In this case, energy-shaping control (13) transforms to the form: For a traditional system of optimal control, a feedback matrix based on state variables: In this case, energy-shaping control (13) transforms to the form: For a traditional system of optimal control, a feedback matrix based on state variables:        The conducted studies confirmed that systems received from both optimal control and IDA-PBC approaches provide the same behavior in the controlled object.

Synthesis of Energy-Shaping Control Parameters in the Case of a Nonlinear Electromechanical System
In the case of a nonlinear system, the system model is given in the form: The optimal control is based on the solution of the Hamilton-Jacobi-Bellman equation which, under the condition T V V = , has the form: for the condition ( ) ( ) 2 , The solution of the Hamilton-Jacobi-Bellman equation (14) is quite complex due to its nonlinear nature. In the case of a linear system, the Hamilton-Jacobi-Bellman equation is transformed into the well-known Riccati equation (4).
When using energy-shaping control, the nonlinear system can also be represented in  The conducted studies confirmed that systems received from both optimal control and IDA-PBC approaches provide the same behavior in the controlled object.

Synthesis of Energy-Shaping Control Parameters in the Case of a Nonlinear Electromechanical System
In the case of a nonlinear system, the system model is given in the form: The optimal control is based on the solution of the Hamilton-Jacobi-Bellman equation which, under the condition T V V = , has the form: for the condition ( ) ( ) The solution of the Hamilton-Jacobi-Bellman equation (14) is quite complex due to its nonlinear nature. In the case of a linear system, the Hamilton-Jacobi-Bellman equation is transformed into the well-known Riccati equation (4).
When using energy-shaping control, the nonlinear system can also be represented in The conducted studies confirmed that systems received from both optimal control and IDA-PBC approaches provide the same behavior in the controlled object.

Synthesis of Energy-Shaping Control Parameters in the Case of a Nonlinear Electromechanical System
In the case of a nonlinear system, the system model is given in the form: The optimal control is based on the solution of the Hamilton-Jacobi-Bellman equation which, under the condition V = V T , has the form: for the condition V(x, T) = S 2 (x), where S 1 and S 2 -formed objective function. The solution of the Hamilton-Jacobi-Bellman Equation (14) is quite complex due to its nonlinear nature. In the case of a linear system, the Hamilton-Jacobi-Bellman equation is transformed into the well-known Riccati Equation (4).
When using energy-shaping control, the nonlinear system can also be represented in PCH form: (15) Skew-symmetric matrix J(x1) = −J T (x1) in the case of an electromechanical system can contain both elements that depend on state variables and elements that do not depend on state variables of system x1, and can be written as: J(x1) = J * + J ** (x1). Similarly, a symmetric matrix R(x1) = R * + R ** (x1) can be written. If matrix G does not depend on state variables, the model of the nonlinear system (15) can be written as follows: (16) The model of the desired asymptotically stable closed-loop PCH is described by the following equation: ∂H d ∂x1 and, taking into account the desired equilibrium point, can be written as: where J d * = J d (x1 0 ) and R d * = R d (x1 0 )-values of the matrices at the point of the state space, which is determined by the state vector of the system x1 0 .
With forms such as (16) and (17), we come to the synthesis of optimal control for linear systems. Synthesized control influence u * for energy-shaping control, as shown above, is equal to u * = u z − K1 · (x − x z ). Then In the case of control based on the full state vector of the system, we obtain: ]-control influence, which compensates nonlinearities in the electromechanical system.

Studies of the Efficiency of the Proposed Approach in the Example of a Permanent Magnet Synchronous Motor Control System
Consider the application of the proposed approach on the example of PMSM control. The model of PMSM in an orthogonal rotating coordinate system d-q, where the d axis is oriented along the rotor flow vector, has the form [14]: where L d and L q -the inductances of the armature winding (stator) at the axes d and q, respectively; R s -active resistance of the armature phase winding; p p -number of pole pairs; ω-angular speed of the rotor; Φ-the amplitude of the flux linkage of the armature winding with a pair of poles of the rotor permanent magnets; I m -total moment of inertia; b-coefficients of external viscous friction; M L -moment of static load.
In energy-shaping control, the state vector is x1 = and taking into account the next equations the system model will look like:  -Hamiltonian of the system. Dividing the system control and disturbing influences and considering that: we will receive where P-solution of the Riccati equation As a result of solving the Riccati Equation (18), the resulting matrix K has the following form where The searched matrices of interconnections and damping, in this case, will look like: L q ·k 23 2 0 L q ·k 23 2 0    For the control system based on the full state vector we obtain: Control influence p p L q − L d · i q · i d compensates for fluctuations in the electromagnetic torque when L q = L d . However, in real systems, it cannot be implemented.
After substituting the synthesized control influences (20) in the model of PMSM, we obtain: For the control system of PMSM with permanent magnets placed on the rotor surface and with the following parameters: n H = 500 r/min, M H = 500 N·M, R s = 0.25 Ohm, The synthesized matrices of interconnection and damping are equal to: The obtained dependences of rotation speed change and stator current projection on the q axis are shown in Figure 7.
Combining this and regular IDA-PBC approaches, the following energy-shaping control can be obtained: which results in the same control influences. In order to confirm the efficiency of the proposed approach, studies were conducted on the validated simulation model and the real experimental installation ( Figure 8); these are described in [6]. The approach consists of a computer control system (1), PMSM (2) and DC-machine load (3) connected through the belt (4).
Motor (2) is a multipolar SPMSM, where L d ≈ L q . It receives power from a custom inverter, built on ATmega 128, which is the core of a low-level control system that forms control signals to transistors drivers. The high-level control system was implemented on the PC (1), which allows us to dynamically change the regulator's structure and parameters.
To provide speed feedback-loop, an absolute 12-bit Kübler 5862 rotary encoder was used. After processing position in Grey-code, this allowed us to calculate the motor's speed. For the currents feedback loops, ABB EH050AP current sensors were used.
The parameters of the main SPMSM are the following: n H = 80 r/min, M H = 80 N·M, R s = 1.7143 Ohm, Φ = 0.1825 Wb, J m = 2.43 kg·m 2 , p p = 38, L d = 6.228 mH L q = 6.468 mH, b = 0.1. As such, the respective control matrix (19) will look like this:  To provide speed feedback-loop, an absolute 12-bit Kübler 5862 rotary encoder was used. After processing position in Grey-code, this allowed us to calculate the motor's speed. For the currents feedback loops, ABB EH050AP current sensors were used.
The obtained dependences of rotation speed change and stator current projection on the q axis are shown in Figure 9.
The obtained dependences of rotation speed change and stator current projection on the q axis are shown in Figure 9.   Figure 9 shows results from the simulation model and the experimental installation. Due to limitations in experimental installation, particularly the limited power source, most studies were conducted on a low speed, which resulted in additional fluctuations in Figure 9.

Conclusions
The conducted analysis of literature sources allows us to assert that, in electric vehicle systems, the application of the theory of passive control is especially promising, as passive control is based on the physical laws of energy transfer and conversion; however, providing energy efficiency and energy flow management is a key challenge in electric vehicle systems.
The complexity of the synthesis of control system parameters inhibits the widespread application of the theory of passive control in electromechanical systems, which, in turn, creates a necessity to find new approaches capable of solving this problem.
The application of the classical theory of optimal control provides a way to synthesize parameter values of interconnection and damping matrices for energy-shaping control of linear and nonlinear electromechanical systems.
In contrast to many of the existing approaches, the application of the proposed approach for the synthesis of parameters of interconnections and damping matrices drives the transient characteristics of the system to be as desired, the appearance of which is determined by the given quality criterion of the system. The results of the performed studies confirm the efficiency of the applied approach to the synthesis of control influences in both linear and nonlinear electromechanical systems. The view of Riccati's equation in terms of energy-shaping control has made it possible to form an optimality criterion that corresponds to the synthesized energy-shaping control.