Study on noise and disturbance issues of generalized predictive speed control for permanent magnet synchronous machines

UK EPSRC Prosperity Partnership “A New Partnership in Offshore Wind”, Grant/Award Number: EP/R004900/1 Abstract Generalized predictive control (GPC) is promising for permanent magnet synchronous machine drive systems, due to its outstanding dynamic performance and disturbance rejection capability. However, the speed measurement noise introduced by the encoder and the unmodelled disturbances introduced by the non‐ideal machine characteristics deteriorate the performance of GPC. The noise and disturbance issues are studied in detail, and an enhanced GPC method is proposed to address them. For the noise issue, the mathematical model of the speed measurement noise is derived, and the noise spectra at different speeds are analysed. Then, a novel GPC with internal low‐pass filter is proposed to reject the influence of the noise. For the disturbance issue, the influence of the unmodelled disturbances on the speed performance is assessed when applying different noise rejection methods, and a resonant controller‐based speed ripple mitigation method is proposed and integrated to the GPC. Experimental results show that the proposed methods can effectively deal with the noise and disturbance issues, as well as providing better dynamic performance than the conventional PI based speed control.


| INTRODUCTION
Permanent magnet synchronous machines (PMSM) have been widely used in traction drives, electrical tools, and servo systems for their advantages in power density, power factor, and efficiency. In many applications, rotor speed control with fast and smooth dynamic process and good disturbance rejection capability is required. These can be achieved with an emerging control method, that is, model predictive control (MPC). Recently, in the machine drive field, the finite-control-set MPC (FCS-MPC) is very popular, and has been well studied for current and torque controls [1]. However, the prediction horizon of FCS-MPC is usually only one step, and can hardly be extended due to the exponentially increasing computation burden when searching for the globally optimized switching sequence. Therefore, the FCS-MPC can hardly be used for speed control, since the short prediction horizon can hardly cover the mechanical dynamics [2,3], which is usually much slower than the electromagnetic dynamics. It should be noted that the commonly used delay compensation method for FCS-MPC with an extra prediction step is not included in the 'prediction horizon' defined in this article, since it only predicts with a certain voltage vector (the one selected in the last sampling period) without the voltage vector selection process, and thus, the total computation burden is not significantly increased by this extra prediction step.
As another type of MPC, generalized model predictive control (GPC) is especially suitable for long prediction horizon, and inherits the good dynamic performance and disturbance rejection capability from MPC family as well. Meanwhile, GPC can inherently avoid the DC bias caused by the parameter mismatch, which is a significant merit compared with other MPC types [4]. Therefore, GPC has been applied to speed control in many researches. In [5], a cascaded structure formed by three GPC controllers is used for the speed control of a PMSM, and resonant controllers are added to each GPC to reduce the speed ripple caused by unmodelled disturbances, but the noise issue is completely ignored. A non-cascaded multivariable GPC control structure is proposed for PMSM speed control in Refs. [6,7], but neither the noise nor the disturbance issues are considered. Actually, the noise and disturbance issues for GPC-based speed control have not been comprehensively studied yet.
On the one hand, the wide control bandwidth of GPC makes it sensitive to measurement noises. For the speed control, encoders are the most widely used sensors. However, the speed signal obtained by an encoder is usually distorted, due to the pulse-based position quantization. In Ref. [8], the mathematical model of the encoder-related speed measurement noise is given, and a comprehensive comparison of different speed estimation algorithms are introduced and compared, but none of these algorithms can completely avoid the speed measurement noise issue. If not well rejected, the speed measurement noise can cause significant steady-state current distortion, and thus, increase the noise vibration harshness (NVH) and loss. An ordinary low-pass filter (LPF) should not be added into the feedback loop of the GPC speed control, for the instability issue caused by the phase delay. Some observer-based solutions have been proposed to filter out the speed measurement noise. For example, extended Kalman filter (EKF) [9], sliding mode observer [10], and Luenberger observer [11,12], are utilized to filter out the speed measurement noise. However, extra observers are usually undesired for the increased complexity. Moreover, in these researches, the observers are designed without any guidance, since the characteristics of the speed measurement noise, for example the magnitude, spectra, time variation, etc., are all unknown. Thus, the speed measurement noise introduced by the encoder is mathematically modelled, and the noise spectra under different conditions are analysed in detail. Thus, a guidance is provided for the design of the noise rejection method of GPC speed control. Based on this, an internal LPF, which can be easily tuned, is inserted to the GPC. Thus, the control system can be simplified by avoiding external observers.
On the other hand, the disturbances are usually not included in the GPC prediction model. Thus, some negative influences can be introduced by the low-order periodic disturbances [5]. For a PMSM, the most common disturbances are the back electromotive force (EMF) harmonics and the cogging torque. For an ordinary GPC-based speed control loop, with ideally accurate and noise-free speed feedback, the disturbances can be well rejected due to the wide control bandwidth of GPC, which means the EMF harmonics and the cogging torque will not cause significant speed ripple. However, as stated before, in a practical system, in order to reject the speed measurement noise, filtering functions should be added to the control loop, that is either the speed observers or the internal LPF. The noise rejection actually has influences on the disturbance rejection capability. Thus, the disturbance rejection capability of the GPC-based speed control loop is reappraised with consideration of different noise rejection methods. Furthermore, resonant loops are added to the previously mentioned GPC with internal LPF (GPC-ILPF) to mitigate the speed ripples caused by the unmodelled disturbances at the price of increased q-axis current oscillations. Thus, the complete control strategy is designated as RGPC-ILPF.
The contributions are as follows: 1. Noise modelling and analysis: the speed measurement noise introduced by an encoder is modelled in detail, and the characteristics of the noise is analysed and proved. This article is organized as follows. Firstly, the speed measurement noise introduced by the encoder is modelled and analysed. Secondly, the GPC-ILPF is described. Then, the main disturbances for a PMSM are introduced, and the disturbance rejection capability of GPC is assessed when applying different noise rejection methods, that is, no-filter, internal filter, and external observer. Afterwards, the resonant loop of the proposed RGPC-ILPF is described. Finally, experimental results are presented to validate the effectiveness of the proposed RGPC-ILPF, and the experimental comparison with conventional PI control is also presented.

