How should the VESC "feel" on a board?

General topics and discussions about the VESC and its development.
benjamin
Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden
Contact:

Re: How should the VESC "feel" on a board?

Postby benjamin » 09 May 2017, 13:13

devin wrote:But I think 70.71 amps for 30.73% of the time produces as much heat as 22 amps for 100% of the time.


The 71 amps are continuous and not modulated for a fraction of time. The modulation is what turns the 22 battery amps into 71 motor amps. There is no way you can draw 1kw from the battery and produce less than 1kw of heat when the mechanical power is close to 0.

devin
Posts: 253
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

Re: How should the VESC "feel" on a board?

Postby devin » 09 May 2017, 13:21

benjamin wrote:The 71 amps are continuous and not modulated for a fraction of time. The modulation is what turns the 22 battery amps into 71 motor amps. There is no way you can draw 1kw from the battery and produce less than 1kw of heat when the mechanical power is close to 0.


But:

-duty cycle means % on time.

-in all your logging videos during throttle use:

battery amps = motor amps x (duty cycle % / 100)

so battery amps = motor amps modulated by duty cycle / on time / off time

21.72A = 70.71A x (30.73%/100)

battery amps = motor amps x (duty cycle % / 100)

benjamin
Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden
Contact:

Re: How should the VESC "feel" on a board?

Postby benjamin » 09 May 2017, 13:33

The duty cycle means how long the motor is connected to the battery vs how long it is shorted. The current in the motor barely changes during one PWM cycle because of the winding inductance. Here is a video that I made to figure out how warm the VESC capacitors will get:



It is based on the assumption that the motor current is constant and rotating with the commutation, which it mostly is in practise. You can see the simulated ripple of the battery current in the simulation plot, and even though the inductance to the battery in the simulation is about 20 times lower than the motor inductance it is close to constant. The motor current on that PWM frequency would have even 20 times less ripple because of the 20 times higher inductance that the ripple caused by PWM wouldn't even be visible. So the motor current is constant and produces the resistive losses for 100 % of the time.

devin
Posts: 253
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

Re: How should the VESC "feel" on a board?

Postby devin » 09 May 2017, 13:54

@Benjamin In a hypothetical scenario:

I put a motor in a clamp so it can't rotate and I simply want to put 1000w pulsed dc electrical through any 2 phase wires.

Earlier a vesc detection revealed 0.1 ohms winding (x2 = 0.2ohm) on the motor, and I have an ideal 46v Dc power source.

Would constant 46v pulses at 30.73% on-off duty cycle deliver 1000w electrical? (21.72 "battery amps" and 70.71 "average amps per pulse" or "motor amps")

devin
Posts: 253
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

Re: How should the VESC "feel" on a board?

Postby devin » 09 May 2017, 13:57

My understanding is that it would, and that each 70.71 average amp pulse would look like a "ramp" in the motor wires from the inductance, and because 70.71 amps is the average, that the pulse would start at 0 amps and rise to 141.42A at the peak (double the average).

Each pulse would be 30.73% of some span of time while the "off time" of "0 amp time" would take up the other 69.27% of the time.

Image

benjamin
Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden
Contact:

Re: How should the VESC "feel" on a board?

Postby benjamin » 09 May 2017, 15:06

you would get a ramp, but a very small one. Maybe from 70 to 71 amps. It takes a lot longer to force the current to 0 or over 100A than the switching period. I would suggest trying to understand how inductors work. There are some videos as well, a quick search gave this one for example:

https://www.youtube.com/watch?v=WR6qVvnDnI4

devin
Posts: 253
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

Re: How should the VESC "feel" on a board?

Postby devin » 09 May 2017, 15:29

in the case when @hummie rode his board for a week with 48/200/200 batt/motor/absolute settings,

assumed battery voltage with sag was 35v,

his detection was:

Image

Image

video of the 48/200/200 hub motor setup running on test bench (was subsequently ridden around san francisco for a week):

https://youtu.be/Eqm6NWf6r7Y

devin
Posts: 253
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

Re: How should the VESC "feel" on a board?

Postby devin » 09 May 2017, 16:31

So let's use those detection values

0.0415ohm detected x 2 = 0.0830ohm winding

27.13uH detected inductance

46v pack voltage with sag predicted

for full throttle, 1000w electrical at all possible rpms including very close to standstill full throttle is desired.

109.76 motor amps x 0.0830ohm = 9.11 pwm effective volts

9.11 pwm effective volts x 109.76 motor amps = 1000w electrical desired

21.73 battery amps = 1000w desired / 46v pack voltage under sag

