Fast and Comprehensive Online Parameter Identification of Switched Reluctance Machines

The switched reluctance machine has been an attractive candidate for many applications owing to its simple design and low construction costs, without the use of permanent magnets. However, the double saliency of its stator and rotor poles results in noise-causing torque ripples. And although advanced torque ripple minimization control techniques exist, they rely on modeling the machine, which in turn requires specialized offline experimental setups or online (during operation) parameter identification techniques. To date, existing online techniques are iterative without proof of convergence, do not provide all model parameters, and/or rely on a priori information that can change after the machine is commissioned. In this work, an online parameter identification method is developed with a new empirical model of its flux linkage and electromagnetic torque, to provide a complete nonlinear model of the machine. With two seconds of data collected online, all electrical and mechanical parameters are identified using a non-iterative algorithm, and so it does not pose a risk of divergence. Therefore, parameter identification can be reliably and frequently carried out at different operating conditions as the machine ages for diagnostics. Also, the resulting model is designed to be used by advanced torque ripple minimization control techniques. The implementation procedure is detailed along with simulation results to demonstrate its efficacy.


Flux Linkage and Torque Empirical Model
Direct-axis flux linkage function. ψ q (i s ) Quadrature-axis flux linkage function. l 1 , l 2 , l 3 Parameters of ψ d (i s ).
The associate editor coordinating the review of this manuscript and approving it for publication was Yanbo Chen .

SRM Parameters R s
Resistance per stator phase.
Combined coefficients of the moment of inertia and viscous friction of the SRM and load. N s , N r Number of stator and rotor poles. Normalized relative error of a variable x(t).

