PDA

View Full Version : Victors Non-linear!!!


Rickertsen2
12-22-2004, 01:05 PM
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.
http://pictar.net/Victor-Response2.gif

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.
http://pictar.net/Victor-Response.gif

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

Mike Betts
12-22-2004, 02:02 PM
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

Billfred
12-22-2004, 02:07 PM
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.

Rickertsen2
12-22-2004, 02:10 PM
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
You are suggesting that perhaps this is an issue with the controller PWM output being nonlinear? I didn't think of that. This is something else i will test.

Max Lobovsky
12-22-2004, 02:19 PM
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.

Mike Betts
12-22-2004, 03:30 PM
You are suggesting that perhaps this is an issue with the controller PWM output being nonlinear? I didn't think of that. This is something else i will test.
Jim,

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

Kevin Sevcik
12-22-2004, 05:41 PM
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.


Erm, so I'm confused. I was under the impression that the Vics have a PWM output instead of a variable voltage output. As such, you can't really measure the output with a standard multimeter. This would be why Mike Betts was talking about checking it with a scope.

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.

MikeDubreuil
12-22-2004, 06:22 PM
Erm, so I'm confused. I was under the impression that the Vics have a PWM output instead of a variable voltage output. As such, you can't really measure the output with a standard multimeter. This would be why Mike Betts was talking about checking it with a scope. Exactly,
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.

Dan Richardson
12-22-2004, 06:35 PM
Exactly,
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.

Wouldn't these numbers make perfect sense in these instances? how at around 0 it went flat.. and untill that point it was near the bottom, and when it was near full 12v it was at the top? It would be taking the pulse average?

And with it fluctuating, it would confuse the meter?

Am I way off here?

Kevin Watson
12-22-2004, 06:39 PM
Exactly,
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.You can with a true RMS meter.

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.Actually, the frequency is fixed. The duty cycle is what changes. This too can be measured directly with some higher-end meters, like the Fluke 189.

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

Yan Wang
12-22-2004, 06:42 PM
That looks very much like a graph from how Tiddlywinks ratings are calculated.

http://www.cheng.cam.ac.uk/~pjb10/winks/ratings/graph.gif
http://www.cheng.cam.ac.uk/~pjb10/winks/ratings/method.html

MikeDubreuil
12-22-2004, 06:44 PM
Actually, the frequency is fixed. The duty cycle is what changes. Ah, I didn't think of that. That makes much more sense that the frequency chaging.
Either way, we have an HP scope in the lab that will tell us duty cycle. Thanks for the heads up.

MikeDubreuil
12-22-2004, 06:49 PM
Wouldn't these numbers make perfect sense in these instances? how at around 0 it went flat.. and untill that point it was near the bottom, and when it was near full 12v it was at the top? It would be taking the pulse average?

And with it fluctuating, it would confuse the meter?
At the extremes? Yes. The duty cycle would be 100% or closer and the meter would easilly be able to read the value. His data does indeed show that motor will get full voltage at the extremes.
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.

Kevin Watson
12-22-2004, 07:19 PM
Ah, I didn't think of that. That makes much more sense that the frequency chaging.
Either way, we have an HP scope in the lab that will tell us duty cycle. Thanks for the heads up. Actually, if the Victors will work down to five volts, you could feed the waveform back into a robot controller running suitable software to give you the information you want. This is pretty much what last years IR receiver software did.

-Kevin

Mike Betts
12-22-2004, 09:26 PM
Erm, so I'm confused. I was under the impression that the Vics have a PWM output instead of a variable voltage output. As such, you can't really measure the output with a standard multimeter. This would be why Mike Betts was talking about checking it with a scope.

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.Kevin,

The both the input and the output are PWM. I was asking about the input.

The output is a PWM whose duty cycle varies from 0 to 100% so it can be easily read with a multimeter.

