Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Motors (http://www.chiefdelphi.com/forums/forumdisplay.php?f=52)
-   -   Modeling motor control (http://www.chiefdelphi.com/forums/showthread.php?t=88193)

Ether 06-01-2011 19:15

Re: Modeling motor control
 
Quote:

Originally Posted by kamocat (Post 992113)

Yes, I remember it :-(

The "Black Jags use locked antiphase" was based on a post by Gdeaver that sat there unchallenged after several subsequent posts and so I assumed it was true (slaps side of head).

Now, along comes Sir Kevin and enlightens us on this matter: Black Jags alternately connect the motor to power and short it.



kamocat 06-01-2011 20:36

Re: Modeling motor control
 
Hmm. It seems the datasheet I linked was for the Tan Jaguar. (Again, the Fairchild part should have tipped me off.)
The Black Jaguar controls all four MOSFET sets with 4 IO pins, and uses an Allegro A4940 to drive the MOSFETs.

So that would imply the Tan Jaguar is locked antiphase. And yet it doesn't have the response I would expect. Strange.
It appears the Tan Jag uses 4 outputs as well: two for each PWM driver.

EDIT:
So what do you think about this post by EricVanWyk? Should we ask him for clarification? Did he confirm that locked antiphase exists, or that it is implemented on the Tan Jaguars, or that it is implemented on the Black Jaguars?

Ether 06-01-2011 21:32

Re: Modeling motor control
 
Quote:

Originally Posted by kamocat (Post 992168)
EDIT:
So what do you think about this post by EricVanWyk? Should we ask him for clarification?

The question has already been asked here and here.

The answer was given here.



kamocat 06-01-2011 23:38

Re: Modeling motor control
 
I was just asking because he said he had observed the behavior.

Nevertheless, we've looked at the hardware and software for the Black Jaguar.
I know from observation that the Tan Jaguar controls differently. I get the impression it alternates between power and open, but I'm curious HOW it does this (does it modulate the OutputDisable?).

At any rate, I need to get my current clamp working so I can accurately measure current.

Kevin Sevcik 07-01-2011 00:13

Re: Modeling motor control
 
Too much crosstalk between this thread and the current sensing thread... but yes, the tan jags are modulating the output disable pin. They could be programmed to modulate the pwm pin but aren't for some reason. I obviously can't say if it's to get that particular dynamic or to avoid shoot through, but there it is.

Kevin Sevcik 07-01-2011 00:45

Re: Modeling motor control
 
Alright, I'm transferring a post from the current sensing thread over here to keep things better organized.

Quote:

Originally Posted by kamocat (Post 992244)
No, they can't modulate the PWM pin. If they did, that would be locked antiphase, because the MOSFET driver would alternate between driving the low side and driving the high side.

Noooo, the Jags aren't operating in locked anti phase, and the tan wouldn't if the PWM pin was modulated.

Locked anti-phase required reserving the entire h-bridge to go from forward bias to reverse bias in respective PWM phases. It's a Forward-Reverse phase modulation. That's definitely not what either Jag is doing.

Both Jags hold one half of the h-bridge constant. So in forward motion, the M- half is held high-OFF, low-ON for the entire PWM cycle. In the Tan Jags, the M+ high side is selected via the PWM pin, and the output disable is modulated, so the M+ low side would never turn on. So that's a Forward-Open modulation. The Black Jags do things differently and alternately drive the M+ high and low sides. That's a Forward-Shorted modulation, because we never turn on the M- high side.

So I was suggesting that the Tan hardware seems perfectly capable of the same Forward-Shorted operation as the Black if they modulated the PWM pin instead of the Output Disable pin.

kamocat 07-01-2011 01:06

Re: Modeling motor control
 
Oh, you're right, my mistake.
If they modulated the PWM pin, it would have the same control as the Black Jaguar.
Isn't that interesting? I wonder why they haven't changed that yet.

Kevin Sevcik 07-01-2011 10:15

Re: Modeling motor control
 
They very well may have changed it for the FRC firmware. Again with my caveats that this is all based off the reference source code released by Luminary Micro, which may not be identical to the FRC firmware. I'm not much interested in hunting up a disassembler for pick apart the FRC firmware just to double check things though. Anyways, the only reason I can think of for not doing it is if the don't trust the dead time protection in their FET drivers.

FETs all have some delay between turning off the gate supply and when conduction actually stops. So if you're simply turning off the high side and turning on the low side at the same instant, you can get "shoot-through" where you've actually shorted V+ to V- for some small amount of time. This is obviously bad, so most integrated FET drivers have provisions for adding "dead time" between turning one side off and the other on. The Tan Jag's driver says it has built in dead time, but Luminary Micro may not have trusted it, or may have discovered a problem with their implementation of it. Or they may have just not wanted bother with the possibility of a problem.

Al Skierkiewicz 07-01-2011 11:17

Re: Modeling motor control
 
It may well have been to help the bootstrap work.

Ether 07-01-2011 14:01

Re: Modeling motor control
 
2 Attachment(s)
Quote:

Originally Posted by Ether (Post 992125)
Black Jags alternately connect the motor to power and short it.

So what happens to the current in a spinning motor when it is shorted?

The simple answer is, the motor's inductance forces the current to keep flowing for a few microseconds, before the motor's back emf overpowers the inductance and reverses the current.

This momentary forward current continues applying torque during the few microseconds that it is flowing.

With a Jag, operating at 15000Hz, the pulse width is shorter than the decay time, so it makes sense to short the motor during the OFF cycle, to let the good (forward) current keep flowing.

With a Victor, operating at 150Hz, the pulse width is far longer than the decay time, so it the motor were shorted, the back emf would have time to overpower the inductance, and you'd get reverse current (and reverse torque) during the OFF portion of the PWM.

See attached PDF (analytical solution) or PNG (numerical solution) for more technical detail.



Ether 07-01-2011 15:23

Re: Modeling motor control
 
Quote:

Originally Posted by Kevin Sevcik (Post 992255)
Both Jags hold one half of the h-bridge constant. So in forward motion, the M- half is held high-OFF, low-ON for the entire PWM cycle. In the Tan Jags, the M+ high side is selected via the PWM pin, and the output disable is modulated, so the M+ low side would never turn on. So that's a Forward-Open modulation. The Black Jags do things differently and alternately drive the M+ high and low sides. That's a Forward-Shorted modulation, because we never turn on the M- high side.

Just to clarify, even with "Forward-Open", the Tan Jag still has a path for the current through the Q4,5,&6 Zener diodes.



Kevin Sevcik 07-01-2011 15:46

Re: Modeling motor control
 
Quote:

Originally Posted by Ether (Post 992459)
Just to clarify, even with "Forward-Open", the Tan Jag still has a path for the current through the Q4,5,&6 Zener diodes.

Yes, but with a 1V drop, which will drain the current a fair bit quicker. And the more important difference that if your current decays quick enough that you'd start regenerative braking, the diodes will stop that. So the "Forward-Open" mode has an advantage in the (rare) case that a motor is turning fast enough with low enough current that you'd encounter reverse torque.

Come to think of it, this explains Marshal's report of different operating characteristics between the tan and black jags. If you're running the motor at high/full speed and drop to a lower PWM command, the current will decay quicker in the tan jag, but you'll never get reverse torque, so you'll "coast" during the off cycle. In the Black Jag, there's a path for reverse current during the off cycle, so it's possible for the back emf to build up a reverse current and create reverse torque to slow the motor down quicker.

I think this makes sense, but I don't have any simulations set up at the moment to test it.

Ether 07-01-2011 17:10

Re: Modeling motor control
 
Quote:

Originally Posted by Kevin Sevcik (Post 992480)
Come to think of it, this explains Marshal's report of different operating characteristics between the tan and black jags. If you're running the motor at high/full speed and drop to a lower PWM command, the current will decay quicker in the tan jag, but you'll never get reverse torque, so you'll "coast" during the off cycle. In the Black Jag, there's a path for reverse current during the off cycle, so it's possible for the back emf to build up a reverse current and create reverse torque to slow the motor down quicker.

I think this makes sense, but I don't have any simulations set up at the moment to test it.

That is a reasonable hypothesis, and makes sense intuitively, but the analysis doesn't support it (unless my math or assumptions are wrong - which is certainly possible).

With a CIM and a Black Jag: even if the CIM is going at full throttle no-load, it takes almost 45 microseconds for the 2.7amp no-load current to decay to zero if you short the motor. The Jag's PWM period is 33 microseconds.



Ether 07-01-2011 18:02

Re: Modeling motor control
 
Quote:

Originally Posted by Kevin Sevcik (Post 992480)
Yes, but with a 1V drop, which will drain the current a fair bit quicker.

I plugged an additional 1 volt into the analysis mentioned in my earlier post; it makes very little difference with a CIM.

I don't have L values for other motors.

Quote:

And the more important difference that if your current decays quick enough that you'd start regenerative braking, the diodes will stop that. So the "Forward-Open" mode has an advantage in the (rare) case that a motor is turning fast enough with low enough current that you'd encounter reverse torque.
Good point. That may (or may not) happen with other motors.




All times are GMT -5. The time now is 21:55.

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