Position error according to motor parameter inaccuracy

## 1. Introduction

Permanent Magnet Synchronous Motors (PMSM) are widely used in industrial drives due to their high power density, high torque-to- inertia ratio, small torque ripple and precise control at low speed range, possibility to torque control at zero speed, high efficiency and small size. To exploit presented advantages, a vector control should be used. Vector control allows the drive a good dynamic, effective performance especially during transients and prevents overload of the motor by controlling the torque. However, a motor shaft position sensor is required to enable the effective vector control of a PMSM. Such sensors increase the overall cost of the drive and decrease its reliability. That sensor occupies usually the end of the shaft, so elimination of the need for its installation allows new applications of such drive. This scientific problem remains an open question for and is the subject for extensive research in many scientific centers. Several approaches to this problem are reported in the literature, which are based on state observers [1,2], various versions of the Kalman filters [3,4], sliding-mode observers [5,6] or methods of applying motor saliency [7,8,9]. State observers and Kalman filters based on a motor model require complex computational operations to obtain proper accuracy, which always causes problems in real time operation. Several approaches apply motor magnetic saliency and detect the rotor position by measuring phase inductances. These methods provide a real solution at small speeds and during standstill operation, but requirements with respect to hardware and software are high. The additional scientific problem is to obtain high dynamic sensorless drive [10,11]. Assumption of the limitation the applications up to speed control (without position control) gives possibility to achieve well performance of high dynamic sensorless drive for low speed operating range.

A simple and effective structure of an observer is proposed in this paper. The presented observer structure is based on a modified concept of back EMF detection [5] and introduces a more complex corrector function which differs from the traditional one. The structure contains a corrector with a proportional-multi integral function (PII^{2}) instead of the proportional correction used in the Luenberger observer [12]. Prepared observer structure is applied to control structure presented at figure 1. The motor is fed by the PWM inverter, the control system includes vector control system of stator currents at *dq* independent axes (R_{iq} and R_{id}), speed controller (R_{ω}) and observer. The system is equipped with position and speed sensors which are used only to analysis of the estimation quality. The estimated value of the actual shaft position is used in transforming blocks of the coordinate system *dq-αβ* and *αβ-dq*. The estimated value of the speed is used in control loop of the speed.

Presented structure gives possibility to test system in closed (observed values are used to control drive) and open (observed values are only considered) mode using manual switches as it is shown on figure 1. To achieve smooth observed values, a reference voltage can be used instead of measured ones.

## 2. Inverter

For modeling the PWM converters can be used models with various complexity degrees. First approximation can be a usage of the inverter's transfer function equal to one. One can do that in the case of high carrier frequency of the inverter, since any significant delays occur in the measuring loops. At this case, the observer input signals may be smooth, and is easily obtained the proper observer performance. The other possibility to ease modeling transfer function of the inverter is zero order sample and hold block, usage the delay block or first order transfer function, which time constant or sampling interval is calculated depends on the proposed carrier frequency. These models do not require a very small simulation step size. In the case of the simulation where the effect of the inverter such as simply the impact the modulated voltage on generated state vector’s waveforms and drive performance or inverter's dead time impact is taken into account, the more accurate model is inserted in place of the simplified one. Figure 3 presents used in this model simplified structure of the PWM inverter. Structure of this model is directly derived from the method of generating the states of the switches, the change of switch state is carried out at the intersection of the reference voltage and the carrier signal. This model does not take into account the dead time phenomenon.

The cost of the exact model of inverter usage is of course much smaller calculating step, from single microseconds up to dozens of nanoseconds (for range about 10 kHz carrier frequency) in place of dozens or hundreds microseconds for simple inverter model for presented drive parameters. The calculating step value is very important due to simulation time especially during optimization procedure (thousands or hundreds of thousands of repetitions). For example, the presented drive is simulated in normal mode, at 2.10 GHz dual core Intel processor at 8.3 s, (simulation stop time 0.12 s, fixed step size – 5 μs), but start simulation without opening the model (using only the command window), will reduce the simulation time to about 6.3 s.

Presented at figure 3 inverter model generates the exemplary (for the ideal three-phase sinusoidal excitation) waveforms of the output voltage (the testing waveform obtained for carrier frequency f_{c}=500 Hz) for bipolar voltage modulation – as presented on figure 4. Figure 5 presents the carrier frequency influence for waveforms for the excited phase current for the stationary circuit.

## 3. Speed controller structure

