DC Motor Emulator

Thread Starter

kubeek

Joined Sep 20, 2005
5,795
I am in need of making an emulator of a DC motor. We have a gate mechanism which has a 24V 10A motor. It is geared to the gate which is spring loaded in the end positions, so the load on the shaft moves from forcing the motor along the direction of travel to oposing it when the gate moves from one stop to the other.

What I need is to build a device that would be able to act as a spinning motor - with back EMF proportional to speed, internal winding resistance, and positive or negative load on the shaft. This means that the emulator needs to source and sink current, and if possible be driven in both polarities to allow for reversal but this can be solved another way. There will be a microcontroller that will set the parameters for speed and load.

I imagine that the core will be likely be two mosfets, one for sourcing current from an internal supply and the other for dumping the current coming from the driver, which would be somehow regulated to the value of the EMF, however I cannot figure now how to add the shaft loading to this. The internal resistance could really be modelled by a fixed resistor, so that I don´t need to worry about right now.

Any ideas?
 

Thread Starter

kubeek

Joined Sep 20, 2005
5,795
So far it seems that a simple output stage of an audio amplifier will quite happily keep the voltage on the terminals of the motor constant, while sinking and sourcing current.
Now, how do I model the mechanical load? It seems I could measure the voltage across the fixed resistor and adjust the amplifier voltage to a preset current.
 

Marley

Joined Apr 4, 2016
502
Motors do not have back EMF, they generate a voltage proportional to the shaft speed*. It does this all the time it is running not only when the supply stops. This is why a lightly loaded motor takes less current from the supply.

So to simulate a motor you need a low resistance, equal to the winding resistance, probably in the region of a few tenths of an ohm. This needs to be in series with a voltage generator (high power amplifier) capable of sinking and sourcing the peak motor current. This voltage needs to be controlled to simulate the inertia of the motor. Probably using a filter from the original motor output.

So the peak motor current will be the motor supply voltage = 24V / winding resistance (for a stalled motor).
To simulate the inertia, when the 24V is first applied, the amplifier output needs to be zero. Then slowly rise. When the motor supply voltage is removed the amplifier voltage needs to slowly fall.

Actually, thinking about it, the amplifier output needs to be controlled by the motor current (via a filter).

*A relay has back EMF. This is opposite polarity to the supply. When a motor generates it is the same polarity as the supply.
 
Last edited:

Thread Starter

kubeek

Joined Sep 20, 2005
5,795
Ok, I have allways seen the generated voltage called back emf, but that doesn´t really matter as long as we know what we mean. You are right that the voltage has a different polarity than with a relay, so is there some short term for this other thatn generated voltage proportional to shaft speed?

Anyway, what this boils down to is a power amplifier with a series resistance R. The voltage on the amp will be controled by a combination of voltage that represents the shaft speed*kv, and by additional voltage that is the set current/R minus the drop on the resistor. Am I going the right way with this?
 

Marley

Joined Apr 4, 2016
502
Anyway, what this boils down to is a power amplifier with a series resistance R. The voltage on the amp will be controled by a combination of voltage that represents the shaft speed*kv, and by additional voltage that is the set current/R minus the drop on the resistor. Am I going the right way with this?
Correct, the amplifier voltage will be proportional to the simulated shaft speed. The amplifier output will never go below zero and, because no motor is 100% efficient, will never equal the motor supply voltage. So there will be a filter to simulate the inertia and the amplifier gain simulates the motor efficiency. This gain will always be less than 1.

Because the gain is less than 1, I think it will be OK to control the amplifier simply on the motor supply voltage. No need to measure current*.
Just thinking of the case where we have the simulated motor running and then we remove the supply: Lets say we have a gain of 0.8 and a resistor of 0.5 ohm. With a steady 24V supply, the amplifier output will be 19.2V and the current will be (24.0 - 19.2)/0.5 = 9.6A.

When the supply is removed (open circuited) the current falls to zero, the 19.2V is fed back to the input via the filter and the amplifier output voltage drops at a controlled rate.

If the motor supply was shorted:
  1. A reverse current will flow 19.2/0.5 = 38.4A
  2. Zero volts will be fed back to the filter. The amplifier output will fall much faster.
I think this simulates what a real motor will do when open circuited or shorted. Of course the filter needs to be carefully designed. Might have to be some kind of digital filter. *Of course the filter already knows the current. It's the difference between the motor supply voltage and the actual amplifier output voltage.
 
Last edited:

Thread Starter

kubeek

Joined Sep 20, 2005
5,795
What I think is missing is some form of load on the motor, not just the inertia. Lets say the motor is up to its RPM as dictated by the input voltage, and then it is loaded with some static load. The output of the amp and consequently the RPM need to drop by I*R, where I is proportional to torque.
 

Marley

Joined Apr 4, 2016
502
I think that could be simulated by reducing the amplifier gain. Basically, the motor becomes less efficient because some power is being lost in the load.

I'm not an expert in this - I'm making it up as I go along! It's all very interesting though. I'm sure its all been done before.
 
Top