## code to change the motor amp limit

General topics and discussions about the VESC and its development.
devin
Posts: 246
Joined: 08 May 2017, 01:55
Location: San Francisco, California, US

### Re: code to change the motor amp limit

rew wrote:Your pencil has finite thickness. Your compass is not perfect, you have to visually set it to the right width. My calculator can EASILY outperform your not 100% accurate drawings

Yes but use an infinitely fine pencil & perfect compass & use the same geometric steps to make the same drawing and the drawing will EASILY outperform the not 100% accurate calculator [which with decimal numerals must "round" all output decimals to the nearest decimal digit -- eternally preventing 100% accuracy in the case of decimal representation of the square root of 3 without infinite paper or display screen mass]

rew wrote:Yes, but your simple: less copper, same KV motor will not have the same wattage.

Both of the last wye examples had different copper volume but yet had the same resistance so I would disagree on the basis of: same resistance with same applied voltage through ohm's law results in the same amps & wattage. [ W = I^2R ] <- same amps, same resistance [ & conductance ], same applied voltage, same electrical wattage

& kv = rpm/v peak [not V RMS]-- kv is measured from peak v not rms v therefore any kv measurement by definition must occur at & assume 100% duty cycle.

any theoretically infinitely precise decimal-based calculator would still require infinite display screen volume & therefore infinite physical volume to display the decimal equivalent of the square root of 3 -- but with a theoretically infinitely precise compass - any arbitrarily small volume may be used to represent the relative distance lengths of "1" & the "square root of 3" with infinite accuracy and precision [arbitrarily small -- not infinite -- volume necessary] -- causing the theoretically infinitely precise compass to surpass the inifinitely precise calculator in utility to volume ratio when representing "irrational lengths" with "infinite precision."

rew wrote:KV = Constant(motor) * C(termination) * turns.

C(termination) is 1 for Y or sqrt(3) for delta wiring.
Last edited by devin on 30 May 2017, 06:01, edited 1 time in total.

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

### Re: code to change the motor amp limit

rew wrote:Note that the I^2.R losses are the LOSSES, not the wattage of the motor. But as a motor is limited mostly by its losses, same losses would mean similar effective power output.

When you claim to have a transformation that preserves performance, but requires less material, and when you can iterate that transformation, then your claim is flawed. I claim I have a compression algorithm that always reduces the size of a file by one byte. or "at least one byte". In any case, what happens when you do that with the compressed file? again one byte reduction? do it again and again, and you end up with zero bytes. That does not have enough information in it to reconstruct the original file. The claim to be able to reduce the filesize always by at least one byte is flawed.

If you can transform a motor to have the same performance, but less material, then why doesn't everybody already do that?

Identical resistive losses means identical effective electrical wattage at the same applied effective voltage.

If i have a longer, thicker copper wire and a shorter, thinner copper wire each with identical 1ohm resistance and apply 1v to each of these... i will get an identical number of amps and watts through both of these. (same amount of volts, amps & electrical wattage through a different material volume & mass copper wire)

If these wires are each enclosed in separate same sized boxes, the shorter thinner wire will be higher in measurable temperature, but since it is also has less radiant volume & surface area than than the longer, thicker, cooler wire, but identical resistive losses, it will actually be producing an identical amount of total heat within the enclosed box (same identical total resistive losses) and therefore both boxes would have the same average temperature, both generating same total heat & both wires would have identical measurable resistance and wattage, & one of the boxes would weigh less.

rew
Posts: 928
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

### Re: code to change the motor amp limit

As 1.414213562373095048801688724209698078569671875376948073176679737990 specifies sqrt (2) to an accuracy of a single atom should you use a compass the size of the visible universe(*) , I don't see why your drawings could be more accurate than using a finite amount of paper. If you want to visualize things, go ahead an draw things. That's useful. But please keep nonsense claims of "100% accuracy" away from me. What you believe yourself I don't mind, but you're not going to convince me.

We can transform motors to keep the same KV with different configurations. I think that for every KV and copper volume there are exactly two configurations with the same KV: delta and Y. Those configurations have very similar performance.

