<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Data-driven Koopman fractional order PID control of a MEMS gyroscope using bat algorithm</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>05/01/2023</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10432770</idno>
					<idno type="doi">10.1007/s00521-023-08220-w</idno>
					<title level='j'>Neural Computing and Applications</title>
<idno>0941-0643</idno>
<biblScope unit="volume">35</biblScope>
<biblScope unit="issue">13</biblScope>					

					<author>Mehran Rahmani</author><author>Sangram Redkar</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Data-driven control methods are strong tools due to their predictions for controlling the systems with a nonlinear dynamic model. In this paper, the Koopman operator is used to linearize the nonlinear dynamic model. Generating the Koopman operator is the most important part of using the Koopman theory. Dynamic mode decomposition (DMD) is used to obtain eigenfunction for producing the Koopman operator. Then, a fractional order PID (FOPID) controller is applied to control the linearized dynamic model. A swarm intelligence bat optimization algorithm is utilized to tune the FOPID controller's parameters. Simulation results on micro-electromechanical systems (MEMS) gyroscope under conventional PID controller, FOPID, Koopman-based FOPID controller (Koopman-FOPID), and Koopman-FOPID control optimized by bat algorithm (Koopman-BAFOPID) show that the proposed Koopman-BAFOPID controller has better performance in comparison with three other controllers in terms of high tracking performance, low tracking error, and low control efforts.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>The MEMS gyroscope is an interesting device that can measure angular velocity by motion in x-and y-directions. This tool has been used in the automotive industry due to its low costs and small size <ref type="bibr">[1,</ref><ref type="bibr">2]</ref>. The control of the MEMS gyroscope is a difficult task because it constantly encounters external disturbances, which designing a suitable control method is required for this system <ref type="bibr">[3]</ref>.</p><p>An interesting area of study is data-driven control system, which uses data to control dynamical systems <ref type="bibr">[4]</ref><ref type="bibr">[5]</ref><ref type="bibr">[6]</ref>. Several techniques are used to create data-driven structures such as deep neural network <ref type="bibr">[7]</ref> and machine learning algorithms <ref type="bibr">[8]</ref>. One effective method for linearizing the nonlinear dynamic model is the linear parameter varying (LPV) method. Hadian et al. <ref type="bibr">[9]</ref> proposed a controller to reduce computation and conservatism for constrained nonlinear MIMO systems. Also, the simulation results verified the effectiveness of the proposed method in terms of disturbance rejection and high tracking performance. In addition, a model predictive controller (MPC) is proposed for nonlinear systems subjected to perturbations <ref type="bibr">[10]</ref>. The LPV method is used to linearize the nonlinear dynamic model. Then, the MPC controller applied on the linearized model. The proposed method is robust against the disturbances. In data-driven control systems, Koopman theory is a strong approach. By projecting the system dynamics onto the Koopman eigenspace, <ref type="bibr">Goswami and Paley [11]</ref> explore the issues of bilinearization and optimum control of a control-affine nonlinear system. Under certain assumptions, the suggested technique converts the dynamics into a bilinear system by using the Koopman canonical transform, especially the Koopman eigenfunctions of the drift vector field. Numerous examples of control-affine nonlinear systems are used to numerically demonstrate bilinearization and the best control strategy while assuming a quadratic cost function for the states and control input. The difficulties of making models that are subject to model-based control design methodologies make it challenging to operate soft robots precisely. Koopman operator theory provides a framework for creating explicit dynamical models of soft robotics and controlling them with practiced model-based techniques <ref type="bibr">[12]</ref>. How to derive the Koopman operator is the most crucial aspect of the Koopman theory, especially for complex systems with nonlinear dynamic system.</p><p>A useful approach for estimating the modes and eigenvalues of the Koopman operator is the DMD method. Utilizing an embedding into an infinite dimensional space, the Koopman operator offers a linear description of nonlinear systems. Among the most often used finite dimensional approximations of the Koopman operator are DMD and extended DMD <ref type="bibr">[13,</ref><ref type="bibr">14]</ref>. Koopman operator theory and the associated algorithm DMD were introduced by Ling et al. for the study and control of signalized traffic flow networks. They study DMD's application to various issues in signalized traffic as a model-free method for describing complicated oscillatory dynamics from observed data <ref type="bibr">[15]</ref>. Wilches-Bernal et al. <ref type="bibr">[16]</ref> propose a novel technique for identifying faults and other power quality issues. The major signal indicating a power quality event has occurred is identified by the suggested technique using the real component of the principal eigenvalue computed by the DMD. To discriminate between distinct failures, the study demonstrates how the suggested approach may be utilized to detect events utilizing current and voltage data. The performance of the strategy is examined in relation to the impact of the window size because the suggested method is window-based. To properly control the system, an appropriate controller can be used with the linearized DMD Koopman model such as linear quadratic regulator controller (LQR) <ref type="bibr">[17]</ref> and model predictive controller (MPC) <ref type="bibr">[18]</ref>.</p><p>PID controller is a strong control method to control linear dynamic systems. It has been widely used in realworld systems due to its low cost and ease of implementation <ref type="bibr">[19,</ref><ref type="bibr">20]</ref>. By regulating the PID gains, it constantly evaluates errors and provides the best value. It is used to control different systems such as MEMS gyroscope <ref type="bibr">[21]</ref>, vehicle <ref type="bibr">[22]</ref>, and quadcopter <ref type="bibr">[23]</ref>. However, the main drawbacks of the PID control method are that it's not robust control against the external disturbances. Although some useful methods can be used to tune the PID controller parameters such as axiomatic design theory based <ref type="bibr">[24]</ref>, the fractional control is also a suitable controller to improve the robustness and stability of PID controller. FOPID controller has been used in different research. Large uncertainty in dynamic and hydrodynamic properties as well as the signal transmission channel's time delay is the key challenges with autonomous underwater vehicles (AUV) motion control. For an AUV yaw control system, Liu et al. suggest a reliable FOPID controller architecture <ref type="bibr">[25]</ref>. Erol <ref type="bibr">[26]</ref> proposed a strong method of the pitch control system of large wind turbines with a FOPID controller that is delay dependent. The simulation findings demonstrate that outcomes for the delay margin are improved by using the proposed method. One of the main parts of FOPID controller design is how to tune the controller's gains to achieve the best performance. The bat optimization algorithm is a suitable method to tune the proposed controller's parameters.</p><p>The bat algorithm inspired by the echolocation behavior of microbats, with varying pulse rates of emission and loudness <ref type="bibr">[27]</ref>. Finding solutions using algorithms based on population and local search is a benefit of employing the bat algorithm. We get both local rigorous exploitation and global variety from this combination, which is crucial for metaheuristic algorithms. The advantages of bat algorithm in comparison with particle swarm optimization and genetic algorithm are discussed in <ref type="bibr">[28]</ref>. Based on the equivalent transfer function model and a reduced decoupler, the <ref type="bibr">[29]</ref> describes a technique for developing independent FOPID controllers for two interacting conical tank-level processes. An optimization bat algorithm is used to increase the power system stability by tuning FOPID controller parameters <ref type="bibr">[30]</ref>.</p><p>This research paper proposes a new data-driven control algorithm to control the MEMS gyroscope. The contribution of this work is as follows:</p><p>1. The nonlinear dynamic model of the MEMS gyroscope is presented. 2. DMD method is used to generate eigenfunction and eigenvectors to obtain Koopman operator. 3. Using the Koopman theory, a FOPID controller is implemented to control the linearized dynamic model. 4. A bat metaheuristic optimization algorithm is used to tune the proposed control method parameters. 5. The robustness of the proposed control method verified by random noise application.</p><p>The rest of this paper is arranged as follows. Section 2 discusses the dynamic model of the MEMS gyroscope. Section 3 presents Koopman's theory. Section 4 describes the DMD method. Section 5 explains PID and FOPID control methods. Section 6 discusses the bat algorithm. Section 7 provides the simulation results. Section 7 demonstrates the conclusion.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Nonlinear dynamic model of MEMS gyroscope</head><p>An essential instrument for angular velocity measurement using x and y motion is the MEMS gyroscope <ref type="bibr">[31]</ref><ref type="bibr">[32]</ref><ref type="bibr">[33]</ref>. This device has been used in automotive industry. A typical z-axis MEMS gyroscope architecture is shown in Fig. <ref type="figure">1</ref>.</p><p>A common MEMS gyroscope design includes sensor mechanisms, a proof mass suspended by springs, and an electrostatic actuation system for generating an oscillatory motion and determining the position and speed of the proof mass <ref type="bibr">[34]</ref>. The proof mass is mounted on a frame that moves with a consistent linear velocity, while the gyroscope rotates at a gradually varying angular velocity, X z . The centrifugal forces mX 2 z x and mX 2 z y are expected to be insignificant due to the modest displacements x and y. The development of the Coriolis forces, 2mX &#195; z _ y and 2mX &#195; z _ x, is parallel to the driving and rotating axes <ref type="bibr">[35]</ref>. The dynamics of the gyroscope are determined by the following equations.</p><p>The origin of the coordinates in Eqs. 1 and 2 is placed in the center of the proof mass since there is no external force applied on the system. The constants k &#195; xy and d &#195; xy , respectively, stand in for the asymmetric spring and damping coefficients. Despite the possibility of small unknown deviations from their nominal values, the control forces in the x-and y-direction, u &#195;</p><p>x and u &#195; y , are usually accepted. There are also typical descriptions of the damping rates, d &#195; xx and d &#195; yy , and the spring constants of springs interacting in the x-and y-directions, k &#195; xx and k &#195; yy . Therefore, both electromechanical and mechanical nonlinearity, which is a positive constant, will introduce the terms bx 3 and by 3 . The following vector representation might be used to express Eqs. 1 and 2:</p><p>, and nondimensional parameters as follows:</p><p>where each axis' natural frequency is x 0 and the reference length is q 0 . The following are the dynamic equations for the MEMS gyroscope.</p><p>An external disturbance, E, might be modeled as:</p><p>where Y and P determine certain parameter variation uncertainties, P &#188; K b , and</p><p>Therefore, Eq. ( <ref type="formula">8</ref>) might be expressed as:</p><p>where.</p><p>There are several ways to show Eq. ( <ref type="formula">9</ref>):</p><p>The expression for Eq. ( <ref type="formula">10</ref>) in the x-and y-directions is</p><p>Equation ( <ref type="formula">12</ref>) will be transformed into first-order dynamic equations by selecting the following parameters: </p><p>Then, there is</p><p>Equation ( <ref type="formula">13</ref>) shows</p><p>Equation ( <ref type="formula">14</ref>) can be given in its classical form as follows:</p><p>3 Koopman theory</p><p>According to the Koopman operator theory, the crucial step to correctly a nonlinear dynamical system is to transform the nonlinear system's original form into an infinite dimensional state space so that the resulting system is linear <ref type="bibr">[18]</ref>. The dynamic in discrete time defines as <ref type="bibr">[36]</ref>:</p><p>where F is characterized by</p><p>When a finite-dimensional nonlinear system's dynamics are transferred to an infinite-dimensional function space using the Koopman operator theoretic method, the original system's dynamics becomes linear. g is a real-valued scalar measurement function and an observable, a part of an infinite-dimensional Hilbert space. The Koopman operator generates based on this observable as</p><p>Smooth dynamics can be implemented using a continuous system.</p><p>where the Koopman operator is K. Due to the infinite dimensions of the Koopman operator, which is significant but problematic for operation and representation. Instead of describing the development of all measurement functions in a Hilbert space, applied Koopman analysis approximates the evolution on a subspace covered by a small number of measurement functions. One can get a representation of the Koopman operator in a finite-dimensional matrix by limiting the operator to an invariant subspace. A Koopman invariant subspace is covered by any combination of the eigenfunctions of the Koopman operator <ref type="bibr">[36]</ref>. When eigenvalue k is satisfied by eigenfunction u z &#240; &#222; of the Koopman model.</p><p>In continuous time, a Koopman eigenfunction u z &#240; &#222; is satisfied.</p><p>A finite-dimensional approximation is required from the application side to approximate the Koopman operator. DMD method is one of the approaches that can estimate Koopman operator <ref type="bibr">[36]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">DMD method</head><p>A strong numerical method DMD utilizes to approximate Koopman operator.</p><p>where Z 0 is time shifted of matrix Z as:</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>. .: &#189;</head><p>The A can be found according to Eq. ( <ref type="formula">22</ref>) as:</p><p>where ? represents the Moore-Penrose pseudoinverse. We may use singular value decomposition (SVD) on the snapshots to determine the dominating properties of the pseudoinverse of Z because a typical calculation involving A would need a significant amount of computation due to its huge n <ref type="bibr">[37]</ref>.</p><p>where U 2 R n&#194;r , R 2 R r&#194;r , V 2 R n&#194;r , and * demonstrates the conjugate transpose. SVD's reduced rank for approximating Z is r. The eigenvectors can be defined as:</p><p>where W is eigenvectors of full rank system dynamic systems.</p><p>Let k be eigenfunction, then we will have:</p><p>where K is the Koopman operator.</p><p>The linearized dynamic model can be demonstrated as:</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">FOPID control</head><p>PID controller is a suitable control method that has been used in many industrial applications <ref type="bibr">[38]</ref><ref type="bibr">[39]</ref><ref type="bibr">[40]</ref>. It constantly evaluates the error by using its parameters K p , K i , and K d and delivers the correct value. The PID controller can be defined as:</p><p>where e t &#240; &#222; &#188; y &#192; y d , which y d is desired trajectory. The main problem of the PID controller is that it's not robust against external disturbances. Also, the stability of the PID controller is another issue that should be taken into consideration during the controller design.</p><p>Fractional control method introduced to improve the controller's performance. It can improve the stability and robustness of common PID controller. The FOPID controller can be defined as:</p><p>where D is fractional operator defines as D &#188; d dt and l is fractional order. The fractional type that we use in this research is Grunwald-Letnikov <ref type="bibr">[41]</ref>. The Grunwald-Letnikov fractional derivative of the function e(t) with respect to t is given</p><p>where</p><p>The detailed explanation can be observed in <ref type="bibr">[41]</ref>. The control structure shows in Fig. <ref type="figure">2</ref>.</p><p>One of the main parts of FOPID controller design is how to tune the controller's parameters. The metaheuristic algorithms are the rich sources to tune the FOPID controller parameters.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">Bat algorithm to tune the proposed controller parameters</head><p>The optimization technique known as the bat bio-inspired algorithm was influenced by how common bats use echolocation to find food. It is introduced in <ref type="bibr">[27,</ref><ref type="bibr">42]</ref> and used to resolve several optimization issues. The echolocation strategy of bats is used in the algorithm. These bats create an extremely loud sound pulse, and then, they listen for the echo that is returned from the nearby objects. Depending on the species, their signal bandwidth ranges change through harmonics. The i th bat moves randomly at location x i with velocity v i and a set frequency f min . To discover food, the bat changes its wavelength and volume. To improve the echolocation capabilities, objective function needs to be optimized. It is possible to develop an optimization algorithm from the way a bat searches for the best answer. The algorithms for bat-inspired echolocation can be created by enhancing certain of the microbats' echolocation characteristics. The features of bat echolocation are used to address an optimization issue brought about by the following hypotheses <ref type="bibr">[43]</ref>.</p><p>1. Echolocation is a tool used by all bats to detect distance. 2. To locate prey, bats fly at random speeds of v i at positions x i with a fixed frequency and wavelength of f min and a variable wavelength and frequency of A 0 . 3. Depending on how close the prey is, they can control their wavelength/frequency and pulse emission rate, r i 2 [0-1]. 4. Their loudness decreases from high A 0 to low A min levels as they get closer to the prey.</p><p>In real implementations, frequency occurs between [f min , f max ] and is chosen to be similar to the size of the domain of interest. For a virtual bat to solve an optimization issue, rules must be developed to specify their locations and velocities in the d-dimensional search space. The following definitions apply to the new location x &#254; i and velocity v &#254; i at time step t <ref type="bibr">[44]</ref>. </p><p>The current best solution across all N bats is represented by x * , where n 2 [0-1] is the random vector generated at random from a uniform distribution. When a new solution is needed for local search, it is determined using the most recent bat loudness A i and the most variance that can be tolerated max(var) at a time stop, as shown below.</p><p>The volume drops and the pulse emission rate rises as a bat locates its prey. The bat is heading toward the best option, as shown by</p><p>where a and c are constant. Initial boundness is A i 2[0.1-0.9], initial emission rate is r 0 2 [0-1], and a = c = 0.9. Bat algorithm is used for tuning the [K p , K i , K d ] parameters of proposed controller for a MEMS gyroscope. This problem's objective function is described as follows <ref type="bibr">[19]</ref>:</p><p>7 Simulation results  Figure <ref type="figure">4</ref> shows the trajectory tracking of x-and y-direction under PID, FOPID, Koopman-FOPID, and Koopman-BAFOPID controllers. It demonstrates that the proposed Koopman-BAFOPID controller has high tracking performance in comparison with the three other controllers. Figure <ref type="figure">5</ref> shows the position tracking error of x-and y-diunder PID, FOPID, Koopman-FOPID, and Koopman-BAFOPID controllers. It illustrates that the proposed Koopman-BAFOPID controller has low tracking error in comparison with the PID, FOPID, Koopman-FOPID, and Koopman-BAFOPID controllers. Figure <ref type="figure">6</ref> shows the velocity of x-and y-direction under PID, FOPID, Koopman-FOPID, and Koopman-BAFOPID controllers. A conventional PID controller applied on nonlinear MEMS gyroscope to control the x-and y-direction. The main problem of that controller is that it is not stable. Then, a FOPID controller used to remove the stability problem of conventional PID controllers. Figure <ref type="figure">7</ref> shows the control inputs under PID, FOPID, Koopman-FOPID, and Koopman-BAFOPID controllers. It demonstrates that the PID controller is not stable by increasing the control efforts when time is increased, but the FOPID controller fixed this problem. Therefore, using FOPID controller provides better stability along with using Koopman theory on nonlinear MEMS gyroscope. The robustness of the proposed control method is verified by random noise 0.5*randn(1,1) application. Figure <ref type="figure">8</ref> shows that the proposed control method is robust against the external disturbances. This paper proposed a new Koopman-BAFOPID control of a nonlinear MEMS gyroscope. The PID controller stability improved by proposing FOPID controller. The Koopman theory used to drive a linear dynamic model of MEMS gyroscope. The DMD method used to estimate the Koopman operators numerically. Then, selected FOPID controller applied on linearized MEMS gyroscope dynamic model to control the x-and y-direction suitably. A bat algorithm implemented on Koopman-FOPID controller in order to tune the proposed controller parameters. The simulation results verified that the proposed Koopman-BAFOPID controller has better performance in comparison with PID, FOPID, and Koopman-FOPID controllers in terms high tracking performance, low tracking error, low control efforts, and high stability.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>Neural Computing and Applications (2023) 35:9831-9840</p></note>
		</body>
		</text>
</TEI>
