Design of a perfect-tracking soft-landing controller for electromagnetic switching devices

Electromagnetic switching devices such as electromechanical relays and solenoid valves suffer from impacts and mechanical wear when they are activated using a constant-voltage policy. This paper presents a new control approach that aims at achieving soft landing in these devices, i.e., a movement without neither impacts nor bouncing. The hybrid nonlinear dynamics of the system is firstly described taking into account the limited range of motion that characterizes this class of devices. Then, the nonlinear expression of the control law is derived and a method to design a soft-landing reference trajectory is proposed. It is shown that, when certain conditions are met, the design methodology presented in the paper results in a controller that achieves perfect tracking of the reference trajectory and, hence, soft landing is accomplished. The theoretical analysis is validated by simulation using a dynamical model of a specific switching device.


Introduction
Reluctance actuators are electromechanical devices that feature high force density, good efficiency, and high tolerance to faults. These features make these actuators a promising choice for high-speed high-precision applications [1] such as antivibration systems [2] or equipment for the semiconductor manufacturing industry [3], among others. On the other hand, they are also the ideal actuation system for commercial switching devices that require a modest performance [4] because of their compactness, low cost, and low energy consumption. In particular, electromechanical relays and solenoid valves are devices whose operation is based on the force created by a small single-coil reluctance actuator with a limited range of motion.
Essentially, a single-coil reluctance actuator is an electromagnet with a specifically designed moving component commonly known as armature (see Fig. 1). When the coil is energized, the magnetic force that appears in the air gap pulls the armature towards the yoke. Since this force is always attractive, the opposing force is generally produced by a spring. Commonly, commercial switching devices are activated using a constant voltage. This policy, however, leads to a continuously accelerated motion which ultimately results Coil Armature Air gap Yoke Spring Fig. 1 Diagram of a single-coil reluctance actuator in impacts, bouncing, mechanical wear, and a clicking noise that may be undesirable in some applications.
Several control methods have been already applied to improve the performance of electromechanical switching devices. Starting with the early works of the 1990s [5][6][7], the literature contains proposals based on sliding-mode control [7][8][9], optimal open-loop control [10,11], or iterative techniques [12,13], among others. The common goal of all these works is to achieve soft landing, i.e., a controlled movement by which the armature reaches the final position with zero velocity [14], thus avoiding impacts and bouncing. The benefits of this strategy are evident: the devices would suffer less degradation and therefore have a longer service life, and they would also be quieter. The solution, however, is far from obvious, as these actuators exhibit hybrid, nonlinear and very fast dynamics.
In this work, a new control approach to achieve soft landing in electromechanical switching devices is presented. The main contribution is the joint design of the feedback controller and the soft-landing trajectory, which includes a pre-movement stage to deal with the hybrid dynamics of the system. The controller is based on feedback linearization, a common approach for nonlinear systems that has been successfully applied to single-coil [15], double-coil [16], and permanent-magnet [17] electromagnetic actuators. Despite these works, there is still scope of improvement in the design of the reference trajectory and its effects on the controller performance. In the paper, a hybrid dynamical model of the system including magnetic saturation, eddy currents, flux fringing and the bouncing phenomenon is firstly presented. Then, the equations of the control law are derived and the design method for the reference trajectory, based on optimal control theory, is described. Finally, the proposal is validated through several simulations, in which we compare both the controller and the trajectory designs with other alternatives from the literature. It is assumed that measurements of all the state variables are available.
State observers [18,19] could be used to address the problem if only electrical measurements-voltage and current-are available.

System dynamics
A diagram of a reluctance actuator is represented in Fig. 2. This figure, which shows the coil, part of the core, and the air gap of a generic single-coil linearmotion actuator, will be used to explain the model presented in this section. The position of the armature is defined by the gap length, z, which is physically limited between z min and z max , 0 ≤ z min < z max . The coil is wrapped around the iron core and has N turns. When it is supplied with power, the electrical current i that flows through the wire creates the magnetic flux φ and the equivalent eddy current i ec . Note that this diagram can be used to describe most geometric designs, such as E-core or plunger-type actuators.

