"Tim Wescott" <
t...@seemywebsite.com> wrote in message
news:dpmdnYKGTZNcV8TM...@giganews.com...
> Clever sampling can save you a lot of grief. 'course, I may be
> outsmarting myself.
>
> The point of the sampling is to pick the time where the current reading
> represents the average current in the motor. The current in the motor
> coils is a sawtooth + DC; sampling in the center of the bottom FET on-
> time gets you right in the center of the rising segment of the sawtooth,
> which gets you the average motor current that cycle. (Again, assuming
> I'm not outsmarting myself).
Not true in the presence of losses, and of course, any time you've got
current going on a ramp or some other curve, it all goes out the window.
Eddy current losses cause an "instant" jump in current, proportional to
the change in voltage, while DCR introduces an L/R time constant, shifting
the average-crossing point a little earlier than half. Think of the
transformer equivalent model:
. Rdc Lleak
. o---RRR----LLL---+--------+
. | |
. L Lp R Reddy
. L R
. | |
. o----------------+--------+
Plus (in the case of a transformer proper) whatever secondary load
connects across Lp. (Note that Lleak and Lp are divided proportionally,
strictly speaking; an L-equivalent circuit like this is only reasonably
true for k ~= 1.) In a motor, this might amount to harmonics induced from
the finite number of rotor poles and how their exact magnetic profile
differs from an ideal circle, but that's all slow-rotatey-stuff that gets
averaged and lumped in with DC current (which does most of the real work).
If you sliding-average a pair of "middle" samples (one up, one down), it
automatically accounts for the DCR sample error.
I would just as well sample frequently and filter down (takes lots of
sampling + DSP), or slow it down analog (a couple analog poles isn't all
that fast in response) and sample it at my leisure. Trying to do tricky
sample-in-the-middle business is going to get awkward around variable
slopes and timing (how do you know you've sampled in the middle of both
halves of a 2% or 98% duty cycle waveform, and how is that affected by the
sample-and-hold aperture?).
I doubt this is the problem you're having, just... nuts and bolts, eh?
Tim
--
Deep Friar: a very philosophical monk.
Website:
http://seventransistorlabs.com