| Model of PMSM
GPC is based on the mathematical model of the controlled plant. Thus, both the mechanical and electrical dynamics should be derived for the controller design. The electrical equation of ideal PMSM in the d-q reference frame can be expressed as follows: where, u d , u q , i d , i q , L d , and L q are the d-q axis voltages, currents, and inductances, respectively. R s , N p , ω r , and ψ pm are the stator resistance, the pole pair number, the mechanical angular speed, and the permanent magnet flux linkage, respectively. The mechanical equation of a PMSM can be expressed as: When considering the surface-mounted permanent magnet (SPM) machine, L d and L q can be treated as equal, that is, L d = L q = L s . Thus, the complete machine model in difference equations can be expressed as: where, t represents the current sampling instant.

| Model of speed measurement noise
Incremental encoders are widely used in machine drive applications, which produce rotor position-related pulses and based on which the instantaneous speed can be calculated. The speed calculation algorithm that counts the pulse number in every sampling period is commonly used [13,14]. The speed measurement noise focused in this article is caused by the varying pulse number in adjacent sampling periods. The mechanism of the speed measurement noise is explained in Figure 1. The encoder produces N e number of pulses in every mechanical circle, and the control processor counts these pulses in every sampling period T s . Then, the instantaneous mechanical angular speed can be expressed as: where, N s is the number of encoder pulses counted in the most recent sampling period. It can be seen in Equation (5) and Figure 1 that the estimated speed is proportional to the encoder pulse number N s , which can be time varying even if the actual speed is fixed, for the difference between the sampling frequency and encoder pulse frequency. Considering that the difference of encoder pulse number between two adjacent sampling instants can only be 0 or 1 when the actual speed is fixed, the noise magnitude is fixed as: The noise frequency varies with the rotor speed, which can be expressed as: It should be noted that the noise frequency in Equation (7) only means that the noise waveform repeats with f noise , but does not mean that the noise spectrum is concentrated at f noise , since the noise waveform is not sinusoidal and usually asymmetric. Actually, the noise spectrum (especially considering that ripples exist in the actual speed) is usually quite complex, but the main components of the noise spectrum are still close to f noise , which will be proved with both simulation and experiments. Therefore, f noise can be used as an approximate indicator of the noise spectrum for the theoretical analysis and filter design.
According to Equation (7), when ω r is a multiple of ω noise , the frequency of the speed measurement noise is zero, which means the speed signal has no ripple and the speed measurement noise disappears, since the pulse number in every sampling period is fixed. When the remainder after division of ω r by ω noise is 0.5ω noise , that is, rem(ω r , ω noise ) = 0.5ω noise , the speed measurement noise has the highest frequency, which is exactly half of the sampling frequency, that is, 0.5f s . The relationship between the noise frequency and the rotor speed is shown in Figure 2.
To validate the noise model above, a simulation is conducted in SIMULINK with the help of the incremental shaft encoder block in the Simscape/Power Systems library, which can simulate an actual encoder in detail. To better show the relationship between the noise frequency and the rotor speed, in the simulation, the actual rotor speed is set as a ramp signal, thus the noise waveform at different speed conditions can be presented in the same figure, as shown in Figure 3. In the simulation, the encoder produces 16,384 pulses in one mechanical circle, that is N e = 16,384, and the sampling frequency f s is 5 kHz, that is, T s = 0.0002 s. Therefore, according to Equation (6), the amplitude of the speed measurement noise, that is, ω noise , should be 1.9175 rad/s (18.31 rpm). From Figure 3, it can be observed that the speed signal obtained by the encoder has significant noise, whose amplitude and F I G U R E 1 Diagram of speed measurement noise caused by encoder pulse counting (rotor speed 50 rpm) frequency agree well with the proposed noise model in Equations (6) and (7); and Figure 2.