I. INTRODUCTION
Modeling and parameter identification of electric machines (motors or generators) is an important first step towards their reliable analysis and control. Towards that end, parameter identification methods have been developed for their often nonlinear models, with objectives as varied as performing stability analyses and enhancing controller performance. These methods have been developed for the induction motor [1], [2], the salient-pole synchronous generator [3], and the divided-winding synchronous generator [4] to name a few. For some machines, effective control techniques, such as the PID method, exist that do not rely on an accurate model [5]. However, for other applications such as the switched reluctance machine (SRM), model-based closedloop control enhances their performance. The SRM is characterized by its ability to operate at synchronous speed without the use of field windings or permanent magnets. As such, it has a wide range of applications from vacuum cleaners and lathe machines to (potentially) electric vehicles; e.g., see the comparative study on electric vehicle motors by Ramamurthy et al. [6]. Its structure, however, has a double saliency, both in its rotor and stator poles, which results in torque ripples and vibrations when basic commutation control schemes are used. Instead, closed-loop control aiming at torque ripple minimization is used, which requires knowledge of its model including the nonlinear flux linkage curves, and the induced electromagnetic torque in relation to the phase current and rotor position, i.e., the τ -i-θ characteristics. In many cases these models are obtained from experimental data to support such control techniques. For example, a feedback linearization technique developed by Ilic-Spong et al. [7] achieves robust position tracking control of the SRM using a nonlinear model. The model parameters were determined offline from experimental flux linkage data (to best fit them) enabling their control method. Also, adaptive fuzzy control was used by Mir et al. [8] and sliding mode control was used by Inanc and Ozbulur [9] for torque ripple minimization. The latter, for example, required model parameters, namely, the rotor moment of inertia and slope of inductance with respect to rotor angle variations. Several other SRM control methods were developed including the use of torque sharing functions in [10], [11], a hybrid PID torque sharing with τ -i-θ characteristics in [12], and the use of model predictive control and a Kalman filter with recursive least squares to estimate the inductances in [13].
Flux linkage curves can therefore be computed experimentally as in [14], [15], using finite element analysis methods (FEM) as in [16], [17], or as empirical analytical functions that approximate these curves at various rotor positions and current levels, see for example Le-Huy and Brunelle [18]. Using these curves the τ -i-θ characteristics can then be determined for use in the aforementioned control methods. Ultimately, the model obtained for the τ -i-θ characteristics is either a look up table or an empirical analytical model that best fits the data. The former method can be more accurate in implementation (provided enough data points are recorded) but requires a large memory on the controller. Therefore, empirical analytical models are preferred for microcontroller operated motor drives due to their lower computational complexity in memory and time. Miller and McGilp [19], for example, capture the flux nonlinear curves transitioning between the unaligned and aligned rotor positions using parameterized piecewise functions and correction factors. Their parameters and correction factors are calculated from a limited set of points obtained from FEM. Their model was later improved [20], with the introduction of smooth transitions in their normalized flux gage curves. Also, Vujicic and Vukosavic [21] propose a set of three parameterized piecewise functions to characterize the flux linkage curve with the parameters calculated from the SRM geometry, magnetic material and points on the experimental curves.
Parameter identification for a given model could be further categorized as offline or online depending on whether the SRM is disconnected from its load with a dedicated experimental excitation setup or connected to its operational load, respectively. Typically, offline methods aim to obtain detailed flux linkage curves and are performed prior to commissioning the SRM. The challenges of experimentally obtaining these curves offline are discussed by Sharma et al. [14] with a recommendation for example to use a fixed DC source as excitation to reduce measurement noise and simplify filtering requirements. In their offline method, the test had to be repeated in standstill at different rotor angles. Data collection periods also vary depending on whether the test requires capturing steady state signals or transient signals, with the former requiring significantly longer times. By adding a search coil on the stator to measure the EMF, Ferrero and Raciti [22] showed that AC excitation can be used with the SRM in standstill or a DC excitation with the rotor moved using another motor during data acquisition to obtain the flux linkage curves. Alternatively, FEM can be used in the design phase and later verified from experimental data, see for example by Ursu et al. [17].
Online methods have also been developed to directly obtain the parameters of an empirical model of the SRM. They are non-intrusive to the operation of the SRM and can be conducted periodically, e.g., at different operating conditions and as the machine ages. Mir et al. [23] developed an iterative (recursive) online method for torque estimation to aid their fuzzy controller [8]. A single parameterized function for the flux curve was used with a few parameters to be measured offline such as the stator resistance, and five parameters to be recursively computed and improved online. This function was later reduced to four parameters [24] to improve the chances of convergence. Also, online identification methods for the linear SRM were developed by Pan et al. [25] for position control, and by Missouri et al. [26] to aid their fuzzy system based controller. However, iterative methods require a proof of convergence as they may diverge during their implementation. A more recent iterative method developed by Aguado-Rojas et al. [27] identifies all electrical and mechanical SRM model parameters online. Moreover, their work outlines a proof of convergence of their iterative method that can be tested by the algorithm during its execution. However, their model assumes linear magnetics which limits its applicability to very low current levels that are well below the rated current of a typical SRM.
In this work, an online parameter identification method is developed for the SRM, with the following contributions: 1) A new empirical nonlinear model of the SRM flux linkage and torque is introduced. 2) All electrical and mechanical parameters of the model are identified online. 3) Offline tests and a priori knowledge of the SRM are not needed. 4) Its algorithm is non-iterative and hence can reliably work without the need to prove its convergence or risk divergence. 5) Its procedure is detailed and carried out with two seconds of data, which can run on an SRM embedded system drive.
Therefore, in contrast with existing online methods, it is both comprehensive and reliable. The remainder of the paper is organized as follows: The machine model is given in Section II, and its parameter identification models are derived in Section III. The implementation in simulation and its results are detailed in Section IV, with the impact of disturbance considered and an alternative online method included for comparison. Concluding remarks are drawn in Section V.

