My motor controller dev thread

I am currently writing my bachelor’s degree for “BLDC motor and controller” and I’m just bringing out couple of theories and hypothesis’ to see if they make sense to you guys.

1st topic/theory: “Effective” voltage and torque

What is effective voltage? Effective voltage is the “voltage doing work” in the motor’s windings and is the difference between the PWM cycled battery voltage and the motor’s BEMF voltage. If the PWM battery voltage is the same as the BEMF voltage, no current flows and no torque is generated.

Example with arbitrary values: 12 V battery voltage and 50 % PWM duty cycle → 6 V Motor’s BEMF voltage → 4 V “Effective voltage” = 6 V - 4 V = 2 V

Question: Does the effective voltage linearly effect the current/torque? AKA using the example values above. The 2 V “effective voltage” would cause current X, to flow through the winding. Now, if the motor’s BEMF is just 2 Volts, the “effective voltage” would now be 4 Volts, would the resulting current now be 2X?

2nd topic/theory: Offset of “Effective” voltage and behavior

How does the current behave when we offset the “effective voltage” and BEMF voltage?

Example with arbitrary values: Our “effective voltage” → 2 V 1st case voltages → PWM 4 V, BEMF 2 V 2nd case voltages → PWM 12 V, BEMF 10 V

Question: Is the same current flowing the same in both cases? Both cases have the same “effective voltage”, but is the current the same too? Or is the current effected something else also that is derived from those 2 voltages (Test conditions are theoretical and therefore ideal, no friction losses or hysteresis losses etc…)?

Please stay on topic and avoid digressing. Or at least point out that you’re going off-topic like below

Offtopic. I have gathered a bunch of student candidates from my local university who we’re interested in my electric longboard project. I am in the process of interviewing them. I made a presentation in which I showed the board, it’s specs and how it was developed and presented three bachelor’s degree eligible works for the group of 14 students. Out of the 14 students I got five interested students who wanted to join in. I have 3 areas available (BMS, Remote and smartphone app), so I’ll have to interview the five and pick one to each area. We’ll see how it progresses from here.

2 Likes

I’m going to post all future questions in the original post, so people don’t have to go hunting for them in the case this thread gets larger.

I have changed the way I think/look about the VESC’s motor max setting. Rather then thinking it’s effects on PWM cycles or so on, I think it’s easier to think about it as the maximum “effective voltage” that the controller can use. Of course the effective voltage will be different for different motors as their attributes are different AKA. how much current will X amount of effective voltage cause.

Example with arbitrary values: Motor amp limit: 25 A with a particular motor, this current would be delivered with 5 V of effective voltage

So as long as difference between battery supply voltage and BEMF voltage is larger than 5 V, it’s possible to hold the effective voltage at 5V and the motor will be supplied 25 Amps or in another words, constant torque.

That chart is also a bit hard to apply as the X-axis RPM is relative to the Battery PWM cycle and it also causes the current line to behave a bit weirdly once taken into account.

I updated the original post with a 2nd question

So is this how the VESC would behave in your example? It would keep the effective voltage at ~11.2 V -> current at ~89 Amps and the board would accelerate (I know the graph is not linear due to kinetic energy having velocity squared) until the BEMF hits ~38.8 V at point Z (the upper horizontal marked voltage point should be 38.8, not 48.8) at which point the VESC would then just keep the PWM at 100 % and while the motor would still keep accelerating the current would start decreasing along with “effective voltage” and therefore torque.

I’m personally interested in this from point of my own motor controller and it’s control schemes.

The point is that the AC voltage needs to 11.2 Volts higher than the BEMF voltage for the 89 Amps to flow. Using your AC/DC terms, the difference between AC voltage and BEMF voltage is the “effective voltage”, and the “PWM BAT” line in the graph is the AC voltage.

@SimosMCmuffin

You are much better off asking these questions in Benjamins forum: http://vedder.se/forums/

And here is the code you want to look at for the controlling bit: https://github.com/vedderb/bldc/blob/cb2a205cb8f99f9dd5a75d7a1606394b6c2cf58f/mcpwm.c

Re your questions. Assumptions I made: Ideal motor model, identical motor in all cases, no voltage sag, losses…

  1. No, the effective voltage does not relate linear to current torque. If you’re interested I can see if I still got the lecture slides floating around that explain it. If you want to make any predictions about current you need to know the applied torque.

  2. That voltage gap gives you the rpm your motor desires. Therefore it wants to accelerate in this case. Same as the first case. Current relates to torque. Remember your ideal motor model!

Offish Topic

What do you study?

I’m the kind of guy who likes to study the theory and then apply it with my understanding to the problem, so in problem cases, if I understand that my theory understanding is wrong, I need to figure out what part I don’t understand or I misunderstood.

It would be greatly appreciated if you could find those lecture slides.

I know it wants to accelerate. I know current is directly related to torque. What I want to know how the voltage gap and current relate to one another at different motor RPMs (BEMF).

I study embedded systems in Finland at Tampere’s polytechnic university. I have a strong electronics background and mechanical design from hobby time.

I already pointed out that the nice linearity is not real. The point was that the AC voltage was maintained 11.2 V over the BEMF.

BEMF is generated from the change in the magnetic field over electric field, which changes linearly with speed. If you have a coil and you move a magnet through it at X speed the voltage it produces in the coil would be Y, now if the speed is 2X then the voltage is 2Y.

Electric field and magnetic field theory on pages 5 and 6 (note how not any function has anything squared):

That’s why when the motor starts turning and generating BEMF, we need to increase our PWM duty cycle to raise the AC voltage so it stays 11.2 volts higher than the BEMF voltage.

As pictured in the graph. when BEMF is 0 V (meaning motor is NOT turning, 0 RPM), our duty cycle with the 50V battery would be 22.4 %. But later at the vertical voltage gap mark (effective voltage) our BEMF is ~17 V, and we change the duty cycle to 56.4 % so that the AC voltage is now 28.2 V and the voltage gap is still 11.2 Volts.

That’s why the PWM BAT plateaus at 50 V meaning 100% duty

That’s exactly what my theory is trying to solve, how the system behaves dynamically at different motor BEMF/RPMs. I’m sorry if I didn’t point out that BEMF is only generated when the motor is turning, so all my examples have the motor rotating at different speeds, but the BEMF can be used without knowing the motors real kV and RPM values, because it’s always relative.

It’s a bit like Ohm’s Law, R = U / I -> BEMF = RPM / kV

The reason why I’m asking this question to test my theory is because I want to make a constant torque algorithm for the controller, which means I need to have a constant current going through the motor. X current = X torque. Sure the acceleration is not linear, but the change in kinetic energy is.

That’s why I wondered if I know what speed the motor is turning (BEMF) then I would know what duty cycle to keep the “effective voltage” constant to produce a constant torque, IF my theory is correct.