Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Failed attempt to explain JAG linearity (http://www.chiefdelphi.com/forums/showthread.php?t=77297)

Al Skierkiewicz 16-05-2009 15:02

Re: Failed attempt to explain JAG linearity
 
Chris the diodes only conduct when the forward bias is high enough to turn them on. As soon as the bias falls below the 1.25 volts per diode, they stop conducting. Remember that the diodes are also back biased by the battery so the motor EMF must be higher than the battery voltage.

vamfun 16-05-2009 15:13

Re: Failed attempt to explain JAG linearity
 
2 Attachment(s)
Quote:

Originally Posted by vamfun (Post 859702)
It all hinges on the "off" PWM current. We have a low FET "on" and the rest "off". Any current flow must now pass through a protection diode. As long as the diode can conduct, the current is heading toward a steady state value of -Vemf/R (assuming positive current during the "on" PWM drive). If the L/R is short with respect to the PWM period, the current decays quickly and is zero for most of the off phase. So the average current for the whole pulse is determined by the area under the "on" pulse which = (12-Vemf)/R*duty. This would be the case for the slow Victors and we would expect a nonlinear response equal to my old coast formula.

For the JAG, the L/R is large relative to the PWM period. If the current cannot decay to zero during the "off" phase, it will continue to accumulate until the average current stabilizes. Since the current never gets below zero we can consider the problem as the superposition of a steady state Vemf and a pulsed 12v. And this leads us to the linear equation = (12*duty -Vemf)/R .

SOOOO...I think the two formulas are ok but now it would be due to the 15khz JAG vs the slow Victors. I didn't see this in my previous excel because I assumed the steady state current was heading towards zero in the "off" state instead of -Vemf/R.

OK, finished my TODO and have verified that linearity is indeed due to the higher frequency of the JAG. Based upon my quoted rationale we can show that

120Hz Victor v_emf = 12 - i_free*R/duty......................varies with 1/duty

15kHz Jag v_emf = 12*duty - i_free*R .....................varies with duty

The 2kHz Victor is very close to the Jag.


I wrote a LABVIEW simulation (see attch hbridge.vi) of a one sided Hbridge and the curves (see attch thumbnail) verify what we are seeing. As Al says, this is independent of coast or brake mode however, with the JAG, the "off" ckt is essentially the brake mode since the diode is always conducting..the only difference is for the voltage drop across the diode. This is why I did not see any non spike Vemf in the JAG waveform ..only duty cycle variations.

Feel free to run the program and vary the inductance to see its effects. I used a nominal 120uh which is close to what people have measured in the past. I think the max posted was 230uh.



I wonder what all this is worth? Since I have not seen this mentioned in any of the Hbridge tutorials maybe I'll publish a paper. Lets see...what should I call it. How about

"Special Theory of Nonlinearity: An Inconvient Truth of Low Hz Hbridges".

Maybe the good folks in Stockholm are reading ChiefDelphi threads:)
Well, it might be worth a minor entry to Wikipedia under Hbridge theory
or under alternative ways to spend time when Friday night TV is on.


Erick...put those beers on ice...assuming Al doesn't send me back to the showers again.

RIP thread ;

Mr. Lim 16-05-2009 15:33

Re: Failed attempt to explain JAG linearity
 
Quote:

RIP thread ;
Maybe not so fast :o.

We programmers now are dying to know how we can save ticks and optimize everything now.

Would it be prudent to suggest we can take these results, and figure out a minimum PWM frequency that will give us a "linear" response for all of our FRC motors?

And another question, a Jaguar will accept a 120Hz PWM signal, and if it does, will it behave in the same non-linear fashion as the Victors?

Joe Ross 16-05-2009 17:40

Re: Failed attempt to explain JAG linearity
 
Quote:

Originally Posted by Mr. Lim (Post 859862)
t we can take these results, and figure out a minimum PWM frequency that will give us a "linear" response for all of our FRC motors?

And another question, a Jaguar will accept a 120Hz PWM signal, and if it does, will it behave in the same non-linear fashion as the Victors?

The pwm frequency that is being discussed here is the output of the speed controller and is completely independent from the input.

Al Skierkiewicz 17-05-2009 18:07

Re: Failed attempt to explain JAG linearity
 
1 Attachment(s)
OK,
I thought it was time to make a chart, so here is a spreadsheet and chart. I took the values that have been mentioned here although they are not taken from published data. In calculating motor current, I simply took the motor winding resistance and stated inductance and plotted the result against duty cycle. Please note that I also multiplied the 15kHz values by 10 so that the current would at least approximate the current accumulated over the same time interval. The table certainly has a telling tale to tell in comparing duty cycle ON time with inductance rise time.
Note that this table and chart do not take into account the switching frequency of the commutator or the dead band in between segments. Nor does it make an attempt to average current. It merely is comparing the max current that could be achieved during the 150 Hz ON time period due to motor winding resistance and inductance. Please note that the 100% duty cycle 150 Hz switching frequency does approximate the published 133 amp stall current of the CIM.
Although the 15kHz current does look linear, please note that the plot is merely in a linear region of the same type of curve do to the stretched time base of the horizontal axis. The values are real though. At 15kHz, the motor current cannot rise to near max values even at 100% duty cycle due to the L/R time constant vs input frequency.
Remember that series wiring resistance, controller Rdson resistance, battery voltage and many other variables will serve to change these values.

