1. Introduction
Every permanent magnet synchronous motor (PMSM) combined with the field-oriented control (FOC) represents one of the most efficient electro-mechanical systems. Keeping the efficiency on a high level comes at the expense of complex control algorithms that require the angular position of the rotor during the operation. The angular position of the rotor is obtained by a position sensor such as an encoder, a resolver, or a Hall sensor. Such a sensor requires additional space for mounting, proper wiring to avoid interferences with its surroundings, and increases the overall cost of the drive. For that reason, a sensorless implementation of the FOC is a step towards a reduction in costs of drives comprised of PMSMs and an improvement in their reliability. While the position sensor for some reason may stop working, sensorless algorithms work as long as the motor itself together with the power electronics is operational.
Sensorless observers of the angular position and speed of the rotor can be based on the voltage or the current model of the motor. They can be implemented either in the stator reference frame or in the rotor reference frame, although the combination of variables from both reference frames, as presented in [
1], is also feasible. This paper focuses on open-loop observers based on the voltage model in the stator reference frame whose governing variable for the calculation of the angular position of the rotor is the rotor magnetic flux linkage. Since the voltage equations of the motor in such observers are being integrated, most of the measurement noise is inherently filtered out. Another advantage comes from the fact that the amplitude of the rotor magnetic flux linkage is constant throughout the speed range up to the nominal speed, which ensures a constant resolution of the reference waveforms from which the angle is being calculated. The main challenge of implementing such an observer represents the compensation of the integrational drift caused by even the smallest DC offsets in the measured input waveforms and initial conditions at transient states that get accumulated by the integration. The requirement of the angular position of the rotor for the transformation of quantities into the rotor reference frame makes the stator reference frame the preferable choice.
A great majority of attempts to overcome the problem of the integrational drift has so far been addressed in the stator reference frame, mostly in applications with squirrel cage induction motors (SCIMs). The simplest approach with integrators is presented in [
2] by resetting them after every full electrical period based on the accumulated average value of the integrational drift. While this method works in steady states, its dynamics is severely limited because the accumulated integrational drift in a single period can become too large to be successfully compensated, which consequently results in instability. The integrators are typically replaced by low-pass filters (LPFs), which, from the standpoint of the transfer function, is equivalent to a high-pass filter (HPF) in a cascade with each of the integrators to attenuate DC offsets in the waveforms of the input voltage. From the results of such implementations presented in [
3,
4,
5,
6,
7,
8], it can be seen that the LPFs influence both the magnitude and the phase of the output waveforms of the magnetic flux linkage. While the influence on the magnitude above the cut-off frequency is practically negligible, the phase shift of the LPFs must be compensated because of its direct influence on the estimated angular position of the rotor. Lower values of the cut-off frequency reduce the dynamics as well as the error in the estimated angular position of the rotor, while its higher values have the opposite effects. Based on that notion, cascaded LPFs presented in [
9,
10] pass the waveforms of the input voltage through the filter whose cut-off frequency satisfies the required dynamics at the operating speed, while the phase shift is being compensated based on the time constant of the selected filter and the instantaneous value of the speed. Computationally more efficient solutions in the form of programmable LPFs with variable cut-off frequencies are presented in [
11,
12,
13,
14], where the dynamics can be improved by selecting a suitable ratio of the cut-off frequencies and the instantaneous speed. That also ensures a constant phase shift and, consequently, a constant error in the estimated angular position of the rotor that can be easily compensated through the entire speed range. Nonetheless, all methods mentioned so far require an additional compensation of the phase shift due to the native frequency response of the used LPFs. An attempt to mimic the transfer function of integrators by a combination of two LPFs is presented in [
15,
16]. Besides a relatively slow rejection of disturbances in transient states that, according to presented results, last between 0.5 s and 1 s from their occurrence, the proposed solutions apparently require a 32-bit implementation primarily due to Cartesian to Polar conversions that contain sums of squared values under square roots. Methods to estimate the magnetic flux linkage using pure integrators are proposed in [
17,
18,
19]. The method in [
17] presents a general solution to the problem of the integrational drift, while the methods presented in [
18,
19] focus on SCIMs at very low speeds. The method in [
17] exhibits limited dynamics due to its complexity. That can be seen from the presented step response, where the residual error persist for about 4 s after the occurrence of a transient state. The methods presented in [
18,
19] are essentially identical and so far the best solution to the problem of the integrational drift regarding the stated duration of transient states that ranges between 250 ms and 280 ms.
This paper addresses the problem of the integrational drift with a simple and straightforward solution based on orthogonal properties of the input and output waveforms of the integrators in the stator reference frame. While all the referred methods require some sort of optimization by the user, the solution presented hereafter requires no optimization due to its complete independence of the electrical parameters of the motor. Consequently, the proposed solution, unlike the referred methods based on LPFs, does not influence the amplitude or the phase of the resulting output waveforms in steady states. The clams stated here are supported analytically and experimentally in the following sections.
2. The Electrical Angular Position and Speed of the Rotor
A PMSM can be characterized by its voltage equation expressed as a function of the torque angle (
) and time (
t). Accordingly, the spatial phasor of the stator phase voltage projected onto the stator reference frame (
) can be expressed in terms of the per-phase stator electrical resistance (
), the spatial phasor of the stator electrical current projected onto the stator reference frame (
), and the spatial phasor of the stator magnetic flux linkage projected onto the stator reference frame (
) as
By starting from the right-hand side,
is defined via the base of natural logarithms (e) and the imaginary unit (j) in terms of the magnitude of the fundamental harmonic of the stator electrical current (
), the electrical angular position of the rotor (
), and
as
To account for the magnetic saliency of the rotor,
is defined in terms of the products of the mean stator inductance (
) with
and the second harmonic of the stator inductance (
) with the complex conjugate of
(
) with an addition of the rotor magnetic flux linkage constant (
) as
where the last two terms on the right-hand side vary with
. Additionally,
can be expressed in terms of the direct synchronous inductance (
) and the quadrature synchronous inductance (
) as
and
as
Since
determines the spatial distribution of the magnetic field within the machine, it is the reference variable. For that reason, the phase shift of
with respect to
(
) needs to be included in
, which is defined via the magnitude of the fundamental harmonic of the stator phase voltage (
) as
By equating the real parts of Equation (
3), which include the direct component of
(
) and the quadrature component of
(
), the direct component of
(
) is obtained in the form
while doing the same with the imaginary parts of Equation (
3) gives the quadrature component of
(
) in the form
The relationship between
and the spatial phasor of the stator electrical current projected onto the synchronous reference frame (
) defined as
allows Equation (
7) to be rewritten in terms of the direct component of
(
) and the quadrature component of
(
) to the form
as well as Equation (
8) to
According to the relationship defined by Equation (
9),
can be expressed in terms of
and
as
and in terms of
and
as
By substituting Equation (
12) into (
10), while combining
and
according to Equations (
4) and (
5), the direct component of
(
) based on Equation (
1) is
Similarly, by substituting Equation (
13) into Equation (
11), while expressing the inductances in terms of
and
according to Equations (
4) and (
5), the quadrature component of
(
) based on Equation (
1) turns out to be
From Equation (
14), the direct component of the extended rotor magnetic flux linkage (
) can be defined as
while the quadrature component of the extended rotor magnetic flux linkage (
) can accordingly be defined from Equation (
15) as
Although Equations (
14)–(
17) include field weakening, for the purposes of this paper, it is sufficient to observe the speed range up to the nominal speed in which case
, or equivalently
, which means that Equations (
1)–(
17) can be observed only as functions of
t. Thus,
can be expressed as
and
as
The instantaneous value of
can be calculated from the instantaneous values of
and
via the four-quadrant inverse tangent function as
Since the electrical angular speed of the rotor (
) is determined by the rate of change of
, the instantaneous value of
is defined as
An observer of
and
for the flux-based sensorless FOC of PMSMs can therefore be constructed by combining Equations (
18)–(
21), as is shown by the block diagram in
Figure 1.
The simplicity and filtering properties of the integrators make this observer highly desirable, especially in low-cost applications, but the integrational drift represents its major obstacle in practical implementations. The overall block diagram of the sensorless FOC is given in
Figure 2 ito show how the input values of the observer from
Figure 1 are obtained, and how its output values are used within the control system.
2.1. The Problem of the Integrational Drift
The integrational drift is caused by DC offsets in the direct integration voltage (
) and the quadrature integration voltage (
), shown in
Figure 1, where each DC offset is composed of two components. One component represents measurement DC offsets introduced by improperly calibrated current sensors, which in any practical implementation of the FOC must be negligibly small, while the other component represents initial conditions of the corresponding input waveform at each transient state. Since instantaneous values of
and
in the speed range up to the nominal speed can be observed as functions of time, they need to be expressed according to Equation (
21) by rearranging it to the form
from where
in steady states can be expressed as
For the purpose of presenting the problem, it is sufficient and at the same time simpler to consider the steady state case presented by Equation (
23). Hence,
can be expressed from Equation (
6) in terms of a DC offset in
(
) and the magnitude of the fundamental harmonic of
(
) as
and similarly,
can be expressed in terms of a DC offset in
(
) and the magnitude of the fundamental harmonic of
(
) as
Based on Equation (
2),
can be expressed in terms of a DC offset in
(
) and the magnitude of the fundamental harmonic of
(
) as
while
can be expressed in terms of a DC offset in
(
) and the magnitude of the fundamental harmonic of
(
) as
From Equation (
18), based on Equations (
24) and (
26),
is expressed as
while
is expressed from Equation (
19), based on Equations (
25) and (
27), as
After the integration of Equation (
28),
is obtained in the form
while the integration of Equation (
29) results in
in the shape
From Equations (
30) and (
31), it can be seen that
,
,
, and
constitute the integrational drift that is initially offset by the initial conditions
(0) and
(0).
2.2. A Solution to the Problem of the Integrational Drift
Under the assumption of a balanced three-phase power supply,
and
holds true. Following that notion, a compensation of the integrational drift can be introduced on the basis of the orthogonality between
and
as well as
and
. The idea of a solution to the problem of the integrational drift can be introduced in several steps. By comparing Equation (
29) with Equation (
30), the correction of
(
) can be defined in terms of the value of
directly on the output of the integrator (
) as
where
, due to integration, is required to scale
to the level of
. Since
and
and
are required by the FOC to be negligibly small, the integrational drift in
is compensated by subtracting
from Equation (
30). Following the same reasoning, the correction of
(
) can be obtained based on Equations (
28) and (
31) in terms of the value of
directly on the output of the integrator (
) as
By considering
and taking into account the requirement of the FOC for negligibly small values of
and
, the integrational drift in
is compensated by subtracting
from Equation (
31). Despite the compensation of the integrational drift in
and
, the integrators can still saturate. For that reason it is necessary to introduce the correction of
(
) in the form of
which needs to be subtracted from
, together with the correction of
(
) that is similarly defined as
and as such needs to be subtracted from
. While the idea behind Equations (
32) and (
34) should be clear, the idea behind Equations (
36) and (
37) may not be. Thus, for an easier understanding, the proposed compensation of the integrational drift based on Equations (
32)–(
37) is presented in the form of the block diagram in
Figure 3.
The idea behind Equation (
36) can be explained by the block diagram in
Figure 3 in terms of a DC offset in
(
) at
by assuming
, starting from
, and making a full loop as:
⇒
⇒
⇒
⇒
⇒
⇒
⇒
. As it can be seen,
gets inverted and cancels itself. The idea behind Equation (
37) can be explained in a similar way in terms of a DC offset in
(
) at
by assuming
and starting from
as:
⇒
⇒
⇒
⇒
⇒
⇒
⇒
. As expected,
gets inverted as well and cancels itself. Therefore, Equations (
32)–(
37) constitute the proposed compensation of the integrational drift that, besides the effects of integration, does not have any additional influence on the amplitude nor the phase of the fundamental harmonic of
and
in steady states, if the assumption of a balanced three-phase power supply holds true.
2.3. A Characterization of the Proposed Compensation
From the definition of the problem presented by Equations (
28)–(
31), it is clear that the proposed compensation of the integrational drift completely eliminates the integrational drift in steady states without affecting the amplitude nor the phase of
and
. To avoid causality-related problems that might arise depending on the implementation,
can be precalculated by substituting the phase angle of
(
) that can be obtained from the instantaneous values of
and
as
instead of
in Equation (
21), as is shown in
Figure 3.
The equivalent steady state representation of the system in
Figure 3 in the Laplace domain is shown in
Figure 4 in the form of the block diagram that can be used for a characterization of the proposed compensation. The system in
Figure 4 can be algebraically described by the following equations:
which can be combined into the closed-loop system
that relates each of the two outputs to the two inputs of the system.
The frequency response of each output in relation to the corresponding input can be obtained by observing the system as multiple single input–single output systems, where each output is described by the corresponding transfer function with the observed input. Since the transfer function between
and
according to Equation (
47) is identical to the transfer function between
and
, that is
they share the same Bode plots shown in
Figure 5 whose characteristic represents an adaptive second-order HPF with the cut-off frequency and the gain determined by the value of
, and the added phase shift of
in comparison to the standard second-order HPF.
Analogously, the transfer function between
and
is
while the transfer function between
and
is
The common Bode plots of
and
are shown in
Figure 6.
They show that the frequency response of each output in relation to the opposite input resembles the standard first-order HPF with a small rise just below the cut-off frequency, which is also the gain determined by the value of . The only difference between the two transfer functions can be seen in the phase plot as the extra phase shift whose sign is determined by the sign of .
Transient states in the system caused by the integrational drift can be analyzed in the time domain by multiplying each of the transfer functions by the Laplace transform of the unit step function, taking the inverse Laplace transform of their product, and adding up the orthogonal components of the same output. Thus, the component of the integrational drift in
imposed by
in the form of the step function, that is
and constant for
and
is
The integrational drift imposed by
, for
and constant for
, on
for
is
Based on Equations (
51) and (
52), the total integrational drift in
is defined as
and graphically presented in the plot in
Figure 7.
Equivalently, the component of the integrational drift in
imposed by
in the form of the step function, that is
and constant for
and
is obtained in the form
while the integrational drift imposed by
on
, for
and constant for
, is
Based on Equations (
54) and (
55), the total integrational drift in
is expressed as
and graphically presented in the plot in
Figure 8.
The relative scaling of the axes in
Figure 7 and
Figure 8 show that the duration of each transient state of the proposed compensation of the integrational drift is inversely proportional to
. The exponential function
in Equations (
51), (
52), (
54), and (
55) determines the duration of each transient state and therefore ensures that a minimum of 95.68% of the integrational drift introduced by
and
is filtered out from
and
already after the first electrical period of the observed transient state.
3. Simulation Results of the Proposed Compensation
Two simulations of the proposed compensation of the integrational drift, without the rest of the control system and direct relations to possible states of the drive, were made in MATLAB Simulink using the block diagram shown in
Figure 9 to demonstrate its overall performance as well as to avoid the analytical derivation of the response for sinusoidal waveforms.
In
Figure 9, the derivative of
filtered by an LPF represented by the
block in
Figure 9 is implemented in terms of an integrator and the cut-off frequency of the LPF for filtering
(
) based on the transfer function
Since the
block gives values in the range from
to
inclusive, the output angle of the integrator is wrapped to the same range as well as the resulting error signal via the
branch. To prevent the case of division by 0, a negligibly small value
is added to
. The results of the first simulation presented in
Figure 10 show sudden steps in the amplitudes of
and
with the resulting waveforms of
and
at the constant value of
of
.
The decaying transients visible from the time of 4.5 s onward when
and
drop to zero are essentially the transients in
and
presented in
Figure 7 and
Figure 8. The results of the second simulation presented in
Figure 11 show a step in
from
to
, where the amplitudes of
and
after the initial time of 0.5 s are kept constant.
In
Figure 10 and
Figure 11, the sudden changes in
and
are imposed by Equations (
32) and (
34), while the remaining transients are introduced by the corrections described by Equations (
36) and (
37).
A Comparison of the Proposed Compensation with Referred Methods
For the purpose of a qualitative comparison of the proposed method with the state of the art, two methods were selected. The first method is the method common to [
18,
19] presented by the block diagram in
Figure 12. The second method represents the standard method with LPFs presented in [
3,
4,
5,
6,
7,
8], where the integrators in
Figure 1 are replaced by LPFs.
The results of a parallel simulation of the three methods for a sudden step in the amplitudes of
and
at
are presented in
Figure 13.
From the results presented in
Figure 13, it can be seen that the proposed compensation has the fastest response. The dynamics of the method by Holtz and Quan can be adjusted by the
k block, where higher values give faster response but introduce a phase shift in the resulting waveforms of
and
. The LPFs serve for filtering of the estimated integrational drift that can be limited by the saturation blocks. The downside of the method by Holtz and Quan is the requirement of the reference value of the magnitude of the stator magnetic flux linkage. The dynamics of the method with LPFs is completely determined by the cut-off frequencies of the filters that also influence the amplitudes of
and
, and a certain phase shift always exists if it is not adequately compensated.
4. Experiment Results of the Sensorless FOC with the Proposed Compensation
The proposed compensation of the integrational drift was implemented as a part of the observer presented in
Figure 1 on a Texas Instruments TMS320F28335 digital signal processor (DSP) and successfully tested on a motor whose parameters are given in
Table 1.
The test motor was chosen based on its relatively small size and thereby small mechanical time constant that makes it highly dynamic. The sensorless FOC of such motors is generally difficult, especially without any load in the low speed range.
The top plots in
Figure 14 show the estimated waveforms of
and
obtained without any load at
(left) and
(right), wherein the bottom plots show the corresponding estimated values of
.
Instead of comparing
with the actual electrical angular position of the rotor (
) obtained by the encoder, the performance of the proposed compensation of the integrational drift can be observed more conveniently via the error in
(
) defined as
Besides
, for presenting measurement results, it is also convenient to show the actual speed of the rotor (
). Since
is typically expressed in
, the estimated counterpart of
(
n) is obtained in terms of the number of pole pairs (
) and
as
The major issue in practical applications of sensorless algorithms that do not utilize a high frequency current injection with a heterodyne filtering technique is the startup process which requires the knowledge of the spatial angular position of the rotor magnetic field. This is especially true in the case of PMSMs whose rotor magnetic field, in contrast to SCIMs, is spatially fixed to the mechanical angular position of the rotor. A startup is typically performed by aligning the direct axis of the rotor with the magnetic axis of the phase A and then injecting a certain value of the current in the direction of the quadrature axis of the rotor, while slowly increasing in the form of the ramp function. That way, the rotor is spun up to a certain speed at which the sensorless algorithm takes over. The first problem with this approach is that the value of the current is unknown and dependent on the load. If the current is set to its nominal value, the induced magnetic field is usually misaligned with the direct axis of the rotor, which results in a reduced value of the electromagnetic torque (). The second problem is the speed of acceleration that should not be too fast so that the rotor does not lose synchronism. The third problem is the transition between the startup and the sensorless algorithm, which due to the differences in and the amplitude of the current is often noticeable.
The proposed compensation of the integrational drift enables nearly a smooth startup from a standstill, as shown in
Figure 15, while in the case of the loaded motor, the startup from a standstill is rather abrupt, but still possible, as can be seen in
Figure 16.
The plots on the left side of
Figure 15 show the values of
and
n obtained during the acceleration from
to
within 1 s, while the plots on the right side show the values for an equivalent acceleration within the time-span of 10 s. From the presented data, it can be seen that the noise in
n caused by the higher initial values of
has little influence on
due to the inertia of the rotor. In addition,
shows that the uncertainty of the actual angular position of the rotor practically vanishes within 0.5 s.
Figure 16 presents the measurement data of the reference speed of the rotor (
),
,
n,
, and
, during the linear acceleration from
to
under the load torque of 90% of the nominal torque (
) as well as the intermittent periodic loading at
. While the first and third plots show the same variables presented in
Figure 15, the second plot shows
calculated based on
as
From Equation (
60), it can be seen that
is proportional to
, which also explains the delayed startup. Since the load torque between 0 s and 35 s is 90% of
, the initial current is not sufficiently high to create
that can overcome it. The current therefore rises until about 9 s when
overcomes the load torque and the rotor starts to spin. The sudden increase in
n, and consequently in
, is the result of the speed ramp that begins to rise at 1 s whose value at 9 s is approximately
. The plot of
between 1 s and 9 s resembles the bottom plots in
Figure 14, but looks like a random noise due to a limited number of samples that can be fetched by the used hardware. The observer is able to generate values of
and
due to the fact that all the necessary variables for the proposed compensation of the integrational drift are obtained from
and
, which are initially available. A smoother startup under a load can be achieved by setting a small reference of
n and allowing the current to rise until
is sufficiently high to overcome the load torque. From the time period between 35 s and 60 s, when the motor is intermittently periodically loaded at
, it can be seen that, despite the rapid changes in
n, whose peak values are about
,
is within peak values +3.06° and −4.8° with the mean average value of +0.18°. A reversal of the unloaded motor from
to
within 2 s and in the same time-span from
back to
is presented in
Figure 17.
A small difference between
and
n is noticeable only around zero when the distortion in the waveforms of the voltage and the current caused by a limited resolution of the measurement sensors and quantization errors increase the uncertainty of knowing the actual angular position of the rotor. The positive peak of
is +47.95°, which within 0.31 s falls below 10% of its value, while the negative peak of −47.61° becomes smaller than 10% of its absolute value within 0.21 s. The dynamics of the proposed compensation is demonstrated in
Figure 18 by applying the step in the speed from
to
to the unloaded motor.
From the waveforms of and it is visible that the transient state is slightly longer than theoretically predicted due to limitations in the practical implementation of the pure differentiator used for obtaining from , which, because of the white noise, requires a cascaded LPF whose cut-off frequency in the presented measurement was set to the electrical equivalent of the nominal value of n of the motor. Nonetheless, the resulting dynamics is exceptionally good, considering that the peak value of of 32.08° falls below 10% of its value within 24 ms.
It is important to mention that the measured values of as well as were only used as reference values to demonstrate the performance of the proposed compensation of the integrational drift.