Free motion dynamics
When the armature is moving between the two position boundaries, i.e., z min < z < z max the dynamics of the system can be described by a set of continuous nonlinear differential equations. Two fundamental equations describe the electromagnetic dynamics. Firstly, the electrical equation of the coil, where u is the voltage applied to the coil terminalsand input of the system-and R is the internal resis- Fig. 2 Diagram of a single-coil linear-motion reluctance actuator. The sign convention adopted for i, φ, and i ec is indicated by arrows tance. Recall that the magnetic flux is the integral of the flux density B on the cross section of the magnetic circuit.
The second equation results from applying Ampère's law on the surface (see Fig. 2), where H is the magnetic field intensity, J is the current density, and ∂ is the contour of , selected to match the main path of the flux. Assuming that the relation between the field intensity and the flux density can be described by means of the magnetic permeability μ as H = B/μ, the previous equation can be simplified [20] into where R(z, φ) is the reluctance of the magnetic system, which is in general a function of the armature position and the magnetic flux. Several methodologies can be used to obtain such function, including numerical methods [2] and analytical expressions [21]. Without loss of generality, the reluctance of a single-coil actuator can be divided into two terms, where R gap is the air gap component, which only depends on z, and R core is the iron core part, depending only on φ. In this paper, these two terms are modeled by means of the following analytical expressions, where A core , l w , R core0 , and φ sat are positive parameters and μ 0 is the magnetic permeability of vacuum. The air gap reluctance is based on the correction factor proposed by McLyman [22] in order to account for flux fringing effects. In addition, magnetic saturation is incorporated to the model by using the Fröhlich-Kennelly relation [21] in the expression of R core . In order to model the currents induced in the iron, it is assumed that the magnetic flux density is uniform across the core section. Under this assumption, the equivalent eddy current is proportional to the time derivative of the magnetic flux [3], where k ec > 0 depends on the electrical conductivity and the geometry of the core. As a result, the presented model includes most of the electromagnetic phenomena that may appear in reluctance actuators [3,20], i.e., eddy currents, flux fringing, and magnetic saturation. The armature motion is described by Newton's second law, where m is the armature mass, F mag (z, φ) is the magnetic force that produces the motion, and F(z,ż) describes the spring, friction, and gravity forces. The simplest approach to describe this latter force is to consider a linear spring-damper model, where k s is the spring stiffness constant, c is the damping coefficient, and F 0 accounts for gravity and the spring preload force. If necessary, more sophisticated models can be found in the literature [23] that could also be used. On the other hand, the magnetic force can be expressed in terms of the reluctance [21] as where R gap (z) = ∂R gap (z) ∂z (12) is in general a strictly positive function of z for all z ≥ 0. In particular, when R gap is modeled using (6), its partial derivative with respect to z is given by A third-order state-space model can then be obtained by combining all the previous equations. If the state is selected as where v =ż is the velocity of the armature, the explicit dynamical equations of the system arė where Assuming that φ is bounded due to magnetic saturation, i.e., φ ∈ (−φ sat , φ sat ), where φ sat > 0 is the saturation flux, the previous dynamical equations are valid in the domain

Dynamics of switching devices
Reluctance actuators used in high-precision applications [1] operate generally in the continuous regime. However, electromechanical switching devices are specifically designed to switch between z min and z max .
In that case, the constraints imposed by the position limits lead to hybrid dynamics, i.e., dynamics that combine both continuous and discrete events. The dynamics of the system when considering these limits can be modeled by the hybrid automaton of Fig. 3. Each transition between dynamic modes is described by its corresponding guard condition (in blue) and reset map (in green), respectively before and after an arrow (⇒). The reset map is explicitly presented only for the velocity, which is the only state that may change during jumps. For those transitions that do not imply jumps, only the guard condition is shown. The value of the velocity after a jump is indicated by the use of the superscript +. Functions ϕ 1 (x), ϕ 2 (x), and ϕ 3 (x, u) are those in (15)- (17).
The operation of the automaton is as follows. If the armature is moving (Mode 2) and hits any of the limit positions with a low impact velocity (0 ≤ |v| ≤ v ε ), the model jumps to the corresponding non-motion dynamic mode (Mode 1 or 3) and v is reset to zero. Then, when ϕ 2 (x) has the right sign to start the movement, the automaton returns to the motion mode. If, on the other hand, the impact occurs with a greater kinetic energy (|v| > v ε ), the armature bounces as defined by the coefficient of restitution γ . The threshold parameter v ε allows for controlling the level of detail of the bounc- ing phenomenon in simulation, ranging from v ε = 0 for full bouncing to v ε = ∞ for no bounces.

