Skip to content

PLL tuning

Introduction

The phase-locked loop (PLL) tracks the sensorless angular position of the motor. The controller uses it in the motor model to calculate the flux frequency. The PLL controls the output frequency.

The controller uses PLL bandwidth to calculate the gains of the PLL: Pll Kp and Pll Ki.

When PLL bandwidth increases, the lock time decreases. A higher bandwidth lets the PLL adjust the output frequency more quickly, so it can lock more quickly.

A higher PLL bandwidth can also make the PLL less stable. The PLL can adjust too much. This can increase the output noise, audible noise, vibration and jitter. A low PLL bandwidth can remove jitter on the reference. A PLL bandwidth that is too high can send the incoming jitter to the output, or make it larger.

Tuning

Bandwidth tuning

If there is jitter, change PLL bandwidth up or down in steps of 100. The maximum value is 500.

Motors with a higher electrical frequency, or motors with an RPM that can change quickly, can operate better with values of 300 or more. Examples are geared hub motors and mid-drive motors. These values can prevent Instantaneous phase over current faults.

Motors with a lower electrical frequency, or motors with an RPM that changes slowly, can usually operate with lower values. An example is a direct-drive hub motor.

PLL damping has an effect on Pll Kp. If you increase PLL damping, the Pll Kp that the controller calculates from PLL bandwidth increases.

Manual tuning

We do not recommend manual tuning. If PLL bandwidth and PLL damping are 0, you can set the PLL gains manually. To do this, set PLL Kp old and PLL Ki old, not Pll Kp and Pll Ki.

The table shows the effect when you increase one gain and do not change the other:

Parameter Rise time Overshoot Settling time Steady-state error Stability
PLL Kp Decrease Increase Small change Decrease Decrease
PLL Ki Decrease Increase Increase Remove Decrease

Effect of an increase in each PLL gain