Jump to content
 

Motor Speed


AndyID
 Share

Recommended Posts

With DC its not so difficult to maintain speed and compensate for changes in load due to curves, gradients etc. The trick is to to supply additional voltage to cancel-out the motor's internal resistance. It's not terribly complicated.

 

The snag with that is any resistance in the track connection between the motor and the controller reduces the effectiveness of the feedback because the controller "thinks" the motor is running faster than it really is.

 

it is also possible to determine motor speed by interrupting the current supplied to the motor and sensing the motor's Back EMF. That sort of works but the snag is the motor slows down a lot in the process.

 

Rather than shut down the current supplied to the motor completely is it possible to periodically ramp it up or down to some extent and determine the actual motor speed without cutting off the power?

 

 

 

Edited by AndyID
Speeling
  • Interesting/Thought-provoking 1
Link to post
Share on other sites

After a bit more "exhaustive" thinking 😄, this should actually work, at least in theory. The resistive element of the load (that's the resistance of the motor and any resistance in the connections to it) can be determined by a decrease or increase in the current supplied to the circuit. Any resistance in the circuit will instantaneously respond to the current but the motor's EMF cannot change so quickly due to the motor's momentum.

Link to post
Share on other sites

  • RMweb Gold
On 06/10/2024 at 06:40, AndyID said:

After a bit more "exhaustive" thinking 😄, this should actually work, at least in theory. The resistive element of the load (that's the resistance of the motor and any resistance in the connections to it) can be determined by a decrease or increase in the current supplied to the circuit. Any resistance in the circuit will instantaneously respond to the current but the motor's EMF cannot change so quickly due to the motor's momentum.

At first sight, that seems a reasonable explanation, and in theory, should work.

If you do try it for real, I wish you good luck on first contact with the enemy!

Paul.

  • Funny 1
Link to post
Share on other sites

  • RMweb Premium

PWM controllers constantly measure the BEMF between pulses, the time period is so small the motor doesn't have time to slow down.

 

All DCC decoders use PWM output, usually at a high frequency (which is kind on coreless motors), typically between 20kHz & 30kHz, although a  low freqency (which is bad for coreless motors) is sometimes an option in the settings.

e.g. Lenz decoders use 23kHz for the standard setting and 19Hz for the optional setting)

  • Like 1
Link to post
Share on other sites

  • RMweb Premium
On 06/10/2024 at 02:38, AndyID said:

With DC its not so difficult to maintain speed and compensate for changes in load due to curves, gradients etc. The trick is to to supply additional voltage to cancel-out the motor's internal resistance. It's not terribly complicated.

"The motor's internal resistance" is surely the wrong term here, making it sound as if you are talking about electrical resistance. The "resistance" from gradients and curves, or stiff motion at a particular wheel angle, is in the form of an additional torque load on the motor, and to counteract this and keep the motor turning at the same speed, you need to supply more current. You can do this by increasing the voltage, but I thought PWM controllers did it by increasing the pulse length.

 

On 06/10/2024 at 02:38, AndyID said:

The snag with that is any resistance in the track connection between the motor and the controller reduces the effectiveness of the feedback because the controller "thinks" the motor is running faster than it really is.

 

it is also possible to determine motor speed by interrupting the current supplied to the motor and sensing the motor's Back EMF. That sort of works but the snag is the motor slows down a lot in the process.

One way to measure the motor speed is to measure the back emf, as you say. I don't know exactly how feedback controllers do this, but I am pretty sure the current when measuring the back emf is very low (ideally it would be zero), and so the electrical resistance of the circuit has very little effect. If the controller senses a decrease in back emf, meaning a reduction in motor speed, it won't know whether this is caused by the train going up a gradient or moving onto a distant track section with a longer electrical path (and so a higher electrical resistance), but it does not matter. The solution in either case is to increase the current to compensate.

 

On 06/10/2024 at 02:38, AndyID said:

Rather than shut down the current supplied to the motor completely is it possible to periodically ramp it up or down to some extent and determine the actual motor speed without cutting off the power?

If you can reduce the voltage without slowing down the motor, you ought to be able to cut off the voltage without slowing down the motor; this is, after all, how PWM controllers work. But if you only reduce the voltage, you will then need to measure the current at full voltage and part voltage, work out the electrical resistance of the circuit, and then use this to calculate the back emf, which seems far more complicated than measuring the back emf directly in the gap between pulses.

 

Link to post
Share on other sites

It absolutely is the motor's internal resistance. That's why the motor slows as the load increases. If there was no internal resistance the motor would run at constant speed if supplied with a constant voltage. I have made controllers that effectively cancel out most of the motor resistance and they work very well.

Link to post
Share on other sites

  • RMweb Gold

Increasing the "internal impedance", of a source, to match/control the motor speed has problem - the resultant voltage, across the rails, drops as speed drops. This means that the contacts, (never perfect on model railways), will lose conductivity occasionally. Resulting in slow speed stuttering.

 

The great advantage of PWM is that the applied voltage, (when active, ie the high period), is at a much higher "line" voltage and usually gets through. (The BEMF, when/where used, does still suffer from the intermittent rolling contact conductivity.

 

Many moons ago, I built a PWM controller where I could "record" the journey's Throttle positions, (in the microcontroller's memory), as I "controlled" the train. Pressing "repeat" would replay this whole "journey" as often as I wanted - but it did show up a major problem very quickly. A cold loco would behave differently to the same train that had run the "repeat" just several times. This was because the motor, and gear chain, had "warmed up" and had a lot less rolling resistive load than a cold train.

 

Curves are a big resistance, (in 00 - must be similar in other gauges but I have no experience), but gradients are VERY asymmetrical due to the dominating (and proven variable!) resistance to moving/rolling. Going up will take a LOT more energy BUT this is only repaid a very little in going down.

 

If you want to compensate for up gradients/curves/points/down gradients - without BEMF - then you WILL need some "dead reckoning" positional feedback to the controller. I did this in the end.

 

Just thoughts. I wish your endeavours well.

 

 

Kev.

Link to post
Share on other sites

  • RMweb Premium
59 minutes ago, AndyID said:

It absolutely is the motor's internal resistance. That's why the motor slows as the load increases. If there was no internal resistance the motor would run at constant speed if supplied with a constant voltage. I have made controllers that effectively cancel out most of the motor resistance and they work very well.

The motor slows as the load increases in much the same way as an internal combustion engine or a steam locomotive will slow as the load increases. To prevent the slowing down, you need to increase the supply of whatever it is that creates the torque. In a steam engine, you will need more steam, in an internal combustion engine you will need more fuel, and in an electric motor you will need more current or a stronger magnetic field. The increased current is there to provide additional mechanical force, not to overcome additional electrical resistance.

 

In fact, if you have a constant voltage supply, such as a large battery, and you measure the current, you will see that as you increase the mechanical load on the motor, the current will increase. This is nothing to do with resistance, but is caused by the motor slowing down, which reduces the back emf counteracting the supply voltage.

  • Agree 4
Link to post
Share on other sites

43 minutes ago, Jeremy Cumberland said:

The motor slows as the load increases in much the same way as an internal combustion engine or a steam locomotive will slow as the load increases. To prevent the slowing down, you need to increase the supply of whatever it is that creates the torque. In a steam engine, you will need more steam, in an internal combustion engine you will need more fuel, and in an electric motor you will need more current or a stronger magnetic field. The increased current is there to provide additional mechanical force, not to overcome additional electrical resistance.

 

In fact, if you have a constant voltage supply, such as a large battery, and you measure the current, you will see that as you increase the mechanical load on the motor, the current will increase. This is nothing to do with resistance, but is caused by the motor slowing down, which reduces the back emf counteracting the supply voltage.

 

Alas no 😄

 

The reason the motor slows as the load increases is because the increased load increases the current drawn by the motor. That increases the voltage drop across the motor's internal resistance so the motor "sees" a lower EMF. The trick is to increase the supply voltage by an amount that is proportional to the current. It's really quite easy with a couple of op-amps.

 

The snags are that it does not compensate for variations in the resistance of the connection to the motor (track resistance etc.), the amount has to be adjusted to match the particular motor and if you get too greedy you get positive feedback and it starts to oscillate 🙂

Link to post
Share on other sites

1 hour ago, SHMD said:

Increasing the "internal impedance", of a source, to match/control the motor speed has problem - the resultant voltage, across the rails, drops as speed drops. This means that the contacts, (never perfect on model railways), will lose conductivity occasionally. Resulting in slow speed stuttering.

 

 

 

That's not how this works. The controller output is a constant voltage, zero impedance source. The voltage is increased to compensate for increased load.

Link to post
Share on other sites

4 hours ago, Jeremy Cumberland said:

"The motor's internal resistance" is surely the wrong term here, making it sound as if you are talking about electrical resistance. The "resistance" from gradients and curves, or stiff motion at a particular wheel angle, is in the form of an additional torque load on the motor, and to counteract this and keep the motor turning at the same speed, you need to supply more current. You can do this by increasing the voltage, but I thought PWM controllers did it by increasing the pulse length.

 

One way to measure the motor speed is to measure the back emf, as you say. I don't know exactly how feedback controllers do this, but I am pretty sure the current when measuring the back emf is very low (ideally it would be zero), and so the electrical resistance of the circuit has very little effect. If the controller senses a decrease in back emf, meaning a reduction in motor speed, it won't know whether this is caused by the train going up a gradient or moving onto a distant track section with a longer electrical path (and so a higher electrical resistance), but it does not matter. The solution in either case is to increase the current to compensate.

 

If you can reduce the voltage without slowing down the motor, you ought to be able to cut off the voltage without slowing down the motor; this is, after all, how PWM controllers work. But if you only reduce the voltage, you will then need to measure the current at full voltage and part voltage, work out the electrical resistance of the circuit, and then use this to calculate the back emf, which seems far more complicated than measuring the back emf directly in the gap between pulses.

 

 

I am talking about electrical resistance.

 

You don't need to measure the motor speed if you use an analog circuit that continuously compensates for the voltage drop across the internal resistance of the motor.

 

Messing with the current supplied to the motor to determine the total resistance of the circuit does require a bit of extrapolation but microprocessors are pretty good at that and there is nothing wrong with a bit of extrapolation between friends.

 

PWM would be great if motors didn't have any reactance. Unfortunately they do 😄

 

I do agree that PWM is a good way to control low speeds but it's not such a good method at higher speeds. Pure DC is much kinder to the motor but that would very difficult to implement in a small DCC decoder although some might actually do that now. I'm not up to speed in the latest methods. I'm just experimenting to see if it's possible to get better results with good old DC 😄

Link to post
Share on other sites

3 minutes ago, melmerby said:

No such thing😊.

I know what you mean but..

 

Well, if you want to pick hairs it's probably close enough for the purposes here. In slightly less scientific terminology the controller output doesn't give a rats wotsit about the load, up to a point.

Link to post
Share on other sites

For the avoidance of further confusion this is the model for a DC motor running on DC. (It is a bit more complicated by the reactance of the windings during commutation but that is not significant for this discussion.) E is the voltage that does the actual work. R is the electrical resistance of the windings and brushes (all they do is waste energy in the form of heat). As the load increases E is reduced because of the voltage drop across R.

 

If you compensate for the voltage drop across R it's easy to maintain E constant which means that the motor will rotate at constant speed regardless of load.

 

DCMotor.jpg.b54d9bee8787c3e66b7bf01ede86d51e.jpg

 

 

Edited by AndyID
  • Agree 1
Link to post
Share on other sites

  • RMweb Premium

E= supply voltage minus back emf, I suppose. The only change in R is from heat, and once the motor warms up, this probably won't be much.

 

If you have a conventional DC supply (not PWM), then if you increase the load and want to maintain the same speed, you'll need more current. To get more current, you increase the supply voltage, which in turn increases E (if the motor speed is the same, then the back emf won't change).

 