vamfun 18-05-2009 13:59

Re: Failed attempt to explain JAG linearity
 
Ok Al,
Its about time you dusted off the excel sheet. I feel that you are not yet comfortable with my explanation so we need a few more rounds. The peak current is instructive but is only valid for Vemf = 0 and tells just a small piece of the story. The reason you had to multiply by 10 for the JAG is because the JAG pulses must accumulate to get to the average current with the big L/R. Until you incorporate the discharge half of the cycle which includes the diode you cannot fully explain the nonlinearity, for it is here that the ratio of L/R to PWM period that makes the difference in the average current. Without the diode, this phenomenon would not occur.

EricVanWyk 18-05-2009 14:21

Re: Failed attempt to explain JAG linearity
 
Quote:

Originally Posted by vamfun (Post 860189)
Ok Al,
Its about time you dusted off the excel sheet. I feel that you are not yet comfortable with my explanation so we need a few more rounds. The peak current is instructive but is only valid for Vemf = 0 and tells just a small piece of the story. The reason you had to multiply by 10 for the JAG is because the JAG pulses must accumulate to get to the average current with the big L/R. Until you incorporate the discharge half of the cycle which includes the diode you cannot fully explain the nonlinearity, for it is here that the ratio of L/R to PWM period that makes the difference in the average current. Without the diode, this phenomenon would not occur.

I believe and agree with you, but I must reneg on our original contract - In order to get the beer, I now ask that you explain this in a way that my students could understand it.

Al Skierkiewicz 18-05-2009 15:45

Re: Failed attempt to explain JAG linearity
 
Chris,
Again I ask you to consider that the diodes only conduct IF the EMF exceeds the battery voltage which is rare or when the inductive kick attempts to raise the voltage. I multiplied the jag by 10 only to allow the two graphs to appear on the same scale. The average current for both controllers will be far less except at 100% duty cycle when average and peak are approx. equal. If the diodes do not conduct there is no EMF induced current. The graph simply shows the calculated current through the motor due to the effects of the pulse width (calculated at and for the length of the pulse due to the duty cycle). You cannot see the voltage developed across the inductor but a current probe or other method of looking at current would demonstrate this phenomena.

vamfun 18-05-2009 15:52

Re: Failed attempt to explain JAG linearity
 
Quote:

Originally Posted by EricVanWyk (Post 860192)
I believe and agree with you, but I must reneg on our original contract - In order to get the beer, I now ask that you explain this in a way that my students could understand it.

Your are tough Erick... "come and enjoy your beers and I'll give you two more if you can make my kids understand it" would have kept me from dying of thrist while I work on the problem some more.

"I believe" bothers me.. "I understand" would make me feel that at least I have communicated enough for a mentor to understand. This is all I can do. The mentor must take it from there since the level of students varies between something and wiz kids. What I think is missing from this thread are a few time histories that show how the waveform is behaving and maybe I'll spend another day modifying my hbridge.vi to output a waveform as well.

I was able to explain this to my software kids with a white board in about 15 minutes...however, they have had a few prep lectures regarding motor nonlinearities and a little control theory.

vamfun 18-05-2009 16:20

Re: Failed attempt to explain JAG linearity
 
Quote:

Originally Posted by Al Skierkiewicz (Post 860218)
Chris,
Again I ask you to consider that the diodes only conduct IF the EMF exceeds the battery voltage which is rare or when the inductive kick attempts to raise the voltage.


I felt this is what was bothering you Al... and this point needs to be debated.

I don't see the battery voltage entering into it unless all FET's are OFF the return path is through a high side diode and a low side diode on the other side of the bridge. This return path is then through the 12 volt source and ground. But, the JAG leaves a lower FET in the ON state. This shorts one side of the motor to ground and only the diode on the remaining low side of the motor can complete the path to ground. This path is easily completed by reversing the voltage across the inductor.

V_L = -v_diode - i*R - Vemf . This inductor voltage remains until the current drops to zero and we reach the open loop state.

Al Skierkiewicz 18-05-2009 19:33

Re: Failed attempt to explain JAG linearity
 