We can transform motors to keep the same KV while we change the copper volume. Maximum performance will change, even though the motor parameters will be the same.

Suppose that through a few examples, I formulate the theory that total energy is described by 1/2 . m . v2. Funny to note that "height" is not present in this formula. Interesting observation that height doesn't matter. But when we realize that according to my formula an object at the top of the skyscraper has the same energy as one at the bottom we have to reject the hypothesis that the formula is correct.

So... if your formula predicts that it is possible to transform every motor into a smaller version with precisely the same performance, then something went wrong.

There are lots of mathematical proofs that prove that say 1==0. It is sometimes tricky to find the problem in such a reasoning. But if the result is absurd, you must have made an error along the way.

In the case of your formula: either the formual is not valid, or you are applying it wrong.

(*) That's a guess. I don't feel like doing the math. At worst my guess is off-by-a-factor-of-two and you'd need another 50-80 decimals.

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

### Re: code to change the motor amp limit

rew wrote:rew wrote:As 1.414213562373095048801688724209698078569671875376948073176679737990 specifies sqrt (2) to an accuracy of a single atom should you use a compass the size of the visible universe(*) , I don't see why your drawings could be more accurate than using a finite amount of paper. If you want to visualize things, go ahead an draw things. That's useful. But please keep nonsense claims of "100% accuracy" away from me. What you believe yourself I don't mind, but you're not going to convince me.

devin wrote:Wiki Square Root 2: https://en.wikipedia.org/wiki/Square_root_of_2

^From wikipedia we can see:
1) any decimal representation of sqrt(2) without infinite paper is considered "truncated"
2) the hypotenuse of a right triangle with leg lengths exactly "1" is equal to exactly the square root of 2, (disprove the pythagorean theorum to disprove this https://en.wikipedia.org/wiki/Pythagorean_theorem)

Image: http://tppsf.com/sqrt2-2.jpg

^From an arbitrary precision calculator we can see:
1) "1.414213562373095048801688724209698078569671875376948073176679737990" is slightly too small to be exactly the square root of 2
2) "1.414213562373095048801688724209698078569671875376948073176679737990" is actually the square root of "1.999999999999999999999999999999999999999999999999999999999999999997"

Image: http://tppsf.com/sqrt2-5.jpg

Image: http://tppsf.com/sqrt2-3.jpg

^From my drawing we see can see:
1) I didn't merely "draw" an image with the best possible yet only limited accuracy feasible with the tools I have at my disposal -- i also specified via mathematical formulas the exact line lengths ( AB = 1, AC = 1, BC = sqrt(2) ) -- and via the pythagorean theorum if the drawing was drawn precisely as I specified by the formulas with arbitrary precision to 100% accuracy, then line BC length would equal precisely the square root of 2 with 100% accuracy... & using less volume than the infinite mass required to display the decimal representation of sqrt(2) (disprove the pythagorean theorum to disprove this https://en.wikipedia.org/wiki/Pythagorean_theorem)

rew wrote:We can transform motors to keep the same KV with different configurations. I think that for every KV and copper volume there are exactly two configurations with the same KV: delta and Y. Those configurations have very similar performance.

We can transform motors to keep the same KV while we change the copper volume. Maximum performance will change, even though the motor parameters will be the same.

Suppose that through a few examples, I formulate the theory that total energy is described by 1/2 . m . v2. Funny to note that "height" is not present in this formula. Interesting observation that height doesn't matter. But when we realize that according to my formula an object at the top of the skyscraper has the same energy as one at the bottom we have to reject the hypothesis that the formula is correct.

So... if your formula predicts that it is possible to transform every motor into a smaller version with precisely the same performance, then something went wrong.

There are lots of mathematical proofs that prove that say 1==0. It is sometimes tricky to find the problem in such a reasoning. But if the result is absurd, you must have made an error along the way.

In the case of your formula: either the formual is not valid, or you are applying it wrong.

(*) That's a guess. I don't feel like doing the math. At worst my guess is off-by-a-factor-of-two and you'd need another 50-80 decimals.

@Rew-- I think we agree on the math for the transformations involving motors having constant copper volume so I will use these as the mathematical example to prove identical performance of motors using different copper volume:

