Go to start of banner

# Introduction

This technical note explains how to implement a speed control for a motor.

First, the note introduces the general operating principles of a speed control, regardless of which type of machine is used. Then, the speed controller is tuned using the symmetrical optimum method.

Finally, a practical control implementation is introduced, targeting the B-Box RCP or B-Board PRO with

# General principles

An electrical machine can be modeled mechanically as a rotating mass. Its inertia $//$ can be rotated by applying a torque on it, which is the difference between electro-magnetic torque $//$ and a load torque $//$. The load is external to the motor and cannot be controlled. However the speed $//$ of the machine can be changed by controlling the electro-magnetic torque.

The relation between the speed, the inertia and the torque is formalized by the second law of Newton for rotational movement [1]:

$//$ is the external load torque applied to the shaft and $//$ is the torque due to the frictions.

The transfer function linking the torque to the speed is then:

In most applications, the effect of frictions is negligible in comparison to the load and motor torque. In this case, the transfer function simplifies to:

## Tuning of the digital control

According to the transfer function derived above, the plant is a 1st order system. Therefore, a PI controller is sufficient to follow a constant reference with no permanent error. Since the simplified plant from (3) contains a pure integrator, the proportional and integral terms are tuned using the symmetrical optimum criterion [1][2].

The parameter $//$ represents the total delay of the discrete control, which can be computed using the PN142. An numerical example is presented below.

The symmetrical optimum criterion is sensitive to abrupt changes on the reference value. In this case, a setpoint corrector can be used in order to reduce the overshoot [2]:

An other alternative is to use a rate limiter to limit the variation rate of the speed reference.

The speed controller generates only a torque reference and, therefore, must be cascaded with a torque controller in order to produce an effect on the machine. The torque controller can be implemented using, for instance, Field-Oriented Control (TN111) or Direct Torque Control (AN004).

As developed above, the tuning of the speed controller depends on the total control delay, which can be computed as in PN142. In the case of the speed control, the speed controller is the outer control loop and the torque controller is the inner loop.

The overall cascaded control diagram is shown below.

# B-Box / B-Board implementation

The figure below shows the implementation of cascaded control structure with a Field-Oriented Control as the torque controller. A Finite State Machine (FSM) oversees the operation of the machine. In particular, the FSM receives a desired speed (in rpm) from the user and limits its variation rate to reduce the overshoot of the speed controller.

### Speed controller

In this application example, the speed controller is executed 100 times slower than the torque control. This way, the torque controller has enough time at disposal to regulate the stator currents before the reference from the speed control is updated. Notice that with FOC, the torque reference must be translated into a current reference, using the equation developed in TN111.

### Tuning of the speed controller

Here is a complete numerical example of how to tune the PI of the speed control. The machine parameters are presented in the Experimental results section.

The tuning of the inner loop of the cascaded control is detailed in TN111. As a reminder:

The first step is to identify the transfer function of the speed controller:

The determination of the delays along the control chain of a cascaded control is explained in Draft PN142 v2. In this Simulink implementation, the outer-loop was chosen to the $//$ times slower than the inner-loop. Consequently, the various delays are:

The total delay of the outer-loop is then the sum of the small time constants:

According the symmetrical optimum criterion, the parameters of the PIs are computed as:

# Experimental results

The experimental setup consists of a PMSM supplied by voltage source inverter controlled by a B-Box prototyping controller. The FOC control is implemented using the graphical programming of ACG SDK library for Simulink. The power converter is built from 4x PEB 8032 phase-leg modules (3 phases and 1 braking chopper leg). Another PMSM connected to 3 power resistors is used a brake to generate a load torque.

# Machine parameters

The speed controller was validated on a Permanent Magnets Synchronous Machine (PMSM).

 Model: Control techniques 095U2B300BACAA100190 Parameter Value Unit Rated power 1.23 kW Pole pairs 3 - Rated phase voltage 460 V Rated phase current 2.7 A Rated mechanical speed 314 rad/s Rated torque 3.9 Nm Stator resistance 3.4 Ohm Stator inductance (d and q axis) 12.15 mH Permanent magnet flux that encircles the stator winding 0.25 Wb Moment of inertia (PMSM only) 2.9 kg cm2

### Test conditions

• Load torque: 2 Nm (PMSM with resistors as load)

• DC link voltage: 500 V

• Inverter: 4x PEB8032 (one leg for braking chopper)

• Interrupt and sampling frequency: 20 kHz

• Sampling phase: 0.5

• PWM outputs: carrier-based

• Torque control technique: Field-Oriented Control (FOC)

### Results

The tracking performance of the speed controller was validated experimentally by applying a speed reference step from 0 to 1500 rpm. The experiment was performed twice, with two different rate limits on the speed reference.

At first, the rate limiter was set to 100000 rpm/s. As shown below, the PMSM is unable to accelerate at this rate because the speed controller hits its upper saturation limit (1.1 pu of the nominal torque). Additionally, the tuning from the symmetrical optimum criterion leads to an overshoot of 21%.

For the second run, the reference variation was limited to 5000 rpm/s. In this case, the speed control is able to follow the acceleration of the speed reference. Since the control uses a 1st order PI controller, it is not able to completely eliminate the tracking error during the ramp. However, this has the advantage that the mechanical stress on the machine is also reduced since the control does not abruptly apply a high torque at startup. What's more, the overshoot is also reduced to only 4.7%. The only drawback compared to the first experiment is the prolonged settling time of 0.4 s, compared to 0.3 s.

The choice of the speed reference rate limitation is a trade-off between the settling time and the mechanical stress induced by a sudden change of the torque.