All the controllers and observer are implemented as a discrete structure. The used in this study structure of speed controller is shown in figure 6 (the currents controllers used in *q* and *q* axis are typical PI structure with anti wind-up and limited output). The signals used in a controller module are “Wref” – reference speed, “Wm” – measurement (or estimated) feed back speed value and speed controller output signal, “Iref” – reference current/torque. Choice of controller structure allows determining the impact of the control algorithm for ability to sensorless performance because of the transients. The tested structure of speed controller was the typical P/PI structure. To avoid integrator saturation for a controller with limited output level, a hard limit is imposed. It is easy and effective solution. The easiest way to set the integrator limit is to use the same value as in the output. Figure 6 shows the tested structure of PI controller. The structure is parallel. Block zero-order-hold in proportional gain branch is used to “synchronize” input signals of the adder. For fast integration switch-off a manual switch “s1” is used. This structure provides a stable performance of the system, and easy selection of settings using different methods. One of the methods used for setting the controller parameters was RWC method (that method will be discussed later), the same as used for settings the observer's parameters.

## 4. PMSM model

Assuming ordinary simplified assumptions, the general form of the PMSM model in *αβ* stationary orthogonal coordinates can be expressed as follows:

and the mechanical part:

The motor model with state variables i_{α}, i_{β} ω and Θ is non-linear. All state variables are measurable but in a concept without mechanical sensor ω and Θ should be estimated. The symbols i_{α}, i_{β}, Ψ_{α}, Ψ_{β}, e_{α}, e_{β} are stator current, stator flux linkage and induced back EMF in *αβ* coordinates. Symbols v_{α}, v_{β} are the components of input stator voltage, R and L are the stator windings resistance and inductance. The symbols ω and Θ are the rotor speed and the position, J is the moment of inertia and T_{L} is the load torque treated as an external disturbance. Such model formula is used for easy derivation of the observer structure. The observer is prepared as a *αβ* model because there is no need of conversion of the coordinates systems for calculation of the output values.

After simple conversion of the motor model, we get the model in the coordinates system rotating with the rotor - *dq* – electrical part:

and the mechanical part:

where u_{d}, u_{q} means the components of input voltage, i_{d}, i_{q}, L_{d}, L_{q} mean currents and inductance of the motor in the *dq*-axis respectively, Ψ_{d},Ψ_{q},Ψ_{f} means flux in the *dq*-axis respectively and flux excited by permanent magnet. The electromagnetic torque is represented by a symbol T_{e}.

Such structure gives a possibility to ease analyze of the decoupled *dq* values of the currents and introduction of different forms of the nonlinear flux distribution. It should be noted that such simple model does not take into account the variable number of pole pairs.

Based on such general model, in simulation PMSM block expanded on nonlinearities in distribution of the flux, current measurement noise addition with control and simple model of friction are used. Model prepared in *dq*-axis gives simple solution to simulate salient pole motor by use the different values of the axis inductance. The *dq* model is equipped with external conversion modules, to get inputs and outputs as voltages and currents in *ABC* phases. It gives possibility to test the drive under various conditions. Outside the PMSM model in axis *dq*, the model is equipped with conversion block into *ABC* coordinates systems used to supply and measurement (Fig. 2). As a measurement noise source a uniform random number function may be used.

## 5. Observer structure

Proposed observer system calculates position information from back EMF estimated in *αβ* coordinates (stator based). This coordinates system was chosen because of its simple form, and there is no need to convert the coordinate system by using the (estimated) shaft position. The sine and cosine of shaft position is calculated from back EMF values, and based on their modulus, is calculated the motor speed (Fig. 7). The inner structure of the observer depends on the correction function. As is shown in figure 7, the observer consists of the electrical part of the PMSM model and an additional correction loop. Different forms of correction functions are shown in the following equations.

According to the method presented in [13] it is convenient to use only first two electrical equations (1), in which the back EMF components are considered as disturbances. In such a case we can prepare an extended state formula, which can be described as:

where

For presented system it is possible to use ordinary Luenberger observer with correction based on error between measured and calculated currents value. Assuming that derivative of disturbances is equal zero one can write the equations describing observer (8).

or in matrix form

where K is a correction factor.

Such solution generates acceptable observer’s performance, however, a more accurate model was also taken into account [14].

The cost of that simplicity is required of the change of the observer’s corrector parameters settings due to operating point (*gain scheduling*). Modifying the observer's parameters as a function of velocity only is sufficient at this case. Its proper change is very important in the case where the speed range is wide. At that case (low speed), the corrector parameters may be constant. Otherwise a scheduling mechanism based on the fuzzy logic or artificial neural network should be used [14]. Because observer estimates back EMF values, to achieve position and speed information one can use that transformation:

where