II. MODELING THE SRM
The dynamic model of the SRM using the motor (load) convention represents the electrical and mechanical dynamics as follows, see Le-Huy and Brunelle [18] and Gieras [28] v s = dψ s dt There are m stator phases, with the subscript s denoting any one of these phases, e.g., for a three phase machine m = 3 and s ∈ {a, b, c}. For the electrical quantities, v s is the terminal voltage, i s is the current, ψ s is the flux linkage, and R s is the resistance per stator phase. For the mechanical dynamics τ e is the induced electromagnetic torque, which is a function of both i s and the rotor position θ. Also, ω is the rotor angular velocity, τ L is the load torque. J and B f are the rotor coefficients of the moment of inertia and viscous friction, respectively.
A prominent feature of an SRM is its double saliency, and the number of stator poles N s and rotor poles N r are not equal. To operate the SRM, a complete cycle of pulses and torque production is identified as its periodicity, or the torque production capability angle, and is given by ρ 2π/N r . A related angle is the torque zone [28], which is half of the periodicity, and can be defined as β ρ/2 = π/N r . So, a voltage is applied in each stator phase to generate a current pulse resulting in a magnetic field attracting the rotor poles. The angle over which one phase can influence torque is called the stroke angle α s 2π/(mN r ), which is also the phase shift between stator phases. Therefore, the rotor pole starts from an aligned position with stator phase a at θ = 0 rad and reaches the quadrature point (furthest from this alignment) at θ = β. The next rotor pole reaches full alignment with stator phase a at θ = 2β.
One SRM configuration that will be adopted in this work without loss of generality is the 6/4 SRM with N s = 6 and N r = 4 as shown in Fig. 1. This has m = 3 stator phases, β = π/4 rad and α s = π/6 rad. Note that there is no need to define an electrical counterpart to the mechanical angle θ. That is, θ suffices for modeling both mechanical and electrical dynamics of the SRM [7].

A. FLUX LINKAGE CHARACTERISTICS
Assuming no mutual coupling between the phases, ψ s only depends on its self-inductance. However, the machine is typically operated in the magnetic saturation region, making ψ s nonlinearly dependent on i s . Also, the reluctance along the path of the magnetic flux significantly changes as the SRM rotates due to its double saliency, hence, it is both a function of i s and θ, i.e., ψ s (i s , θ). If v s , i s , and R s are known, ψ s can be computed directly by integrating both sides of (1) and rearranging to get where t 0 is the moment when commutation starts and t is a dummy integration variable evaluated in the time range t > t 0 such that i s (t) = 0 and i s (t 0 ) = 0. Note that ψ s (t 0 ) = 0, and, in general, ψ s must be reset to zero whenever i s = 0 because the SRM stator and rotor are constructed using soft ferromagnetic materials, i.e., they do not retain a residual magnetic field. Therefore, the integrator reset is an important step when using this method in a simulation or on a microcontroller to calculate ψ s . Alternatively, ψ s (i s , θ) can be obtained using one of two methods: 1) A look up table constructed with the rotor fixed at specific angles in the range 0 ≤ θ ≤ 2β. This requires a large memory allocation in the controller. 2) An approximate parameterized empirical model, with the parameters either obtained to best fit experimental data (of method 1) or from an online parameter identification method as discussed in this work. One such empirical model was proposed by Le-Huy and Brunelle [18] and is the basis of a new empirical model developed in this work. This model is given by where ψ d (.) is the aligned flux linkage, ψ q (.) is the quadrature flux linkage, and f (θ) is a function representing the transition along the range 0 ≤ θ ≤ 2β. In other words, the flux linkage is maximum when stator phase a and a rotor pole are directly aligned, with ψ s = ψ d . In quadrature, ψ s = ψ q , which occurs at θ = β. These flux linkages are functions of the phase current as where ψ q (i s ) is parameterized with L q , but unlike Le-Huy and Brunelle [18], ψ d (i s ) is parameterized with l 1 , l 2 , and l 3 . These parameters along with R s will be obtained using online parameter identification. In addition, the function representing the transition between ψ d (.) and ψ q (.) in (5) is given as [18] Recalling that β π/N r , we can rewrite this equation as Note that ψ d (.) and ψ q (.) are only functions of the current i s and f (.) is only a function of θ. This analytical function is similar in form to the work by Miller et al. [20], but it is simpler as it has fewer parameters to identify. Based on this model from [18], f (0) = 1, f (β) = 0 and f (2β) = 5. Therefore, f (.) is only valid for 0 < θ < β, i.e., between the aligned (direct) and the unaligned (quadrature) positions of phase a. So, a modification is necessary to make f (.) valid for a complete cycle in the range 0 < θ < 2β, by redefining it as where u s (.) is the unit step function. It can be simplified to Therefore, the flux linkage model is comprised of equations (5), (6), (7) and (11).

