Skip to main content

Kollmorgen Support Network

Cogging Suppression | 05 Aug 2014 | |

Cogging Suppression


If the drive is operated in velocity / position control mode, the torque / force ripple leads to a current ripple which occurs in the torque- / force- generating component. 

The principle of the cogging compensation is to add a feed-forward signal to the current q- component command value which prevents the ripple from being propagated to the outer control loops (velocity, position). This leads to an even torque / force deployment along the whole traversing range. 

Number of table points 256 256 4096
OPMODE   for creating the table 8 0 0
Reference required depends on DRVCNFG3 Bit 7 not required
COGFILT active active inactive
Application - Incremental feedback
- Linear motors
  with rotatory motors with absolute encoder only
DRVCNFG3 Bit 7 don't set 0 = PFB used => reference required
1 = PRD used => no referenz required (rotatory motors with absolute encoder only)
no function

Current Feed- Forward 

The current feed-forward values are read from a table and added to the output signal of the velocity controller. Since all feed-forward signals are only applied in velocity- and position- control mode, the cogging compensation must be switched on/off in OPMODE 2 and 3 with the parameter FFTSW  (Bit 0= 1, see chapter useful ASCII commands). Since the current feed-forward values are referenced against the position feedback position PFB, the cogging compensation is only active if the reference point is set. For proper operation of the current feed-forward control, it has to be assured that the reference point is always located at the same position as during generation of the current feed-forward table. The current feed-forward control is activated by means of the ASCII command COGMODE (1 means activated, 0 means deactivated, 0 is the default setting). Before the cogging compensation is used for the first time, a table with current feed-forward values has to be recorded by means of the ASCII command CALCCOG

Compensated Traversing Range

For rotary motors, the table of current feed-forward values always covers one revolution, the current feed-forward signal is repeated periodically with each revolution. Thus, the compensation is active along the entire traversing range.  For linear motors, the table of current feed-forward values covers exactly the traversing range over which the current q-component command value was recorded. This  range can comprise of 1/4, 1/2, 1, 2, 4, ..., 2n pole- pair pitches, where n is a positive integer number. Outside of the compensated range, the current feed-forward values are set to 0. 

Recording of the Current Feed- Forward Values

The current feed-forward values are recorded by means of the ASCII command CALCCOG.  This command launches a motion task which  causes the motor to traverse from a specific start position over the range to be compensated at a constant velocity specified previously. During execution of this motion task, the current q- component command values are recorded. The recorded values are filtered, the constant component is removed, and the modified values are written to the current feed-forward table. The constant component of the current q- component must be removed from the current feed-forward values because only the current ripple has to be compensated.  The CALCCOG command can only be executed if the following pre- requisites are met: 

  • Since a motion task is used to record the current feed-forward values, OPMODE must be set to 8. 
  • The reference point must be set. 
  • The drive must be enabled. 

The set of parameters valid for the CALCCOG command depends on the motor type (MTYPE): 

Rotary Motors (MTYPE <> 2) 

Syntax:    CALCCOG (velocity) 
For rotary motors, the traversing range is always a single revolution, beginning from the current position. If the optional parameter velocity is omitted, the traversing velocity is 5 rpm. 

Linear Motors (MTYPE = 2)

Syntax:    CALCCOG (velocity) (distance) (start position) 
For linear motors, the traversing range is a single pole- pair pitch if the optional parameter distance is omitted. If the optional parameter start position is given and differs from the current position, a motion task is generated, do the motor moves to the designated start position with the velocity VREF. If start position is omitted, the current position is selected as the start position. The optional parameter distance defines the traversing range along which the cogging compensation shall be active. The settings valid for this parameter are given in section Compensated Traversing Range, invalid settings result in an error message. The optional parameter velocity defines the traversing velocity during recording of the current feed-forward values. If this parameter is omitted, the traversing velocity is 5 pole pairs per minute.  Note: Parameters can only be omitted in right-to-left order, i.e. valid command lines are: 

If  CALCCOG is finished, the table is automatically saved to the drive’s flash EEPROM and can be activated by setting COGMODE to 1, 2 or 3 (see table on top). 


CALCCOG will be operated with 5 rpm. In case of high resolution encoders and with COGMODE  3 (large table) it is recommended to set a smaller velocity set point, for example 2 rpm.


As mentioned in section Recording of the Current Feed- Forward Values, the constant component has to be removed from the recorded values. Further, disturbances and noise should be removed from the signal. A conventional low-pass filter could serve for this purpose, though with the disadvantage of introducing a phase lag to the feed-forward signal.

As an alternative, the signal can be transformed to the frequency domain using the Fast Fourier Transform (FFT), and, after removal of all undesired frequency components from the spectrum, transformed back to the original domain using the Inverse Fast Fourier Transform (IFFT). The advantage of this method is that no phase lag is introduced to the feed-forward signal. Another advantage is that the constant component of the signal is provided in sample 0 of the spectrum weighed with the number of samples. Thus, the only thing to do to remove the constant component from the signal is to zero sample 0 of the spectrum.

Parameterization of the Filter

The filter can be parameterized by means of the ASCII command COGFILT. This parameter represents a bandwidth factor which can assume values in the range from 0 to 1. If COGFILT is set to 0, all frequency components are removed from the spectrum.

If COGFILT is set to 1, no filtering is applied at all. For any other setting of COGFILT , all samples from
   COGFILT*N/2 to (N-1)-COGFILT*N/2
are removed from the spectrum.

If, for example, N=1024 and COGFILT=0.1, the samples 51 to 972 are removed from the spectrum. The values in this example have been chosen by intention because the present implementation of the cogging compensation uses a table of 1024 values and the default setting of COGFILT is 0.1, since this value has proven to be suitable for most of the motors tested. 

Note : in case of cogging effects with higher frequencies the compensation will show better results, if the filter is activated with  COGFILT 1.


Presumption :

Control circuits must be optimized (CTUNE, OTUNE, Autotuning, see Onlinehelp of the setup software)

Cogging compensation in the position controller:

  1. COGMODE 0
  2. OPMODE 8
  3. EN
  5. COGMODE 1

Cogging compensation in the velocity controller:

  1. COGMODE 3 or COGMODE 2 and DRVCNFG3 Bit7 = 1 (SAVE COLDSTART required) 
  2. OPMODE 0
  3. EN

Useful ASCII commands:

DRVCNFG 0x100 Resolver as absolut encoder (2 poles Resolver = absolut within one turn)
DRVCNFG3 0x16 Fast error reset
COGFILT Low pass filter of cogging function
COGRED Factor of GV reduction during cogging measurement
FFTSW 1 Activate cogging compensation in current controller

Cogging test in velocity controller

  1. OPMODE 0
  2. COGMODE 1 (2)
  3. GVTN 0
  4. GV 0.001
  5. EN

Test the cogging by rotating the motor shaft manually. By switching over COGMODE from 0 to x a direct comparation with/without compensation is possible.Test cogging.

Check the Cogging Table

The recorded table (with CALCCOG) is saved in the servo amplifier's memory and can be checked using the scope funtionality in the setup software DriveGUI:

  1. Set trigger source to COGTAB and trigger level to 0. Start recording loads the cogging table and displays it with the position. Skaling:
    Current 3280 increments = peak current (DIPEAK) of the servo amplifier,
    Position: 1 rotation = 2^32 
  2. With rotating motor the macro variable ICMDCOG can be recorded. It shows the currently used table value in increments.
Back to top

About this Article

Kollmorgen Support