Multiplication of observer error by constant coefficient **K** (9) gives the observer structure with proportional correction equation. To modify observer operation it can be proposed a more complex function of observer error **F[Δi]** instead of a proportional one. By analogue to designing ordinary controller of P, PI and PID structure, one can propose instead of proportional correction more complex operation like PI or PID. This leads to a new general concept of observer, which formula can be written as:

where **F[ Δi]** is a function of observer corrector. So, the correction function may be a sliding mode corrector [15], an integrated sliding mode corrector [16] or e.g. any other correction function based on integration. Such idea of the observer structure may be used for position estimation also in other types of motor, e.g. SRM [17].

In the case of the proportional-integral (PI) correction the observer equations take the following form:

On the basis of many simulation tests a more complex corrector structure with proportional-double integral (PII^{2}) correction was proposed [16]:

The advantage of introducing integral and double integral components of the observer corrector is that they ensure the astatic character of observation (parameters estimation) even during the transient speed process, in which fast changes of speed and reference currents occur – when the back EMFs waveforms are not in sinusoidal shape. The estimation of back EMF signals by the observer enables the calculation of the new values of the rotor speed and position from (10) and (11) at each step of algorithm realization. In fact, the observed signals (back EMFs) are still changing its values (sinusoidal wave) when motor isn’t at standstill and the astatic character of observer corrector is very important to follow up the position with small estimation error and small phase shift. The structure of the observer's parameters vector consists of six different elements due to symmetry of the equation (14) for current and back EMF calculation and the additional seventh k_{e}, which is used to scaling back EMF’s estimated amplitude into speed value (11). The observer’s structure is identical in both *α* and *β* component.

## 6. Observer parameters setting

The choice of observer parameters is an important task and should take into account dynamics in closed loop system as well as good accuracy of observation. The simulated drive is a compound object. Motor nonlinearity, discontinuity caused by the inverter structure and discrete structure of the control loop make it difficult to calculate the parameters of the observer. The solution presented in this paper is based on the special algorithm, which is used for automatic supervising the calculations, and after a certain number of cycles generates the results in form of the observer parameter set. The process of parameter synthesis was optimised by means on the base of random weight change (RWC) procedure [18] (Fig. 8). This algorithm is fast and insensitive to the local minimum of the optimized criterion. Depending on the value of the search step parameters, the effects of the algorithm performance that we get are like for gradient algorithm or evolutionary algorithm (Fig. 9), the possibility to quickly find a local minimum or in longer calculations the searching and finding the global minimum. The searching process is supervised by the quality index. The quality function of observer optimization is formulated as:

where e_{Θ} is the position estimation error, Δe_{Θ} is the range of the error value changes of the estimated position during the transient process, t_{1} and t_{1} + τ are the time boundaries of the integral calculation. The meaning of those parameters is explained in figure 10.

The optimization procedure is performing *off-line* by simulating a transient process (can also be performed *on-line* using real system, while motor drive is operating, in a case of significantly reduced range of coefficients change). According to the RWC procedure a new set of corrector settings is randomly selected at each step but only the set which gives estimation improvement (for quality index defined by (15) means smaller quality index value) is saved. In the procedure a dimension of search area (a range of randomly change of coefficient values) must be determined at each step. In the presented solution a wide area was assumed at the beginning of optimization process for fast quality index reduction and next at the final stage its dimension was reduced to achieve better accuracy. As a result of such *off-line* optimization a set of optimal values of corrector coefficients is found for the analyzed point of operation. If the speed is changed in a wide range, the modifying of the parameter set is needed. This procedure depends on search parameters, may be fast and insensitive to the local minimum of the optimized criterion. The optimization procedure may be performed *off-line* by simulating a transient process. The optimization procedure should be repeated for different points of operation, which were determined by the steady state speed value. At each step of optimization the transient process of the step response to speed reference changes in the selected point of operation was simulated, and during this process the value of the criterion was calculated. According to the RWC procedure a new set of corrector settings is randomly selected at each step but only the set which gives estimation improvement (smaller criterion value) is stored. In the procedure a dimension of search area (a range of randomly change of coefficient values) must be determined at each step. In the presented solution a wide area was assumed at the beginning of optimization process and next at the final stage its dimension was reduce to achieve better accuracy.

Because the optimization procedure of the observer parameters is based on random numbers generation, it is important to take care on proper initiation of that generator. It is very important to initiate generating values using such code:

rand('state', sum(100*clock))

It is used to eliminate the generation of the same values sequence, each time you start MATLAB.

## 7. Simulation results