Alternatively, if you increase the load and don't change the supply voltage, E (and therefore the current) will increase because the additional load slows the motor down and this reduces the back emf.

 

R does not change in either scenario.

 

it is easy enough to demonstrate that R does not change with load if you have a non-PWM dc supply with voltage control, and can measure voltage, current and motor speed. Get the motor warmed up by running it with a decent load, then run it with three different loads at the same speed, recording the voltage and current.

 

In each case, V - bemf = I.R

Since bemf remains the same at constant speed, you can use two sets of readings to calculate R:

R = (V2 - V1) / (I2 - I1)

You can then use the other set of readings to show that R remains the same:

R = (V3 - V1) / (I3 - I1)

or

R = (V3 - V2) / (I3 - I2)

Edited by Jeremy Cumberland
Link to post
Share on other sites

13 hours ago, AndyID said:

 

Alas no 😄

 

The reason the motor slows as the load increases is because the increased load increases the current drawn by the motor. That increases the voltage drop across the motor's internal resistance so the motor "sees" a lower EMF. The trick is to increase the supply voltage by an amount that is proportional to the current. It's really quite easy with a couple of op-amps.

 

 

It is important to understand why the current increases.

When a motor is turning at a constant speed, the torque produced (motor torque) is equal to the torque consumed by the load (load torque). Imagine you coupled up some more wagons while the train is moving. This would increase the load torque. This is now more than the motor torque, causing it to slow down.

 

