Back-EMF (BEMF)

IN THIS SECTION

1) BEMF SHORT ANSWER

2) BEMF TERM DEFINITION

3) WHAT IS BEMF GOOD FOR?

4) BEMF BACKGROUND

5) THE MOTOR/GENERATOR CONCEPT BEHIND BEMF

6) HOW DO YOU MEASURE THE BEMF VOLTAGE IF THE DECODER IS DRIVING THE MOTOR?

7) WHY DOES THE MOTOR KEEP SPINNING WHEN THE DECODER CUTS OFF POWER?

8) BEMF MOTOR CONTROL (PID CONTROL) (MOTOR SPEED FEEDBACK)

9) WHAT DOES EACH TERM OF "PID" DO TO HELP REGULATE THE MOTOR SPEED?

10) DO ALL DCC DECODERS USE PID CONTROL?

Don Fiehmann has written a document on BEMF control. Here is a link to his presentation:

http://www.amhobby.com/download/BEMF_PID_Intro_AHD.pdf

1) BEMF SHORT ANSWER

BEMF is like cruse control for an electric motor. BEMF refers to a voltage generated by the motor that can, under certain circumstances, be measured by the decoder. That voltage tells the decoder what rotating speed the motor is going (think speedometer). With the decoder now knowing the current speed of the motor, the decoder can compare it to the speed requested by the throttle. If the speed does not match, the decoder then changes the level of power applied to the motor to correct the speed. The loop of measuring the speed and then adjusting the speed occurs continuously giving you precise regulated motor speed control under wide motor load and speed conditions.

2) BEMF TERM DEFINITION

BEMF (Back-EMF) decoders use a property of all DC motors called called BEMF or Back Electro Motive Force. It is a scientific electromechanical term. The word "Back" refers to something "coming back from the motor" and the word "Force" is referring to the motor voltage that is being created. In other words, we are talking about a "Back Voltage" as in opposing voltage. This fancy term means nothing more than recognizing all DC motors are also DC generators.

The term "BEMF" has ALSO taken on a secondary Marketing definition with Decoders. It is used as a name describing the use of a BEMF based motor speed control system that is used to regulate the motor speed.

3) WHAT IS BEMF GOOD FOR?

On a global scale, generators generate BEMF which is the electricity we use for our homes that does not come from Solar Cells. Nuclear, Coal and Hydro electric power stations all have generators. (Technically they are alternators, AC generators, but it is basically the same thing.)

What about Trains?

The goal is to use the BEMF voltage to improve the model engines prototypical response to a train under any and all operating conditions.

"BEMF" GOAL = SMOOTH TRAIN STARTS AT PROTOTYPICAL SLOW SPEEDS WITH ANY SIZE TRAIN IN TOW.

How?

Using the Decoder's powerful microprocessor to monitor the motors BEMF voltage in combination with special software, it can add this precision motor control capability to any engine.

Modern BEMF decoders have gone further in making BEMF even more realistic in terms of train handling than the first generation BEMF decoders did when working with multiple consisted BEMF powered engines.

4) BEMF BACKGROUND

The motors used in our locomotives have progressively gotten better over the years. Along with this the way we control these motors has continued to improve. The old DC rheostat gave way to solid-state electronics with better control. More advanced DC power packs offered Pulse Power which extended the low speed performance of the trains. Smooth starts instead of the engine suddenly taking off.

Then came DCC with a decoder that offers direct individual motor control that allows us to run each train individually on the same track. Decoders have continued the progress by improving the way they handle power to the motors. One of the biggest improvements has been the use of BEMF to control motor speed. BEMF has sometimes been called "cruise control" for locomotives. The idea is you can take your hands off the throttle (Gas Pedal) and the train will maintain a constant speed on flat, uphill or downhill track. That was not possible on DC throttles. One often had to adjust the throttle speed to keep the train going at a prototypical speed when encountering grade changes.

Implementing a "BEMF" system as in "BEMF control" system on a given motor results in a constant speed motor that will remain at that speed REGARDLESS of the load on the motor. This assumes the load is within the load limits of the motor itself.

The most dramatic example of what BEMF control can do is to allow a locomotive pull a full train at super slow speeds. If you set a very slow speed on a engine with NO cars connected, dynamically adding cars to the rear of that engine will NOT change the engine's very slow speed. This is unlike a DC engine which will go slower or even stall when you couple the cars to the engine. The point is with BEMF you get low speed with full power behind it. No stalling assuming clean track power pickup.

For Diesel Engines this is more prototypical since they generate the most pulling power at startup. But it can also help steam engines to. BEMF control can smooth out minor kinks in a steam locomotive's running gear that are visible at slow speeds. No more jerky running at slow speeds. Within limits, BEMF can cover up rotating mechanical defects.

There is more to BEMF control and how it should be used properly on engines. But that is not the point of this section.

5) THE MOTOR/GENERATOR CONCEPT BEHIND BEMF

The difference between a motor and a generator is how the energy/power is getting to the motor/generator.

a) If the motor/generator is being driven externally by electricity on the motor electrical terminals, it becomes a motor putting mechanical power out via the motor's shaft.

b) If the motor/generator is being driven externally by mechanical energy via the motor shaft, it becomes a generator putting electricity power out via motor's electrical terminals.

When the motor is acting as a generator, you can measure the "BEMF DC voltage" on the terminals of the un-powered motor! As you change the speed of the motor, the BEMF voltage will go up and down accordingly. Higher motor speed = higher voltage and visa versa.

THIS IS KEY: MOTOR SPEED IS DIRECTLY PROPORTIONAL TO THE BEMF VOLTAGE THAT IT CREATES.