The model of the PMSM control system was carried out in MATLAB Simulink ® environment. The motor was modeled with ordinary simplifying assumptions such as constant resistance and inductance in stator windings, symmetry of windings, and isotropic properties of motor (3, 4, 5). The motor model was connected with a model of a control system, which includes a vector control system of stator currents, a speed controller and a model of the analyzed observer (Figure 1). Drive model contains also a *d-*axis current control loop because even that current value is considered during sensorless mode operation.

The model of the observer was used as an element of feedback sending detected signals of rotor position and speed. The motor model was calculated with a very small step of integration, which simulates its continuous character. The step value was within the range of 0.02

Selected waveforms of speed, currents and position error are presented below. These images well illustrate the operation of observer compared with sensor mode. These waveforms were obtained as responses to the step change of speed reference, generated in the form of a step sequence starting from zero speed to 10 rad/s and to 5 rad/s at time 0.1 s. Motor load changes from zero to motor’s nominal load value at time 0.16 s. In addition, figures 11 and 12 show ±2 % range of reference value. Waveform 11 and 12 prove the well performance of sensorless mode drive at low speed – even at 5 rad/s. That drive still remains robustness on disturbance (rapid reference speed and load change). Enlarged part of figure 11 (Fig. 12) shows clearly the setpoint achieving process. Figures 13 and 14 show waveforms of currents in *q-*axis and *d-*axis respectively obtained for test such as at figure 11. One can notice the *d-*axis current value in sensorless mode isn’t close zero at transients – it is determined by temporary ripple in position estimation signal but the ripple quickly fades away. Figure 15 shows waveforms of the calculated position error (observer estimates only sine and cosine of the position). The steady state position error does not depend on motor load (which is seen at time 0.1÷0.2 s of that figure) but the operating point (determined as a motor speed). Presented in figure 16 sine and cosine of the estimated position waveforms proves that observer operates well at longer simulating time. Figures 17 and 18 present drive performance for additional difficulty: disruption of the “measured” phase currents by injection of the random signal. Reliable performance is considered even for such disturbance. Then observer was tested to determine its robust on inaccurate estimation of the motor parameters. Results are shown in figure 19 and table 1. For such system the parameters lower deviation range is about ±10 %. Motor parameters were stationary, only the observer’s parameters were changed with factors presented below. Certain robust on inaccuracy parameter estimation is noticed.

In observer | Position error [°] | |||

R factor | L factor | loaded 5 rad/s | unloaded 5 rad/s | unloaded 10 rad/s |

1 | 1 | 0.08 | 0.08 | 0.5 |

1.2 | 1 | 0.1 | 0.1 | 0.5 |

0.9 | 1 | 0.06 | 0.08 | 0.5 |

1 | 0.91 | -0.2 | 0.05 | 0.5 |

1.1 | 0.91 | -0.2 | 0.06 | 0.5 |

The final test was prepared to determine the robustness to the incorrect estimate of the initial position. The question was how big may be position difference between estimated and the real one, to prevent the motor startup. Tests have shown, that the possible range of the initial position error, for which the engine will start correctly, it is 80 degrees of arc (Fig. 24). Figures 20-23 show the sine and cosine waveforms of the estimated and the real shaft position. Corresponding to sine and cosine waveforms from figures 20-23, figure 24 shows the “measured” speed waveforms. The robustness on initial position error estimation is proven.

## 8. Conclusions

Stable performance of the sensorless drive with PMSM at low speed was noticed in the closed loop mode. Small position error and robust on inaccuracy motor parameter estimation were proven. The resistance tolerance is about 20 %, whereas inductance error tolerance is below 9 %. A wider range of resistance change could be achieved by using resistance observation. A test for robustness on the disturbance in the measured signal was passed: even a disruption of the phase currents by injection of the random signal does not disturb the performance of the sensorless drive. Such drive can achieve high dynamics according to the definition presented in abstract. Robustness to the incorrect estimate of initial position was also tested. The used PI controller discrete implementation gives possibility to use the same speed controller settings in both operating mode – sensor and sensorless. The sensorless drive using modified Luenberger observer gives possibility of the high performance of the high dynamic drive, where the “high dynamic” definition is introduced in this chapter. An additional effect of this work is to present the outline of how to create and how to operate the complex models of electrical motor drives in the context of the selection of model components of varying complexity which affect the calculation time and quality and accuracy of the results.

## Notice

Motor parameters:

stator inductance:L = 5.7 mH

stator resistance per phase:R = 0.7 Ω

total moment of inertia:J = 0.007273 kg m

^{2}

## Acknowledgement

This work was supported by grant N N510 325937.Appendix