Current and voltage shaping method via modified d – q transformation for the torque ripple compensation in PMSMs

: This study deals with a novel control strategy for permanent magnet synchronous machines (PMSMs) to incorporate disturbance compensation features in the existing current controller maintaining at the same time the integrity of the reference tracking performances. The torque produced by a PMSM arises from the interaction of stator currents and rotor magnetic flux, therefore an intrinsic disturbance is propagated to the output, in case the flux is not perfectly sinusoidal. In particular, the authors focus is to propose the effective correction of undesired harmonic effects generated on the torque from the non-ideal machine rotor. With the knowledge of the back electromagnetic force waveform, it is possible to determine the current waveforms necessary to produce a smooth torque in normal operation and through model-base considerations, the required voltage harmonic waveforms are also computed. The method is also extended to the flux weakening operation of the machine. The analytical solutions found are used in place of the classical αβ / dq transformations, without modifying the field-oriented control performance of the main controller. The effectiveness of the proposed control scheme is verified by means of test-bench measurement.


Introduction
Emerging environmental problems are pushing the market of electrical vehicles towards a leading position in the automotive and transportation field. This poses new and challenging issues into the research and the design of the electrical power trains, which were in general hardly considered in the past. Yet, even though wellestablished methods for e-drive control are available, increasing integration of components and demand for new features, drive the need for more advanced control functionality. Efficiency and reliability over the extended operative range of the electrical motor are key features in specific fields of technology as for example automotive. In these fields, manufacturing and economical reasons often lead to machines with strong non-idealities which are potential source of disturbance. For instance, the choice of V-shape magnets allows to greatly increase the power density of the motor, but causes a larger harmonic content in the air-gap flux distribution waveform and so an additional disturbance in the back electromagnetic force (BEMF) and torque. For this and other reasons, an elevate ripple could be present in the torque and current waveforms producing undesired vibrations and noise [1,2]. Despite these and other aspects, the control should guarantee high performances complying with specifications during the drive operation. The harmonic issue for this kind of machines is well known since many decades [3,4] and already several solutions have been proposed [5,6]. Fundamentally, there are two ways to manipulate the harmonic behaviour of the machine: adopting iterative feedback routines or deploying feed-forward solutions based on the nature of the harmonic disturbance. In [7], the authors propose an adaptive control algorithm for rejecting specific harmonics on the position of a servo motor. Again, in [8], a resonant controller is designed for mitigating speed oscillation and in [9] conditions for reducing torque harmonics are met combining estimation techniques and a feedback harmonic injection algorithm. Unfortunately, the majority of them rely on rather complex control structures which reduce the potential practical implementation in commercial drives [10,11]. Moreover, the harmonic injection is commonly imposed as a current reference, requiring to design a suitable current control for tracking highfrequency signals [12,13], especially for variable frequency high speed drives. Another suitable alternative, in place of injecting harmonics in feedback approaches, comes directly through modelbased considerations. In [14], the authors developed an extended version of the Park transformation in order to compensate torque harmonics and also in [15] a similar method is followed for driving the machine with specific non-sinusoidal currents with further considerations on losses impact. Although, the proposed strategies show interesting features, they are limited to the application of surface-mounted permanent magnet synchronous machines (SM-PMSM) in their normal operation. The purpose of this paper is to propose a more general feedforward method for driving the machine under non-sinusoidal voltages considering the full operation range; the compensation is achieved through the knowledge of the BEMF. The paper is organised as follow: Section 2 provides a mathematical model of the PMSM both in stator and rotor reference frame. Moreover, the classical transformations are introduced. Section 3 proposes a method to shape the current and the voltage for obtaining a smooth electromagnetic power/torque. In Section 4, the solution is extended to flux weakening operation and in Section 5 the overall control strategy is depicted. Finally in Section 6 a test-bed measurement confirm the effectiveness of our proposal.