devin wrote:Motor:

-Delta
-100kv
-50 turns
-1 cross section
-1 copper volume
(0.0415 ohm VESC detection)
-12.04819 siemens conductance = 1/0.08300 ohm

KV Formula For Motor:

100kv = A x 1.73205[Delta] x 50

KV = 100
A = X = Constant(motor)
B = 1.73205 = C(termination) <- Must be 1 for Wye Wiring or 1.73205 [sqrt(3)] when Delta Wiring
C = 50 = turns

This formula can be rearranged to:

A = 1.15470

Therefore:

Formula For Test Motor:

100kv = 1.15470 [A] x 1.73205 [B -- Delta] x 50 [C]

100 = 1.15470 x 1.73205 x 50

KV = 100
A = 1.15470 = Constant(motor)
B = 1.73205 = C(termination) <- Must be 1 for Wye Wiring or 1.73205 [sqrt(3)] when Delta Wiring
C = 50 = turns

^Simply 50 turns delta gives 100kv

^Delta 100KV

devin wrote:Re-Winding the 57.735 KV Wye to 100 KV Wye Keeping Same Copper Volume:

-Wye
-100kv = 57.735kv original wye x sqrt(3) [kv change factor sqrt(3)] <- more kv
-28.86 turns = 50 original turns / sqrt(3) <- less turns
-1.73205 cross section = 1 x sqrt(3) [keeps copper volume constant after turns reduction] <- more cross section
-1 copper volume <- same copper volume
-0.0830 ohm resistance lead-to-lead = original 0.249ohm / 3 (0.0415 ohm VESC detection) [resistance change factor 0.333...] <- 1/3rd as much resistance
-12.04819 siemens conductance = original 4.01606 siemens x [3 conductance change factor] = 1 / 0.0830 ohm <- 3 times as much conductance

Formula For Re-Winding the New 57.735 KV Wye to 100 KV Keeping Same Copper Volume:

100kv = X [A] x 1 [B -- Wye] x 28.86 [C]

This formula can be rearranged to:

