A Variable Frequency Angle-Based Repetitive Control for Torque Ripple Reduction in PMSMs

This paper presents a novel method for torque ripple reduction in PMSM drives at variable speed, using a combination of angle-based repetitive control and deadbeat current control. Based on the internal model principle, repetitive control is capable to reduce periodic torque ripple by generating a compensating action that consequently need to be synchronized with the original ripple. The time to angle, angle to time conversions for repetitive control, which improve both the stability and the performance when the sampling frequency is not integer multiple of the speed, are presented. A transient detection strategy is also developed to allow a stable torque ripple reduction even during speed and load changes.


Introduction
Torque ripple reduction in permanent magnet synchronous machines (PMSMs) has been studied for decades.Using traditional vector control, since the output torque of the machine can be expressed as a function of current, many of the existing torque ripple suppression methods reduce torque ripple by introducing a tailored compensating periodic current ripple [1][2][3][4][5].In some cases, current references are generated by lookup tables computed from measurements [6].In any case the bandwidth of the current loop should be high enough to track such current references, which may contain high frequency components.
Besides, since torque ripple is mainly periodic [7], repetitive control (RC) can be a very powerful solution for periodic torque ripple reduction or periodic current references tracking, depending on where the repetitive controller is located.For example, repetitive control can work in conjunction with normal PI controllers in current loops to remove errors between periodic current references and current feedback [8].Alternatively, the repetitive control can be placed in the speed loop where the controller can use the speed error [9][10] or the torque error [7,11] as an input producing periodic current references.Among these two methods, the latter one may be preferred to avoid computing current lookup tables.It is also to be noted that the values of periodic current references relate not only to the rotor position, but also to the level of saturation and parameter variations of the machine.It is therefore difficult, time and resource consuming to derive the right lookup tables for the different expected working conditions.
Repetitive control has been applied successfully for torque ripple reduction in some existing works in scientific literature [7,[9][10][11].RC is effective on reducing any periodic torque ripple without necessarily knowing the machine parameters, no matter the ripple is caused by cogging torque, inverter nonlinearities [12], flux harmonics, current offset, current scaling error, or mechanical unbalance.
However, the knowledge of the frequency of torque ripple is necessary for a time-domain RC to maximize disturbance rejection.The time-domain RC would need to realign its memory length to the new period of the repetitive torque ripple each time the speed is changed.For this reason, the memory content should be reset and a new learning process should be started since the phase of the periodic disturbance is not maintained among speed changes.
Considering that PMSMs are very often used as variable speed drives and the torque ripple is in fact periodic with respect to rotor position, [10] presents an angle-based RC which works effectively within a limited variable speed range of 50 rpm to 70 rpm.
In the angle domain, the frequency of the previously described torque disturbance is fixed and the controller memory does not need to be resized when the speed is changed; the phase of torque disturbance due to cogging torque and flux harmonics within a full electrical rotation are marginally affected by the speed and by saturation conditions.Therefore the RC should learn only the amplitude variation of the torque disturbance as a consequence of a speed/load change and parameter variations.
The latter consideration can be extended to torque disturbances due inverter non-linearities, current offset or scaling error if the current angle is kept constant as usually happens in case of surface PMSMs when controlled at zero direct current to minimise losses.However, none of these papers considered that conventional PI current control may need to be replaced by other high bandwidth current control where torque ripple reduction is demanded at high speed.Besides, the interaction between the speed loop PI controller and the repetitive controller should be considered for better performance.Also torque ripple reduction has been proved effective only for a reduced range of low speed.
Moreover, synchronization issues between the targeted system torque and the injected RC compensating action at largely variable speed, arising from the use of the speed feedback loop for torque ripple compensation, have never been addressed in any scientific work, according to authors' knowledge.
This paper proposes a novel combination of angle-based repetitive control and deadbeat current control (DBCC) [13] for torque ripple reduction in PMSMs, aimed for variable speed/load applications.Simulation tests have shown that this strategy significantly improves the synchronization of the generated RC compensation action at variable frequency, widely expands the frequency range of the torque ripple suppression, and improves performance not only at steady state, but also during transients.Therefore, high performance of the drive system can possibly be achieved without the extra cost for improving the manufacturing process, and even with worn shafts or unbalanced loads.This paper is organised as follows.System models equations and diagrams of the proposed control are explained in detail in section 2. Simulation results are shown in section 3. The results and advantages of the proposed control are discussed in section 4. Finally, conclusions with discussion over the improvements introduced by the proposed approach are given in section 5.

Model and equations
The overall structure of the proposed system is depicted in figure 1, where the details of the proposed repetitive control are shown in figure 2. For a surface mounted PMSM, the output torque is considered proportional to only the q-axis current, while the d-axis current is set to zero.
(a) Angle-based repetitive control in the control system

Deadbeat current control loop
The deadbeat current control loop has been implemented as described in [6,13].In closed loop it can be expressed by a delay of two sampling periods as in Equation ( 1) when operating within the voltage limitation determined by the inverter DC bus voltage.

Torque estimator
The discretized mechanical plant of the motor is described in Equation ( 2): Where, Ts is the sampling period, J is the motor and load inertia, B is friction factor, and Tl is the load torque.
The RC is connected with the speed loop PI using a "plug-in" structure.Assuming the pre-knowledge of the mechanical parameters (inertia J est and friction factor B est ), the output torque is estimated and then used as an input for the RC.The output torque is estimated based on the reverse of Equation (2) as follow: Where, Te est (tk) is the estimated output torque at tk, used as input for RC at tk+1, r(tk) is the rotor angular speed at tk; r(tk-1)is the rotor angular speed at tk-1; the load torque is approximated using the value of the torque reference at tk, Te ref (tk).

Time to angle conversion
Together with the estimated torque at tk, Te est (tk), the torque reference Te ref (tk) generated by the speed loop PI controller at tk, and the rotor mechanical position at tk, θm(tk), are all inputted to the repetitive controller at tk+1 which means at the beginning of the (k+1) th sampling period.
The torque error Te err at tk is first calculated as in Equation ( 4): The time to angle conversion is then executed.An array of length N, mem, is defined in the memory.The N values of the array mem are updated by the torque errors at only N chosen rotor angles out of the whole mechanical resolution of 2π and indicate the q-axis currents required for torque ripple reductions at the N chosen rotor locations.For example, mem{i}, the (i+1) th value in the array mem, (i is within [0,N-1]), is the q-axis current iqRC required for reducing torque error when the rotor mechanical position is exactly i*2π/N.The rotor location index k1 is defined as in Equation ( 5): Where, the value of N is chosen to be around the ratio between the sampling frequency fs and the rated speed ωr of the machine in Hz.
Since the rotor position cannot always be measured exactly at points coincident with integers multiple of 2π/N, interpolations are necessarily used to predict the torque error at the closest chosen rotor locations (θm=0, 2π/N, 4π/N,…, 2π).Linear interpolations are executed as in Equations (6)(7)(8) only if the value of k1 is different from the one obtained at the previous sampling period.
In the case of positive rotation: In the case of negative rotation and k1 (N-1): T (k 1) T (t ) In the case of negative rotation and k1=(N-1): Where, Te pred (k1) is the torque error if the rotor mechanical angular position equals to θm(k1)=k1(2π)/N, Te err (tk) and Te err (tk-1) are the torque errors at tk and tk-1, θm(tk) and θm(tk-1) are the rotor mechanical angular position at tk and tk-1.When the direction of the rotor movement is opposite to the positive direction of the encoder, thus negative rotation, Te pred (k1+1) is calculated instead of Te pred (k1).This is because the interpolation is more accurate estimating the torque error at θm(k1+1)=2π(k1+1)/N, which is in between the current position θm(tk) and the position at the previous period θm(tk-1), than estimating the torque error at θm(k1)=k1(2π)/N, which has not been reached.

Repetitive control
After converting the torque error at the time tk into the torque error at position θm(k1) or θm(k1+1) or θm(0), the memory array can now be updated according to the repetitive control Equations (9)(10)(11) (Figure 2(b)).Again, only when the rotor location index k1 is different from the one at the previous sampling period, the memory array would need to be updated.
For positive rotation: For negative rotation and k1 (N-1): mem{k 1} mem {k 1} Q T (k 1) G (10)   For negative rotation and k1=(N-1): Where, QRC is the forgetting factor of RC, GRC is the gain of RC, mem{k1} is the (k1+1) th value in the memory array mem, which indicates q-axis current required for compensating the torque ripple at rotor position k1*2π/N, mem prev {k1} is the previous value of mem{k1} obtained at the time of one full circle rotation ago.

Angle to time conversion
As shown in figure 2(a), the output of the repetitive controller after the angle to time conversion acts as an additional q-axis current reference, iqRC ref .Because of the delay of the current loop (2Ts), the current reference outputted at tk+1, iqRC ref (tk+1), will be achieved at tk+3.The future rotor position at tk+3 is predicted and converted to be within [0, 2π] as in Equation ( 12): A Future rotor location index k2 is defined as in Equation ( 13): To compensate the overall delay of 3Ts (2Ts for the current loop and 1Ts for processing time), the q-axis current reference generated by RC at tk+1, iqRC ref (tk+1), should be chosen from the memory array according to the future rotor mechanical position at tk+3, θm(tk+3).Again, linear interpolations are used for estimating the value between mem{k2} and mem{k2+1}, as in Equations ( 14)(15): When k2 (N-1): When k2=(N-1):

Transient detector
The angle-based RC allows maintaining torque ripple compensation even during speed and load changes.In fact the learning process, after a transient, only needs to be updated with the small amplitude changes in the torque ripple due to the changed conditions (saturation of the machine for example) since the frequency and phase of the torque ripple are fixed with rotor position.However the learning process has to be temporarily disabled during each transient, to avoid the RC may output an excessive compensating reference current as a consequence of the non-existent large torque ripple estimated during each sudden change in speed.Therefore, a transient detection routine is designed to detect speed/load changes and disable the learning process accordingly.
In details, a speed transient will be detected once the change of the torque reference In both speed and load changes, the torque error Te err as defined in 2.3 is set to zero to block the learning procedure.

Simulation results
A PMSM model has been built in MATLAB/Simulink for simulating the effectiveness of the proposed method.It is worth noting that, in order to accurately simulate the nonsinusoidal flux distribution and cogging torque of PMSM in Simulink, two lookup tables, derived from a finite element (FE) model of the same motor, are used for the magnetic flux, and for the cogging torque.Parameters for RC are as Table 1: Figure 3 shows a successful implementation of the deadbeat current control.The speed of the motor is kept at 100rpm and the q-axis current reference iq ref steps from 6A to 8A, the real q-axis current reaches the reference after 133μs (=2Ts) as designed.The resulting torque and speed waveforms with and without interpolation in the time to angle conversion are shown in Figure 4, where a speed change from 0 to 2995rpm (=49.917Hz) is applied at 0s and the load torque is set to be 5Nm.The speed 2995rpm is chosen since the sampling frequency 15kHz is then not integer multiple (300.5) of the speed.The torque and speed waveforms with and without the proposed transient detection strategy under speed/load changes are shown in Figure .5,where a speed change from 1500 to 3000rpm is applied at 1s and a load change from 2Nm to 5Nm is applied at 2s.

Discussion
Generally, the effectiveness of RC depends on whether the repetitive controller can learn or predict the torque ripple at different rotor locations precisely, and whether the compensation torque can be synthesized at exactly the desired rotor positions.Four innovative aspects of the proposed control method are discussed in the following together with the results in part 3.

Compensation of the current loop delays by position prediction
Current reference cannot be achieved instantaneously, but a delay is introduced as a consequence of the digital control implementation and depending on the particular type of current control used.The main advantage of DBCC compare to PI is that the delay of DBCC is fixed to be 2Ts in normal operations (no physical limits are hit) as shown in figure3.Therefore, the rotor position after the 2Ts delay can be easily predicted as Equation( 12).

Compensation of the mechanical system delays by torque estimation
The low-pass filter effect of the mechanical system causes a phase shift between the rotor speed and the output torque of the machine.For a low-pass filter, high frequency signals are delayed more than the low frequency signals, so synchronization of the output of RC to target ripple reduction is more challenging at high speed.Since the torque is made up of components at different frequencies, the delay is difficult to compensate in RC.Alternatively, in the proposed control topology, the delay is compensated by the torque estimator as in Equation (3).

Improvements of RC learning accuracy
RC compensates the torque ripple based on the torque error it learns during previous operations.Therefore, the more accurate the torque errors are learned or recorded, the better the performance.Due to the floor function (Equation ( 5)), without the proposed interpolations, the compensation current saved in each memory location k1 (or the torque error Te err used for calculating it) corresponds to a rotor position in the range [k1*2π/N, (k1+1)*2π/N].With the worst case happening, when the sampling frequency and the rotor speed are not synchronised and the measured rotor position slowly shifts with time, the RC will generate a wrong compensation action, which in turn may increase the torque ripple, as shown in figure 4 when the sampling frequency is not integer multiple of the motor speed.Without enlarging the memory or increasing the sampling frequency, simply with interpolations, the performance of RC is improved.

Rejection of oscillations during speed/load transients
In order to minimize interferences between the speed PI controller and the RC and minimize convergence time, the latter is connected in a plug-in configuration in the proposed control topology instead of a parallel implementation as it was done in [7,[9][10][11].
However, still, the interaction between speed PI and RC may cause oscillations during speed/load transients as shown in figure 5(green), where is kept on after being activated at 0.2s.Meanwhile, by properly disable only the learning process, the blue curve proves that the proposed transient detection strategy can reduce the oscillations while maintaining the reduction of torque ripple during the speed/load transients.

Conclusions
A novel combination of angle-based repetitive control (RC) and deadbeat current control (DBCC) is presented in this paper, aiming to effectively reducing periodic torque ripple under widely variable speed and even during speed/load transients.The DBCC, angle-based RC, torque estimator and the topology are chosen by considering the compensation of current control delays and the low-pass filter effect of mechanical system.Interpolations algorithms and a transient detection strategy are proposed to improve the accuracy of RC.The effectiveness of the proposed control topology is proven by simulation tests.

Figure 1 :
Figure 1: Block diagram for the proposed angle-based repetitive control and deadbeat current control

Figure 2 :
Figure 2: Diagram of the angle-based repetitive control

Figure 3
Figure 3 Performance of deadbeat current control

Figure 4 :Figure 5 :
Figure 4: The performance of the proposed time/angle conversion Te ref generated by the speed loop PI controller, ΔTe ref , is greater than a chosen threshold ΔTe sudden- max as in Equation (16): In addition, a load changes will be detected if the sum of ΔTe ref , ΔTe sum is larger than a chosen threshold ΔTe sum-max as in Equation (17):T (t ) T (t ) T (t ) T (t ) T (t ) T (t )

Table 1 :
Parameters of RC in simulation