Mathematical background
In this section, the development of the mathematical model of a PMSM in the stator and rotor reference frame is derived. The permanent magnet synchronous motor is a three-phase AC machine with windings usually star connected and displaced 120°e lectrical degrees in space. For simplification, in this treatment the iron saturation and the position dependency of the inductances are not considered. The only focus of our work is devoted to the BEMF non-sinusoidal pattern.
An overview of the coordinate transformations commonly used in the study and the design of control strategies in PMSM is shown in Fig. 1.
In Fig. 1, θ r and ω r denote, respectively, the angular mechanical position and velocity of the rotor respect to the reference on the phase a on the stator. The machine sketched in Fig. 1  pole pairs z p , the electrical rotor position and speed can be computed as

Stator reference frame
In general, the physical three-phase winding system distributed with 120° between each phase can be simplified with a linear transformation, leading to a two-phase system 90° shifted. The transformation from three-phase to two-phase quantities can be written in the matrix form as where S a , S b , S c denote a general signal in the original three-phase reference frame, while S α , S β are the two-phase orthogonal space phasors after the transformation. The choice of the constant 2/3 in (2) is intended for maintaining unaltered the signals magnitude across the transformation, although from a power perspective, in order to be consistent, the constant need to be added as a reciprocal factor. The inverse relationship is written as Transformation (2) and (3) are also known as Forward and Inverse Clarke transformations.

Rotor reference frame
The idea of the rotor reference frame transformation is to attach the rotating time-dependent signals in the α−β coordinate to a system which forms a rigid body with the machine rotor. In order to obtain this, the variables are transformed into a reference frame rotating at the electrical angular speed ω e ; thus fundamental frequency signals component and inductances will no longer depend on rotor position, becoming constant quantities. Since the transformation arises in an ideal context, where all the original signals are purely sinusoidal, the relationship between rotor and stator reference frames is described as follows: where S d , S q form the d-q two-phase orthogonal stationary phasors space. The elimination of position dependency from the machine variables is the main advantage. The inverse rotation, to transform from the rotating to the stationary reference frame is straightforward Transformation (4) and (5) are also known as Forward and Inverse Park transformations.

Model of a PMSM
The stator windings consist of individual coils connected and wounded in different slots, so as to approximate an ideal sinusoidal distribution, for minimising the space harmonics. In Fig. 1, they are depicted as single coils together with their resultant magnetic axes. The electrical dynamic equations in the three-phase stator reference system can be written as v abc = Ri abc + d dt λ abc (6) where u abc are the terminal voltages, i abc are the phase currents, λ abc are the flux linkages and R is the winding resistance. The fluxes include both stator excitation and rotor magnets contribution, which can be described as with L = L aa L ab L ac L ab L bb L bc L ac L bc L cc and where L and γ i are denote, respectively, the self-and mutualinductances coupling of the stator windings and the spatial angle between the three phases in radians. Mutual inductances are considered symmetric and self-inductances are supposed identical; the permanent flux produced by the rotor magnets is denoted by λ pm . The electrical input power can be represented as Applying the sequence of transformation (2) and (5) to (6) we can derive the classic d-q model [16] as where the fluxes are expressed through with L d , L q the d and q synchronous inductances. It is implicitly considered that the d − q inductances are directly derived transforming opportunely the matrix L in (7). The classic d − q model of a PMSM is based on a linear model of linkage fluxes (10) and it does not consider any rotor flux harmonic and crossmagnetisation effect. Therefore, eventual power and torque pulsating modes due to non-ideal rotor configuration are not taken into account. The instantaneous power can be derived from (8) For completeness, we should mention that the power equation also holds in the α−β reference system, in fact It should worth mentioning that the instantaneous power equations are valid also without the hypothesis of pure sinusoidal signals. Finally, from the voltage (9) and power (11) the expression of the electromagnetic torque in d−q can be represented as follows: In case L d = L q , the machine reduces to an SM-PMSM and the reluctance contribution to the torque is zero.