| Noise spectrum analysis
In order to further comprehend the characteristic of the speed measurement noise, and provide guidance for the following deign of the noise rejection method, the noise spectrum is analysed in this part. The equation of the noise frequency has been expressed in Equation (7), but the noise spectrum is difficult to be directly obtained, since the noise waveform is non-sinusoidal. Therefore, the noise spectrum analysis is based on simulation rather than mathematical derivation, which will also be validated by experiments in the following experiment section. Figure 4 shows the actual speed, the encoder-measured speed, and the FFT spectra of the encoder-measured speed, under different speed conditions. By comparing Figure 4a,c, it can be observed that the speed measurement noise changes with the actual speed.
According to Equation (7), when the actual speed is 100 rpm, the noise frequency should be 2308 Hz. Correspondingly, the main component with the largest magnitude in Figure 4a is at about 2300 Hz, which agrees with the theoretical value obtained from the model in Equation (7). It should be noted that another main component can be found at 2700 Hz in Figure 4a, which is caused by the spectrum periodic extension of the discrete sampling (f s = 5000 Hz) [15]. This extra main component is always symmetrically located on the other side of 0.5f s , and thus, it is always with high-frequency and easy to reject. Therefore, the extra main component, that is the one at 2700 Hz in Figure 4a, can be ignored when considering the noise rejection method design.
When the actual speed is 110 rpm, the noise frequency should theoretically be 38.2 Hz. It can be observed in Figure 4c that the speed measurement noise appears with a frequency of about 38.2 Hz, which completely agrees with the theoretical value. The spectrum shows that the noise components are widely distributed, but with quite small magnitudes.
In practical systems, speed ripples are inevitable due to different disturbances. It is found that the FFT spectrum of the speed measurement noise can be significantly impacted by even very small actual speed ripples. The noise spectrum with actual speed ripples are shown in Figure 4b,d, where the 4th order and 12th order ripples with the amplitude of 2 rpm are added to the average actual speed. These two speed ripples exist in the experimental platform to be used in this article. Comparing Figure 4b with Figure 4a, it can be observed that the FFT spectrum is reshaped by the existence of the speed ripples, but the spectrum distribution is approximately similar. The same phenomenon can also be found by comparing Figure 4d with Figure 4c.
Therefore, the noise spectrum in a practical system is not concentrated at particular frequencies, but the theoretical noise frequency obtained from Equation (7) can still approximately describe the noise spectrum distribution.