The input is a RC compatible PWM. See (Servo Basics (http://www.geocities.com/BourbonStreet/3220/servobasics.html)) for a good explanation. A multimeter will not necessarily give good results. That is why I suggested a scope.

Mike

Gdeaver
12-22-2004, 11:13 PM
Measuring voltage is not going to tell much. PWM varies the power to the motor not voltage. A motor under no load takes very little power to run at full speed. It would be interesting to see a plot of rpm vs current draw. I would expect to see much different curves with a motor under load. A better measure of the victors would be to put the motor under a constant load and measure the power ouput of the victors motor system as the robot controller steps through the pwm variable.

Rickertsen2
12-23-2004, 01:07 AM
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.
This would be true if a motor were strictly a resistor but it is not.
Power output of a motor at a given time is given by:
power = ((V-speed*kv)^2)/armature resistance
where speed is in rads/sec and Kv is the motor's CEMF speed constant.
as you can see power output is not porportional to the square of voltage unless you assume your robot is always moving at a single speed.

Measuring voltage is not going to tell much. PWM varies the power to the motor not voltage. A motor under no load takes very little power to run at full speed. It would be interesting to see a plot of rpm vs current draw. I would expect to see much different curves with a motor under load. A better measure of the victors would be to put the motor under a constant load and measure the power ouput of the victors motor system as the robot controller steps through the pwm variable.

First off PWM DOES vary equivilant voltage NOT POWER. Any EE or anyone with any knowledge on these forums will back me up on this. in order for the speed controllers to vary power they would either have to have some sort of closed feedback loop based on current and voltage or have some knowledge of the system they are controlling including either feedback from a speed or torque sensor and the necessary system constants.

Secondy a plot of RPM vs. Current draw would be meaningless to say the least. Current draw cannot be related to speed without integral calculus, the moment of intertia of the driven system, the current torque constant of the motor, the armature resistance of the motor, the CEMF speed constant of the motor, the input voltage to the motor, etc.


Erm, so I'm confused. I was under the impression that the Vics have a PWM output instead of a variable voltage output. As such, you can't really measure the output with a standard multimeter. This would be why Mike Betts was talking about checking it with a scope.

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.

The output of the victor is a duty cycle modulated square wave but its's frequency is high enough that for out purposes as well as modeling purposes it can be treated as if it were variable voltage DC. Since it is a square wave and it is of sufficiently hihg frequency its "RMS voltage" can be measured with accuracy without a "true RMS" meter.

If you want to model a PM DC brush motor, the relevant equation is as follows.

torque output=(Kt(Vin-speed*Kv))/r
where:
Kt is the torque voltage constant in newton-meters per amp
Kv is the speed CEMF constant in volts per radian per sec
r is the armature resistance in ohms
Vin is the input voltage in volts
if you plug this into our friend newton's second law and solve for speed vs time for a particular voltage input, you will find that when there are no other forces in the system(ie motor is spinning freely), speed will be porportional to voltage input(after time for acceleration/decelleration is allowed).

MikeDubreuil
12-23-2004, 01:25 AM
The output of the victor is a duty cycle modulated square wave but its's frequency is high enough that for out purposes as well as modeling purposes it can be treated as if it were variable voltage DC. Since it is a square wave and it is of sufficiently hihg frequency its "RMS voltage" can be measured with accuracy without a "true RMS" meter. I'm going to say you can't acurately measure the voltage with a voltmeter by the definition of RMS.

VRMS = 0.7 × Vpeak
VRMS = 0.7 * 12V = 8.4V

Since we're pulsing +12V DC (changing the duty cycle), theoreticly, the voltage should always be 8.4 Volts.

EDIT: This is only true for a sine wave (AC voltage). Give me a minute for a square wave.

EDIT2: Because our duty cycle changes it throws off the RMS calculation big time. The above equation is true for a 50% duty cycle square wave.

Al Skierkiewicz
12-23-2004, 07:25 AM
Whoa Boys,
I stop looking at the boards for a few minutes and things go a little crazy on me. The PWM output (or input for that matter) is not able to be accurately read on most multimeters as Kevin specified above. The input circuitry for most meters, Fluke general line included, is designed to measure AC signals below 400Hz in most cases. The conversion electronics are designed to give reasonable RMS datum on nearly pure sine waves. With the Victor output being a PWM square wave at a much higher frequency than 400 Hz, very few meters will give any indication that would be linear. Two methods that would give you accurate data would be to measure the duty cycle with a scope or with a PWM to average convertor. The second may be easy to build. Check out the ARRL Radio Amatuers Handbook for full wave bridge power supplies. Build up the bridge and capacitor filter, (two components from Radio Shack, bridge rectifier and 100 microfarad capacitor) and add a little load resistance (say 470 ohms at 1/2 or 1 watt.) in parallel with the cap. Measure the voltage across the resistor for different PWM inputs and you should see what you are expecting to see in linearity. (Give the output a chance to settle a few seconds before making the measurement.) The bridge will also allow you to measure reverse currents as well since the bridge will automatically make the switch for you. Remember that this test is only looking for representative numbers, not absolute, dead nuts, accuracy. It is just easy to build and get valid, representative data.
Mike, the RMS value of a square wave of varying pulse duration can be calculated for each pulse by averaging the voltage over the pulse repetition, i.e. the duty cycle. If the duty cycle is 40% then a 12 volt pulse would average 4.8 volts, a 10% pulse would be 1.2 volts, etc.(average is the secret word here!) You can, of course, write an integral that describes the action or even use Fourier transforms for other than pure sine waves. Since RMS is theoretically intended to give the same "heating power" of an AC signal as the equivalent DC voltage would. (pure sine wave or not) True reading RMS voltmeters as Kevin suggested above actually make this measurement. The 0.707 * PEAK Voltage only holds true for pure sine waves and is the solution to the integral for a pure sine wave. Add a little distortion to the signal and you can throw your calculations out the window.

Max Lobovsky
12-23-2004, 08:26 AM
This would be true if a motor were strictly a resistor but it is not.
Power output of a motor at a given time is given by:
power = ((V-speed*kv)^2)/armature resistance
where speed is in rads/sec and Kv is the motor's CEMF speed constant.
as you can see power output is not porportional to the square of voltage unless you assume your robot is always moving at a single speed.
But isn't speed proportional to voltage for a given load? (ie speed=V*someConstant). In that case, we have

power = ((V-V*k*kv)^2)/armature resistance
and hence
power = ((V*(1-k*kv))^2)/armature resistance



Anyway, I think there is some very obvious and simple evidence that your data is wrong. I would guess that most of the community gathered data for RPM/torque/current curves were gathered using Victors to control voltage, and all these curves report the expected linear curve, and therefore, the Victor must be outputting a linear voltage.

Al Skierkiewicz
12-23-2004, 10:08 AM
But isn't speed proportional to voltage for a given load? (ie speed=V*someConstant). In that case, we have

power = ((V-V*k*kv)^2)/armature resistance
and hence
power = ((V*(1-k*kv))^2)/armature resistance



Anyway, I think there is some very obvious and simple evidence that your data is wrong. I would guess that most of the community gathered data for RPM/torque/current curves were gathered using Victors to control voltage, and all these curves report the expected linear curve, and therefore, the Victor must be outputting a linear voltage.
Let's get a better look at this. The equation that Rick quoted is input electrical power derived from Ohm's Law for power, P=V^2/R. In the case of the motor, the available voltage for determining armature current (for DC permanent magnet motors) is the power source voltage-the counter EMF produced by the motor. CEMF varies with speed, hence the introduction of the speed constant and CEMF spec as a reduction in the available voltage. V-(speed*kv)=voltage available to motor winding. Then the reults are simply plugged into Ohm's Law for power as above. Unfortunately, armature resistance is not the only loss that affects total series resistance. Brushes, wiring, armature connections, etc. are all losses that will affect current through the armature and heat will change all of these. All of the losses summed together (electrical and mechanical) determine the output power vs. input power, or efficiency. That is why efficiency is never 100%!

Max, the data sheets are provided by manufacturers and cannot use controllers. All of the variables must be tightly controlled in order for porduction specs to be guaranteed. Imagine what would happen if only half of the motors in the four million CD players you just made, could not meet RPM as specified.

gc02
12-23-2004, 10:21 AM
Whoa Boys,
With the Victor output being a PWM square wave at a much higher frequency than 400 Hz, very few meters will give any indication that would be linear.

I've measured the Victor 884's PWM frequency as 120 Hz.

Al Skierkiewicz
12-23-2004, 10:29 AM
I've measured the Victor 884's PWM frequency as 120 Hz.

Greg,
I have not checked myself in a while (OK, a couple of years) but I was under the impression they were about 2kHz. Still the rise time of the pulses get into trouble when the input is frequency limited. Even a 50% duty cycle would not have enough measureable energy beyond maybe the first or second odd harmonic to be accurate, I would think.

Kevin Sevcik
12-23-2004, 11:12 AM
torque output=(Kt(Vin-speed*Kv))/r
where:
Kt is the torque voltage constant in newton-meters per amp
Kv is the speed CEMF constant in volts per radian per sec
r is the armature resistance in ohms
Vin is the input voltage in volts
if you plug this into our friend newton's second law and solve for speed vs time for a particular voltage input, you will find that when there are no other forces in the system(ie motor is spinning freely), speed will be porportional to voltage input(after time for acceleration/decelleration is allowed).

Well the trick there would be that we don't have an actual DC signal going into the motor. I'm relatively certain that the inductance of the motor will have an effect on the square wave going into the motor. And I'm too lazy to try to figure out the transfer function of a square wave with variable duty cycle, so I was just going to make a Simulink model of the whole electro-mechanical system and be done with it. Assuming I can find data on the frequency of the PWM output of the Vics, that is.

EDIT: This link claims the frequency is 120Hz. http://www.enigmaindustries.com/links.htm
Also, Victor 885? have these always been around or are we getting new Vics this year? I'll grant you they're overpowered for our applications, though.

gc02
12-23-2004, 11:16 AM
Greg,
I have not checked myself in a while (OK, a couple of years) but I was under the impression they were about 2kHz. Still the rise time of the pulses get into trouble when the input is frequency limited. Even a 50% duty cycle would not have enough measureable energy beyond maybe the first or second odd harmonic to be accurate, I would think.

The 884 I checked is about six months old and it was defiantly 120 Hz. It's quite possible the frequency was changed at some point. I think the 883s were 2 kHz, but I've never actually checked one of those.

Max Lobovsky
12-23-2004, 11:45 AM
Max, the data sheets are provided by manufacturers and cannot use controllers. All of the variables must be tightly controlled in order for porduction specs to be guaranteed. Imagine what would happen if only half of the motors in the four million CD players you just made, could not meet RPM as specified.
I was not referring to the manufacturer provided sheets which we can obviously trust the voltages on. Though I can't seem to find it right now, there were some measurements taken by FIRST members with a tachometer, and I assume, a Victor for voltage control.

gc02
12-23-2004, 11:45 AM
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.


I think what you're seeing is caused by low a PWM switching frequency. If a speed controller's PWM period is too long, longer than the current rise/fall time caused by inductance, you don't get the smoothing you would with a higher PWM frequency.

Best way to check if the duty cycle is linear would be to use an oscilloscope.

MikeDubreuil
12-23-2004, 11:58 AM
<christmas carol>
All I want for Christmas is an Agilent O-Scope
</christmas carol>

I can't wait to get back to the lab after the Holidays! I'll come back with some readings and maybe some screen shots off our oscilloscope.

Rickertsen2
12-23-2004, 12:01 PM
I think what you're seeing is caused by low a PWM switching frequency. If a speed controller's PWM period is too long, longer than the current rise/fall time caused by inductance, you don't get the smoothing you would with a higher PWM frequency.

Best way to check if the duty cycle is linear would be to use an oscilloscope.
I have a frequency counter with a duty cycle function as well as a scope. When i get home I will definately repeat my tests measuring duty cycle. I will also note the output frequency. Even if you assume that my pwm vs voltage graph is entirely bogus, that still doesn't explain the pwm vs speed graph which looks just like it. One of the less obvious reasons for the pwm vs. speed graph in the first place is that a motor under no load converges on a speed porportional to its input voltage. A PM DC brush motor that is under no mechanical load will act as a linear voltage to speed transducer and likewise a motor under no electrical load will act as a speed to voltage transducer. The second graph was partially to confirm the first.

Al Skierkiewicz
12-23-2004, 12:03 PM
The 884 I checked is about six months old and it was defiantly 120 Hz. It's quite possible the frequency was changed at some point. I think the 883s were 2 kHz, but I've never actually checked one of those.

Greg et al,
The reference in Kevin's post: http://www.enigmaindustries.com/links.htm lists the 884 as 120Hz and the 883 as 2kHz, hence my confusion. (being around for a long time does get in the way.) Greg, are you in a position to check rise time where you are right now?

Jim,
(I am confused and keep calling you Rick) You tell us that the motor is unloaded but it is connected to the FP gearbox. That is a load. The numbers in your table suggest the large amount of friction present at low speeds in that FP gearbox. At low speeds, a motor still must overcome internal losses due to friction, brush pressure and magnetic influences. On the FP motor in particular, there are only three commutator segments which means three windings. Depending on the duty cycle, energy may only be supplied to the motor for a small portion of the brush/commutator cycle at low speeds. If analyzed, you may find that current is only flowing to one winding at a time instead of two. (two gives better torque/output/higer current) In contrast, the drill motor has several windings/commutators and the spec sheets illustrate the difference in these two motors. Ironically, the graph you displayed in your earlier post is a typical charge current graph of an inductor. This may indicate the effect of the duty cycle vs. inductance or not.

Rickertsen2
12-23-2004, 12:29 PM
Greg et al,
The reference in Kevin's post: http://www.enigmaindustries.com/links.htm lists the 884 as 120Hz and the 883 as 2kHz, hence my confusion. (being around for a long time does get in the way.) Greg, are you in a position to check rise time where you are right now?

Jim,
(I am confused and keep calling you Rick) You tell us that the motor is unloaded but it is connected to the FP gearbox. That is a load. The numbers in your table suggest the large amount of friction present at low speeds in that FP gearbox. At low speeds, a motor still must overcome internal losses due to friction, brush pressure and magnetic influences. On the FP motor in particular, there are only three commutator segments which means three windings. Depending on the duty cycle, energy may only be supplied to the motor for a small portion of the brush/commutator cycle at low speeds. If analyzed, you may find that current is only flowing to one winding at a time instead of two. (two gives better torque/output/higer current) In contrast, the drill motor has several windings/commutators and the spec sheets illustrate the difference in these two motors. Ironically, the graph you displayed in your earlier post is a typical charge current graph of an inductor. This may indicate the effect of the duty cycle vs. inductance or not.

Ok we have all come to the consensus that in order to figure out whether or not the victors are linear or not, we must measure duty cycle.

Exactly how do you calculate the reactance vs. time of an inductor with a square wave input. I know how to do this with a sine wave, but a square wave is much more complex. Would you model the first 10 or so sine components of the square wave? Is there a simpler way?

MikeDubreuil
12-23-2004, 12:44 PM
Wouldn't you just add to the complexity of the test by adding a motor?

When I perform my test I plan on attaching the scope leads directly to the motor output on the Victor. With no other load other than the internal resistance of the scope. Is that a bad idea?

Gdeaver
12-23-2004, 12:52 PM
The original poster was looking to measure the victor- motor system behavior by measuring voltage given by a volt ohm meter vs. rpm for a given setting of the robot controller. I submit that probably is not a good measure of our robot system. If you take the battery, power distribution wiring, RC, victors and motors and try to describe it, you'll end up with a complex system of equations with many independent variables. Not nice. The formulas in the ee books are simplifications with assumptions that for many apps are good enough to approximate the motor behavior. If you notice the Bosh motor curves we where given used a very tight linear power supply. That's not the case with our robot system. I think a better measure would be to take a Typical robot setup and the Fp motor. Apply a constant load to the motor.
Set the PWM variable and measure the RPM a second or 2 latter. Then increase the PWM variable by 1, measure the rpm. After the full PWM range has been measured, Increase the load by a fixed amount and measure for PWM range. Continue increasing the load by a fixed amount and measuring until the stall load is reached. The motor should be left to cool to eliminate the thermal effects. Then plot PWM setting, load , and rpm. The surface of the plot would give a visual representation of the motor - robot performance. With the same setup thermal performance could be measured by fixing the PWM variable and the load. Then measure and plot the rpm over time.
The some analysis could be made to see if those formulas and performance curves are valid. Comments?

gc02
12-23-2004, 01:02 PM
Greg et al,
Greg, are you in a position to check rise time where you are right now?


I'd have to dig out a bunch of parts to do a test. I didn't measure the exact rise time, but when I ran the test before the motor's current was able to rise and fall completely between PWM pulses.

gc02
12-23-2004, 01:25 PM
Wouldn't you just add to the complexity of the test by adding a motor?

When I perform my test I plan on attaching the scope leads directly to the motor output on the Victor. With no other load other than the internal resistance of the scope. Is that a bad idea?

If you just want to see the square PWM wave just connect the scope to the output terminals on the Victor. I think you'll get the same results whether or not the motor is connected. If you want to see the sawtooth wave generated by the rising and falling current in the motor you'll need to connect a current shunt in series with the motor and connect the scope to that.

Kevin Sevcik
12-23-2004, 01:32 PM
If you just want to see the square PWM wave just connect the scope to the output terminals on the Victor. I think you'll get the same results whether or not the motor is connected. If you want to see the sawtooth wave generated by the rising and falling current in the motor you'll need to connect a current shunt in series with the motor and connect the scope to that.

The voltage shouldn't be a simple square wave if there's motor in the system. DC motors generate back EMF and also present a fairly large inductance to the speed controller. All of this will have a definite effect on the voltage that you see on the scope with a motor connected.

gc02
12-23-2004, 01:47 PM
The voltage shouldn't be a simple square wave if there's motor in the system. DC motors generate back EMF and also present a fairly large inductance to the speed controller. All of this will have a definite effect on the voltage that you see on the scope with a motor connected.

You're right, I was thinking about the motor at stall and forgot about the back EMF. The cleanest PWM signal will be with no motor attached.

gc02
12-23-2004, 02:14 PM
Even if you assume that my pwm vs voltage graph is entirely bogus, that still doesn't explain the pwm vs speed graph which looks just like it.

What I'm suggesting does explain what you're seeing, sorry I can't explain it any better, there's a section in the Astroflight motor handbook about "lo-rate" speed controllers which covers exactly what you're seeing.

Al Skierkiewicz
12-23-2004, 02:21 PM
Jim,
The best way to mathematically analyze this would be a single step function. From what Greg has written, it would seem that the inductance of a winding is small. A scope would verify that the inductance likely does not have an effect until pulse width is very small. I just had a thought...it is always possible that IFI has built in a power curve to compensate for the average motor response at low speeds. They are pretty smart guys. As I alluded to before, the actual current through the motor changes depending on how many windings are in the circuit. Since there is no sync between the PWM frequency and the motor speed, you should be able to observe steps in the waveform when a motor is connected. Another method is looking at the voltage drop across a series resistor. This is a simple solution since the wire acts a resistor. Attach your scope probe to battery negative and scope the "-" terminal of the speed controller input. You will be looking at the motor current through the controller but that has little effect on your data. (again you are looking for representative data, not absolute.) You should see step currents here as well as inductive response. You may need to play with horizontal sweep to see the edge of the rising pulse. Calculate current from the voltage you measure. A 12" piece of #10 is .001 ohm, so ad a few feet of #10 between the controller and the battery. (If measuring on a real robot, 24' of #6 is .001 ohm so fudge the series resistance.)
Back EMF will not be measurable, just it's effects. Remember that the impedance between the motor and controller are very low compared to other reactances within the motor. If you are measuring anywhere after the controller, DO NOT connect the ground lead of your probe to the controller output terminal. It is not at circuit common and is only near common when the controller is in the forward mode. Expect large amounts of noise at the motor terminals from brush arcing.
Finally, a plot of PMW to actual average voltage (from scope measurements of voltage and duty cycle) would be a very accurate way to look at linearity with and without motor.

andy
12-23-2004, 03:31 PM
Whooo buddy this is a funny thread!

First off, the original poster's name is James, not Rick or Jim, and he's on my team.

I figured I'd solve this dilemma the easy way (as I have no test equipment, victors or loads etc.) and call Innovation First and ask one of their techs. Their technician, Corey, said a couple of very valuable things.

-The victors are simply MOSFET H-Bridges controlled by a microprocessor which interprets the input PWM signal. So, given the input PWM high (on) time varies from 1ms (full reverse) to 2ms (full forward) where 1.5ms is neutral (off).The period of the input PWM signal is around 16-17ms or about 60Hz.
-The microprocessor controls the MOSFETs so that they output to the motors (and I quote) a "chopped pulse width modulated signal at 120 Hz"
-The processor controls the output duty cycle based on the input period of the PWM signal.
-Since they are true H-Bridges, they DO NOT vary (instantaneous) voltage, only (as he said) "on time" or duty cycle. (or average voltage, but we'll get to that later)
-When asked about linearity, he stressed that the devices are designed to be completely linear, there is no fancy PID or other control loop etc within the victors. This means, as PWM is linearly increased (outside the deadband), the percentage of "on time" (duty cycle) of the output signal is linearly correlated to the input PWM signal.

So, applying some simple physics and calculus, we can conclude that while voltage does not vary (and assuming the resistance and therefore current does not vary) since the time the voltage is applied varies, the power must vary by the following function:

To find the amount of power in a PWM signal where P(t) is the amount of power in terms of time we apply the average value theorem of calculus

power_average = 1/(T - T_0) * integral of P(t) from T to T_0 in terms of t

Where t is time and T - T_0 is the time interval the the average power was measured over

However, in James' defense, the same can be said for voltage. There is an average value function for voltage also which could be used to explain the values James recorded.

Where V(t) is the function of voltage in terms of time

voltage_ average = 1/(T-T_0) * integral of V(t) from T to T_0 in terms of t

Where t is time and T - T_0 is the time interval the the average voltage was measured over

BUT, weather or not this actually was the case depends on the characteristics of his meter. Suppose, his meter measures ten samples over a specified time interval then sums the samples and displays the value. Since the voltage changes with time, the meter COULD display erroneous values depending on WHEN those samples are collected. Say that the meter collects 5 samples while the signal is +12VDC and then another 5 samples when the signal is 0VDC. The meter would then sum those samples and display +6VDC. Here's the kicker, it is possible that the meter could display +6VDC at ANY DUTY CYCLE provided the right (or in this case, lucky) sampling rate. (google Nyquist sampling theorem for more information)

Remember that this all depends on the actual characteristics of the meter. Also, many more variables come into play when dealing with an inductive load (especially, in this case, a motor). Take for example, as the heat increases, the resistance (usually) also increases. We all know how hot the Fischer Price motors get. This is all not taking into account any rotational inertia, which is a another can of worms I don't want to open.

In summary, any nonlinearity you see in the duty cycle is caused by the input signal, in this case, the robot controller.

Good luck everyone!

-Andy

*disclaimer I am not an expert, and something above is probably wrong, I also have thick skin, have at it :D

gc02
12-23-2004, 04:08 PM
In summary, any nonlinearity you see in the duty cycle is caused by the input signal, in this case, the robot controller.

Good luck everyone!

-Andy

*disclaimer I am not an expert, and something above is probably wrong, I also have thick skin, have at it :D


I disagree completly. I'll try and explain my theory a little better. The output of the speed controller, connected to a resistive load, gives us a nice square wave. With a square wave voltage/current are directly proportional to the duty cycle. Now if you throw an inductor in there, you no longer have a square wave, you have a funny sawtooth shaped wave and the output voltage/current are no longer linearly proportional to the duty cycle. They become related to the rise and fall times of the inductor and the length of the switching period. This non-linearity will become more pronounced at lower PWM frequiencies as the voltage/current have more time to rise and fall between the on and off switches. I'm sure you're right in that the duty cycle varies linearly, but I can definetly see how the voltage/current dont have to respond linearly.

Rickertsen2
12-23-2004, 05:31 PM
I disagree completly. I'll try and explain my theory a little better. The output of the speed controller, connected to a resistive load, gives us a nice square wave. With a square wave voltage/current are directly proportional to the duty cycle. Now if you throw an inductor in there, you no longer have a square wave, you have a funny sawtooth shaped wave and the output voltage/current are no longer linearly proportional to the duty cycle. They become related to the rise and fall times of the inductor and the length of the switching period. This non-linearity will become more pronounced at lower PWM frequiencies as the voltage/current have more time to rise and fall between the on and off switches. I'm sure you're right in that the duty cycle varies linearly, but I can definetly see how the voltage/current dont have to respond linearly.
So what you are saying is that you believe the reactance motor is varying with duty cycle? Do any of you know how to compute reactance over time of a square wave through an inductor? Would you break it up into sine waves and alanlyze the first 20 or so? Is there a simpler way? I can't even find the fourier series for anything but a truly square square wave.
BTW this is entirely possible as both tests had motors attached when they were performed. At this point we seem to have many theories and many untested hypotheses. I Think we will get a much clearer picture of what is going on onve someone measures duty cycle output vs. pwm input.

gc02
12-23-2004, 09:13 PM
So what you are saying is that you believe the reactance motor is varying with duty cycle? Do any of you know how to compute reactance over time of a square wave through an inductor? Would you break it up into sine waves and alanlyze the first 20 or so? Is there a simpler way? I can't even find the fourier series for anything but a truly square square wave.
BTW this is entirely possible as both tests had motors attached when they were performed. At this point we seem to have many theories and many untested hypotheses. I Think we will get a much clearer picture of what is going on onve someone measures duty cycle output vs. pwm input.


Take a look at the picture under the "Choosing a frequency based on motor characteristics" section of this website: http://homepages.which.net/~paul.hills/SpeedControl/SpeedControllers.html
It shows the relationship between the PWM signal and the motor's current. If someone ;) was to figure out the RMS current of that waveform at different duty cycles, I believe there would be a non-linear relationship between the RMS current and duty cycle.

Some information on inductor transient response is available here:
http://hyperphysics.phy-astr.gsu.edu/hbase/electric/indtra.html

andy
12-24-2004, 12:26 AM
I disagree completly.

That's ok:)

Take a look at the picture under the "Choosing a frequency based on motor characteristics" section of this website: http://homepages.which.net/~paul.hills/SpeedControl/SpeedControllers.html
It shows the relationship between the PWM signal and the motor's current. If someone ;) was to figure out the RMS current of that waveform at different duty cycles, I believe there would be a non-linear relationship between the RMS current and duty cycle.


Really good website btw.

That is exactly what I began to think (I even drew pictures) but then I thought about what happens to voltage (emf) across an inductor. It gets really hairy because a back emf is produced when the current changes. This is an application of Faraday's Law which more or less says that if a change in current occurs, a change in the magnetic field will also occur that is exactly opposite and equivalent of the equivalent current.

This is given by the equation

emf = -Inductance * change in current / change in time

//Given the schematic (slightly modified so it has no whitespace) (why no whitespace Brandon? It makes it tougher for ASCII art :( ) Comments on schematic, switch represents half of the H-Bridge (in a way) resistor represents resistance of wire windings commutor etc. and inductor represents motor's inductance.

BATTERY____/ __C__^^^^__A__~~~__B___GROUND

//And the pulse produced by the switch (see schematic) potential difference between A and B

Voltage
12 | __
00 |_| |___ time
-12|


//With an inductor potential difference between A and B

Voltage
12 |
00 |_|\_ ___ time
-12|___|/

But what happens when I take into account the resistor? And try to measure voltage between C and B? Will it simply decrease the voltage by an increment (shift downward?) or will it cause a nonlinear response voltage change? I will try to puzzle that out when I am not so tired.

Also, for anyone who wishes to do circuit analysis, OrCad offers a free student copy of their product PSpice which I have yet to play with, however I am told that it can simulate this sort of thing rather nicely. The url is

http://www.orcad.com/downloads/demo/

Cool, goodnight

-Andy

Al Skierkiewicz
12-24-2004, 12:50 AM
Ok James,
I thought I had it about seven or eight different times then I remembered I had a Johnson version of the FP motor sitting on a shelf so i took it out and looked at and did a little measuring and fudging some numbers and here is what I came up with.
The FP motor has three commutator segments and therefore three armature windings. If you draw out the equivalent circuit you will see that depending on what the brushes are contacting, you can have one of three conditions, 1) two windings in series, 2) one winding is parallel with two windings in series or 3) Two windings in parallel (the third is shorted by one of the brushes) Now doing some math making some assumptions and backing into the calculations, you can solve for L. At no load the specs are CEMF=2.35 volts I=1.1amps speed=15000RPM. Calculating for equivalent impedance from 1.1/(12-2.35)=.1 ohms. At 15000RPM shaft takes .004seconds/revolution or a commutator segment is engaged for 1.33mSec.(less than the "on"time of the speed controller at 50% duty cycle) Now making the assumption that a prudent designer would make the inductive reactance equal the series resistance at the highest frequency (1/1.33mSec=750Hz) then L would be 10 microhenries. The time constant for this inductance would be 0.2mSec. Hence, the current would would have a chance to rise (rather quickly) to full level at duty cycles down into the single digits. (about 2-3% duty cycle) As the motor RPM goes down, the inductance has less of an effect.
In analyzing the drill and chalupa which both have more windings, the inductance is likely far less per winding. (since there are more windings per armature, there is less wire/turns for each coil) In any case it does not seem that the controller switching at 120 Hz would have much effect on speed above 10% duty cycle.
In reading through Greg's linked article, the author referred to series wound DC motors (non permanent magnet) and controllers using kHz switching frequencies. Although a lot of his discussion and drawings are useful, the conclusions cannot fit our motor/controller combination. When looking at the voltage waveforms and sawtooth response, remember his switching frequency is very high and may (likely) be affected by controller output impedance. As the output impedance rises, the time constant stretches out and the resultant sawtooth response can be observed.
Now, if controllers are not introducing the error (deviation from linear) and inductance doesn't appear to have that effect than there is obviously something else. This is what I think it may be. At low RPM say 1000, the controller actually has time to turn on and off several times before a commutator segment will have turned past the brush. Total current will be a function of 1) speed at which the three winding conditions will switch vs. time 2) how many pulses can be delivered to a winding pair on average and 3) load. Since the test in question did have a load (Ok a small one) it is easy to see that these other factors would have an effect on motor performance.
At low speeds the meter should read more accurately (still flawed by rise time and frequency response) but cannot take into account the effect of rapidly changing load conditions as speed increases. The graph of controller output voltage, scope vs. meter should be an interesting thing to look at.