sin 2 -cos 2 method
The purpose of this section is to demonstrate how it is possible to determine a current pattern which guarantees smooth electromagnetic power and consequently torque. With this scope, we will consider a trapezoidal BEMF as an extreme benchmark situation. Supposing an ideal SM-PMSM driven only through the q-axis current, with purely sinusoidal BEMF, from (12), the instantaneous electromagnetic power can be computed as where e α , e β represent the machine BEMF in α−β coordinates. Fig. 2 shows the resulting constant power. On the contrary, if we consider the case of a trapezoidal BEMF, computing the instantaneous electromagnetic power, the resulting function will incorporate a pulsating mode. In particular, for a three-phase AC machine, there are always present modes proportional to the sixth electrical order [1]. It appears clear from Fig. 3, where again the BEMF and the currents are plotted in the α−β reference frame.
Since the pulsating pattern of the power displayed in Fig. 3 is directly proportional to the one within the torque [9], if we achieve smooth power shaping opportunely the currents, we can compensate this effect also in the machine torque. In the ideal case with sinusoidal BEMF, from (14) can be deduced the following fact: In fact, since the induced voltage and the current are aligned for producing the maximum torque per ampere and they are sinusoidal signals, the latter proportion (15) holds true. Therefore, in case of the trapezoidal BEMF, the α−β currents can be shaped opportunely to force a smooth power function as follow where the appendix q denotes the fact that these current shapes are related to the q-axis current, which is the torque producer in this case. In Fig. 4, the resulting currents and power are shown. The pulsating power is clearly mitigated; eventual imperfection are given by the fact that from (16) some high order harmonics need to be filtered out for practical implementation; thus a perfect analytical compensation cannot be reached. Once the currents are computed from (16), it is necessary to derive the commanded voltage required to produce that specific current shape into the machine and this can be done exploiting the model presented in (9). For simplicity, we decide to neglect the resistance voltage drop term Ri and consider only the cross-coupling of the flux between the d-q-axis. Physically, the voltage on the d-axis is controlled proportional to the effect of the flux linkage produced by the q-axis current; therefore transforming the voltage from the rotor reference frame to the stator frame it is possible to write the following: which in an ideal SM-PMSM, this could be simply seen as a classical αβ/dq transformation as shown in (5), where v^d = ω e L q i^q is the peak required voltage in d-q and d/dt i α q and d/dt i β q are nothing else that the transformation terms cos(θ e ) and sin(θ e ) associated to the d-axis voltage component. Having validated the latter fact, it is now possible to determine the qualitatively shape of the α−β voltages, contribution of the q-axis current, in the nonideal case, simply applying the derivative of the non-sinusoidal current shapes determined with (16). The resulting normalised voltage functions are shown in Fig. 5. It is interesting to notice that the price to pay for driving the machine with a reduced torque ripple is a heavy voltage distortion, which can lead to other drawbacks. Moreover, the harmonics are proportional to the magnitude of the voltage required, thus they amplify their values proportionally to speed and load and careful considerations on the voltage limitation of the power electronics should be carried out.