| Noise rejection and filter design
For conventional PI-based speed control, the speed measurement noise is not a serious problem. The PI controller is insensitive to the speed measurement noise due to the limited control bandwidth and decaying magnitude response of PI controller. For the same reason, even if the control performance is impacted by the noise, ordinary LPFs can be directly added into the speed feedback loop of a PI controller to reject the noise, and the system stability will not be significantly impacted.
However, for GPC, as well as other novel control methods with wide control bandwidth, the noise rejection is a trickier issue. On the one hand, GPC responds to almost all the noise components due to its wide control bandwidth. Thus, GPC is very sensitive to the speed measurement noise analysed above. On the other hand, ordinary LPFs should not be directly added into the speed feedback loop of GPC for the instability issue caused by the phase delay.
In the existing articles that use novel control methods with wide control bandwidth, the speed measurement noise is usually rejected by employing speed observers, for example, EKF [9], sliding mode observer [10], Luenberger observer [11], etc. However, compared with ordinary LPFs, these observers are much trickier to design. For instance, to design an EKF, there are two important covariance matrices to be determined, that is the process noise covariance matrix Q and the sensor noise covariance matrix R, which are usually determined by trial and error [9,11,12]. Meanwhile, considering that the spectrum of the speed noise studied in this article does not match the Gaussian distribution (see Figure 4), the design of R is even more difficult, since EKF was originally proposed to deal with Gaussian noises. Moreover, these observers can significantly increase the computation burden, since multiple matrix operations (including matrix inversions) are required. It should be noted that these observers are not used to estimate the speed in a sensorless manner, but work as LPFs without phase delay, and thus, the encoder signal is still required.
To avoid the extra speed observers, an internal filter concept can be applied, which is achieved by inserting the desired filter in the GPC controller when deriving the prediction model [3]. The GPC-ILPF, designated as GPC-ILPF, can reject the speed measurement noise without introducing phase delay or extra observers.
Before introducing the design of the GPC-ILPF, the parameter tuning of the internal LPF is discussed in advance in F I G U R E 2 Relationship between noise frequency and rotor speed 66this part. The largest problem of the internal LPF design is that the frequency of the speed measurement noise is varying with the rotor speed. As shown in Equation (7), the frequency of the speed measurement noise varies from 0 to half of the sampling frequency, and changes periodically with the rotor speed. To help the internal LPF design, the frequency of the speed measurement noise and the cut-off frequency of the internal LPF are both shown in Figure 5. To simplify the design, the cut-off frequency of the internal LPF, that is, f cut , can be regarded as a boundary, and thus, the speed measurement noise with frequencies higher than f cut is regarded as well rejected, and those below f cut are regarded as not rejected and bad for the control performance (although the filtering capability of an LPF is actually not demarcated so strictly). As shown in Figure 5, when an internal LPF is employed, the rotor speed ranges that are immune to speed measurement noise are actually discontinuously distributed on the rotor speed axis. Therefore, there will always be some rotor speed ranges that are sensitive to the speed measurement noise, regardless of the cut-off frequency selection of the internal LPF.
Generally, internal LPF with lower f cut , that is, LPF2 in Figure 5, benefits the noise rejection by covering wider rotor speed ranges, but it will slow the GPC dynamic by reducing the control bandwidth. Therefore, the cut-off frequency of the LPF should be carefully selected to balance the speed measurement noise rejection and dynamic performance. It should be noted that even though the internal LPF is added to the GPC, the dynamic performance and disturbance rejection capability can still be better than a well-tuned PI, which will be validated with experiments in a later section.