Chris,
The equivalent loop is Vemf-Imotor*Rmotor+2.5volts >> Vbatt for the diode(s) to conduct. In terms of an equivalent, think of the EMF as a battery with the positive lead connected to the postive lead of the battery through the motor internal resistance, the diodes with cathode connected to the positive lead of the battery and the circuit resistance as a series circuit. Current will only flow when the EMF exceeds the voltage drop in all the resistance plus the forward diode drop of both diodes in the FET strings.
My contention is that this will only be the case if the inductor creates a spike and then for only a very short time. The path only exists for the period when the voltage is jumping the gap between segments on the commutator on the trailing edge of the commutator segment. This occurs because or the collapsing magnetic field of the winding just opened not because the controller has gone to zero output. Since there is no sync between the segments and the controller switching frequency, the inductive spike occurring during the off period of the controller is random and unpredictable. In fact even that repetition rate is variable with motor speed. So for your purposes, when the controller has gone to zero, the sum of the EMF and wiring voltage drop must exceed the battery voltage plus 2.5 volts for current to flow. Even if the lowside FET is still turned on, the junction will be shunted by the diode when it is forward biased. My belief is that the EMF won't exceed this unless the system is receiving external force to drive the motors faster than they were turning during the controlled "ON" period. I believe you can sample the EMF during this period but must account for those times when the diodes are forward biased and supplying current to the battery. Don't forget that the battery internal impedance is 11 mohms but the DC internal is lower. I think you will find that several samples over a defined time period will likely give you accurate results.

vamfun 18-05-2009 21:00

Re: Failed attempt to explain JAG linearity
 
Quote:

the sum of the EMF and wiring voltage drop must exceed the battery voltage plus 2.5 volts for current to flow. Even if the lowside FET is still turned on, the junction will be shunted by the diode when it is forward biased.
For further discussions, I will always refer to Vemf as a battery or source and due only to the rotation of the motor. I refer to V_L as the inductor voltage that is caused only by the current rate in the wires.

I still don't agree with the quoted statement and its time we drew some pictures. I will post a few shortly...but I think its the current rate that you are neglecting. As soon as the 12v is switched off, the field created by the current collapses and creates a voltage drop across the inductor that tries to sustain that current. If the low side diode wasnt there it would indeed cause a spark and almost instanteous discharge of the coil. But, the low side diode is there to allow current to flow in the same direction but with a negative rate. So the inductor voltage jumps to the sum of :

V_L = -(i*R + Vemf + V_diode ) and the current now decays at a rate

di/dt = V_L / L until the current goes to zero.



The low side FET that is ON is still conducting current in the same direction as the charge period. (As far as I know, these MOSFETs can conduct current in both directions when turned ON but that is an unknown to me.)

Gdeaver 18-05-2009 21:00

Re: Failed attempt to explain JAG linearity
 
I don't Know if this affects the discussion, but I believe a high side FET is left on durring the PWM off period. They are applying the PWM to the gate driver enable pin. For forward the gate driver A PWM input pin is set high and the chip enable set to high. The B Gate driver PWM input pin is set low and the PWM pulse is applied to the B gate driver enable. So in the off period the A high side FET is in an on state and both B side FETS are off. So does this mean the inductive spike is clamped to the battery voltage or just above with the Fet resistance?

Al Skierkiewicz 18-05-2009 23:52

Re: Failed attempt to explain JAG linearity
 
Chris,
I believe we are talking the same thing. The collapsing field generates a voltage independent of the EMF of the motor. Whether caused by the FET switch or the brush assy, the pulse is very short but the path is still through the diodes and to the battery. The current flow induced is still subject to the diode forward bias and is clamped to Vbatt as Gary pointed out. If measured at the output terminal of the controller, the pulse would clamp at Vbatt+2.5 volts (the diodes forward drop). All that being said, the winding is still moving in a magnetic field and a voltage is induced in said winding but cannot exceed the supplied voltage unless an external mechanical source adds to the speed. Therefore, the EMF is not high enough to forward bias the diodes and will be something less than Vbatt when the controller is turned off. If the controller remains off, the EMF will wind down in proportion to the decreasing speed of the motor. This is fairly easy to see with a non loaded motor and a scope at the output of the controller.

vamfun 19-05-2009 01:37

Re: Failed attempt to explain JAG linearity
 
2 Attachment(s)
Quote:

Originally Posted by Gdeaver (Post 860303)
I don't Know if this affects the discussion, but I believe a high side FET is left on durring the PWM off period. They are applying the PWM to the gate driver enable pin. For forward the gate driver A PWM input pin is set high and the chip enable set to high. The B Gate driver PWM input pin is set low and the PWM pulse is applied to the B gate driver enable. So in the off period the A high side FET is in an on state and both B side FETS are off. So does this mean the inductive spike is clamped to the battery voltage or just above with the Fet resistance?

If I look at hbridge.c the way I intrepret the software switches is shown in the attached doc. When they say the minus side = LO then I thought the gates on the lo side were either on or off and the hi side minus gate was off. I could have these reversed. Look at this straw man and we will get full agreement on the configuration. I have only depicted the voltage input>0 drive state.

Update: the zip expands this to Chris config, Gdeaver config and an Al? config


All times are GMT -5. The time now is 04:25.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi