|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Victors Non-linear!!!
I have confirmed a suspicion i have had for a while. Apparently the victor 884's do not have a linear PWM input vs. voltage input.
A DVM was attached to a victor and the values recorded while incrementing the PWM input by a set number every 6 seconds. The reason for the initial values being a bit sketchy is that i was using a cheap digital meter that fluctuated a bit. As time went on, i got a little better at figuring what number it was hovering around. Here i attached an unloaded motor to a victor and measured its speed vs. victor PWM input. The speeds were determined using a 1024 count optical encoder encoder. The motor was a fisher-price motor w/gearbox. The test was automated and did the following: 1.set victor output 2.wait 2 secs for speed to stabilize 3.count encoder ticks for x secs. (I think the test was set to wait 3 seconds at the time this data was taken). 4.output data 5.increment pwm output and goto step 2 unless finished Note that since the motor is unloaded, motor models dictate that speed should be directly porportional to the input voltage of the motor. ![]() I should mention that these tests were done on a single victor 884 and i cannot guarentee that all victors behave similarly although i believe that they do. I also believe that this curve is a feature of their design. There will be higher resolution data as well as code examples of how to compensate for this to come. It will probably be a while as i am busy with other things and will be out of town all this week. I hope my imagehost holds up |
|
#2
|
||||
|
||||
|
Re: Victors Non-linear!!!
Jim,
Very interesting data. Thank you for sharing. I'm not sure why IFI would make its device non-linear. I would be tempted to redo the test and monitor the controller output PWM with a scope. Mike |
|
#3
|
||||
|
||||
|
Re: Victors Non-linear!!!
Quote:
|
|
#4
|
||||
|
||||
|
Re: Victors Non-linear!!!
Quote:
I rather doubt that the controller is non-linear and, the more I think on it, it does not matter. This non-linearity does shed some light on some phenomena I saw working with autonomous mode last year. I'm thinking a lookup table to linearize the output may be in order this year. Once again, Thanks for sharing the data. Mike |
|
#5
|
|||||
|
|||||
|
Re: Victors Non-linear!!!
Very interesting information--definitely throws an extra idea or two in for the software crew this year.
And I'm sure we'd all love you to run this test on a few more Victors to see if the numbers hold up. |
|
#6
|
||||
|
||||
|
Re: Victors Non-linear!!!
I think this is actually good news for most FIRST applications. Power is, of course, proportional to voltage squared and this curve looks to be approximately 1/x^2 so that way, PWM values are close to proportional to power.
|
|
#7
|
|||||
|
|||||
|
Re: Victors Non-linear!!!
Quote:
This has not bearing on if the RPM output is linear, however. I think I'll do a Simulink model tonight and see how RPM varies with duty cycle, if I can get enough data on motors and the PWM output. |
|
#8
|
|||||
|
|||||
|
Re: Victors Non-linear!!!
Quote:
It's general knowledge that the Victors pulse 12V to the motors to control their speed. Except at the extremes when the FET's give the full 12V. It would be very difficult to measure this on a general purpose multimeter. I am extremely skeptical of the voltages you are getting. A better test would be to see if the frequency is linear. I plan on checking that when I get back to the lab after the holidays. Last edited by MikeDubreuil : 22-12-2004 at 18:26. |
|
#9
|
|||||
|
|||||
|
Re: Victors Non-linear!!!
Quote:
And with it fluctuating, it would confuse the meter? Am I way off here? |
|
#10
|
|||||
|
|||||
|
Re: Victors Non-linear!!!
That looks very much like a graph from how Tiddlywinks ratings are calculated.
![]() http://www.cheng.cam.ac.uk/~pjb10/wi...gs/method.html |
|
#11
|
|||||
|
|||||
|
Re: Victors Non-linear!!!
Quote:
However, the change from 0 volts to 12 volts is definitely not linear and more exponential. I think most of us have operated under the assumption that the change was linear. EDIT: If anyone has taken an electronics course, Jim's graph looks very similar to an RC circuit charging and discharging. Last edited by MikeDubreuil : 22-12-2004 at 18:54. |
|
#12
|
||||
|
||||
|
Re: Victors Non-linear!!!
Quote:
Quote:
Edit: I wrote some code that shows how to generate the PWM signals using the PIC's CCP hardware. It's here: http://kevin.org/frc/edu_led_pwm.zip -Kevin Last edited by Kevin Watson : 22-12-2004 at 18:42. |
|
#13
|
|||||
|
|||||
|
Re: Victors Non-linear!!!
Quote:
Either way, we have an HP scope in the lab that will tell us duty cycle. Thanks for the heads up. |
|
#14
|
||||
|
||||
|
Re: Victors Non-linear!!!
Quote:
-Kevin |
|
#15
|
||||
|
||||
|
Re: Victors Non-linear!!!
Quote:
In response to Andy's post: I can't tell how familiar you are with circuit analysis in the time domain, but it seems like you have a pretty good grasp of it qualitatively. Here's a "formal" way of going about the series inductor-resistor's response to an impulse. The impulse can be modeled by the use of the unit step function: Vin = Vm(u(t) - u(t-Tw)), where Vm is the voltage magnitude of the pulse and Tw is the length of the pulse. The unit step function u(tau) is simply 1 for tau >= 0 and 0 otherwise. The "physics" description of how the inductor responds to voltages and currents is good for qualitative analysis, but I often get confused with the signs corresponding to the use of the term EMF instead of voltage drops. Here's the way I visualize it (this should be fun in ascii): Code:
Current, i(t)
| |
| |
| \|/
| v
+ |
) <-this "comes out at you"
( <-this "goes into the background"
)
(
)
- |
|
An increasing i(t) over some period of t will cause the magnetic flux cutting the coils to increase in the downward direction. This causes an emf to be generated in the opposite direction, which is in the upward direction for the orientation of the coils above. Here's where my memory gets fuzzy, but I *think* it's right: The emf going upward, having the same units as Voltage, causes a voltage to develop across the terminals as marked on the figure. THe reason for this orientation, as I think of it, is that the emf is the result of a circular electric field that causes positive charges to go up in the figure. Thus, if a "load" existed in parallel with the inductor, it would act like a "battery" with a "voltage" that caused the current to go in the direction of the emf. Thus, we can write a nice voltage/current relationship for the inductor and eliminate the negative sign and the emf term: v(t) = L * di(t)/dt, where the voltage and current orientation are as in the figure above. This corresponds to the passive sign convention, commonly used in linear circuit analysis, and the sign convention it follows is also used for resistors and capacitors: the current enters the positive node of any two-terminal element. So let's say that we have a voltage source, given by Vin = Vm(u(t) - u(t-Tw)), in series with our inductor, L, and reisistor, R. Code:
current --> ______ | | | R + | Vin L - | |______| Vin(t) = R * i(t) + L * di(t)/dt or: di(t)/dt + R / L * i(t) = Vin(t) / L Using the integrating factor method (you can look this up if you haven't seen it before): Let the integrating factor be exp(R / L * t) (where exp(x) = e^x) then: exp(R / L * t) * (di(t)/dt + R / L * i(t)) = d/dt((exp(R / L * t) * i(t)) = exp(R / L * t) * Vin(t) / L Changing the variable of integration to tau and integrating both sides from 0 to t (Vin is 0 for tau < 0): int(d/dt(exp(R / L * tau) * i(tau)), tau, 0, t) = int(exp(R / L * tau) * Vin(tau) / L, tau, 0, t) For 0 <= t < Tw, Vin(t) = Vm, so evaluating the integrals gives: exp(R / L * t) * i(t) - i(0) = Vm / L * ( L / R) * exp(R / L * t) - Vm / L * ( L / R) = Vm / R * exp(R / L * t) - Vm / R We can say, for this case, that i(0), the initial current through the inductor, is 0, so: exp(R / L * t) * i(t) = Vm / R * exp(R / L * t) - Vm / R i1(t) = Vm / R (1 - exp(-R / L * t)) I call this i1(t) because it is only valid for the first part of the Vin excitation to the system. From here, one can define t' = t - Tw such that t' = 0 corresponds to t = Tw We can now solve for i2(t'), which is valid for all t' > 0 (or t > Tw) using the same method. It will come down to this equation again: di(t')/dt' + R / L * i(t') = Vin(t') / L = 0 for t' > 0 Separating variables: di(t')/i(t') = -R / L * dt' or di(tau')/i(tau') = -R / L * dtau' Integrating from 0 to t', since we have taken into account tau' < 0 in the previous section of the problem: ln(|i(t')|) - ln(|i(0)|) = -R / L * t' exp(ln(|i(t')|) - ln(|i(0)|)) = exp(-R / L * t') i2(t') = i2(0) exp(-R / L * t') where i2(0) = i1(Tw), a constant In terms of t, i(t) for t > Tw is: i1(Tw) exp(-R / L * (t - Tw)) Thus, the current over all time is: Code:
i(t) = {0, t < 0
{Vm / R (1 - exp(-R / L * t)), 0 <= t < Tw
{i1(Tw) exp(-R / L * (t - Tw)), t >= Tw
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 24Vs and victors | greencactus3 | Control System | 13 | 05-02-2005 14:22 |
| Calibrating Victors | SpaceOsc | Control System | 27 | 19-11-2004 07:59 |
| Flakey Victors | archiver | 1999 | 4 | 23-06-2002 21:58 |
| DON'T Recalibrate Victors! | Joe Johnson | Off-Season Events | 0 | 12-11-2001 22:58 |