The automatic vibration compensation function has been added and called in motor drive ISR to calculate feedforward torque current.
- Adding the pre-define symbols MOTOR1_VIBCOMPA in build configuration of the project as
described in Section 3.2.2 for enabling the vibration compensation.
- Adding the variables vibCompAlpha, vibCompGain,
and vibCompIndexDelta to Expressions window in CCS Debug Perspective, and tuning
these parameters to achieve the expectation performance for the vibration
compensation according to the compressor and air-conditioner system.
- vibCompAlpha is used as the learning speed. The higher this value (with
a maximum of 1.0) the slowest it learns the algorithm. A high value is
desirable though, since it provides noise immunity.
- vibCompIndexDelta is to advance the output waveform into the future by a
little bit so that the resulting current will be very close to the
desired value by the time the mechanical angle reaches that point. A
typical value of 10 is recommended, but ultimately needs to be
fine-tuned by the user.
- vibCompGain is the gain factor of the feedforward torque reference
torque current value (with a maximum of 1.0).
- Change speed reference (motorVars[0].speedRef_Hz) and speed controller gains
(motorVars[0].Kp_spd and motorVars[0].Ki_spd). This step is used to take the
motor and load to where the motor vibrates due to the pulsating load. For
vibration compensation to work better, increase the values of the speed
controller gains. Make sure the speed controller is still stable though.
- Adding the pre-define symbols DEBUG_MONITOR_EN in build configuration of the project as
described in Section 3.2.2 for enabling the motor running speed vibration. Now enable the vibration
compensation output by setting this flag, vibCompFlagEnable = 1. Then let it run
for a 5 to 10 seconds, and then get the new speed variation by setting this bit:
motorVars[0].flagClearRecord = 1. Record that the speed variation is about
2Hz.
- If the vibration was not reduced, try increasing the speed controller gains. Also try increasing
the learning speed of the vibration compensation algorithm by decreasing the
value of vibCompAlpha in decrements of 0.02, so try: 0.99, 0.97, 0.95, etc. each
time you change vibCompAlpha, let it run for a few seconds and get a reading of
the speed variation by resetting that calculation: motorVars[0].flagClearRecord
= 1.
- After tuned and fixed these variables value,
record the watch window values with the newly defined parameters in user_mtr1.h
file.
USER_MOTOR1_VIBCOMPA_ALPHA = vibCompAlpha's value. The learning rate of the
vibration compensation module from 0.0 to 1.0.
USER_MOTOR1_VIBCOMPA_GAIN =
vibCompGain's value. The gain of the vibration compensation module from 0.0
to 1.0.
USER_MOTOR1_VIBCOMPA_INDEX_DELTA = vibCompIndexDelta's value. The phase
advance of the vibration compensation module from 0 to 360.
Controlling motor current based on compressor
torque vs angle is an alternate technique to counter the speed ripple variations.
Adding the pre-define symbols MOTOR1_VIBCOMPT in build configuration of the
project as described in Section 3.2.2 for enabling this vibration compensation method.
Depending upon the rolling piston angle, an additional torque current component can be either
added or subtracted from the speed PI controller output. The current needs to be
added during compression stage and subtracted during exhaustion (where it aids the
movement of piston leading to increase in speed) and its magnitude can be computed
empirically to match the torque profile of the compressor. Algorithm has split the
360 mechanical deg into 3 sector and compensation current can be added separately
through variables VibCompAlpha0, 120 and 240. With rough tuning of the compensation,
the speed ripple is reduced from 200Hz to under 100Hz @ 1200rpm. Further reduction
in speed ripple is possible, when tuning matches the torque profile to the closest.
Usually vibration compensation is enabled for compressor speeds between 1200 -
2000rpm (100Hz), post which its impact tends to be smaller.