Design of the controller
As stated, the controller proposed in this work is based on exact feedback linearization. This section presents the design of the linearizing law and the tracking controller. For generalization purposes, no particular model of the force F or the reluctance R is considered in the design of the controller.

Linearizing law
The system (15)-(17) is a single-input affine dynamical system, i.e., it has the forṁ with x ∈ D ⊂ R 3 given by (14), domain D as defined in (19), and vector fields f and g equal to In order to be feedback linearizable, there must exist an output function h : D → R such that the system has relative degree three. That is, we must be able to find a function h that satisfies where L f and L g denote the Lie derivatives with respect to f and g, respectively, and , two conclusions can be drawn from the previous expressions. Firstly, that the system cannot be feedback linearized when φ = 0 because (25) is not satisfied in that case. And secondly, that the output function h must satisfy i.e., it must depend only on z.
Since the variable to be controlled is in fact the position of the armature, z, let the output function h be simply selected as Note that, by simple inspection of the equations (15)- (17) it can be seen that z is indeed a flat output of the system. Firstly, if z and its derivatives are known, (16) constitutes a differential equation from which φ can be obtained. Then, using (17), the input u of the system could also be calculated in terms of the position, velocity, acceleration, and jerk of the armature. Thus, all the time-dependent variables of the system can be parameterized in terms of z and its derivatives up to order three. As a remark note that, using (27) as output function, the system satisfies the conditions (23)- (25) in the regions i.e., for all x ∈ D such that φ = 0. Thus, it is feedback linearizable in either D + 0 or D − 0 . In this paper, D + 0 is arbitrarily chosen as the working domain.
The existence of an output function h that satisfies conditions (23)- (25) implies that the dynamics of the system can be expressed as where where , (32) that transforms the system into a third-order integrator, Considering (21), (22), and (27), the functions α and β of the linearizing control law are given by where The feedback law (31) results in the LTI system (33), which can be expressed in Brunovsky canonical form, i.e., where w ∈ R is the input, ξ consists of the position, velocity, and acceleration of the armature, and the state and input matrices are The linearizing state is related to the original state (14) by the change of coordinates Furthermore, considering that x ∈ D + 0 , the inverse transformation is given by and it has no singularities given that R gap > 0.

Trajectory tracking controller
Once the system (15)-(17) is linearized and transformed into an equivalent LTI system, position controllers can be designed using classical linear techniques. In particular, the main goal is to design a controller such that the position of the armature follows a predefined soft-landing reference trajectory z r (t).
Since the linearizing state ξ is composed of the position, velocity, and acceleration of the armature, the desired position trajectory can be used to define a timedependent reference for the entire state vector. This state reference, ξ r (t), is composed of z r (t) and its first two time derivatives.
Let the tracking error be defined asξ = ξ r − ξ . Considering (38), the error dynamics is given bẏ Since the equivalent LTI system is a chain of integrators, with A and B in the form of (40), it can be shown thaṫ where Consequently, the error dynamics can be reformulated aṡ Then, by using the feedback-feedforward control law where K ∈ R 1×3 , the closed-loop error dynamics becomeṡ By choosing K such that A − B K is Hurwitz, the error dynamics can be made exponentially asymptotically stable at the origin and, thus, the actuator will track the predefined trajectory with an exponentially decreasing error. This final step completes the design of the nonlinear controller for the actuator via feedback linearization. The complete control law to track the reference z r (t) can be obtained by combining all the previous expressions.