When the motor speed decreases, its back EMF will decrease with it (because the current is passing through the magnetic field more slowly). As the back EMF decreases, the effective forward voltage will increase, which will increase the current, which will increase the motor torque. Once this matches the applied torque, the speed will stabilise.

  • Like 3
Link to post
Share on other sites

12 hours ago, Jeremy Cumberland said:

E= supply voltage minus back emf, I suppose. The only change in R is from heat, and once the motor warms up, this probably won't be much.

 

E is the back-emf. R is any resistance in the circuit. That's the brushes and the resistance in the of the wire in the windings. The applied voltage would be V across the terminals (but not shown on the diagram)

 

The equation is:

 

V= iR + E  (i is the current)

 

As the load on the motor increases the current increases which means the voltage across R increases and E must be reduced. (Motor slows down.)

 

If you measure the current you can supply additional voltage to compensate for the voltage drop across R. (That's what the circuit above does)

Link to post
Share on other sites

12 hours ago, Jeremy Cumberland said:

If you have a conventional DC supply (not PWM), then if you increase the load and want to maintain the same speed, you'll need more current. To get more current, you increase the supply voltage, which in turn increases E (if the motor speed is the same, then the back emf won't change).

 

"E" always corresponds to the motor speed. The speed reduction is due to the voltage drop across the internal resistance as the current increases.

