3. Set the required bandwidth and attenuation of the tracking observer—the bandwidth is typically set in the range of 10 – 20
Hz for most low-dynamic drives (fans, pumps).
4. Click the “Update target” button to apply the changes to the MCU.
5. Select the “Observer” recorder from the FreeMASTER project tree and check the observer response in the
"Observer" recorder.
8.15 Speed PI controller tuning
The motor speed control loop is a first-order function with a mechanical time constant that depends on the motor inertia and
friction. If the mechanical constant is available, the PI controller constants can be tuned using the loop bandwidth and attenuation.
Otherwise, the manual tuning of the P and I portions of the speed controllers is available to obtain the required speed response
(see the example response in
). There are dozens of approaches to tune the PI controller constants. The following steps
provide an approach to set and tune the speed PI controller for a PM synchronous motor:
1. Select the “Speed Controller” option from the FreeMASTER project tree.
2. Select the “Speed loop” tab.
3. Check the “Manual Constant Tuning” option—that is, the “Bandwidth” and “Attenuation” fields are disabled and the
“SL_Kp” and “SL_Ki” fields are enabled.
4. Tune the proportional gain:
• Set the “SL_Ki” integral gain to 0.
• Set the speed ramp to 1000 rpm/sec (or higher).
• Run the motor at a convenient speed (about 30 % of the nominal speed).
• Set a step in the required speed to 40 % of
N
nom
.
• Adjust the proportional gain “SL_Kp” until the system responds to the required value properly and without any
oscillations or excessive overshoot:
— If the “SL_Kp” field is set low, the system response is slow.
— If the “SL_Kp” field is set high, the system response is tighter.
— When the “SL_Ki” field is 0, the system most probably does not achieve the required speed.
— Click the “Update Target” button to apply the changes to the MCU.
5. Tune the integral gain:
• Increase the “SL_Ki” field slowly to minimize the difference between the required and actual speeds to 0.
• Adjust the “SL_Ki” field such that you do not see any oscillation or large overshoot of the actual speed value while
the required speed step is applied.
• Click the “Update target” button to apply the changes to the MCU.
6. Tune the loop bandwidth and attenuation until the required response is received. The example waveforms with the
correct and incorrect settings of the speed loop parameters are shown in the following figures:
• The “SL_Ki” value is low and the “Speed Actual Filtered” does not achieve the “Speed Ramp” (see
NXP Semiconductors
Remote control using FreeMASTER
MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC motors, Rev. 0, 01/2022
User Guide
40 / 50