| GPC prediction with internal LPF
In GPC design, the controlled autoregressive integrated moving average (CARIMA) model is often used, which can be expressed as [3]: where, y(t), u(t − 1), and ξ(t) are the output variable, input variable, and noise, respectively. Δ is the differential operator.
If ξ(t) is white noise, the polynomial can be set to Cðz −1 Þ ¼ 1.
However, in our application, in order to reject the speed measurement noise, Cðz −1 Þ should be replaced by a filtering polynomial T ðz −1 Þ ¼ 1 − t f z −1 , which can provide internal LPF characteristic to the GPC. Here, T ðz −1 Þ is actually the denominator of the discrete transfer function of a first-order LPF. The system matrices A(z −1 ) and B(z −1 ) are actually with the dimension of 1 � 1, and they fully describe the PMSM system. There are actually two sets of system matrices, one describes the mechanical dynamic, and the other describes the electromagnetic dynamic, which are both given in the Appendix.
To obtain the GPC control law, the future behaviour of the plant is derived by solving the following Diophantine equation: where,Ãðz −1 Þ ¼ ΔAðz −1 Þ. The solution of Diophantine equation can be found in [3,16]. By multiply Equation (8) with ΔE j ðz −1 Þz j , the following equation can be obtained: Thus, the best prediction of the future y can be expressed as:ŷ where, the superscript f means the variables pre-filtered with 1=T ðz −1 Þ. For the GPC control, the predicted output y should be separated into two parts, that is, the forced response and the free response. In Equation (11), the filtered input variable u f in both the past and the future are contained in u f ðt þ j − 1Þ, since the degree of G j ðz −1 Þ is larger than j − 1. Considering that the future values of the input variable u should not be pre-filtered with 1=T ðz −1 Þ, since they are not determined yet. Thus, G j ðz −1 Þ in Equation (11) should be divided into two parts: Now the j step prediction is separated into the forced and free responses as: Δuðt þ j − 1Þ |ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl fflffl {zffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl fflffl } forced response þF j À z −1 � y f ðtÞ þ Γ j À z −1 � Δu f ðt − 1Þ |ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl fflffl {zffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl fflffl } free response ð13Þ Equation (13) is just the prediction of a specific number of following step, while the GPC requires the prediction of all the following N steps, here N is the prediction horizon. Therefore, based on Equation (13), the predictor should be written into matrix form: 1Þ |ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl {zffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl } Other polynomial vectors and matrixes are made up in the same way. In order to simplify the implementation, the two free response terms are written together as FΓ ⋅ yũ f .

| Calculation of optimized input variable
The GPC algorithm minimizes a quadratic cost function to make the predicted output variable track the reference. Meanwhile, the change of the input variable Δu, which is treated as a cost, is also evaluated in the cost function. The cost function can be expressed as: where, λ j is the weighting factor of the input change compared with the output error at step j. Equal weighting factors are given to every step, that is, λ j ¼ λ. The output reference y * is treated as fixed for the whole prediction horizon. Based on Equation (14), the cost function can be written in matrix form as: By setting the derivative of J with respect toũ as zero, the optimized input change can be obtained:ũ Although the optimized input changes of the following N steps are obtained at once, only the first element ofũ is applied. Note that theũ obtained by Equation (17) is the change of the input u at each step, thus an accumulator is required to obtain the final control input u(t). The diagram of the GPC-ILPF described above can be presented as Figure 6.

| Parameter tuning of GPC-ILPF
In this part, the parameter design of the proposed GPC-ILPF is discussed. To design the GPC-ILPF, several key parameters should be determined, that is, the prediction horizon N, the weighting factor λ, and the coefficient t f of the internal LPF.
Among these parameters, N should be selected first. The value of N directly determines the computation burden of the proposed GPC-ILPF, since the dimensions of the matrices in Equation (17) are proportional to N. Theoretically, large N is preferred for both the speed and the current GPC-ILPF loops. The computation capability of the processor (memory and clock frequency) is the main constraint of N. Fortunately, the benefit from the increase of N reduces rapidly, which means that the extremely large N is not required. For the speed GPC-ILPF, the control performance will not observably change when N is larger than 50. Similarly, for the current GPC-ILPF, the control performance will not observably change when N is larger than 10.
Then, the weighting factors λ should be designed for the speed and the current GPC-ILPF loops. The weighting factor design for MPC is still an open problem [17,18], but the orders of magnitude of the speed, current, and voltage can help to roughly design the weighting factor, since the different terms in the cost function should be comparable. Then, the weighting factor should be fine adjusted by trial and error. Generally, smaller λ leads to faster step response, that is, wider control bandwidth, but the system will be more sensitive to unexpected noises or disturbances. For the cascaded structure, the inner current loop should be significantly faster than the outer speed loop.  Finally, the coefficient t f determines the cut-off frequency of the internal LPF, that is, Considering that the spectrum distribution of the speed measurement noise is quite wide, lower cut-off frequency is preferred for the noise rejection, but the control bandwidth of the GPC-ILPF will be narrowed accordingly, which reduces the disturbance rejection capability. To make a tradeoff, the cut-off frequency of the speed GPC-ILPF is recommended to be set between a few Hertz to a few dozens of Hertz. Considering that the current measurement noise is quite slight compared with the speed measurement noise, the cut-off frequency of the current GPC-ILPF can be set as larger values, that is, a few hundreds of Hertz, or even directly remove the internal LPF by setting its t f as 0.
In a practical tuning process, a very large N is recommended at first, which should be implementable for the processor considering the computation capability. Then, λ and t f are be tuned. Finally, N can be gradually decreased, until the system performance starts to be deteriorated.