B. THE INDUCED ELECTROMAGNETIC TORQUE
The electromagnetic torque τ e,s resulting from i s in each phase s is computed from the coenergy function W as where W = ι=i s ι=0 ψ(ι, θ)dι. The coenergy is in turn computed from ψ s (i s , θ) either numerically using the tables or analytically from equation (5). Accordingly, Then, and Since this is a derivative of a piecewise function, the derivative of each portion is obtained separately. In this case, the first order derivative at θ = β is zero for both functions. Hence, there is no discontinuity and as a result where, The total induced electromagnetic torque is the sum with α s = 2π/(mN r ) = π/6 rad being the phase shift between the stator phases.

III. ONLINE PARAMETER IDENTIFICATION MODEL
The identification model is derived next, consisting of electrical and mechanical regressor equations. They are solved in sequence to obtain all the SRM parameters. Also, two error metrics are introduced, namely, an error index and a normalized relative error, which are used as qualifying metrics for the results.

A. ELECTRICAL REGRESSOR
For any phase s ∈ {a, b, c}, we substitute (19) in (4) and rearrange to get During the online operation of the machine, let the current be regulated at two reference values over two time ranges as for which indicator functions can be defined as We can approximate the last term of (21) as l 2 i s e −l 3 i s ≈ l 2 I ref e −l 3 I ref over a given time range, either by tightly regulating the phase current or simply by collecting data points only when they satisfy a tolerance bound I tol , i.e., I ref − i s < I tol . Representing these equations in regressor form we obtain with, where K contains the unknown parameters, whereas y and W are known from the measured variables. The variables are sampled at t = T , 2T , 3T , . . . , NT , where T is the sampling period and N is the total number of samples collected. So y and W are computed for each data point n = 1 to N . One desires to find K that minimizes the mean squared error defined by Multiplying out the right-hand side gives where, R y = If R W is invertible, we can minimize E 2 (K ) by ∂E 2 (K )/∂K = −2R Wy + 2R W K = 0, that is, Substituting back in κ 5 , and solving for l 2 we get

B. MECHANICAL REGRESSOR
After finding the electrical parameters, the induced electromagnetic torque can be computed using (2), (20), (15) and (17). Additionally, (2) can be integrated to add a second equation forming the mechanical parameter identification model Rewriting them in regressor form VOLUME 9, 2021 where, K M contains the unknown mechanical parameters, whereas y M and W M are known from the N sampled measurements. Note that J and B f represent the combined SRM and load coefficients. Also, τ L is assumed to be constant over the brief period over which the data is collected. One desires to find K M that minimizes the mean squared error defined by where, in this case, R y =

C. AN ERROR INDEX
The squared errors in (26) and (33) can be used to define an Error Index. This determines how well the identified parameter set K * provides a best fit for the collected data [3], [5], and is defined as, where, the squared error at K * is compared to the squared error at the zero vector, i.e., K = 0. EI should be less than one; otherwise, K * is as good as any arbitrary set K .

D. A NORMALIZED RELATIVE ERROR
One main objective of the parameter identification method is to produce a model that can estimate the stator flux linkage ψ s (t) and induced torque τ e (t) state variables. Therefore, a useful metric for determining the efficacy of the proposed method is to calculate the relative error between the actual (e.g., from simulation data) and the estimated state variables. This can be defined similar to the state estimation methods in the work by Chen et al. [29]- [31] as where, x is the state variable of interest (e.g., ψ s ), x act is the measured (or simulated) variable, and x est is its estimated counterpart. Note that in practice, the sampled data must be in a range where x act (nT ) is not zero, in which case, N is replaced by the number of samples in this valid range.

IV. IMPLEMENTATION AND RESULTS
The application of the proposed parameter identification method is demonstrated in simulation with the implementation procedure listed in detail. A model of the SRM is constructed in Simulink along with: a mechanical load, a hysteresis current controller, and a data acquisition block, see Fig. 2. Moreover, a three-leg asymmetric bridge converter is used to drive the SRM, which is a standard converter for SRM drives [28]. The model represents an SRM with N s = 6 stator poles, N r = 4 rotor poles, that is rated for an output power  Fig. 3.
With the SRM inertia and friction moved outside of the SRM block in Fig. 2, τ ind (t) can be directly measured. Also, when R s is known, ψ s (t) can be computed by integrating the v s and i s , which is performed by its block in Fig. 2. Both waveforms are used for comparison with their estimated counterparts τ ind,est (t) and ψ s,est (t), but they are otherwise not needed by the identification method.
The flux linkage curves can be used to obtain L q = ψ(180, 45 • )/180 = 0.5556 mH at the quadrature position. However, the remaining parameters have to be obtained to fit the empirical flux linkage model.

