|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#31
|
|||
|
|||
|
Re: Failed attempt to explain JAG linearity
Quote:
..where HWREG() is a macro that dereferences the unsigned long value pointed to by the BASE+OFFSET, in this case registers within the PWM[*] unit. The defines ON, LO, HI, and PULSE are predefined values for the PWM's[*] GeneratorA/B registers. What the code above says is to set the control input of the M- gate driver to 0 and set the enable to be 1, making the output turn on the low side MOSFET of M-. The next two lines turn on the control input of the M+ gate driver, BUT to PWM the enable. This pulses the high side MOSFET of M+. The reverse direction is similar, but reversed. -Scott [*] It is important to remember that there are (unfortunately) two things referred to as PWM: the 3-wire hobby servo signal, and the functional unit in the MCU that controls the HBridge. For this note's purposes I strictly refer to the latter. The pulse-width modulating of the HBridge. |
|
#32
|
|||
|
|||
|
Re: Failed attempt to explain JAG linearity
Quote:
There are two plots for the .3 duty case: one for the 884 and one for the JAG. These plots were made with the attached LABVIEW Hbridge time history vi and I think Eric will find it goes a long way to help explain whats going on. The sim allows you to follow each pulse as it accumulates ....but its like watching paint dry...so I added a "pre_init" that runs the sim to steady state current and then turns on the plots. I am by no means an accomplished LABVIEW programmer so I chose it as practice ... It would be great if some real programmers tidied it up. But , I'm real happy with how it works. If Al doesn't at least try the program I'll be disappointed. Have fun all and I welcome any comments to help improve the model. PS if the configuration settles to something else, I can easily update the program. Last edited by vamfun : 19-05-2009 at 18:25. |
|
#33
|
|||||
|
|||||
|
Re: Failed attempt to explain JAG linearity
Chris,
Sorry, I don't use Labview and I don't have access to it at work or at home. The waveform for the Victor looks as I would guess with no discharge path but the Jaguar shows some discharge path with the obvious triangular waveform expected for a closed circuit. We know that the EMF does not approach battery voltage until the motor is at free speed so at 30% duty cycle even with no load, the EMF is much lower than the battery. I agree the diodes conduct during the immediate discharge voltage spike following turn off, but rapidly falls to EMF-motor resistance voltage drop, which is still much less than the battery voltage. Since the battery is on the cathode of the diode/FET string and the lower EMF is on the anode, the diodes do not conduct during much of the off period. However, just to run a simple check calculation for current in the Victor during turn on, the motor current works out to over one hundred amps at 30% duty cycle. Even if I work in some numbers for the series resistance (battery internal resistance 11 mohm, Tdson of all FETs=5.3 mohm, motor resistance 90 mohm and allowing for 10 mohm of wiring losses that comes to 116 mohm) the motor current still works out to 95 amps at 30% for 120Hz and a little under 2 amps for the on period of the Jaguar at 15kHz with the same duty cycle. Last edited by Al Skierkiewicz : 19-05-2009 at 22:24. |
|
#34
|
|||
|
|||
|
Re: Failed attempt to explain JAG linearity
Al,
It is important that you respond to post 30 since we can never come to agreement until this diode issue is settled. I spent some time making these pictures as a means of clarification since words aren't doing it. |
|
#35
|
|||
|
|||
|
Re: Failed attempt to explain JAG linearity
Nice App! I'll take you to Strange Brew - much better beer than Milly's.
In my mind, there were two possible reasons for all of this: 1) Longer periods widen the gap between mean current and rms current. 2) Longer periods force the inductor to "run dry". The "dry" period affects the effective duty cycle. My interpretation of your app supports #2, but not #1. I just ran the simulation at 1kHz. I think this frequency shows the problem most clearly. You can clearly see ramp up, ramp down, and dwell. As you dither around that frequency, the ratio between those three sections does not remain constant. This means that the effective duty cycle is chop-frequency dependent. These results match perfectly with text-book buck regulator design principles. And really, what is an H-bridge other than a buck-boost regulator arguing with itself? I'm convinced that I could teach my students without any (ok, much ) hand waving. I still think it would be a great topic for a white paper.For LabVIEW-less Al - His code wraps the following in a code block. You can stick it into language-of-your-choice. Spoiler for code:
|
|
#36
|
|||||
|
|||||
|
Re: Failed attempt to explain JAG linearity
Sorry guys, it was a long day in a seminar for wireless mic theory, frequency coordination and application...
I am including a slide at the end of your power point, attached. We should keep in mind that there are a few variables that we are using that are heretofore unpublished and untested. Namely motor inductance, motor resistance (which we backed into) and guesses as to series resistance of wiring feeding the controller. Segment length has not yet entered into the discussion for calculation purposes. |
|
#37
|
|||
|
|||
|
Re: Failed attempt to explain JAG linearity
Sorry, I was confused and wrong. I looked at the same stuff you guys did and yes the low side fet is on in the PWM off period. Maybe my brain saw what I expected to see. Most of the small motor controls I have switch the low side. I believe IFI switches the low side. The jag switches the high. What factors led the Jag developers to want to switch the high side? Where does the Spike flow? I'm confused more than ever after reading this post. Will you guys continue to beat this up and enlighten me?
|
|
#38
|
|||||
|
|||||
|
Re: Failed attempt to explain JAG linearity
Gary,
It is my impression that the bootstrap capacitor is more easily charged with this configuration. |
|
#39
|
||||
|
||||
|
Re: Failed attempt to explain JAG linearity
Quote:
You remained silent with respect to my H bridge configuration and expanded on my "AL" model in the ppt revision so I assume it matches you model. I claim that this "AL" model is only valid for the coast configuration...which we have established is only in effect for "0" duty, coast enabled conditions. Please tell me why my PWM off , single diode configuration is wrong or just accept it so we can proceed. Quote:
Quote:
Quote:
Last edited by vamfun : 20-05-2009 at 17:41. |
|
#40
|
|||
|
|||
|
Re: Failed attempt to explain JAG linearity
In response to Eric:
Quote:
Strange Brew is ok by me.... I'll fit right in. Quote:
Quote:
Last edited by vamfun : 23-05-2009 at 01:36. |
|
#41
|
|||||
|
|||||
|
Re: Failed attempt to explain JAG linearity
Sorry to get back to this so late. Layoffs, salary reductions and elimination of 403b contributions take precedent.
Now I am the one that is confused. We started out looking at linearity and then progressed to start configuration and simulations. Now I am not sure where we are at. So let me answer a few things. Wildstang did not choose to use Labview, we did not load it or attempt to learn it. Our software team uses C everyday and that is the only thing they wish to use. If we are going to discuss operational differences at speed between the two controllers, then the discussion and simulation is useless without a valid calculation of CEMF (Counter EMF) and the introduction of switching for the commutator at that speed. To remind our readers, CEMF is a variable based on the rotational speed of the motor, the number of magnetic poles, the number of windings on the armature and the subsequent switching by the brush assembly, and the load on the motor. Therefore, without establishing that the motor is turning at the same speed for each controller with the same data input, no comparison/calculation can be made as the CEMF and speed would be different. Additionally, the CEMF is not a pure DC voltage, but varies as the windings pass through the magnetic field. From memory, this could be as high as 2 volts peak to peak. The result is a pulsed DC that looks more like a full wave rectifier output. At least some of the time, the brush assembly is contacting two windings and the rest of the time it is contacting only one. The simulation must also account for that phenomena for inductance, resistance, CEMF and supply current. As to differences between the "OFF" times on the two controllers and coast/brake. My understanding is the PWM output of both controllers varies between battery voltage and zero volts irrespective of the brake jumper as long as the controller has a valid speed signal present. This is accomplished by turning off one set of FETs, opening the circuit to the motor. It is not possible for me to get into the shop in the near future, but I would like to parallel a PWM drive signal to a Jaguar and a Victor, one feeding each side of our test bed drive base. That can at least tell us if the resultant speeds are identical for various throttle positions under minimum load with a transmission attached. It will also allow me to measure the commutator frequency for different motor speeds, and to look at the CEMF of each motor with the two controllers. As to the spreadsheet I first published, the data was calculated with the understanding we were still talking about start configuration. During start, CEMF would be non-existent as the motor is not yet turning. The data calculated would appear to be accurate for the two controllers, other than the slight error introduced by the multiplication of the Jaguar values by ten to coorelate with the same time period for the Victor's first "ON" pulse and using the resistance and inductance of two windings in parallel as the worst case model. The eventual Victor current that approximately equals the specified stall current validated that calculation namely 133 amps. |
|
#42
|
|||
|
|||
|
Re: Failed attempt to explain JAG linearity
Quote:
My objective was to describe what causes the JAG to be linear. I first conjectured that it was probably due to the commutator segment seeing more JAG pulses than the Victor. The first excel I did tried to model the segment switching and showed that there was no difference between the Victor and JAG... but I goofed and assumed that the currents headed for zero rather than -Vemf/R in OFF phase. This was an important oversight and made all cases look like the victor. In rethinking the problem, it became clear that the diode in the OFF phase was allowing the inductor to "run dry" (I think these were Eric's words) for the Victor but not for the JAG. This is because L/R is short with respect to the Victor period and the current decays and is zero for most of the OFF phase. The JAG on the other hand looks like a pure inductor because the frequency is so high (in an A/C ckt its impedance would dominate the R) and just integrates the voltage pulses . The current doesn't decay much in the OFF phase so the current builds up until the motor moves. Vemf comes into the picture and there is a transient but the current never goes negative and the diode is always conducting. This led to my two little equations: i_free*R = (12-Vemf)*duty for the Victor (behaves like a diode in OFF phase and all current comes from ON phase duty cycle) i_free*R = 12*duty -Vemf for the JAG. (behaves like a short in OFF phase so current can remain in the inductor and we can model it as a simple linear low pass ckt with a chopped 12 v and DC Vemf) These equations match the measured performance amazingly well!!! My DOOH moment came when I assumed the Victor was running in a coast mode (with diodes) and the JAG was running in the brake mode (shorted)during the OFF phase since this seemed to match the results we were getting. You reminded me that there is no difference between the coast and brake mode under normal operating conditions. So... rather than go back to the excel and try to model a complicated switching problem I just wrote a basic LR switching simulation to see how it would match the results of the simple equations. The first LABVIEW program showed speed vs duty for Victor 120hz,2k hz and JAG 15k hz. The plots looked realistic and I was happy(http://www.chiefdelphi.com/forums/at...&d=1242511867) To make these plots, I ran the time simulation to steady state. I had to fool with L but the final value was within reason with old CD posts. Eric wanted more explanation so I modified the program to output the waveform time history and it really helps others visualize what's going on. It hasn't helped you since my LABVIEW choice wasn't good for your team. I could have done it five times faster in C or MATLAB!! It is important to note that my model has only one diode in the OFF phase and it returns current in a ground loop involving the motor and the diode. Enter Al... seemed almost all your comments involved two diodes and a 12 v return path for the current and it would never jive with what I was showing. Of course you educated us on many other things along the way as well. But this was the biggest issue in my eyes. To clarify the circuit, I generated some flow graphs in the ppt showing my high side switching model with the one diode return loop plus an "Al" model that had two diodes and 12 v current return path hoping to nail this down. You responded by elaborating on the "AL" configuration and said nothing on the single diode return so I assumed that this was your Hbridge return model. We have yet to agree on this unless I'm missing something ![]() I am not naive enough to believe that you can simulate any real Hbridge without taking into account all the effects you mention. But, it is my assertion that all these effects are secondary to the problem of linearity and the simple LR switching model does a good job in explaining the phenomenon and thats all you can ask of a model. This is why I encouraged you to do the simulation. My simulation code is basically written in C and wrapped in a LABVIEW while loop(see spoiler in http://www.chiefdelphi.com/forums/sh...9&postcount=35.) I was hoping you would examine the differential equations , which include inertia dynamics and coulomb friction effects and run something similar in C , however, you'll have to substitute for the nice LABVIEW graphics. We would all like to see some real lab data in addition to the Beach Bot data I posted which showed the simplified model matching to within 5% by adjusting i_free to match installation friction. Hopefully, things will settle down in your work and give you some time to tinker and that this post didn't confuse things further. Post note: I was never really concerned about the start transient. All my simplified equations address the steady state. After I posted my LABVIEW plots showing how well the steady state simple LR model worked, you posted your start up excel transient. This was perfectly accurate but the plots seemed sooo misleading because there was a linear one for the JAG and a nonlinear one for the Victor. Although you did not claim that that was the reason for the phenomenon...it just looked like it was key. So I jumped on it and pointed out that the main reason for the phenomenon was the difference in the OFF phase currents which were not represented there. Last edited by vamfun : 24-05-2009 at 01:48. |
|
#43
|
|||||
|
|||||
|
Re: Failed attempt to explain JAG linearity
Chris,
I think we keep missing each other here. So lets agree on some things assuming for the moment that the brush/commutator is not switching and we are trying to analyze one simple winding... Vemf=Counter EMF=CEMF, which will be the same for either controller in the "off" condition or in coast, when connected to the same type motor running at the same speed. CEMF will be less than Vbattery unless additional mechanical force is applied to the system or will be zero if the motor is not turning. If we identify the four parts of the H bridge such that the two FET groups connected to positive battery terminal are labeled A & B, and the two FET groups connected to negative terminal are labeled C & D. Then for one motor direction group A & D are turned on and for the other motor direction B & C are turned on. All FETs in both controllers have diodes from source to drain as part of their implementation/manufacture. When any (or all) FET group in either controller is turned off, the motor inductance will make a voltage spike whose polarity is opposite of the applied voltage during the "on" phase of the PWM output and in the same polarity as CEMF. The drop across the Victor diodes is 1.2 volts and the Jaguar is 1.25 volts. If these conditions exist then two sets of diodes will conduct the voltage spike through the series circuit that includes the battery and all wiring to that branch. The current will continue to flow only until the voltage spike plus CEMF exceed the battery voltage and the voltage drops across the resistance of the wiring and the forward drop of the diodes. If motor current is supplied by FET groups A & D then the diodes in B & C will conduct during the discharge. |
|
#44
|
|||
|
|||
|
Re: Failed attempt to explain JAG linearity
Quote:
Quote:
Signed Confused Last edited by vamfun : 25-05-2009 at 00:27. |
|
#45
|
|||
|
|||
|
Re: Failed attempt to explain JAG linearity
Chris,
You started this analysis looking to see if the Jags perceived linearity is a result of switching frequency alone. The discussion has evolved and now focused on what happens at the turn off. It's now apparent that there is a second major difference between the 3 controllers. The IFI 883 and 884 are low side switchers with a frequency of 120 and 2000. The jag is a high side switcher with a frequency of 15000. Al has pointed out that there is allot more going on because the h-bridge involves rotating magnetic fields and brush switching. So they have been ignored. Now, I can see your transient and current path at shut off. The low side D FET being on is the key since it is a low Resistance path. I Don't see where current would flow thru AL's path unless the transient is massive. Now I'm a little confused on the victor path. The high side A Fet Is left on and the D Fet Turned off. The A-C side is left at vbat - the FET resistance. Where does the current flow? What happens on the B-D side. Seems to me the transient and back EMF would be clamped very fast By the high side on A fet. Do I have it right? So if I have this right The IFI low side switcher decays fast and the jag high side switcher decays slower. Make sense? Now with the Jag the C FET diode bears the brunt of the off period current decay and with the IFI the A FET Bears the load but since it is on there is less stress. Make sense? Could this be a source of the jag failures? The Fet in the jag is not particularly designed for repetitive avalanche compared to some other fets. ( off topic but curious) On the subject of controller linearity, IFI stated when they introduced the victor 884 that it gave better control in low duty cycle condition for controlling things like an arm where the motor maybe required to maintain a holding current. Now add in AL comments that there is allot more going on with the controller and motor than the simplified model in this discussion. Under real conditions, does the Jag maintain its linearity at low duty cycle conditions? Does the Jag trade controllability at high duty cycle rates and sacrifice the low end? Did IFI sacrifice the high for better control at the low end ? Al mentioned the word deterministic. These models can get nasty and complex real fast when all the variables are added in. At some point some real data will be needed to confirm this. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2009 Camera and Jag inventor models problem | Creator Mat | CAD | 5 | 08-03-2009 14:05 |
| 1 Jag and 1 Victor not responding correctly. | elbuo | NI LabVIEW | 4 | 17-02-2009 22:57 |
| Joystick Linearity | NinJA999 | Control System | 4 | 28-01-2007 18:49 |
| pic: Yet another attempt at Photoshop | Cody Carey | Extra Discussion | 1 | 08-04-2006 23:13 |
| pic: Failed attempt at simulation | CD47-Bot | Extra Discussion | 5 | 17-06-2004 11:03 |