| Disturbance assessment
The low-order periodic disturbances are discussed in this section, which are usually the back-EMF harmonics, cogging torque, inverter dead-time, etc. These disturbances are usually not included in the prediction model of GPC, and thus, speed ripples can be caused theoretically. Even though, for a GPC speed control loop with ideally accurate and noise-free speed feedback, the disturbances can be well rejected due to the wide control bandwidth of GPC. Thus, the speed ripples are not a serious problem.
However, when an internal filter or speed observer is employed to reject the speed measurement noise, the control bandwidth of GPC is reduced. Thus, the speed ripples caused by unmodelled disturbances become more serious. To mitigate the speed ripples, resonant loops are added to the GPC-ILPF, and thus, the enhanced method is designated as RGPC-ILPF. More details of the resonant loop design will be presented in the next part.
To better understand the disturbance issue and other related characteristics, a comprehensive comparison is presented in Table 1, which is obtained based on the existing studies about PI [19,20], PI + Resonant (PIR) [19], FCS-MPC [1], GPC [16], and speed observers [9][10][11][12]. It can be concluded that the proposed RGPC-ILPF is a good solution for speed control, without any significant drawbacks.

| Speed ripple mitigation with RGPC-ILPF
The proposed RGPC-ILPF for speed ripple mitigation is described in this part. The block diagram of the proposed RGPC-ILPF is shown in Figure 7. It should be noted that no matter what method is utilized, the inevitable price of the speed ripple mitigation is the increased q-axis current oscillation, since harmonic components have to be intentionally injected into the q-axis current to compensate the rippling components of the total torque.
In the proposed RGPC-ILPF, the original speed signal obtained from the encoder is directly sent to the RGPC-ILPF as the feedback, without any external filters. Resonant control loops are added to the output of the GPC-ILPF, to provide large open-loop gains for the concerned low-order pulsation components. Considering that the noise issue for the current control loop is usually quite slight, ordinary GPC controllers are used for the inner current loop. The implementation of the current GPC is the same as the GPC-ILPF shown in Figure 6, just set the internal filter parameter, that is, t f , as 0.
Considering that the frequencies of the low-order speed ripples are varying with the rotor speed, the resonant frequencies of the added resonant controllers should be adaptively adjusted. Meanwhile, the added resonant controllers may introduce instability issues for the phase change around the resonant frequency. Thus, a phase adjustment term should be added to each resonant controller to improve the system stability [19].
The transfer function of the adaptive resonant controller with phase adjustment term can be expressed as: where, K r k and ω c k are the resonant gain and cut-off frequency of the resonant controller for the kth order harmonic, φ is the phase adjustment angle, which introduces a phase lead to the resonant controller. In order to avoid impacting the fundamental control loop, small cut-off frequencies are recommended, which is set as 1 rad/s. The phase adjustment angle is related with the rotor speed [19]. For traditional control systems, for example, PI based ones, the phase adjustment angle can be designed based on the phase margin concept of classical control theory. However, the GPC is difficult to be analysed with classical control theory. Thus, the phase adjustment angle is designed based on numerical simulation. Firstly, the optimized phase adjustment angles at different rotor speed conditions are found with simulation, based on which a piecewise linearized curve is obtained and used for adaptive phase compensation for the resonant controllers. The variation of phase adjustment angle with speed used is shown in Figure 8. The discretization should be implemented online, which is presented in the Appendix.