A. PARAMETER IDENTIFICATION PROCEDURE
The procedure is detailed in the following steps: 1) With the SRM online and connected to its load, it is brought up to two operating points using a hysteresis current controller, e. 2) The collected data includes v s , i s , and θ, where the sampling frequency is the same as the switching frequency. It is also helpful to record the active phase s ∈ {a, b, c} during data collection. This facilitates determining the parameters of each phase and separately modeling any asymmetries in the SRM; potentially identifying an imminent failure in one of the phases. i s = 0. Also, integrate ω to get θ if the latter is not measured. 5) The modulo of the rotor angle θ is taken with periodicity 2β = 90 • , and is used to calculate f (θ) and f (θ), in (11) and (15). 6) Set each indicator function ν 1 , ν 2 in (15) to 1, whenever its corresponding reference current is active. 7) The sampled data, indexed from n = 1 to N , is used to calculate y(nT ) and W (nT ) in (24) and construct the regressor matrices R y , R W & R Wy of (26). 8) With K = R −1 W R Wy : R s = κ 1 , L q = κ 2 , and l 1 = κ 3 . Also, calculate l 2 and l 3 using (29) and (28), respectively. Its EI is calculated using (34). 9) Use the identified electrical parameters to compute τ e (i a , i b , i c , θ) in (20). 10) Use the same sampled data with a digital low pass filter, e.g., 4 th order low pass Butterworth filter set at f c = 200 Hz, and substitute for τ e , ω, and dω/dt to calculate y M (nT ) and W M (nT ) of (32). Note that in Matlab this can be implemented using the filtfilt function with the order set to 2, as the function filters the data forward and backward to eliminate phase shifts in the resulting filtered signals. 11) The mechanical regressor matrices R y , R W & R Wy of equation (33) are constructed resulting in the vector K M = R −1 W R Wy . 12) Then, the identified mechanical parameters, which combine the SRM and its load, are J = κ 7 and B f = κ 8 , and τ L = κ 9 , and EI is found using (34).

B. SIMULATION RESULTS
The steps of the procedure are implemented on the SRM in Fig. 2. The plots of the measured variables v a , i a , and ω are shown in Fig. 4, Fig. 5, and Fig. 6, respectively. The estimated electrical parameters are listed in Table 1 along with the actual (known) values. An error index EI = 0.0173 was calculated showing that the parameters resulted in a model that is a good fit for the collected data. These estimated parameters are used to compute ψ a,est and τ est as shown in Fig. 7 and Fig. 8, respectively. The waveforms show that both estimated waveforms closely follow their measured counterparts. Specifically, the normalized relative errors in these two waveforms areē ψ = 0.018 and e τ = 0.15, respectively.    Then, the estimated variables ψ a,est and τ est are used to obtain the mechanical parameters, which are shown in Table 2 along with the actual (known) values. The error index is EI = 0.066, which also shows that the parameters are a good fit for the collected data and that the machine is sufficiently excited. In addition, the total execution time of the procedure is 2.45 seconds, with 2.0 seconds for data collection and 0.45 seconds for computations, on a PC with an Intel   Core i5 CPU operating at 2.40 GHz with an 8 GB RAM. Therefore, the proposed online parameter identification method furnished all electrical and mechanical model parameters of the SRM. Both the plots of the estimated flux and torque obtained from the analytical model proposed in this work are close to those computed from the measured data.

C. IMPACT OF DISTURBANCE
To further validate the proposed online identification method, the impact of disturbance on the measured signal is investigated. Specifically, the additive white gaussian noise model function is applied to all the signals that are used by the identification model, namely, v a , i a , ω and θ for phase a. Also, v a and i a are numerically integrated after the added noise. Then, the same identification algorithm settings are used. Signal to noise ratios of SNR = 40 dB, SNR = 34 dB and SNR = 30 dB are used, with the percentage error in the parameters listed in Table 3. These results show that as the noise levels increase, the electrical parameters are still identified with relatively low errors. However, the performance of the mechanical identification deteriorates with higher noise levels, particularly with regards to τ L .