gc02
12-27-2004, 11:50 AM
...inductance doesn't appear to have that effect...

Alright looks like I'm going to have to break out the big guns here, graphs! I wrote up a program to graph inductor waveforms and calculate the RMS curent, here's the result:

RMS current of swithced inductor (http://www.enigmaindustries.com/inductor_current.htm)

Joe Ross
12-28-2004, 10:32 AM
I don't have a lot of time, as I'm once again posting from an internet cafè in Mexico.

I seem to remember a series of posts from a while ago that stated that there was a band at the outer limits that produced a full voltage output. Perhaps someone could do some research on that.

Al Skierkiewicz
12-29-2004, 12:40 AM
Alright looks like I'm going to have to break out the big guns here, graphs! I wrote up a program to graph inductor waveforms and calculate the RMS curent, here's the result:

RMS current of swithced inductor (http://www.enigmaindustries.com/inductor_current.htm)

Great set of graphs, you should all take a look.

Joe, I think you are referring to the fact that the controllers should put out pure DC voltage at the extremes of the PWM scale. (i.e. at 0 and at 255) This statement is correct only if the controllers are calibrated to your control system/joysticks. If you do not calibrate it is possible to hit DC before the end of travel on the joystick or you may not be able to achieve DC with the joystick fully up or down.


You are not supposed to make the rest of us feel bad by telling us your in Mexico. I, for one, am back here in the cold, bleak winter, getting ready for kickoff. Brrr, it's cold up here! I am going to go put on another pair of socks and a sweater. (Am I making you feel bad yet?)

Joe Ross
12-29-2004, 09:55 PM
[QUOTE=Al Skierkiewicz]Joe, I think you are referring to the fact that the controllers should put out pure DC voltage at the extremes of the PWM scale. (i.e. at 0 and at 255) This statement is correct only if the controllers are calibrated to your control system/joysticks. If you do not calibrate it is possible to hit DC before the end of travel on the joystick or you may not be able to achieve DC with the joystick fully up or down.
[\QUOTE]

Al, what I think I'm refering to is that the controllers would put out 12v in a range, for example 240-255 (much like the dead spot around 127). Like I said before I'm not sure, though.

If nobody else can find it, I'll look in a few days.

Joe Ross
12-31-2004, 04:53 PM
Here is what I was refering to:

http://www.chiefdelphi.com/forums/showpost.php?p=80412&postcount=4
http://www.chiefdelphi.com/forums/showpost.php?p=78569&postcount=2

Caleb Fulton
01-04-2005, 06:06 PM
Exactly,
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.

I'll do the same, and try to remember to post my results as well.

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):



Current, i(t)
| |
| |
| \|/
| v
+ |
) <-this "comes out at you"
( <-this "goes into the background"
)
(
)
- |
|