Link to post
Share on other sites

10 hours ago, Pete the Elaner said:

When the motor speed decreases, its back EMF will decrease with it (because the current is passing through the magnetic field more slowly). As the back EMF decreases, the effective forward voltage will increase, which will increase the current, which will increase the motor torque. Once this matches the applied torque, the speed will stabilise.

 

Yes, as the load increases the EMF decreases but that's because the voltage drop across the internal resistance increases. If there was no internal resistance the motor EMF would be the same as the applied voltage and the motor would simply draw more current to maintain the same speed.

 

All the circuit above does is increase the voltage to compensate for the increase in voltage drop across the internal resistance as the current increases. I know it works because I've built it 😄

Link to post
Share on other sites

12 hours ago, Jeremy Cumberland said:

In each case, V - bemf = I.R

Since bemf remains the same at constant speed, you can use two sets of readings to calculate R:

R = (V2 - V1) / (I2 - I1)

You can then use the other set of readings to show that R remains the same:

R = (V3 - V1) / (I3 - I1)

or

R = (V3 - V2) / (I3 - I2)

 

But R does not remain the same 😄

 

R includes the resistance in the rails (which is non-trivial). Oxidation and a whole bunch of other stuff also affect R.

The idea is to determine the total R of the circuit in real-time and compensate for it. Slightly tricky of course but I think it should be possible.

  • Like 1
Link to post
Share on other sites

2 hours ago, AndyID said:

 

Yes, as the load increases the EMF decreases but that's because the voltage drop across the internal resistance increases. If there was no internal resistance the motor EMF would be the same as the applied voltage and the motor would simply draw more current to maintain the same speed.

 

All the circuit above does is increase the voltage to compensate for the increase in voltage drop across the internal resistance as the current increases. I know it works because I've built it 😄

 

You do realise the motor EMF opposes the applied voltage? It cannot be a forward EMF because you would then be getting power for free, which is physically impossible.

As the speed increases, so does the back EMF, which makes the net voltage lower.

If the back EMF was the same as the applied voltage (impossible), they would cancel each other out & you would get no current.

 

Link to post
Share on other sites

1 hour ago, Pete the Elaner said:

 

If the back EMF was the same as the applied voltage (impossible), they would cancel each other out & you would get no current.

 

Actually no. The current will still flow through the motor to do work if there is any difference.

 

 

 

 

Edited by AndyID
Clarification
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...