D. ALTERNATIVE FLUX LINKAGE MODELING AND ONLINE IDENTIFICATION
As mentioned in Section I, there are alternative online identification techniques. To contrast the proposed method with existing ones, the approach in [24] also provides an empirical flux linkage model to replace look up tables that instead relies on a Fourier series function in the exponent of the model. Online data is used with the assumption that all the other electrical parameters are known such as ψ s,max and R s , and that an initial guess of the parameters is known a priori to improve the convergence of their iterative method. It is based on an earlier work [23] with more Fourier series terms, however, the earlier approach did not converge when attempted in the current simulation. Also, the alternative iterative method in [27] is more comprehensive as it furnishes all electric and mechanical parameters of the SRM, however, it relies on the assumption of linear magnetics, which does not represent SRMs operating at their rated conditions. The flux linkage model [24] is given by f s (θ q ) = a 0 + a 1 cos(θ q ) + a 2 cos(2θ q ) + a 3 cos(3θ q ), (37) where θ q = θ + π/N r as chosen in [24], i.e., it starts at the unaligned (quadrature) position. Rearranging the flux model in regressor form with, where, φ and Y contain the measurable quantities, χ are the unknown parameters, and ψ s = v s − i s R s dt is calculated online.
The following recursive least squares (RLS) discrete-time equations are calculated at time iteration k This identification method was implemented in Simulink by adding the block shown in Fig. 9 and its RLS block in Fig. 10. Phase a parameters are estimated, with the RLS block enabled whenever phase a is active. Moreover, a discrete-time Butterworth second order low pass filter is applied to the signals with a cuttoff frequency f c = 1 kHz.
The main issue observed with the method was that the parameters in χ converge to a new set of values with every phase a cycle. Specifically, there are four parameter sets that were heuristically identified from the resulting plots with the aid of the error function . After converging to a set of values that yield a low error, they diverge again before the end of each cycle as shown in Fig. 11 for the parameters and Fig. 12 for the error function . To achieve this temporary convergence, the following additional factors were considered: 1) Selecting the appropriate cutoff frequency f c was necessary to avoid over filtering of the flux linkage signal if f c is too low and to avoid divergence of χ if f c is too high.
2) The RLS parameter γ has to be 0.95 < γ < 1.00, so γ = 0.97 was selected.  3) The controller was set to a fixed reference current at the rated value I s,ref = 180 A for a 1 s interval. 4) The machine was slowed down by increasing the load's coefficient of viscous friction to B f ,L = 2.2 N.m.s to collect more data when phase a is enabled. 5) Identification starts at t = 0.2 s to skip over initial transients. As a result, the four χ sets of identified parameters are shown in Table 4. These result in four alternative estimated waveforms for ψ a,est as shown in Fig. 13. Note that the y-axis in these figures is restricted for clarity and does not show the diverging waveforms. It can be seen that each one of the estimated ψ a,est waveforms closely matches the actual ψ a albeit once every four cycles. In conclusion, the implementation of the RLS algorithm under these simulated conditions of the  SRM is not reliable in producing a single empirical function that captures the behavior of the flux linkage ψ a .

V. CONCLUSION
An online parameter identification method was developed in this work for the SRM, which uses a new nonlinear empirical model of the machine. All electrical and mechanical parameters of the model were identified without a priori knowledge or offline measurements. It was shown that 2 seconds of data collection time sufficiently excited the parameter identification regressor equations, with a computation time of 0.45 seconds to obtain all the parameters. Also, the resulting analytical model closely predicted the flux linkages and induced electromagnetic torque waveforms compared to their measured counterparts in simulation. In addition, the impact of disturbance due to noise in measurements was investigated. It was found that the electrical parameter identification was reliable, and that the mechanical parameter identification only deteriorated at an SNR of 30 dB and lower. Key features of the proposed method are the non-iterative algorithm that would otherwise require proof of convergence and the ability to identify each phase independently. For comparison, a recursive least squares method was demonstrated that diverged in the simulation. The proposed online method is therefore more comprehensive and more reliable than existing iterative methods. It is also particularly beneficial for embedded system drives that require a fast algorithm that enables periodic diagnostics of the machine, is capable of independently detecting anomalies in each phase, and can support advanced torque ripple minimization control techniques.