If you can measure BEMF voltage, you will know something about the motor speed!

NOTE: The picture above shows what is called a motor-generator set. It allows one to create electrically isolated power which can be the same or higher or lower in voltage. It is the mechanical version of a transformer. The design of the motor or generator is basically the same which it why you cannot tell which is the motor and which is the generator....its both!

6) HOW DO YOU MEASURE THE BEMF VOLTAGE IF THE DECODER IS DRIVING THE MOTOR?

It turns out that making this measurement is very easy given that decoder drive the motor using "PWM" or Pulse Width Modulation" motor drive techniques. (If you want to know more about what PWM means, go here: PWM Motor Drive)

The decoder actually never varies the DC voltage applied to the motor. Instead the decoder pulses the motor with power to control its speed. When the motor is not being pulsed with power, the motor automatically and instantly reverts back to a generator presenting its BEMF voltage on the same electrical terminals used to apply power to the motor. The decoder microprocessor has a built in "Volt Meter" which allows it to measure the BEMF voltage from the motor.

So it turns out, there are plenty of opportunities for the decoder to take "snap shots" of the motor's BEMF voltage and hence it's spinning speed.

7) WHY DOES THE MOTOR KEEP SPINNING WHEN THE DECODER CUTS OFF POWER?

With power cut off, the energy the keeps the motor spinning comes from the rotating mass of the motor and it drive mechanism. Think "flywheel effect" . This rotational mechanical energy is instantly used to attempt to keep the motor spinning at the same speed. The trick is again to take a snap shot of the BEMF voltage before the motor has a chance to slow down due to frictional and loading effects on the motor.

8) BEMF MOTOR CONTROL (PID CONTROL) (MOTOR SPEED FEEDBACK)

BEMF Control is actually correctly called PID control. PID stands for Proportional, Integral and Derivative. However nobody likes to using these mathematical terms and associated feedback concept complexity except in technical circles. The simplified term is BEMF control which itself has been shortened further as simply "BEMF" model railroad marketing parlance.

The PID control process is a little like a three ring circus. Each of these three items plays a part in the control process. For motor control you can think of PID as a black box with the output as the power to the motor and the input as the BACK-EMF from the motor. For a smooth control, the values of PID control can be adjusted or "tuned". Each of the terms in PID actually refer to adjustment variables or decoder CV's that can be tuned to give you precise motor speed control.

In the interest of attempting to un-complicate the BEMF terminology, the exact name given by the decoder manufacture for the PID terms will vary as well which PID adjustments your allowed to access and vary. The holy grail is to have it down to one adjustment or make it 100% automatic. Minimize the intimidation factor of the technology. Unfortunately nobody has succeeded 100% in doing this given all the variables of the type of motors involved. So some level of controls remain available....possibly undocumented.

The "PID" control system takes full advantage of the fact that the motor speed can be measured by looking at the BEMF voltage from the motor.

With the BEMF voltage now measured and translated into a speed value (Measured Speed), the PID loop can now compare the actual motor speed against the requested/desired speed of the engineers throttle.

1) If the motor is going to slow, the decoder will increase the voltage level going to the motor to make it go faster with the given load.

2) If the motor is going to fast, the decoder will decrease the voltage level going to the motor to make it go slower with the given load.

3) If the motor is going at the right speed, the decoder will not change the voltage level going to the motor.

So the PID control process is constantly making correcting adjustments "On The Fly" to control the motor speed and make it run constantly at the desired speed. This process happens so fast that all you see is incredible motor speed control. But if done incorrectly, you can lose control of the motor! Hence doing it the right way become important.

To learn how to do it the right way with different DCC decoder brands, go here: Decoder Motor Tuning

9) WHAT DOES EACH TERM OF "PID" DO TO HELP REGULATE THE MOTOR SPEED?

PROPORTIONAL: Sets the base line correction strength to regulate the motor speed when an engine is working on flat track with a typical load. The correction value is fixed and cannot deal with large load changes as the train move around the layout. The speed of correction depends on how fast the motor speed feedback information is updated. It is faster than integral but slower than derivative.

INTEGRAL: Working from the current base line speed, the Integral function dynamically adjust the speed correction strength up or down in response to a large but AVERAGE motor load change such as going up or down a hill. Once the grade is gone, it's speed corrective action also disappears. Unfortunately since it looking at an average load change over time, it is the slowest in making speed corrections. Using to much integral correction can make the motor operation unstable.

DERIVATIVE: Starting from the current base line speed, the Derivative function dynamically adjust the speed correction strength up or down in response to a very large but sudden or instant motor load change such a wheel bind or slack change. Once the sudden load change is overcome and the original speed has been restored, it's correction action also disappears. Since it only looks for sudden load changes, it is very fast at making corrections. It is the opposite of Integral. Using to much derivative correction will result in a jumpy or jittery motor including making audible noise.

With these terms also comes the definition of what is gradual (slow) and what is sudden (fast). These definitions are up to the PID design engineer and an important variable in determining how well the PID loop will work for a given motor application. The choices can explain the performance differences between different DCC decoders with PID BEMF control.

10) DO ALL DCC DECODERS USE PID CONTROL?

No. There are other methods of implementing BEMF control that does not involve PID control. The only way to tell from the outside if a decoder is using PID control for BEMF is if it calls out PID terms in it's CV settings for BEMF control. There are also some decoders that only implement PI with no "D" control loop or term. The argument is that train control is more about slow events such as grades and not instant corrections. With less variables involved, in theory the system will be easier to set up.

8/29/18