| EXPERIMENTAL RESULTS
In order to validate the proposed RGPC-ILPF, experiments are conducted on a platform as shown in Figure 9, which 70mainly consists of a 240 W PMSM, a permanent magnet brushed DC machine with a load resistor, and a controller based on dSPACE DS1006. The system parameters are shown in Table 2. The sampling frequency is 5 kHz, and the encoder produces 16,384 pulses per mechanical circle. In the experiments, the weighting factor of the speed GPC is set as λ ω ¼ 5, and that of the current GPC is set as λ i ¼ 0:001. The prediction horizon of the speed GPC is set as N ω ¼ 50, and that of the current GPC is set as N i ¼ 10. The parameter of the internal LPF, that is, t f is set as 0.99, which provides a cut-off frequency of about 8 Hz.
The experimental results are presented in three parts: 1. Noise rejection: To validate the noise rejection capability, the steady state performance of the proposed RGPC-ILPF is compared with ordinary GPC, ordinary GPC with external LPF, and conventional cascaded PI. 2. Disturbance rejection and speed ripple mitigation: To show the effectiveness of the low-order speed ripple mitigation, the transient process of enabling the resonant loop is presented. 3. Dynamic performance comparison with PI: To validate the advantages in dynamic response, the proposed RGPC-ILPF is compared with the conventional cascaded PI based on speed and load changes. -71

| Noise rejection
The steady state waveforms of the proposed RGPC-ILPF, the ordinary GPC [6], the ordinary GPC with external LPF, and the conventional cascaded PI [21] are shown in Figure 10. It should be noted that a first-order LPF with 500 Hz cut-off frequency is applied to the original speed signal provided by the encoder (only for the waveform display, but not used in the control loop), to compare the speed waveforms more clearly. By comparing Figure 10a,b it can be observed that the proposed RGPC-ILPF can effectively reject the impact of the speed measurement noise caused by the encoder, while the ordinary GPC has significant burrs in the current waveforms. The current limiter of 2 A behind the speed controller is removed in the ordinary GPC, otherwise the speed cannot even reach 100 rpm. If simply adding an external LPF in the speed feedback loop to reject the speed measurement noise, resonance can appear for the phase delay introduced by the external LPF, as shown in Figure 10c. Here the external LPF has the same cut-off frequency as the internal LPF used in the proposed RGPC-ILPF. In addition, the steady state waveforms of the conventional cascaded PI are also provided in Figure 10d, which show good steady state performance, but the low-order speed ripples are significant. By comparing Figure 10a, d, it can be observed that the speed ripple mitigation of the proposed RGPC-ILPF is achieved at the price of increasing the total harmonic distortion (THD) of the three-phase currents, which is actually an inevitable price for the speed ripple mitigation, no matter what compensation method is used.
In conclusion, the proposed RGPC-ILPF has the following merits: (1) the impact of the speed measurement noise caused by the encoder is rejected; (2) the internal LPF is delay-free, which avoids the stability problem of the external LPF in the speed feedback loop; (3) even though the control bandwidth is reduced by the internal LPF (compared with ideal GPC), the proposed method still has good rejection capability to the loworder speed ripples.

| Disturbance rejection and speed ripple mitigation
To help the resonant loop tuning, the main low-order speed ripple components of the platform are diagnosed. To avoid the impacts of the speed and current control loops, such as resonance caused by improper tuning, the speed and current control loops are tentatively removed, and the voltage references u d and u q are manually given. In such condition, the main low-order speed ripple components are found to be the fourth order one and the 12th order one. The 4th order speed ripple is introduced by the cogging torque of the load machine, that is, a permanent magnet brushed DC machine with 5 pole pairs and 4 teeth, and the 12th order speed ripple is caused by the cogging torque of the PMSM. Therefore, the resonant controllers should be tuned at the 4th order and 12th order frequencies.
The transient processes of enabling the resonant loop are shown in Figure 11. As stated before, the speed measurement noise caused by the encoder has varying frequencies in different rotor speed conditions, which leads to quite different spectrum distribution of the speed measurement noise. To better validate the low-order speed ripple mitigation of the proposed RGPC-ILPF, two typical speed conditions are considered, that is, 100 and 110 rpm, which lead to speed measurement noises with high frequency and low frequency, respectively. As shown in Figure 11a, the low-order speed