A = 3.46500 = ( 3 x 1.15470 original Constant(motor) # )

^notice motor constant change factor [3] from original value is equal to conductance change factor [3].

Therefore:

100kv = 3.46500 [A] x 1 [B -- Wye] x 28.86 [C]

100 = 3.46500 x 1 x 28.86

100 = (3 x 1.15470 original Constant(motor) value) x 1 x 28.86

KV = 100
A = 3.46500 = (3 x 1.15470 original Constant(motor) value) = Constant(motor)
B = 1 = C(termination) <- Must be 1 for Wye Wiring or 1.73205 [sqrt(3)] when Delta Wiring
C = 28.86 = turns

^Simply 28.86 turns wye gives 100kv

---------------------------------------------------------

^So far matches my formula:

-conductance change factor: 3 | 4.01606 original siemens x 3 conductance change factor = 12.04819 new siemens

-kv change factor: sqrt(3) = 1.73205 | 57.735 original kv x sqrt(3) kv change factor = 100 new kv

-notice motor(constant) number has necessarily increased by the same factor [3] as the conductance change factor [3] for the equation to provide a valid answer

^Wye 100KV - same copper volume

^@Rew -- i think we both agree here we have a 100kv Delta -- and a 100kv Wye -- with identical enclosed copper volume.

Notice they both have identical 0.08300 ohm resistance and identical KV.

Identical resistance and KV implies that for any applied effective voltage, since resistance is identical, via ohm's law the resulting amps and watts (motor power) should be identical. Since KV is identical, torque per amp and RPM per volt should also be identical.

^We can see that for all intents and purposes, these 2 motors, via outside measurements should perform identically -- identical weight, identical resistance, identical kv, identical wattage at the same applied voltage.

Obviously these 2 motors have identical performance and enclosed copper volume.

So what if anything is different about them??!?

Let's do a comparison:

Delta 100KV: Lead-to-lead Resistance 0.08300 ohm | Copper Mass 1.00 | 100% Duty Cycle Energized Copper Mass 1.00

Wye 100KV: Lead-to-lead Resistance 0.08300 ohm | Copper Mass 1.00 | 100% Duty Cycle Energized Copper Mass 0.666...

My goodness! It appears the 100kv wye is getting IDENTICAL performance to the 100kv delta using only 2/3rds the 100% Duty Cycle Energized Copper Mass!!

rew wrote:We can transform motors to keep the same KV with different configurations. I think that for every KV and copper volume there are exactly two configurations with the same KV: delta and Y. Those configurations have very similar performance.

@Rew -- So how is it possible that the wye 100KV could have identical performance to the delta 100KV using only 2/3rds the energized copper volume??! It's clearly a differential in energized copper volume so what explains the indistinguishable performance? Could it possibly have anything to do with both motors having identical conductance at identical enclosed copper volume despite the 1/3 volume differential in energized copper volume?

Image: http://tppsf.com/kv-vs-siemens2.jpg
Image: http://tppsf.com/kv-vs-conductance2.jpg
Image: http://tppsf.com/delta-wye-schematic.jpg
Image: http://tppsf.com/stator.jpg
Last edited by devin on 01 Jun 2017, 11:45, edited 1 time in total.

rew
Posts: 928
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

### Re: code to change the motor amp limit

I have abused my moderator powers to edit your post to become more readable. This forum is about motors, not about "perfect sqrt (2)".

Ah... You've fallen for the fallacy of thinking that the third leg in Y configuration is not powered.

The best way to drive a three phase motor is with three sinusoidal waveforms. That's what the VESC does in FOC mode. Each of the phases is driven with a sinusoidal voltage, no phase is undriven any point in time. THAT is the "normal" situation.

Now if you move to BLDC the motor will lose some efficiency. This could very well be different in DELTA or in Y configuration. I just don't know. Fact remains that if the winding is not getting hot because it is unpowered, it is "saving" for being powered stronger during the next commutation step.

This might mean that if you have a Y wound motor with hall sensors providing torque at standstill... you may have to derate the allowable current a bit.

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

### Re: code to change the motor amp limit

^ @Rew -- Taking a glance at the circuit diagrams of wye and delta in reference to the equal enclosed copper volume 100kv delta vs 100kv wye example (which in theory have indistinguishable performance)... it would appear in the 100kv Wye example at 100% duty cycle, 2 of the 3 phases are part of the conductive circuit or "powered" at any given time (2/3rds or 0.666... copper volume) while in the 100kv Delta example, all 3 phases appear to be part of the conductive circuit or "powered" at the same time given the 2 conductive pathways available for the electricity to follow (3/3rds or 1 or "whole"... copper volume). These motors theoretically have identical weight, performance, resistance, enclosed copper volume, rpm per volt and torque per amp-- and yet while there is an identical mass of "enclosed" copper, there seems to be a 1/3rd volume differential in "simultaneously energized" copper-- so it appears to me that it would be non-fallacious to say that identical performance is possible "using" different volumes of copper.

I note that lead-to-lead conductance, resistance, "enclosed copper volume" and kv are identical & consistent between the 2 examples despite the 33.33% difference in "same-time-energized copper volume."

There is simply no time when more then 2/3rds of the Wye's copper volume is used simultaneously. [& the Delta 100kv with identical "enclosed" copper volume energizes a factor of 1.5 times as much copper volume as the Wye 100kv simultaneously to achieve indistinguishable performance]

rew
Posts: 928
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

### Re: code to change the motor amp limit

You are applying the wrong voltages to your motor.

Apply:
VA= Vmax * sin (0*2*PI/3 + &omega;.t)
VB= Vmax * sin (1*2*PI/3 + &omega;.t)
VC= Vmax * sin (2*2*PI/3 + &omega;.t)

You can visualize that by taking a fidget spinner, and using the Y-coordinate of each of the three arms as the voltage for each phase wire, while you spin the spinner and the motor.

Now, when you skimp on driving electronics and simply drive two phases to the power rails and leave the other alone, the Y configuration gets the situation where one part is undriven, while in the Delta configuration you might be driving current through coils that doesn't help in turning the motor. Which of these inefficiencies is more important, or if they maybe cancel out, I don't know.

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

### Re: code to change the motor amp limit

rew wrote:You are applying the wrong voltages to your motor.

Apply:
VA= Vmax * sin (0*2*PI/3 + &omega;.t)
VB= Vmax * sin (1*2*PI/3 + &omega;.t)
VC= Vmax * sin (2*2*PI/3 + &omega;.t)

You can visualize that by taking a fidget spinner, and using the Y-coordinate of each of the three arms as the voltage for each phase wire, while you spin the spinner and the motor.

Now, when you skimp on driving electronics and simply drive two phases to the power rails and leave the other alone, the Y configuration gets the situation where one part is undriven, while in the Delta configuration you might be driving current through coils that doesn't help in turning the motor. Which of these inefficiencies is more important, or if they maybe cancel out, I don't know.

^@rew after spending some time reviewing these trigonometry equations, I believe these are functions describing the 3 phase AC Back-EMF voltages that would be produced by the spinning rotor magnets, and which could be measured and observed if the motor leads were all connected to a neutral ground point, while the rotor was spun manually. In practice, in my understanding (please correct me if I am wrong) in the VESC, these voltage measurements are used by an "observer circuit" and used to calculate the rotor position in real time to calculate the appropriate timing points for commutation steps...

But from the table showing the 6 step commutation sequence of BLDC motors, we can clearly see that only 2 out of 3 motor leads are energized at any one time, and looking at the winding diagrams of wye and delta, the two energized leads will energize 2 out of 3 phases with a wye wound motor and the two energized leads will energize all 3 out of 3 phases in a delta wound motor.

So I went searching on youtube:

Here are a couple of videos of BLDC Motor Commutation Steps which I found on Youtube:

Commutation Steps Video on Youtube: https://youtu.be/43JMIuwVrY4

Commutation Steps Video on Youtube: https://youtu.be/ZAY5JInyHXY?t=6m30s

^Both of these videos show a wye wound motor, and in both videos showing the six step commutation sequence, 2 of the phase wires are always energized while the 3rd phase wire always shows zero applied voltage and zero current.

Also, in one of the videos showing a wye wound motor, the video clearly indicates that each separate phase (Wye winding) is producing 0 torque for 1/3rd of the time, or in other words, at any given time only 2 out of 3 phases are producing rotor torque. If we were to reterminate the winding to delta, this would result in all 3 out of 3 phases being energized from 2 out of 3 motor leads.

For these above listed reasons I do not believe these equations describe the pattern of voltages applied to each phase from the battery.

@Rew... In the previous 100kv delta vs 100kv wye at same enclosed copper volume example I had noted that both motors from outside measurements have identical weight, resistance, rpm per volt, torque per amp -- essentially indistinguishable performance.

Despite the indistinguishable performance from outside measurements, we can see from the delta vs wye wiring diagram that in the case of wye: the indistinguishable torque is obtained via the energizing of only 2/3rds of the volume of the enclosed copper volume and in the case of delta: the indistinguishable torque is obtained via the energizing of the entire 3/3rds of the volume of the identical enclosed copper volume.

So @rew why would it be unreasonable to assume that indistinguishable performance may be possible using different copper volumes?

rew
Posts: 928
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

### Re: code to change the motor amp limit

You seem focused on BLDC mode.

Actually in the beginning motors required sinusoidal excitation. Then people got more control over the back EMF waveform and could actually make motors that accepted the "simplified" driving scheme. Since a few years, motor manufacturers know that you could drive their motor with FOC, so they no longer try to make hte back EMF compatible with BLDC. It still works, but not optimally.

So. I say you need to drive the motor with sines, you ignore me and post again about full-rails-BLDC-mode. Fine. Goodluck.

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

### Re: code to change the motor amp limit

rew wrote:You seem focused on BLDC mode.

Actually in the beginning motors required sinusoidal excitation. Then people got more control over the back EMF waveform and could actually make motors that accepted the "simplified" driving scheme. Since a few years, motor manufacturers know that you could drive their motor with FOC, so they no longer try to make hte back EMF compatible with BLDC. It still works, but not optimally.

So. I say you need to drive the motor with sines, you ignore me and post again about full-rails-BLDC-mode. Fine. Goodluck.

@rew -- i have one follow-up question...

Starting from the 100kv delta vs 100kv wye with identical enclosed copper volume example:

100kv Delta:
devin wrote:Motor:

-Delta
-100kv
-50 turns
-1 cross section
-1 copper volume
-12.04819 siemens conductance = 1/0.08300 ohm

KV Formula For Motor:

100kv = A x 1.73205[Delta] x 50

KV = 100
A = X = Constant(motor)
B = 1.73205 = C(termination) <- Must be 1 for Wye Wiring or 1.73205 [sqrt(3)] when Delta Wiring
C = 50 = turns

This formula can be rearranged to:

A = 1.15470

Therefore:

Formula For Test Motor:

100kv = 1.15470 [A] x 1.73205 [B -- Delta] x 50 [C]

100 = 1.15470 x 1.73205 x 50

KV = 100
A = 1.15470 = Constant(motor)
B = 1.73205 = C(termination) <- Must be 1 for Wye Wiring or 1.73205 [sqrt(3)] when Delta Wiring
C = 50 = turns

^Simply 50 turns delta gives 100kv

100kv Wye:
devin wrote:Re-Winding the 57.735 KV Wye to 100 KV Wye Keeping Same Copper Volume:

-Wye
-100kv = 57.735kv original wye x sqrt(3) [kv change factor sqrt(3)] <- more kv
-28.86 turns = 50 original turns / sqrt(3) <- less turns
-1.73205 cross section = 1 x sqrt(3) [keeps copper volume constant after turns reduction] <- more cross section
-1 copper volume <- same copper volume
-0.0830 ohm resistance lead-to-lead = original 0.249ohm / 3 (0.0415 ohm VESC detection) [resistance change factor 0.333...] <- 1/3rd as much resistance
-12.04819 siemens conductance = original 4.01606 siemens x [3 conductance change factor] = 1 / 0.0830 ohm <- 3 times as much conductance

Formula For Re-Winding the New 57.735 KV Wye to 100 KV Keeping Same Copper Volume:

100kv = X [A] x 1 [B -- Wye] x 28.86 [C]

This formula can be rearranged to:

A = 3.46500 = ( 3 x 1.15470 original Constant(motor) # )

^notice motor constant change factor [3] from original value is equal to conductance change factor [3].

Therefore:

100kv = 3.46500 [A] x 1 [B -- Wye] x 28.86 [C]

100 = 3.46500 x 1 x 28.86

100 = (3 x 1.15470 original Constant(motor) value) x 1 x 28.86

KV = 100
A = 3.46500 = (3 x 1.15470 original Constant(motor) value) = Constant(motor)
B = 1 = C(termination) <- Must be 1 for Wye Wiring or 1.73205 [sqrt(3)] when Delta Wiring
C = 28.86 = turns

^Simply 28.86 turns wye gives 100kv

---------------------------------------------------------

^So far matches my formula:

-conductance change factor: 3 | 4.01606 original siemens x 3 conductance change factor = 12.04819 new siemens

-kv change factor: sqrt(3) = 1.73205 | 57.735 original kv x sqrt(3) kv change factor = 100 new kv

-notice motor(constant) number has necessarily increased by the same factor [3] as the conductance change factor [3] for the equation to provide a valid answer

If we reterminate the 100 kv wye from the example to delta...

...we should end up with 100kv wye --[retermination to delta]---> 173.205kv delta. [resistance 1/3rd of 100kv wye]

If we remove 2/3rds of the 100 kv wye turns & copper from the example...

...we should end up with 100 kv wye --[remove 2/3rds turns & copper 28.86 turns --> 9.62 turns]---> X kv wye. [resistance 1/3rd of 100kv wye]

^@rew what is X? simply, how many KV will the new wye be after you take out 2/3rds of the turns, copper & resistance?

PS.. the reason I am focusing on BLDC mode is it should not have any effect on the motor constant KV whether the motor is powered via FOC or BLDC and it is easier for me to understand and mathematically model BLDC conceptually.
Last edited by devin on 06 Jun 2017, 21:08, edited 1 time in total.