B-8 Control System MN1902B.2.3 Torque controller and feedbackThe torque controller, shown in Figure 49, is a PI controller. Gains are set using the Mintkeywords KIPROP and KIINT. The torque demand is scaled into a current demand. This iscompared with the measured current, obtained from the current sensors, and the error is fedinto the PI control calculation. The resulting value forms the PWM signal that is fed throughthe power stage into the motor windings. The gain values KIPROP and KINT must be tunedfor a specific motor. This is performed automatically by the Commissioning Wizard.Although the PI control alone can achieve adequate current tracking if tuned correctly,performance is increased using a feedforward voltage model. This model compensates for thevoltage drop due to stator resistance (set using the MOTORRS keyword) and stator leakageinductance (set using the MOTORLS keyword). It also compensates for the back EMF of themotor, with the voltage constant of the motor being set using the MOTORFLUX keyword.Values for MOTORRS, MOTORLS and MOTORFLUX are set automatically by the CommissioningWizard. The torque control calculation is performed every 125μs.The feedback device (e.g. an encoder or resolver) is used to determine motor position andspeed. Motor speed can be filtered to reduce measurement noise if necessary. The timeconstant of this filter is specified using the keyword KVTIME. By default the filter is turned off(KVTIME = 0). Note that introducing a filter on measured speed tends to reduce the stabilityof the speed controller. This can make the tuning of the speed controller gains difficult if largevalues of KVTIME are used.KIPROPKIINTdtProportional gain termB-8sIntegral gain termTorque demand+++++-PWM value(EFFORT)CurrentdemandVoltagemodelMOTORLSMOTORFLUXInternalscalingCurrentsensorsFeedbackdevice(e.g. encoder,resolver)MotorMeasured currentFeedbackinterfaceMeasured speed (VEL)Measured position (POS)Filter(KVTIME)PowerstageMOTORRSFigure 49 - Torque control system