FACTA UNIVERSITATIS Series: Electronics and Energetics Vol. 32, N o 4, December 2019, pp. 581-600 https://doi.org/10.2298/FUEE1904581G © 2019 by University of Niš, Serbia | Creative Commons License: CC BY-NC-ND THE USAGE OF LAMBERT W FUNCTION FOR IDENTIFICATION AND SPEED CONTROL OF A DC MOTOR * Radmila Gerov, Zoran Jovanović University of Niš, Faculty of Electronic Engineering, Department of Control Systems, Niš, Republic of Serbia Abstract. The paper proposes a new method of identifying the linear model of a DC motor. The parameter estimation is based on the closed-loop step response of the DC motor under a proportional controller. For the application of the method, a deliberate delay of the measured speed was introduced. The paper considers the speed regulation of the direct current motor with negligible inductance by applying 1-DOF and 2-DOF, proportional integral retarded controllers. The proportional and integral gain of the PI retarded controllers was received by using a pole placement method on the identified model. The Lambert W function was applied for the identification and in designing the controller with the purpose of finding the rightmost poles of the closed-loop as well as the boundary conditions for selecting the gain of the PI controller. The robustness of the calculated controllers was considered under the effect of an disturbance, uncertainty in each of the DC motor parameters as well as perturbations in time delay. Key words: DC motor, Identification, PI controller, Lambert W function, Time delay. 1. INTRODUCTION DC motors have a vast usage range: starting with children’s toys, through house appliances, computer equipment, to the automobile industry - for example [2]. It is well known that the dynamic behavior of the direct current (DC) motor can be approximated by a linear model and that there are multiple ways of its control [3], such as robust speed control [4], predictive control [5], optimal control [6], the application of the integral retarded algorithm [7], etc. The proportional integral (PI) system for controlling the speed of a DC motor communicated by TCP/IP and the Ethernet network is presented and analyzed in [8], wherefrom it can be seen that delay affects the stability of the system. Received March 10, 2019; received in revised form June 18, 2019 Corresponding author: Radmila Gerov University of Niš, Faculty of Electronic Engineering, Department of Control Systems, Aleksandra Medvedeva 14, 18000 Niš, Republic of Serbia (E-mail: gerov@ptt.rs) * An earlier version of this paper was presented at the 13th International Conference on Applied Electromagnetics (ПЕС 2017), August 31 - September 01, 2017, in Niš, Serbia [1].  582 R. GEROV, Z. JOVANOVIĆ For the purpose of designing a controller, it is necessary that the DC motor model represents the dynamics of a real motor as accurately as possible. For this reason, the motor parameters established by the manufacturer are verified by means of various methods of identification and depending on the identified model, the controller of the desired type is then designed. There exist various different procedures for the identification of DC motor parameters among which are: the parameter estimation of the linear models and using step signals [9], the method for closed-loop identification of position-controlled dc servomechanisms [10], the procedure of parameter identification of DC motor model using a method of recursive least squares [11], parameters are estimated using the proposed reduced-order recursive least square parameter identification and discrete-time disturbance observer in [12] and Linear Elman Neural Network based Genetic algorithm are used to find parameters in [13]. This paper suggests a new method of estimating linear DC motor model parameters. The method is based on a closed-loop step response to a DC motor with a proportional controller, with the known delay being considered in the measurement of velocity. Mean absolute error (MAE) and root mean squared error (RMSE) index are used to validate the obtained model. The paper explores the methods of the proportional-integrative controller tuning for speed regulation of the DC motor with negligible inductance. The synthesis of the PI controller was performed by using a pole placement method with the features of the Lambert W function [14]. Using the analytical solution form in terms of the matrix Lambert W function (LWF) [15]-[19] and the limitations of the matrix-like Lambert W function provided in [20], the characteristic system equation for the desired rightmost poles of the closed-loop system was solved and the PI controller parameters were set. The proposed method of controlling the speed of the DC motor was developed for one degree of freedom (1-DOF) and two degrees of freedom (2-DOF) PI controller. This parametric PI controller can be used for the proportional-derivative (PD) controller in the sense of controlling the position of the DC motor shaft. The paper considers two controller synthesis methods. With the first method, during the process of designing the PI controller, the possibility of time delay in the feedback branch [1] is taken into account. Considering that the proposed procedure takes into account the possible time delay, the received characteristic system equation is transcendent and has infinite solutions. The equation can also be solved by means of the Lambert W function [1], [21]-[22]. Apart from the above-mentioned methods, literature also recognizes other methods of PI controller configuration as well as DC motor control system stability analyses. For example: a nonsmooth optimization based stabilization method has been used to design PV and PI controllers for a DC motor system with a pointwise time-delay in the feedback loop in [23], a theoretical method has been used to compute the delay margin values for stability for various values of the PI controller gains for a DC motor speed control system that contains time delays in feedback and feedforward parts in [24], the possibility of designing PI controllers to optimize given performance criteria is given with a characterization of the complete set of stabilizing PI controllers for a FOPTD system in [25]. It is well known that a time delay can produce that a feedback system becomes unstable, as well as that introduction of a delay for control purposes may stabilize an unstable system [26]. The added delay to the control law can be treated as an additional control parameter, as mentioned in [27], where the delay was added to stabilize the open- The Usage of Lambert W Function for Identification and Speed Control of a DC Motor 583 loop unstable system. A second method was designed in accordance to this idea and it was based on the deliberate introduction of time-delays (h) into the systems for control purposes (PI retarded controller). The processes of designing both controllers are identical. There exist several methods for determining the stabilizing set of (Kp, Ki) values, including the extension Hermite-Biehler Theorem to quasipolynomials which is based on the work of Pontryagin given in [25]. In this paper, the boundary conditions for selecting the PI controller parameters are determined using the Lambert W function. Identification of a linear DC motor model provided by the suggested algorithm is shown on the example of the DC motor with the parameters given in [13]. This linear model was used in order to design the controller. The control laws are validated for the DC motor with parameters given in [13] by simulation. Boundary conditions for selecting desired poles of the closed-loop system, boundary values of the PI controller gain as well as the parameters necessary for determining them are confirmed as well. The robustness of the received controllers was taken into account for disturbance, uncertainty in each of the DC motor parameters as well as perturbations in time delay. The paper is organized in the following way: In Chapter 2, the basic properties of the Lambert W function were presented. In Chapter 3 the linear model of a DC motor is presented. Identification of a linear DC motor model is presented in Chapter 4. The design of 1-DOF and 2-DOF PI retarded controllers for speed regulation of a DC motor was explained in Chapter 5. Boundary conditions for selecting the desired poles of the closed- loop system as well as boundary values of the PI controller gain are presented in this chapter. Simulation examples of the identification and design of the controller, as well as the robustness analysis, are provided in Chapter 6. Chapter 7 provides the conclusion with the suggestion for further analysis. 2. LAMBERT W FUNCTION Introduced in the eighteenth century by Lambert and Euler [14], the Lambert W function W(z) is a solution of the following equation ( ) ( ) , . W z W z e z z C  (1) The Lambert W function is a complex value, with a complex argument. Considering the fact that z belongs to a set of complex numbers C, Lambert W function has an infinite number of solutions and an infinite number of branches Wk(z) where k ϵ (∞,∞). If z belongs to a set of real numbers R, only the Principal branch W0(z) for k = 0 and branch W-1(z) for k = 1, assume the real values Fig. 1. Principal branch W0(z) is analytic at the point of zero, which ensues from the Lagrange’s inversion theorem which provides the series expansion with the radius of convergence e 1 . 1 0 1 ( ) ( ) . ! n n n n W z z n      (2) 584 R. GEROV, Z. JOVANOVIĆ Fig. 1 The graph of Wk(z), for zϵR and kϵ(-1,0). Lambert W functions have been implemented in the various commercial software packages, such as Maple and Matlab. A more detail explanation can be found in [14]. 3. LINEAR MODEL OF A DC MOTOR With respect to armature current and shaft speed, the dynamics of a DC motor can be described by electrical and mechanical first order differential equation ( ) ( ) ( ) ( ), ( ) ( ) ( ). e m di t L t Ri t K t dt d t J K i t t dt         (3) where: L – armature inductance, J – the moment of inertia of the moving parts, R – the resistance of armature winding, β – the damping coefficient due to viscous friction, Ke – the back EMF constant, Km – the motor torque constant, u(t) – the input voltage, i(t) – the armature current and ω(t) – the angular velocity of the rotor. It is rather known that the linear model of the direct current motor with negligible inductance [28], can be described by using a differential first-order equation of an inertial system (4), where Tm and Ksm are the motor time constant and the motor gain, respectively, received from the manufacturer and checked by the process of identification. ( ) ( ) ( ) m sm d t T t K v t dt     (4) The motor time constant Tm and the motor gain Ksm have the following values , . m m sm e m e m KRJ T K R K K R K K       (5) If the dimensionless control signal is the scaled input voltage u(t) = ν(t) / νmax, the admissible controls must satisfy the inequality |u(t)| < 1. With respect to Ks = Ksmνmax and Ts = Tm, the velocity (speed) transfer function Gmv(s) The Usage of Lambert W Function for Identification and Speed Control of a DC Motor 585 of the DC motor and angular (position) transfer function Gma(s) of the DC motor, received from (4), respectively are ( ) ( ) ( ) 1 ( ) ( ) ( ) ( 1) s mv s s ma s Ks G s u s T s Ks G s u s s T s         (6) where the angle α represents the position of the motor shaft. 4. PROPOSED METHOD PARAMETER ESTIMATION OF THE LINEAR DC MOTOR MODEL The Control system, for the suggested parameter estimation approach of the linear DC motor model with the negligible inductance, is shown in Fig. 2, where Gmv(s) is the velocity transfer function of the DC motor (6) with the parameters that need to be estimated, Gc(s) = Kp is the transfer function of the P controller, Ktg is the tachogenerator constant, ω(t) is a controlled speed, ωr(t) = uref(t) / Ktg is the desired rotational speed and e(t) is the tracking error where h is the known time delay. Fig. 2 Control system of a DC motor with a retarded controller. The selection of the controller gain needs to be undertaken in such a way so that the underdamped system with the closed-loop transfer function given in (7) is received. ( ) ( ) . ( ) 1 p s tg hs r s p s tg K K Ks W s s T K K K e        (7) If in equation (7), time delay from a denominator is approximated by a Padé approximant, the output of the closed-loop system can be written down in the following form 0 2 2 ( 1) ( ) ( ) 2 r n n K s s s s s         (8) Thus, the observed system can be considered as the second order plus time delay system with dynamic numerators, where ωn is the natural frequency, ξ is the damping 586 R. GEROV, Z. JOVANOVIĆ ratio, ωd is the damping frequency, τ0 is time constant defining zero of the closed-loop transfer function and K is gain. A typical closed-loop step response of the system is shown in Fig. 3, where ωss – is the steady state value, t1 – is the time required for the output to reach its first maximum value, ω1 – is the first maximum value of output, t2 – is the time required for the output to reach its first minimum value and ω2 – is the first minimum value of the output. Fig. 3 Closed-loop step response of a DC motor with a proportional retarded controller. The gain of the velocity transfer function Gmv(s), can be found from . ( ) ss s p tg r ss K K K     (9) Overshoot (OS) can be calculated approximately in the following way 2 12 1 .ss ss OS e        (10) The damping ratio ξ received from (10) is 2 2 ln( ) . ln ( ) OS OS      (11) The damped frequency can be calculated from 2 1 , d t t     (12) therefore the natural frequency is 2 . 1 d n     (13) The Usage of Lambert W Function for Identification and Speed Control of a DC Motor 587 The characteristic equation of the system described by equation (8) has conjugate- complex poles whose values are 1/ 2 n d s j    (14) The characteristic equation of the closed-loop transfer function of a DC motor stabilized by retarded P controller (7) 1 0 hs s s p tg T s K K K e     (15) has an infinite number of solutions 1 1 ( )s h p s tg T k k s s K K K s W he h T T     (16) where k stands for an ordinal number of the Lambert W function branch. Considering that (8) is an approximation of the closed-loop transfer function (7), it is clear that the poles from (14) are also the rightmost poles of the (15). These poles can be calculated from (16) by using the principal branch W0(z) and W1(z). This means that the solutions (16) assume a form of 0 1 1 1 ( ) 1 1 ( ) s s h p s tg T n d s s h p s tg T n d s s K K K j W he h T T K K K j W he h T T                (17) For the known poles (14), the unknown DC motor time constant Ts and time delay h, are received by solving a system of two equations (17) whereby all the parameters of the linear model of the DC motor with transfer function Gmv(s) have been estimated. The MAE and RMSE index are used to validate the model obtained, where ω is the real the angular velocity of the rotor and ωm is the angular velocity produced by the identified model. MAE and RMSE index of 0 indicates a perfect model. 2 0 0 1 1 , ( ) n n m m i i MAE RMSE n n       (18) 5. PI RETARDED CONTROLLER PROJECTION FOR DC MOTOR SPEED REGULATION 5.1. 1-DOF PI retarded controller tuning The transfer function of the PI controller, where Kp and Ki are the gain of the proportional and the integral part of the controller is ( ) . i PI p K G s K s   (19) The Control system for speed regulation of a DC motor with a PI retarded controller is shown in Fig. 2, where Gmv(s) is the identified velocity transfer function of the DC motor, Gc(s) = GPI(s) is the transfer function of the PI controller. 588 R. GEROV, Z. JOVANOVIĆ In time domain control law can be represented by ( ) ( ) ( ) . p i u t K e t K e t dt   (20) The closed-loop transfer function of the received control system is 1 2 ( )( ) ( ) ( ) ( ) s tg p i DOF hs r s s tg p i K K sK Ks T s s T s s K K K s K e          (21) wherefrom the characteristic system equation is 2 ( ) 0. hs s s tg p i T s s K K K s K e      (22) The characteristic equation for the closed-loop system is transcendent and has infinite solutions. It can be seen it its matrix form in the following manner 0.k hS k d S A A e     (23) where A and Ad are real matrices with the dimensions of 2x2 whose values are 0 00 1 , .1 0 s tg i s tg pd s s s K K K K K KA A T T T                     (24) The solution of the characteristic equation (23) is a complex matrix SkϵC 2x2 where k denotes the branch of Lambert W function which can be formulated in the following way 1 2 1 2 0 1 k S            (25) where λ1 and λ2 represent the desired poles of the closed-loop system. In order to convert the characteristic system equation (23) into the Lambert W form, it is necessary [20] to add an unknown matrix QkϵC 2x2 which has to fit into the equation ( ( ) ) ( ) .k d k W A hQ Ah k d k d W A hQ e A h   (26) The solution of the characteristic equation (23) is obtained through the application of the following equation 1 ( ) . k k d k S W A hQ A h   (27) For the desired poles [1], by solving a system of two equations (26) and (27), by using the Lambert W_DDE Toolbox in Matlab [18], the unknown matrix Qk is received, and the PI retarded controller parameters are set. The proposed method provides the opportunity of choosing the desired real and conjugate-complex poles. The selection of the desired poles, in the infinite spectrum of poles, is reduced to the selection of the rightmost poles (the closest to the imaginary axis from the complex plane), and in [16] it was shown that these could be obtained by solving (27) only for k = 0 or k = –1, which guarantees dominance. The Usage of Lambert W Function for Identification and Speed Control of a DC Motor 589 5.2. 2-DOF PI controller tuning In time domain control law of the 2-DOF PI controller control system, where γ is tuning parameter and γ ϵ (0,1), can be represented by ( ) (1 ) ( ) ( ) ( ) ( ) . p r p i r i u t K t K t h K t dt K t h dt             (28) The closed-loop transfer function in the case of a 2-DOF PI controller is 2 2 ( (1 ) )( ) ( ) , ( ) ( ) s tg p i DOF hs r s s tg p i K K sK Ks T s s T s s K K K s K e           (29) It is obvious that the closed-loop transfer functions obtained by using the 1-DOF PI controller (21) and the 2-DOF PI controller (29) differ only in the numerator, which means that the characteristic equations of both systems are identical and equal (22). In order to design the 2-DOF PI controller, the already described process of designing the 1-DOF PI controller can be used, taking into account that both equations (22)-(27) are identical. Considering (29) we can conclude that γ = 0, 2-DOF PI controller control system becomes 1-DOF PI retarded controller control system Fig. 3 with the control law (20), for γ = 1, this control system becomes the so-called I-P retarded controller control system with a control law ( ) ( ) ( ) ( ) . p i r i u t K t h K t dt K t h dt          (30) Tuning parameter γ regulates the hight of the overshoot of the set-point response and the letter is chosen depending on its range γϵ(0,1). 5.3. Boundary range for selection of the desired poles If the desired poles are λd = Re{λd} ± jIm{λd} where d ϵ (1,2), for Re{λ1} = Re{λ2} and Im{λ1} = Im{λ2}, the poles are complex conjugate. For Im{λ1} = Im{λ2} = 0 the poles are real. Let the unknown matrix be Qk 11 12 21 22 . k q q Q q q        (31) Regardless of the value of the unknown matrix Qk,, taking into account the value of the matrix Ad (24), the result AdhQk will always be in the form of 21 22 0 0 . k d k M A hQ m m         (32) From (27) it can be concluded that ( ) ( ) ( ). k k d k k k h S A W A hQ W M   (33) Substituting the values of matrices A and Sk from (24) and (25) as well as the value of the matrix Mk from (32) in (33) the following is received 590 R. GEROV, Z. JOVANOVIĆ 21 1 2 1 2 22 22 22 0 00 0 .1 ( ) ( ) ( ) k k s m h h w m w m T m                        (34) Taking into account the values of poles λ1 and λ2 as well as the values of h and Ts, we can conclude that all matrix coefficients on the left side of (34) are real numbers, wherefrom we can conclude that wk(m22) is a real number. Depending on the value of wk(m22) from Fig. 1, the same corresponds to the branch k = 0 for 1 < wk(m22) or the branch k = 1 if wk(m22) < 1. In order for the closed-loop system to be stable the condition of Re{λ1} < 0 and Re{λ2} < 0 has to be met. Taking into account the principal branch of the Lambert W function ie. k = 0, from (34) we get an additional boundary condition for the selection of real parts of the desired poles. 1 2 1 1 { } { } 0 e e s R R T h        (35) In case that the desired poles are complex conjugated, statement (35) looks as following 1 1 1 ( ) { } 0 2 e d s R T h      (36) It is known that the solution to an equation is satisfactory for the equation itself. Substituting the complex conjugated pole λd = Re{λd} + jIm{λd} = σ + jω into a characteristic equation (22) and also dividing it into its real and imaginary parts, the following is received 2 2 2 2 (( ( ) ) cos( ) (1 2 ) sin( )) 0, ( (( ( ) ) sin( ) (1 2 ) cos( )) ) 0 h s s p s tg i s tg h s s p s tg e T h T h K K K K K K j e T h T h K K K                        (37) From (37) we can conclude that for the chosen part of the real pole σ = Re{λd}, which fulfills the condition (36), there exists an imaginary pole part ωi = Im{λd}, where the integral gain of the PI controller is Ki  0. The integral gain Ki = 0, if the imaginary pole part fulfills the condition      1 Im tan( Im ) ( ) Re d d s d h T        (38) If a higher value of the imaginary pole part is taken than ωi = Im{λd} received from (38), for the real value of the pole σ = Re{λd} the closed-loop system will be unstable. Substituting the desired complex conjugated poles λd = Re{λd} + jIm{λd} = σ ± jω, where ω < ωi, in (25) as well as solving the system of two equations (26) and (27) the PI controller gain is received. With the obtained controller parameters it is necessary to check whether all the poles of the infinite pole specter are located on the left side from the desired poles on the complex s plane. From (37), it can also be seen that for the selected part of the real pole σ = Re{λd}, which fulfills condition (36), there exists an imaginary part of the pole ω = Im{λd}, for which the proportional PI controller gain Kp  0. Proportional gain Kp = 0, only if the imaginary part of the desired pole satisfies the condition The Usage of Lambert W Function for Identification and Speed Control of a DC Motor 591            2 2 Im (1 2 Re ) tan( Im ) ((Re ) (Im ) ) Re d s d d s d d d T h T            (39) The closed-loop system is on the boundary of stability only if there are poles whose real parts are equal to zero i.e. they have only the imaginary part, and all the other poles from the infinite pole spectrum are located on the left half-plane of the complex s plane. Substituting σ = Re{λd} = 0 in (38) the boundary value ωgr = Im{λd} is received where Ki = 0. Substituting the received poles λ1 = jωgr and λ2 = jωgr in (34), the following is received 2 22 0 22 21 0 22 ( ) ( ) , ( ) gr s h mh w m m T w m     (40) From (40) it can be concluded that m22 doesn’t depend on the boundary value of the imaginary part of the pole, which is not the case with m21. Substituting λ1 = jωgr and λ2 = jωgr in (25) as well as solving the system of two equations (26) and (27) the boundary value of the proportional gain Kpgr is received. The proportional gain of the PI controller is located in the following range 1 ( ) s tg p pgr K K K K     (41) 6. SIMULATION EXAMPLE A DC motor with the parameters from [13] is being taken into account: the moment of inertia J = 0.052 kg/m 2 , the motor torque constant Km = 0.66 N.m/A, the back EMF constant Ke = 0.64 V/rad/s, the armature resistance R = 2.3Ω, the armature inductance L = 0.0345 H, the damping coefficient due to viscous friction β = 0.002 N.m/rad/s. The tachogenerator constant Ktg = 0.06685 V/rad/s. 6.1. Parameter estimation of the linear DC motor model For the application of the parameter estimation method of the linear DC motor model, described in chapter 4, it is necessary that an underdamped closed-loop system is created. This method is applicable for several different values of the proportional gain Kp as well as the delay in the return branch h in order to identify the model which most accurately represents the dynamic of the DC motor in question. The paper shows the best possible result. For parameter estimation the proportional gain Kp = 5 is used, time delay in the feedback branch h = 0.5 s with the referent speed of the rotor rotation ωr = 30 πrad/s. For this simulation the program package Matlab/Simulink was used with the following parameters: the duration of the simulation t=10s, solver ODE5, fixed step Ts=0.01s. From the closed-loop step response the following values were measured: ωss = 32.1053 rad/s, ω1 = 42.5769 rad/s, t1 = 0.61 s, ω2 = 29.2832 rad/s and t2 = 1.4 s. With the usage of (9) the gain of the velocity transfer function, Ks = 1.5457 was calculated. Substituting ωss, ω1 and ω2 in (10) the overshoot OS = 0.2695 was calculated, based on which and the application of (11) the damping ratio ξ = 0.3852 was calculated. The damped frequency was calculated by substituting t1 and t2 in (12), ωd = 3.9767 rad/s. By substituting the new values in (13) the natural frequency ωn = 4.3092 rad/s was 592 R. GEROV, Z. JOVANOVIĆ calculated. Applying (14) closed-loop poles s1/2 = 1.6597 ± 3.9767j were calculated. Substituting the newly calculated values in (17) resulted in the time constant of the DC motor Ts = 0.2715 s and the time delay h = 0.5134 s. The linear model transfer function of the considered DC motor is ( ) 1.5457 ( ) ( ) 0.2715 1 mv s G s u s s     (45) Time domain response of a DC motor and identified model is shown in Fig. 4. The frequency response of a DC motor and identified model is given in Fig. 5. Fig. 4 Response of the angular speed of a DC motor and Identified Model. Fig. 5 Frequency response of a DC motor and Identified Model. The result of the application of (18) revealed the following quality indicators of the suggested identification process, MAE = 0.0494 and MRSE = 0.2552. According to these indicators (the MAE index and RMSE index, the response of the DC motor and the model obtained by the usage of the suggested identification process in The Usage of Lambert W Function for Identification and Speed Control of a DC Motor 593 Fig. 4, the frequency response in Fig. 5 from which it is clear that the deviation of the frequency characteristics occurs at irrelevant high frequencies), it can be concluded that the DC motor is adequately identified by the suggested method. 6.2. Designing the controller The project requirements are: the referent rotation speed of the rotor 200rad/s, the rotor settling time is shorter than 1.3s and the maximum amplitude overshoot of the rotor rotation speed is less than 10%. Substituting the calculated values Ks and Ts (45), as well as the tachogenerator Ktg in (24), results in matrices A and Ad with the function of enhancing the PI controller. It is well known that measuring tools i.e. sensors, as well as communication lines, cause delays. Let us suppose there exist measurement and communication delays between the regulated output and the controller [24]. For the purpose of designing the 1-DOF PI retarded controller, the delay of the measured rotation speed of the rotor of h=0.2s is introduced. The suggested controller designing method was applied to the desired real and conjugate-complex poles of the closed-loop system λ1 and λ2. Solving (38) for σ = Re{λd} = 0, within the range π / (2h) < Im{λd} < π / h, ωgr = Im{λd}= 9.6733 is received. Substituting λ1 = 9.6733j and λ2 = 9.6733j in (25) as well as solving the system of two equations (26) and (27), the boundary values of the proportional gain Kpgr = 27.1936 and Ki = 0 are received. For these parameter values of the PI controller, the system is within the borders of stability. From (41) it can be concluded that 9.6779 < Kp < 27.1936. From (35) and (36) condition are met for selecting the real parts of the closed-loop poles: Re{λ1} + Re{λ2} > 8.6838, Re{λ1} < 0, Re{λ2} < 0, i.e. Re{λ1/2} > 4.3419 for the principal branch. For the principal branch, the Lambert W function, wk(m22) > 1. Therefore, with the conjugate-complex poles Re{λ1/2} = 1 / (2Ts) = 1.8419, wk(m22) = 0, m22 = 0. If 4.3419 < Re{λ1/2} < 1.8419, wk(m22) < 0 and m22 < 0 while 1.8419 < Re{λ1/2} < 0, wk(m22) > 0 and m22 > 0. The paper considers both cases. The method of designing a controller was applied to the complex conjugate poles with Re{λ1/2} = 4, which suits the case of wk(m22) < 0. Applying substitution and solving (38) Im{λd}gr = 7.6474 is received. If the desired poles are λ1/2 = 4 ± 7.6474j, Ki = 0, Kp = 9.0351. The PI controller is functioning as a proportional controller, meaning that there will be an offset outgoing signal i.e. there will be a deviation of the rotor velocity compared to the previously entered reference velocity. For higher values of the imaginary part of the pole, the system will be unstable because Ki < 0, i.e. from the infinite pole spectrum there exists a pole that is located in the right half-plane of the s-plain. For example, λ1/2 = 4 ± 8j, Ki = 6.4883, Kp = 9.1043, λ3 = 0.3194. For the values of the imaginary pole part that are lower than the boundary value, the closed-loop system is stable, while both gains are positive. For example, λ1/2 = 4 ± 2j, Ki = 20.2919, Kp = 5.3215. Displacing the desired poles onto the right side Re{λ1/2} = 1, the case of wk(m22) > 0 is taken into consideration. Substituting Re{λ1/2} = 1 in (38), Im{λd}gr = 9.2639 is received, while substitution in (39) results in the boundary value of the imaginary pole part where Kp = 0, Im{λd}0 = 2.2692. If the desired value of the imaginary pole parts is lower than Im{λd}0, then Kp < 0 and Ki > 0. For example, for λ1/2 = 1 ± 2j, Kp = 0.5367, Ki = 15.5265. 594 R. GEROV, Z. JOVANOVIĆ Since the confirmation results of the boundary conditions are received for the identified DC motor model, the angular velocity of the identified model with the received PI controllers is shown in Fig. 6. wherefrom the confirmation of the boundary conditions for the selection of the desired poles can be seen. Fig. 6 Response of the angular speed of the Identified Model with different PI retarded controllers and time delay h = 0.2 s. To evaluate the output control performance the integral absolute error (IAE) of the controll error ωr(t)  ω(t) and the integral square error (ISE) of the controll error ωr(t)  ω(t) is used. 0 ( ) ( ) r IAE t t dt     (46) 2 0 ( ( ) ( )) r ISE t t dt     (47) The small values of IAE and ISE show good closed-loop performance. Table 1 contains the values of the proportional and integral gain of the PI retarded controller obtained for different values of the desired closed-loop poles and time delay h=0.2. To evaluate the closed-loop performance, we considered a step set-point change of amplitude 200 and a step input (load) disturbance of amplitude 10. In order to quantitatively present the results, the integral absolute error (IAE) and the integral square error (ISE) for the set-point and load disturbance as well as for settling time (Ts) and the percentage of the overshoot (OS) of the closed-loop system response are also given in Table 1. The Usage of Lambert W Function for Identification and Speed Control of a DC Motor 595 Table 1 Parameters of the PI controller for different values of the desired rightmost poles of the closed-loop system. Values of settling time, the percentage of the overshoot, IAE and ISE value for set-point and load disturbance Poles λ1/2 Kp Ki Ts [s] OS [%] Set-point IAE ISE Load disturbance IAE ISE -4±2j 5.3215 20.2919 0.71 1.66 58.75 7271 25.69 670 -4±3j 5.9237 22.6005 1.13 4.50 53.93 6530 23.17 605 -3±3j 5.7552 24.7598 1.28 9.94 58.84 6567 22.92 590 -3.5±4.3j 7.2219 27.4642 1.02 12.7 51.17 5567 19.89 507 -4 and -4.5 4.8600 17.9475 0.99 0.00 67.84 8151 29.05 745 Since the values of IAE and ISE in Table 1 are given for a step set-point change of amplitude 200 and a step load disturbance of amplitude 10, it can be said that the closed- loop system has good performances. Figure 7 depicts the response of the angular speed of a DC motor under the effect of torque disturbance of the shape of the step function of amplitude 10 happening at the interval t = 5 s by the regulated usage of the 1-DOF PI retarded controller with the parameters given in Table 1. The response of angular speed of a DC motor with 1-DOF PI retarded controller with Kp = 7.2219, Ki = 27.4642 is not given in Fig. 7. The reason being that with the application of this controller one of the projection conditions isn’t met -that the maximum amplitude overshoot of the rotor rotation speed is less than 10%. It is clear from Fig. 7. that by using the 1-DOF PI retarded controller designed for the desired complex conjugate poles λ1/2 = 3 ± 3j, a system is formed with a better disturbance compensation and also with a higher set-point response overshoot. Fig. 7 The response of a DC motor with different 1-DOF PI retarded controller with the parameters given in Table 1 and time delay h=0.2s. The 2-DOF PI retarded controller is used for the overshoot elimination with γ being the tuning parameter and control law given in (28). Instead of the 1-DOF PI retarded controller which fulfill the projection conditions, using the controller with two degrees of 596 R. GEROV, Z. JOVANOVIĆ freedom is not necessary. The same controller can be used to lower the overshoot. For example, γ = 0.35 being the tuning parameter for 1-DOF PI retarded controller with parameters obtained for λ1/2 = 4 ± 2j. An overshoot of the amplitude of the rotor rotation speed doesn’t exist for 1-DOF PI retarded controller design for real poles, resulting in tuning parameter γ = 0 within the control law of the 2-DOF controller. The influence of the tuning parameter γ on the angular velocity of the DC motor with 2-DOF PI retarded controller is considered in the case that the closed-loop system with 1- DOF PI retarded controller doesn’t fulfill the projecting conditions. Table 1 shows that the conditions aren’t met using the controller with parameters Kp = 7.2219 and Ki = 27.4642 because the overshoot is higher than 10%. It also shows that using this controller the lowest values of indexes IAE and ISE are received. The response of angular velocity of a DC motor under the effect of torque disturbance of the shape of the step function of amplitude 10 happening at the interval t = 5 s with 2-DOF PI retarded controller with the gain Kp = 7.2219 and Ki = 27.4642 and different tuning parameter γ = 0, γ = 0.15 and γ = 0.3 is shown in Fig. 8. Response of the angular speed of a DC motor for γ = 0 is equal to the respone received using the1-DOF PI retarded controller. Fig. 8 clearly shows that an increase of γ lowers the overshoot where: for γ = 0.15, OS = 8.9%, for set-point IAE=52.15 and ISE = 6067, while for γ = 0.3, OS = 5.9%, for set-point IAE = 54.84 and ISE = 6742. In both cases IAE = 19.89 and ISE=507 for load disturbance. Fig. 8 Response of the angular speed of a DC motor with 2-DOF PI retarded controller with the parameters Kp=7.2219, Ki=27.4642, time delay h=0.2s, and different γ. Considering the fact that there was no analysis of the influence on the uncertainty in paper [1], perturbations of ±20% in the DC motor parameters J, Km, Ke, R, L and β are considered. Response of the angular speed of a DC motor with PI retarded controller with the parameters Ki = 20.2919, Kp = 5.3215, time delay h = 0.2 s, and perturbations of ±20% in the DC motor parameters J, Km, Ke, R, L and β is shown in Fig. 9. The Usage of Lambert W Function for Identification and Speed Control of a DC Motor 597 Fig. 9 Response of the angular speed of a DC motor with 1-DOF PI retarded controller with the parameters Ki = 20.2919, Kp = 5.3215, time delay h = 0.2 s, and perturbations of ±20% in the DC motor parameters J, Km, Ke, R, L and β. It can be observed that the change of the parameters affects the response of the feedback system, but also that the same remains stable, for example for the closed-loop system with the PI controller Ki = 17.9475, Kp = 4.8600, perturbation of +20% in all DC motor parameters increase IAE for 32% and ISE for 23%, Ts = 1.54 s, OS=0% while perturbation of 20%, decrease IAE for 22% and ISE for 20%, Ts = 0.924 s, OS = 3.66%. For the closed-loop system with PI controller Ki = 20.2919, Kp = 5.3215 and perturbation of +20% in all DC motor parameters, settling time Ts = 1.12 s, OS = 0.01%, IAE = 74.50 and ISE = 8877 for set-point, while for perturbation of 20%, Ts = 1.08 s, OS = 8.93%, IAE = 51.50 and ISE = 5902. The results received were compared to the results received with the usage of a standard PI controller (PIs) which was projected without the assumption that delay can occur in the return branch. For the desired poles λ1/2 = 4 ± 2j, the PIs controller parameters are Kis = 52.5429, Kps = 11.3392. For the desired real poles λ1 = 4 and λ2 = 4.5, PIs controller parameters are Kis = 47.2886, Kps = 12.6528. For the same perturbation in all DC motor parameters, better results are received using the PIs controller as opposed to the suggested PI retarded controller. The influence of changing the time delay (Td) in the return branch on the angular velocity of the DC motor is considered in case the suggested PI controller and the standard PIs controller are used. Parameters of the controllers are received for real poles where the suggested PI controller: Ki = 17.9475, Kp = 4.8600 without the intentionally added delay of the motor speed measured value i.e. h = 0 s, and PIs controller: Kis = 47.2886, Kps = 12.6528. The response of angular velocity of the DC motor for a different value of time delay Td in measured speed for the control system with the proposed PI controller and standard PIs controller is shown in Fig. 10. 598 R. GEROV, Z. JOVANOVIĆ Fig. 10 Response of angular velocity of a DC motor with the proposed PI controller and standard PIs controller for a different value of time delay Td in measured speed. Based on the results shown in Fig. 10, it can be concluded that for the delay in the return branch Td > 0.3 s the system regulated with the PIs controller will become unstable, which is not the case with the usage of the suggested PI controller. The closed-loop system with the proposed PI controller becomes unstable for Td > 0.8 s. The suggested PI controller shows a considerably better result as opposed to the standard PIs controller if there exists a time delay in the return branch. The same result can be observed with the usage of controllers designed for the desired complex-conjugated poles. [1]. 6. CONCLUSION The linear DC motor model obtained by applying the proposed new method of parameter estimation using the Lambert W functions possesses characteristics which slightly differ from the characteristics of a DC motor in the fields of time and frequency. For this reason, the model can be used for the purpose of designing various types of controllers not only for managing the speed of a DC motor rotor, but also its position. Controlling the rotation speed of the DC motor rotor using the PI controller with the adjusted measuring velocity delay in the suggested manner leads to a robust system with adequate disturbance compensation. Within the following period the usage of this process of identification of the linear DC motor model it is possible to design models that could be used for the purpose of designing other types of speed and rotor positioning DC motor controllers. REFERENCES [1] R. Gerov, Z. Jovanović, “Lambert W function application to a direct current motor speed regulation with a delay”, In Proceedings of the 13 th International Conference on Applied Electromagnetics - PES 2017, Niš, Serbia, 2017, pp. O6-3. [2] A. Hughes, “Electric Motors and Drives: Fundamentals, Types and Applications”, 3 nd , Elsevier, 2006. [3] H. A. Toliyat (Ed.), G. B. Kliman (Ed.), “Handbook of Electric Motors”, 2 nd , Boca Raton: CRC Press, 2004. The Usage of Lambert W Function for Identification and Speed Control of a DC Motor 599 [4] T. Umeno, Y. Hori, “Robust speed control of dc servomotors using modern two degrees-of-freedom controller design”, IEEE Transactions on Industrial Electronics, vol. 38, no. 5, 1991, pp. 363–368. [5] V. L´echapp´e, O. Salas, J. Le´on, F. Plestan, E. Moulay, A. Glumineau, “Predictive control of disturbed systems with input delay: experimental validation on a DC motor”, In Proceedings of the IFAC, 2015, vol. 48, no. 12, pp. 292–297. [6] M. Ruderman, J. Krettek, F. Hoffmann, T. Bertram, “Optimal State Space Control of DC Motor”, In Proceedings of the IFAC, 2008, vol. 41, no. 2, pp. 5796–5801. [7] A. Ramirez, R. Garrido, S. Mondie, “Velocity control of servo system using an integral retarded algorithm”, Elsevier, ISA Transactions, vol. 58, pp. 357–366, 2015. [8] K. Matsuo, T. Miura and T. Taniguchi, “Speed control of a dc motor system through delay time variant network,” In Proceedings of the SICE-ICASE International Joint Conference, 2006, pp. 399–404. [9] W. Lord, J. H. Hwang, “DC Servomotors: Modeling and parameter determination", IEEE Transactions on Industry Aplications”, vol. 1A-13, no. 3, pp. 234–243. 1977. [10] R. Garrido, R. Miranda, “Closed loop identification of a DC servomechanism”, In Proceedings ogf the 2006 IEEE International Power Electronics Congress, 2006, pp.1–5. [11] K. Radojka, A. Sanja, S. Danilo, “Recursive Least Squares Method in Parameters Identification of DC Motors Models”, Facta Universitatis, Series: Electronics and Energetics, vol. 18, no. 3, pp. 467–478, 2005. [12] C. S. Chen, S. C. Lin, S. M. Wang, Y. M. Hong, “Adaptive control based on reduced-order parameter identification and disturbance observer for linear motor”, In Proceedings of the ASME 2007 Conference on International Manufacturing Science and Engineering, Atlanta, Georgia, USA, 2007, pp. 751–758. [13] A. A. Al-Qassar, M. Z. Othman, “Experimental Determination of Electrical and Mechanical DC Motor using Genetic Elman Neural Network”, Journal of Engineering Science and Technology, vol. 3, no. 2, pp. 190–169, 2008. [14] R. M. Corless, G. H. Gonnet, D. E. G. Hare, D. J. Jeffrey, D.E. Knuth, “On the Lambert W Function,”, Advances in Computational Mathematics, vol. 5, 1996, pp. 329–359. [15] S. Yi, P. W. Nelson, A. G. Ulsoy, “Proportional-Integral Control of First-Order Time-Delay Systems via Eigenvalue Assignment,” IEEE Transactions on Control System Technology, vol. 21, no. 5, pp. 1586– 1594, 2013. [16] S. Yi, P. W. Nelson, A. G. Ulsoy, “Time delay systems: Analysis and control using the Lambert W function”, World Scientific, 2010b. [17] S. Yi, P. W. Nelson, A. G. Ulsoy, “DC Motor Control Using the Lambert W Function Approach”, In Proceedings of the IFAC, 2012, vol. 45, no. 14, pp. 49–54. [18] S. Yi, P. W. Nelson, A. G. Ulsoy, “The Lambert W Function Approach to Time Delay Systems and the LambertW_DDE Toolbox,” In Proceedings of the IFAC, 2012, vol. 45, no. 14, pp. 114–119. [19] R. Gerov, Z. Jovanović, “Synthesis of PI Controller with a Simple Set-Point Filter for Unstable First- Order Time Delay Processes and Integral plus Time Delay Plant”, Elektronika ir Elektrotechnika, vol. 24, no. 2, pp. 3–11, 2018. [20] R. M. Corless, H. Ding, N. J. Higham, D. J. Jeffrey, “The solution of S*exp(S)=A is not always the Lambert W function of A”, In Proceedings of the 2007 International Symposium on Symbolic and Algebraic Computation ISSAC 2007, Waterloo, Ontario, Canada, 2007, pp. 116–121. [21] R. R. Alla, J. S. Lather, G. L. Pahuja: “Comparison of PI controller performance for first order systems with time delay”, Journal of Engineering Science and Technology, vol. 12, no. 4, pp. 1081–1091, 2017. [22] R. Gerov, Z. Jovanović, “Primena proporcionalno-integralnog kontrolera za sisteme prvog reda sa kašnjenjem korišćenjem Lambert W funkcije za podešavanje polova”, Zbornik 61. Konferencije za elektroniku, telekomunikacije, računarstvo, automatiku i nuklearnu tehniku, ETRAN 2017, Kladovo, Srbija, 2017, pp. AU1.8.1-5. [23] S. M. Özer, S. Yıldız, A. Iftar, “Optimization-based PV/PI design for a DC-motor system with delayed feedback,” In Proceedings of the 26th Mediterranean Conference on Control and Automation, Zadar, Crotia, 2018, pp. 39–45. [24] S. Ayasun, "Stability analysis of time-delayed DC motor speed control system", Turkish Journal of Electrical Engineering & Computer Sciences, vol. 21, pp. 381–393, 2013. [25] G. J. Silva, A. Datta, S. P. Bhattacharyya: "PI stabilization of first-order systems with time delay", Automatica, vol. 37, pp. 2025–2031, 2001. [26] R. Sipahi, S. I. Niculescu, C. T. Abdallah, W. Michiels, K. Gu, "Stability and Stabilization of Systems with Time Delay. Limitations and Opportunities", 2010, https://digitalrepository.unm.edu/ece_rpts/35. 600 R. GEROV, Z. JOVANOVIĆ [27] W. Michiels, S.I. Niculescu, L. Moreau, "Using delays and time-varying gains to improve the static output feedback stabilizability of linear systems: a comparison", IMA Journal of Mathematical Control and Information, vol. 21, no. 4, 2004, pp. 393–418, 2004. [28] Inteco, Modular Servo System-User’s Manual, [Online]. Available: www.inteco.com.pl, 2008.