Design of the trajectory
The soft-landing reference trajectory proposed for the actuator has the form where z 0 is the initial position, z f is the final position, and z m (t) is the position trajectory for the movement stage. Two different cases are considered: the trajectory for the closing operation, where z 0 = z max and z f = z min , and that for the opening, where z 0 = z min and z f = z max . In order to achieve soft landing at t = t f , the reference trajectory must be such that i.e., it must arrive at z = z f at t = t f with zero velocity and acceleration. Note that the acceleration condition is necessary in order for the mover to stay at the final position for t > t f (see Fig. 3). Assuming that the armature is at rest at z = z 0 and t = t 0 -a logical assumption in switching devices-it is advantageous that the reference trajectory also satisfies In that case, the tracking error at t = t 0 will be identically zero, i.e.,ξ(t 0 ) = [ 0 0 0 ] T . Thus, considering that the error dynamics is given by (49), where A − B K is Hurwitz by design, the tracking error will be equal to zero during the entire trajectory. As a consequence, the controller will achieve perfect tracking in the nominal case, unless the input saturates or the state moves out of the linearizable region. When perfect tracking is accomplished, ξ(t) = ξ r (t) ∀ t. Thus, if the input u is limited between u min and u max , where u min < u max , the condition to avoid input saturation during the motion can be derived from (31) and (38)-(40) as where is the reference trajectory in the original state space. The conditions to keep the state inside the linearizable region D + 0 can be also obtained by means of the inverse transformation. Using (19) and (28), these are given by Several approaches can then be used to find a trajectory that satisfies all the previous conditions. The simplest alternative is to define z m (t) as a fifth degree polynomial whose coefficients are chosen such that the trajectory satisfies the conditions in (52) and (53). Without much difficulty, it can be shown that the resulting polynomial is monotone in [t 0 , t f ], so the condition in (57) is directly met. The conditions in (54) and (56), on the other hand, can be satisfied by a proper choice of the length of the interval [t 0 , t f ]. Polynomial trajectories are indeed the standard solution in the design of soft-landing feedback controllers for electromechanical devices [17,[24][25][26]. In this paper, however, an energy-optimal reference trajectory is obtained using optimal control theory [10,27]. Considering the model (15)-(17), the dynamic optimization problem is formulated as min.
Note that the two last conditions are equivalent to (52) and (53). A solution is then found by means of the Pontryagin method. Firstly, the Hamiltonian is built as where p = [ p 1 p 2 p 3 ] T is the costate. Then, the expression for the optimal input is obtained by applying the Pontryagin principle, r , p * and u * are respectively the optimal trajectory, costate, and input. By using (63) and (15)-(17), the expression for the optimal input is obtained.
Note that, since ϕ 3 (x, u) is input-affine, the Hamiltonian is convex in u, which makes u * the global minimum of H. The equations of the Hamiltonian system are then obtained aṡ where H * = H x * r , p * , u * (x * r , p * ) and, finally, the trajectory is numerically computed solving the boundary value problem (BVP) with (61) and (62) as boundary conditions.
A remaining issue in the design of the trajectory (51) is the purpose of the interval [0, t 0 ). In this regard, it must be noted that the system has hybrid dynamics and it is assumed to be initially at either Mode 1 or Mode 3 (see Fig. 3). Thus, the linearizing state ξ 3 at gravity forces divided by the armature mass. In other words, it does not include the contact force that appears at the limit positions. The goal of the aforementioned period is that, regardless of the initial magnetic flux, the controller forces the system to reach a stationary state at some t < t 0 such that F mag and F are in balance at t = t 0 , i.e., ξ 3 (t 0 ) =ξ 3 (t 0 ) = 0. By a proper choice of t 0 , this interval prepares the actuator for takeoff and allows the movement to start immediately at t = t 0 . Otherwise,ξ 3 (t 0 ) may be nonzero and thus perfect tracking would not be guaranteed. An alternative procedure to overcome this problem [17] consists in designing a reference trajectory for ξ 3 during the pre-movement stage, but the proposal of this paper is simpler and leads to very similar results.

Results and discussion
In this section, the nonlinear soft-landing controller is validated by simulation. With the aim of incorporating the effects of the position limits, the evaluation is performed using the hybrid automaton of Fig. 3. Table 1 presents the parameter values used in the simulations. The voltage is limited between u min = −24 V and u max = +24 V. The simulations have been carried out for the two possible operations-closing and opening-of any electromechanical switching device. In all the cases, the proportional gain K of the controller has been selected to achieve a settling time of 1 ms.

Nominal results
We first analyze the results in the nominal case, i.e., when the controller and trajectory proposed in the previous sections are jointly applied to control the actuator Fig. 4 Results corresponding to closing (left) and opening (right) operations using the designed energy-optimal reference trajectory. From top to bottom, linearizing states (ξ 1 = z, ξ 2 = v, and ξ 3 ), magnetic flux φ, and input u motion. The trajectory used in this case corresponds to t 0 = 1 ms and t f = 6 ms and has been obtained by solving the BVP using the MATLAB function bvp4c [28]. This function implements a collocation method that requires an initial solution. For this purpose, we take advantage of the fact that the Hamiltonian system is differentially flat in z [26], which allows us to propose an initial sub-optimal soft-landing trajectory for the position and, from this, to obtain the corresponding trajectory for all the remaining state variables. Thanks to the initially supplied solution, the algorithm requires less than 2 seconds of computation on a 9th generation Intel Core i5 processor. In order to highlight the advantages of optimally-designed trajectories over polynomial ones, the optimal arcs have been obtained for an input bounded between -20 V and +20 V. This results in a more robust design, since there is still an available 4-volt band that can be used by the feedback term of the controller to correct deviations with respect to the nominal situation. As shown in Fig. 4, the results are in accordance with the theoretical analysis of the previous section: The controller achieves perfect tracking of the proposed trajectory and soft landing is achieved. The errors in the position (z = ξ 1 ) and velocity (v = ξ 2 ) are identically zero during the entire simulation. By contrast, an initial error has been considered in ξ 3 in order to analyze the performance of the controller during the interval [0, t 0 ). Note that, although the position error is zero for all t < t 0 , the controller still forces the magnetic flux to reach a value for which F mag and F are in equilibrium. Since t 0 is large enough, the tracking error at t = t 0 is equal to zero and thus the motion starts immediately. In this regard, any available information about the initial value of φ could be used to estimate the initial errorξ 3 (0) and, hence, to set a proper value for t 0 . As expected, the state stays inside the linearizable region D + 0 .

Trajectory comparison
In order to emphasize the importance of a proper trajectory design, Figs. 5 and 6 present additional results of cases where the conditions to ensure perfect tracking are not satisfied. In these simulations, piecewise polynomial functions are used as reference trajectories. For comparative purposes, these have been also defined between t 0 = 1 ms and t f = 6 ms. On the one hand, Fig. 5 presents two cases where the condition (54) does not hold, i.e., the input saturates in some parts of the interval [t 0 , t f ]. As can be seen, the desired trajectories require high variations of the acceleration which cannot be given by the controller and, thus, tracking errors appear during the motion. On the other hand, the results of Fig. 6 correspond to cases where perfect tracking is lost because the state escapes from the linearizable region. More specifically, the condition (56) does not always hold because the acceleration required in some parts of the desired trajectory is incompatible with the physics of the system. Note that, as the magnetic flux approaches zero, the action given by (50) increases and results in input saturation, so (54) is not met either during these periods. Furthermore, when φ reaches and crosses the zero level, the state jumps between the linearizable regions D + 0 and D − 0 . As a result, the control adopts a high-frequency switching behavior between u min and u max (shaded region in the figure), similarly as in a sliding-mode controller.
The results presented in these two latter figures show that the loss of perfect tracking may lead to two dif- Fig. 6 Results corresponding to closing (left) and opening (right) operations using a piecewise polynomial reference trajectory. In this case, the state escapes from the linearizable region D + 0 , which results in loss of perfect tracking and input chattering (shaded region, the solid line indicates the average value) ferent scenarios with regard to soft landing. When it occurs at the beginning of the motion, the controller may be able to eliminate the error before the end of the trajectory and thus soft landing may still be accomplished (see the closing operation in Fig. 5, and the opening operation in Fig. 6). However, if the tracking error appears near the end of the trajectory, the actuator will probably arrive to the final position with a nonzero impact velocity and bouncing will appear (opening operation in Fig. 5, and closing operation in Fig. 6). Thus, in order to achieve soft landing in reluctance actuators, it can be concluded that it is advantageous to define reference trajectories which are less demanding-in terms of control-as the armature approaches the final position.

Controller comparison
Besides the trajectory design, the other critical part of the proposed control is the feedback linearization technique. In order to show the advantage of this method, it is compared with an alternative controller. It follows the general structure of the sliding-mode controller previously proposed in [8] for reluctance actuators.
Firstly, the sliding surface is defined by the scalar equation s = 0, where, for a third-order system, s is in which λ is a constant that determines the settling time of the position when s = 0. Then, the control law is defined as where U is another constant, which must be large enough to ensure that the sliding surface is reached in finite time. In order to be consistent with the specification of the feedback linearization, the constants are selected so that the settling time is 1 ms and the maximum voltage is 24 V (i.e., λ = 4745 s −1 , U = 24 V). Both controllers are tested and compared for different sampling rates. To evaluate the tracking performance, the root mean square error of the position during motion is obtained as follows: Given the soft landing objective, another important performance index are the impact velocities. Thus, for each where {v i } is the set of impact velocities. Note that it corresponds to the same kinetic energy as the combination of every impact velocity. Thus, it accounts for multiple impacts caused by bouncing.
The main results are presented in Fig. 7. It depicts the root mean square errors and equivalent velocities for different sampling periods T s ranging from 1 to 100 µs. Notice the logarithmic scale in the plots. The proposed controller based on feedback linearization proves to track better the desired position for every tested sampling rate, as the root mean square errors are consistently smaller. Consequently, the soft-landing performance is better, as the equivalent velocities demonstrate.
In order to further illustrate the improvement of the proposed solution with respect to the sliding-mode controller, the full control results are shown for a particular case. The worst-case scenario of the studied cases has been chosen, which corresponds to a sampling period of 100 µs. Fig. 8 presents the results using our proposal. In this scenario, the input saturates frequently, which causes tracking errors in the linearizing states and the magnetic flux. Still, the tracking performance is very good, particularly at the end of the operations. Thus, the impact velocities are very small. In contrast, Fig. 9 presents the results using the sliding-mode controller. In this case, the tracking errors are appreciably larger, Results corresponding to closing (left) and opening (right) operations using the alternative sliding-mode controller with a sampling rate of 10 kHz (T s = 100 µs). Note the impact velocity and the big bounce at the end of the closing operation which leads to significant impact velocities, especially in the closing operation.

Conclusion
This paper has considered the design of a nonlinear feedback controller to achieve soft landing in electromechanical switching devices. As shown, the controller is able to track the reference trajectory with zero error thanks to the joint design of the tracking controller and a soft-landing trajectory that satisfies certain conditions also given in the paper. As a result, the device is able to switch between the two possible states without impacts or bounces. Special attention has been paid to emphasize the importance of the trajectory design. It has been shown that, even when working with a nominal model, a wrong design of the desired trajectory may lead to undesired results with respect to soft landing. Apart from minimizing the energy required for the motion, the use of optimal control theory is also advantageous because it permits more flexibility in the design of the trajectory. The controller has been designed for a generic reluctance actuator independently of its specific design or final application, so it may also be applied to control the motion-or the force-of other reluctance actuators used in high-precision systems. Future work will focus on the evaluation of the controller on perturbed systems and the use of state observers based only on measurements of the electrical variables.
Funding Open Access funding provided thanks to the CRUE-CSIC agreement with Springer Nature. This work was supported in part by the Ministerio de Ciencia, Innovación y Universidades, Gobierno de España -European Union, under projects RTC-2017-5965-6 and PGC2018-098719-B-I00, in part by the Ministerio de Educación, Cultura y Deporte, Gobierno de España, under grant FPU14/04171, and in part by the Aragón Government and the European Social Fund, under research group DGA-FSE T45_20R and program FSE Aragón 14-20.
Data Availability All data generated or analyzed during this study are included in this published article.

Conflict of interest
The authors have no relevant financial or non-financial interests to disclose.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/ by/4.0/.