-
ripples are significantly reduced after enabling the resonant loop, while the stator current distortion increases, which is the expense of the speed ripple mitigation. The low-order pulsating components that originally exist in the GPC output are greatly reduced after enabling the resonant loop, since the resonant output provides the required compensation components instead. The unfiltered speed waveform in Figure 11a clearly shows the high-frequency speed measurement noise, -73 with a magnitude of 18.3 rpm, which agrees with the noise model in Equations (6) and (7). The waveforms in Figure 11b show a similar transient process as those in Figure 11a. The main difference is that more lowfrequency burrs appear in both the filtered and unfiltered speed signals, since according to Equation (7) and Figure 4b, the frequency of the speed measurement noise is quite low under 110 rpm speed condition. As a consequence, the internal LPF has less rejection capability to these low-frequency noises.
Thus, the current waveforms in Figure 11b are worse than Figure 11a, but still acceptable.
More quantitative analysis can be done with the FFT spectra in Figure 12. Note that the speed FFT is done with the unfiltered speed signal. By comparing the FFT spectra before and after enabling the resonant loop in Figure 12a, it can be observed that the two main low-order speed ripples, that is, the 4th order and the 12th order, reduce from 1.72 to 0.52 rpm, and from 1.58 to 0.34 rpm, respectively. Similar results can be found in Figure 12b. Meanwhile, it is clear in Figure 12 that the spectrum of the speed measurement noise mainly lays on the high-frequency range when the speed is 100 rpm, while it mainly lays on the low-frequency range when the speed is 110 rpm, which agrees with the theoretical analysis in Section 2.
Based on the analysis above, the following conclusions can be drawn: (1) the proposed RGPC-ILPF can effectively mitigate the low-order speed ripples caused by periodical disturbances; (2) the frequency of the speed measurement noise varies under different speed conditions, and the noise spectrum distribution agrees with the theoretical analysis; (3) the low-order speed ripple mitigation of the proposed RGPC-ILPF is effective under different speed conditions.

| Dynamic performance comparison with PI
GPC has been proved to have better dynamic performance than conventional PI in many existing researches [22,23]. An internal LPF is embedded in the GPC to reject the speed measurement noise, which will inevitably reduce the control bandwidth of the GPC. Therefore, in this part, the dynamic performance of the proposed RGPC-ILPF is compared with cascaded PI, to validate that the proposed RGPC-ILPF still has better dynamic -75 performance than PI. Two typical dynamic responses are considered, that is speed reference step and sudden load change. The PI parameters of the speed loop and current loop are K p_s = 0.04, K i_s = 5, and K p_i = 3, K i_i = 1000, respectively. The PI controllers are tuned according to [20,24], and the target is to balance the step response speed, the overshoot amplitude, and the load change dynamic. In Figure 13, the speed reference steps from 100 to 150 rpm. Here, a relatively small-range speed dynamic is used for the convenience of showing more details, since large-range speed dynamics are mainly determined by the current limiter. In Figure 13a, the transient process of the proposed RGPC-ILPF lasts about 0.17 s, smoothly without any overshoot. However, the transient process of the cascaded PI lasts about 0.22 s, and has significant overshoot. It should be noted that the overshoot problem and dynamic response speed of PI control should always be compromised when tuning the PI controllers. Thus, the proposed RGPC-ILPF has merits in dynamic response.
In Figure 14, the load resistor is disconnected suddenly, which causes a large sudden disturbance. It can be observed in Figure 14a that the proposed RGPC-ILPF only has very slight transient peak in the speed, that is, 14.9 rpm, and the transient process only lasts about 0.056 s. However, the cascaded PI suffers a much larger and longer transient process. As shown in Figure 14b, the transient peak of the cascaded PI is 34.4 rpm, and the transient process lasts about 0.102 s.
Based on the analysis above, it can be concluded that the proposed RGPC-ILPF still has better dynamic performance than the conventional cascaded PI control, even though the control bandwidth of the proposed RGPC-ILPF is reduced by the internal LPF.

| CONCLUSION
Presented a detailed study on the noise and disturbance issues of the generalized predictive speed control for PMSMs. Based on the noise and disturbance study, a novel resonant generalized predictive control method with internal low-pass filter (RGPC-ILPF) method is proposed. With the experimental validation, the main merits of the proposed method can be concluded as follows: 1. With the internal LPF, the speed measurement noise introduced by the encoder can be effectively rejected without adding external LPFs or observers. Thus, the steady state performance can be ensured without causing instability issues or increasing the system complexity. 2. With the resonant loops, the low-order speed ripples caused by periodic disturbances can be well mitigated. 3. The proposed RGPC-LPF shows better dynamic performance and load disturbance rejection capability than conventional cascaded PI.