Extension to the flux weakening operation
As far we derived the conditions to guarantee the compensation of BEMF harmonics for producing smooth electromagnetic power and torque, in an exemplary case of a trapezoidal shape. However, it must be also considered the contribution of the d-axis current, in case the same SM-PMSM is operating in flux weakening. In the latter condition, a negative d-axis current is in general injected in order to counteract the effect of the rotor flux and reduce the nominal value of the BEMF, keeping the machine operating within the voltage limitation. Qualitatively, in this situation, we should be able to guarantee that the d-axis flux contribution of the stator excitation does not modify the harmonic content of the rotor flux. If this happen, the q-axis current solution found in (16) holds either if the machine operates in normal condition or in flux weakening; therefore smooth torque is guaranteed along the full operative range of the drive. Keeping in mind that, whether it is worthy to drive the motor under harmonics at high speed or not, it is another issue, which is not regarded in this context. Through the knowledge of the BEMF shape and considering that in the fieldoriented control the d-axis current directly interacts with the permanent magnet flux, this behaviour can be mathematically described with the following hybrid equation: Again, (18), from an ideal point of view compute the total flux, contribution of q-axis voltage, in αβ/dq from the direct integration of BEMF e α , e β and add the transformed contribution of the d-axis flux, from dq to αβ, where i α d and i β d functions can be seen, respectively, as a cos(θ e ) and sin(θ e ), in case also the BEMF are purely sinusoidal. It appears clear that from (18), if we have a trapezoidal BEMF with a corresponding not purely sinusoidal flux, the functions i α d and i β d have to match the rotor flux shape in order to do not change the shape of the total flux. Therefore, through the intuition of (18) it follows where e^α and e^β are the peak value of the BEMF in α−β in order to normalise the resulting functions. In Fig. 6, the computed currents for a trapezoidal BEMF are shown and due to the integration effect they tend to be almost sinusoidal. Applying now the same reasoning used for calculating the required voltages in (17) through the d-q model expressed in (9), it is possible to write where, this time, the appendix q means that the computed α−β voltages are contribution of the q-axis voltage equation, in which our BEMF and flux weakening d current act. Substituting (18)  In Fig. 7, the voltages v α q , v β q for the trapezoidal BEMF are reported.

Overall control strategy
In the previous section, a detailed analysis of the current and voltage shapes required to guarantee a smooth torque has been carried out. Qualitatively, if the target is the compensation of the BEMF harmonics for having a reduced torque ripple, it is necessary to apply a voltage from the controller, which is a linear combination of the solutions found, respectively, in (17) and (20). The latter comes in a natural way if the calculated voltage functions, respectively, v α d , v β d , v α q , v β q are embedded within the αβ/dq forward transformation (5). This means that, instead of using the classic al forward Park transformation (5), the new one will take the form of and since the calculated functions are all normalised, they are a legitimate substitution of the cos(θ e ) and sin(θ e ) of the original transformation. Furthermore, since we know exactly which is the shape of the current flowing into the machine using the transformation (23), a changing in the Inverse Park transformation for the feedback currents can directly allows the decoupling of the harmonics; thus leading to a perfectly constant signals within the main field oriented controller, which is one of the remarkable benefit of using this technique. Assuming constant d-q current for the forward current transformation holds the same of (23), that is The latter transformation can then be inverted, leading to with With transformations (23) and (25), in Fig. 8 it is now possible to portrait the overall control strategy. The harmonics are injected and decoupled in the way that the main controller does not see the effect and acts just on the nominal constant values of the currents as it would be for the control of an ideal machine.

Validation
Finally, in this last section, in order to proof the validity of our proposal an experiment is conduced at the test bench using dSPACE DS1005. The machine under test is an unskewed SM-PMSM motor. For this reason, the torque harmonics cannot be completely compensated, in fact besides the ripple contribution of the flux harmonics, which is taken into account by the new controller, also the cogging torque is present and produces torque ripple as well. Due to limited torque sensor bandwidth, the test presented hereafter are conduced at a fixed speed of 300 rpm, in particular we want to compare two cases, where the steady-state behaviour of the machine is examined: • A − the motor runs under classical field-oriented control; • B − the motor runs with the new transformations for mitigating torque harmonics.
The field-oriented control is composed of a standard proportional integral controller for the d-q-axis and a SVPWM with a switching frequency of 10 kHz. The results are presented in Fig. 9, where FOC and MOD stand, respectively, for the operation with the classical and the modified transformations. Clearly, the imposed voltages and currents to the machine are able to strongly reduce the torque ripple, in particular the 12th electrical pulsating mode, which appears to be the most relevant in the torque for this machine.

Conclusions
In this work, a novel way to formulate and tackle the BEMF disturbance for permanent magnet synchronous machine has been presented. Using the simple knowledge of the BEMF shape, we have shown how to determine opportunely specific current and voltage patterns for mitigating the ripple in the torque. The resulting functions are embedded within a re-defined back and forth Park transformation allowing a direct Plug-and-Play method for pre-existing field oriented controllers.