(9.11 pwm effective volts/46v pack volts under sag) = 19.8% duty cycle @ full throttle standstill @ 1000w

so

22/110/150 batt/motor/absolute amp limit settings for 1000w electrical very close to 0rpm full throttle (absolute amp setting higher than the other 2 to prevent cutouts)

since we are saying 27.13uH inductance i believe we can calculate the frequency and pulse lengths.

inductance equation:

V = Volts
H = Inductance
A = Change in Amps
S = Change in Time (Seconds)

V = H x (A / S)

I rearranged the equation to:

S = (A x H) / V

"27.13 uH" = "0.00002713 H"

so, the values are:

V = 46
H = 0.00002713
A = 219.52 (109.76 x 2)
S = X <-- solve for this

When I do the equation I get:

0.0001294 Seconds = (219.52 A x 0.00002713 H) / 46V

In simple terms, a single 46v pulse lasting 0.0001294 seconds into the 0.0830ohm, 27.13uH winding rises to peak 219.52 A.

The average amperage during the 0.0001294 second pulse peaking at 219.52A is the motor amps value 109.76A.

Since the span of time lasting 0.0001294 seconds, averaging 109.76A is also 19.8% duty cycle it means the 0 amp off-time is %80.2 of an on-off cycle time.

109.76A motor amps x (19.8% duty/100)= 21.73 battery amps

21.73 battery amps x 46 pack v = 1000w

Since 0.0001294 seconds is 19.8% of the on+off time, then (0.0001294/19.8)x100 = 0.00065354 seconds entire on+off time

0.00065354 seconds entire on+off time - 0.00012940 on time = 0.00052414 seconds off time

which gives:

on time: 0.00012940 seconds
off time: 0.00052414 seconds

0.00012940 sec on + 0.00052414 sec off = 0.00065354 sec total cycle

1 sec / 0.00065354 seconds per cycle = 1530.12 cycles per second

this gives:

full throttle standstill=
1530.12 cycles per second pwm frequency
0.00012940 sec on time
0.00052414 sec off time
19.8% duty cycle aka % on time
1000w electrical
109.76 motor amps aka avg amps per pulse
21.73 battery amps aka avg amps per second
46v pack volts under sag estimated
9.11v pwm effective volts
0.0830ohm winding
(0.0415ohm vesc detected)
27.13uH (0.00002713H) vesc detected

battery amps = motor amps x (duty cycle % / 100)

in simple terms an average of 109.76 amps for %19.8 of a whole second, and 0 amps the rest (%80.2) of the whole second for 1000w electrical, which is equivalent to the heating and battery current of 21.73 amps DC for an entire second.
Last edited by devin on 09 May 2017, 17:47, edited 1 time in total.

Hummie
Posts: 109
Joined: 10 May 2016, 04:05

Re: How should the VESC "feel" on a board?

Postby Hummie » 09 May 2017, 17:00

I'd think the heating of 100 motor amps at 50% duty would be more than the heat generated at 50 amps at 100% duty because of the square relationship in I(2)R.

benjamin
Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden
Contact:

Re: How should the VESC "feel" on a board?

Postby benjamin » 09 May 2017, 18:31

First, one thing to be aware of is that like the resistance the inductance is also measured to the center, so you have to double it as well to get the value between two motor terminals.

I have already spent so much time explaining, so I made a simulation. The simulated inductor has 50 µH and 40 mOhm. I made a transient simulation with 20 kHz frequency and enough duty cycle to reach around 110A in steady state.

This is the circuit:

sim0.png
sim0.png (9.39 KiB) Viewed 836 times


This is the transient:

sim1.png
sim1.png (24.82 KiB) Viewed 836 times


Zooming in you can see the average current related to the PWM pulses. As you can see, the inductor current is almost constant at 110 amps with very little ripple:

sim2.png
sim2.png (26.04 KiB) Viewed 836 times


zooming in on the ripple, it looks like this:

sim3.png
sim3.png (29.52 KiB) Viewed 836 times


You can see that it is around +- 2 amps. In BLDC mode the switching frequency is 40 kHz, and then the ripple is +- 1 A:

sim4.png
sim4.png (32.16 KiB) Viewed 836 times


The simulation file for ltspice is also attached. If you want to play around with it ltspice can be downloaded for free and runs nicely in wine under linux if you are like me and don't use windows.

So yes, the motor will see nearly a constant current even though there is PWM and the losses are exactly as I explained.
Attachments
sim_pwm.zip
(420 Bytes) Downloaded 42 times


Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest