Current and Torque Control Loop

Torque control loop

General view

Detail view

Note: The master commands a torque but internally it is computed as current. In most cases, as the position or velocity is the controlled value, the current measurement is sufficient. If a precise torque is required by the application, it should be verified with a torque sensor.

General Scope of the Torque Controller

The task of the torque controller is to make sure that the torque currently produced by the motor corresponds to the desired torque. This makes it one of the core algorithms of servo drives. It is used whenever a motor is driven.

In general, the RMS value of motor phase currents are proportional with the generated torque. The ratio between these two is known as torque constant k_T (as defined in subitem 0x2003:2).

The torque control loop is executed at a frequency of 16 kHz (as of firmware v4.2.0).

Model Predictive Deadbeat-Control

Additional to the PID controller, which has accessible gains (object 0x2010 Torque controller) a Model Predictive Deadbeat control algorithm (MPD) is used. This allows to forecast the current over one sampling period and calculate the required voltages so that by the end of the following voltage application period, the current errors will be suppressed to 0.

Reference Torque Generation

The reference torque can be updated in every execution step. In cyclic synchronous torque mode, the reference torque is transferred directly from the EtherCAT master to the torque controller via the PDO (object 0x6071). In other modes, a position or velocity controller is running on the SOMANET Drive and acts as higher level control, so their outputs act as reference for the torque controller. The offset torque 0x60B2 is also part of the reference torque as described in Torque Offset.

Model-Predictive Deadbeat Current Controller

The current controllers used in SOMANET are using a Model-Predictive Deadbeat Field-oriented Controller plus an Integrator.

The purpose of the model-predictive current controller (block “Current Controller” in the block diagram) is to make the actual torque-generating current match the requested torque-generating current. Just as a regular PID current controller, the model-predictive current controller tries to remove the current error.

In Model-Predictive Control, the model of the system is known to the controller. This enables the controller to “predict” the optimal control value for the next time step taking into account the value from the actual time slot.

While a conventional PI current controller would iteratively change the PWM duty cycle to reach a certain current, the model predictive controller can predict the required PWM duty cycle and set it right away during one time step.

Instead of a PID structure, it internally uses a model-based approach to determine the required voltages at motor terminals. The underlying equations allow predicting the current over one sampling period and calculate the required voltages so that by the end of the following voltage application period, the current errors will be suppressed to 0.

As a base for these calculations, the motor parameters are used. This controller structure can theoretically suppress the error values of motor currents to 0 in only one control execution period. However, it is sensitive to sensor noise and also depends on the model accuracy.

Reference Torque Generation

The reference torque can be updated in every execution step. In cyclic synchronous torque mode, the reference torque is transferred directly from the EtherCAT master to the torque controller via the PDO (object 0x6071). In other modes, a position or velocity controller is running on the SOMANET Drive and acts as higher level control, so their outputs act as reference for the torque controller. The offset torque 0x60B2 is also part of the reference torque as described in Torque Offset.

Functional Description and Controller Structure

The following figure represents the structure of the torque controller. The implemented torque control algorithm is based on field oriented control (FOC).

Figure 3: Torque loop structure

Tuning of the current controller

The controller can be fine-tuned by directly setting two parameters:

  • Settling time (subitem 0x2010:10)

  • Damping ratio (subitem 0x2010:11)

Settling time is entered in [µs], the default value 1000 µs.

Damping ratio is entered in [per mill], the default value is 2000 ‰.

Use case:For a damping ratio of 0.7, the entered value should be 700 [per mill].

Parameters

Object ID Name Description
0x2010 Torque Controller Values Kp, Ki and Kd for Torque Controller