emf = -L * di(t)/dt

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.



current
-->
______
| |
| R
+ |
Vin L
- |
|______|


Kirchoff's voltage law gives the following equation:

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:


i(t) = {0, t < 0
{Vm / R (1 - exp(-R / L * t)), 0 <= t < Tw
{i1(Tw) exp(-R / L * (t - Tw)), t >= Tw



So this is what the waveform for the current looks like when there is a resistor in series with an inductor as a response to a pulse.

Manoel
01-04-2005, 06:23 PM
Al, what I think I'm refering to is that the controllers would put out 12v in a range, for example 240-255 (much like the dead spot around 127). Like I said before I'm not sure, though.

If nobody else can find it, I'll look in a few days.

Actually, I think you are confusing the fact that the Victor will output a green light (full forward) in the 240-255 range, but its output won't necessarily be the supply voltage.

Al Skierkiewicz
01-04-2005, 11:34 PM
i(t) = {0, t < 0
{Vm / R (1 - exp(-R / L * t)), 0 <= t < Tw
{i1(Tw) exp(-R / L * (t - Tw)), t >= Tw

[/code]

So this is what the waveform for the current looks like when there is a resistor in series with an inductor as a response to a pulse.

Caleb,
Nice work on the math derivation. The equation should simplify to

I(t)= (V*(1-e^(-(t*R)/L)))/R
Where t is the time the voltage has been applied
L is the inductance of the coil
R is the series resistance of the coil + all other resistive series losses
e is the natural log
V is the applied voltage
If you look closely you will see Ohm's Law (I=V/R) In the case of a motor at speed, the true applied voltage is the supply voltage minus the counter EMF and the inductance is reduced to the average inductance of the windings as they turn.
For all as rules of thumb, the time constant of an L,R circuit is approx. L/R and the current will be about 66% of maximum in one time constant. Current will reach very near maximum between 5 and 6 time constants. So for Greg's example motor above, L/R=40 exp -6/.0859=.465mSec. A 10% duty cycle at 120 Hz is .833mSec so the current at this duty cycle is not quite at 100% but greater than 66% of maximum. Backing into the math you can see that 6 time constants is a little over 2.4mSec or about 30% duty cycle. The graphs that Greg has referenced show this.

Actually, I think you are confusing the fact that the Victor will output a green light (full forward) in the 240-255 range, but its output won't necessarily be the supply voltage.
Can you elaborate? At full up the Victor should output DC at power supply input minus the series "on" resistance of the FETs.

Camerzn
01-05-2005, 05:57 AM
James,
At my lab, we have one really nice Hameg oscilloscope whith neat features like the ability to freezeframe. We could use that to test these guys' crazy theories at some point, if you want.

Manoel
01-05-2005, 09:21 AM
Can you elaborate? At full up the Victor should output DC at power supply input minus the series "on" resistance of the FETs.

Yes, that's what I meant... With an Rds of 0.012 Ω per FET, I just disconsidered it in the context of what I was writing. Of course, with high currents, you do get a noticeable voltage drop on the Victors (and battery wire, and bad crimped connectors, oh, the losses! :ahh: )
:)

Al Skierkiewicz
01-05-2005, 10:15 AM
Yes, that's what I meant... With an Rds of 0.012 Ω per FET
Don't forget that there are three FETs in parallel, .012/3=.004 or about the resistance of four feet of #10.

KVermilion
01-05-2005, 11:21 PM
Hey guys. During the winter break I was working on the current sensors... I came across this post and decided to check it out for my self... I wired up the current sensors and graphed some points (all of them.. twice) and the results are astonishing.

I'm writing it up now, and will publish it via our site (www.saratogarobotics.com) I'll post back with a link, when I'm done.

Here you go. (http://www.saratogarobotics.com/php-nuke/modules.php?name=Content&pa=showpage&pid=1)

Wrote this tonight too... interesting, no? (http://www.saratogarobotics.com/php-nuke/modules.php?name=Content&pa=showpage&pid=2)

Manoel
01-06-2005, 09:41 PM
Don't forget that there are three FETs in parallel, .012/3=.004 or about the resistance of four feet of #10.

Wouldn't it be three FETs in parallel sourcing current plus three FETs in parallel drawing current, and hence 0.008 Ω? It's an H-Bridge after all, isn't it?


Hey guys. During the winter break I was working on the current sensors... I came across this post and decided to check it out for my self... I wired up the current sensors and graphed some points (all of them.. twice) and the results are astonishing.

I'm writing it up now, and will publish it via our site (www.saratogarobotics.com) I'll post back with a link, when I'm done.

Here you go.

Wrote this tonight too... interesting, no?

Interesting data, just be aware when comparing your results with Rickertsen2's that you used a resistor and he used a motor (resistor + voltage source + inductor model). Of course, your tests are better, because this resistor setup will not interfere with the Victor's output waveform.
With your data, we can say for sure that the Victor's are linear (something the IFI guys already told us, for the matter), I'm just a little puzzled about the current "crop" at the graphic's extremes, were you using a battery to feed the Victor or maybe a different power supply with a maximum output current?

andy
01-06-2005, 09:53 PM
%$#& forum kicked me off mid post! (no offence Brandon!)

Cool stuff!

Very good work Caleb I learned alot! However, Al's simplification does not make a whole lot of sense to me...

It started when I wanted to solve for VOLTAGE not CURRENT to compare Jame's work and the expected model. So, if you examine the simplified equation,

I(t)= (V*(1-e^(-(t*R)/L)))/R

and use the multiplication rule we can take out V and R

I(t)= (1-e^(-(t*R)/L))*(V/R)

If V = IR then V/R = I

Soo... now

I(t)= (1-e^(-(t*R)/L))*I

and the I s cancel? Something is screwy....

Some interesting links while I'm at it!
inductors

Inductors (http://hyperphysics.phy-astr.gsu.edu/hbase/hframe.html)

Step functions (http://www.efunda.com/math/unit_delta/unit_delta.cfm)

PS, Al is it ok if we ignore the 0.004 ohms resistance in the FETs? :D

Rickertsen2
01-06-2005, 10:42 PM
Wouldn't it be three FETs in parallel sourcing current plus three FETs in parallel drawing current, and hence 0.008 Ω? It's an H-Bridge after all, isn't it?



Interesting data, just be aware when comparing your results with Rickertsen2's that you used a resistor and he used a motor (resistor + voltage source + inductor model). Of course, your tests are better, because this resistor setup will not interfere with the Victor's output waveform.
With your data, we can say for sure that the Victor's are linear (something the IFI guys already told us, for the matter), I'm just a little puzzled about the current "crop" at the graphic's extremes, were you using a battery to feed the Victor or maybe a different power supply with a maximum output current?.


His data is not "better". Neither is mine for that matter. Put together they reinforce the inductance theory. My graphs were corect. What was not was my assumption that my curve was caused by a nonlinearity of the victors. Given your data we can see this is not the case.I think at this point we can conclude (to IFIs credit), that the victors are linear. This does not mean that my data was wrong. BOTH sets of results are correct. The tests were different. KVermilion measured current across a RESISTOR ONLY with a constant resistance and varying PWM input to the speed controller. This would be nice if we were powering heaters with the victors but we are powering motors.

A motor's torque output is porportional to the current through it regardless of why that amount of current is going through it. It has been shown that while the victors output a linear voltage, the load is not purely resistive and this does not lead to a linear current. It has an inductive Component. It may still be useful to compensate for the the pwm vs. current curve that we now know is caused by inductance. Even though I mistaked the cause of the curve, it is still there. There is still a possibility that my voltage test was wrong due to my meter not being able to properly read a square wave however the pwm vs. speed curve is still viable. After all, we are trying to control speed here, so that is the ultimate test



Btw. Andy, it happens to me about every other post. I have learned to copy my post before submittting. Sessions either always time our for me or arn't working properly.

KVermilion
01-06-2005, 11:29 PM
Interesting data, just be aware when comparing your results with Rickertsen2's that you used a resistor and he used a motor (resistor + voltage source + inductor model). Of course, your tests are better, because this resistor setup will not interfere with the Victor's output waveform.
With your data, we can say for sure that the Victor's are linear (something the IFI guys already told us, for the matter), I'm just a little puzzled about the current "crop" at the graphic's extremes, were you using a battery to feed the Victor or maybe a different power supply with a maximum output current?

Well, the "crop" (where the current levels flat?) must be due to the victor having a (rather large) dead area of the ends at the extreames. I used the standard "EX18-12" SLA battery from exide (the one from the kit) This battery has put out over 65 amps, so I don't think that was an issue.

Yes the victors are linear, but the motors are not... power curves. :eek:

Gdeaver
01-06-2005, 11:50 PM
In the current test, was the Victor operating with the default IFI calibration? If so it would be interesting to see if calibrating the victors under program control would remove the flat part of the curve . First gave us the means last year with the inclusion of the current sensor to implement a constant current motor control . Did anybody try it? If so did it help?

Al Skierkiewicz
01-07-2005, 07:45 AM
Wow, there is a lot of stuff to answer in this post.
First to Manoel, hey you passed the test. The correct answer is total resistance is .008 ohms. When I answer questions I usually use the original question as part of the answer. It helps lower the confusion level. 8 milliohms doesn't sound like much until you try and draw stall current through it. V=I*R=130*.008=1.04 volts. I like using the wire analogy since most everyone understands that more wire is a problem. .008 ohms=8 ft. of #10 or two conductors of #10, 4 ft. long.
Andy, in most cases we don't worry about the resistances since they will add up to whatever they add up to. If the robot runs OK ignore them. If it doesn't, we need to know that there are losses and approximately what they are for troubleshooting. If you measurre 10 volts at the motor in stall, that seems OK. (We can discuss all circuit losses on another thread if you like.) Measure 4 volts and you know there is some really big problem somewhere.
K, nice owrk on the graphs. As to the non linearity at the ends of the graph and the center offset, I would you say you did a nice job of demonstrating why I always calibrate the Victors. Theoretically, a calibration would have fixed both ends and the center at the same time. Can you calibrate and regraph? The pulse drawing is a great visualization of a 75% duty cycle. Since the Victor switches at 120 Hz, 1/120=8.3333 mSec as you have drawn.
As to the other incongruities, you have all read and seen the graphs of current vs. time for an inductor above, but you do need to remember there are many more variables in a simple robot system to consider. If your robot runs near what your design speed was calculated to be, and is controllable, then practice like mad. If you can't controll it or it doesn't run straight, then start to look for problems.
Finally, Andy, the math on this doesn't simplify for voltage as you thought. The voltage term in this equation is a time dependent function because you are solving for current vs. time. So very simply you have I(t)=V(t)/R. You can still manipulate that equation as for Ohm's law if you keep the time dependent reference in. i.e. V(t)=I(t)*R. Theoretically the internal resistance of the battery, all the wire and connector losses, and the series resistance of the Victor should be included in the calculation for current to be accurate. For simple analysis in this discussion, those losses were ignored.

KVermilion
01-08-2005, 12:42 AM
K, nice owrk on the graphs. As to the non linearity at the ends of the graph and the center offset, I would you say you did a nice job of demonstrating why I always calibrate the Victors. Theoretically, a calibration would have fixed both ends and the center at the same time. Can you calibrate and regraph?

Yeah, I'll have to figure out how to actually calibrate it, first :rolleyes:

As long as about 5-3 ticks each way of deadzone can be kept, I don't see why not.