![]() |
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 |
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 |
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. |
Re: Victors Non-linear!!!
Quote:
|
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.
|
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 |
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. |
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. |
Re: Victors Non-linear!!!
Quote:
And with it fluctuating, it would confuse the meter? Am I way off here? |
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 |
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 |
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. |
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. |
Re: Victors Non-linear!!!
Quote:
-Kevin |
Re: Victors Non-linear!!!
Quote:
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) for a good explanation. A multimeter will not necessarily give good results. That is why I suggested a scope. Mike |
Re: Victors Non-linear!!!
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.
|
Re: Victors Non-linear!!!
Quote:
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. Quote:
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. Quote:
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). |
Re: Victors Non-linear!!!
Quote:
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. |
Re: Victors Non-linear!!!
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. |
Re: Victors Non-linear!!!
Quote:
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. |
Re: Victors Non-linear!!!
Quote:
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. |
Re: Victors Non-linear!!!
Quote:
|
Re: Victors Non-linear!!!
Quote:
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. |
Re: Victors Non-linear!!!
Quote:
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. |
Re: Victors Non-linear!!!
Quote:
|
Re: Victors Non-linear!!!
Quote:
|
Re: Victors Non-linear!!!
Quote:
Best way to check if the duty cycle is linear would be to use an oscilloscope. |
Re: Victors Non-linear!!!
<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. |
Re: Victors Non-linear!!!
Quote:
|
Re: Victors Non-linear!!!
Quote:
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. |
Re: Victors Non-linear!!!
Quote:
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? |
Re: Victors Non-linear!!!
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? |
Re: Victors Non-linear!!!
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? |
Re: Victors Non-linear!!!
Quote:
|
Re: Victors Non-linear!!!
Quote:
|
Re: Victors Non-linear!!!
Quote:
|
Re: Victors Non-linear!!!
Quote:
|
Re: Victors Non-linear!!!
Quote:
|
Re: Victors Non-linear!!!
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. |
Re: Victors Non-linear!!!
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 |
Re: Victors Non-linear!!!
Quote:
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. |
Re: Victors Non-linear!!!
Quote:
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. |
Re: Victors Non-linear!!!
Quote:
Take a look at the picture under the "Choosing a frequency based on motor characteristics" section of this website: http://homepages.which.net/~paul.hil...ntrollers.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...ic/indtra.html |
Re: Victors Non-linear!!!
Quote:
Quote:
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 |
Re: Victors Non-linear!!!
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. |
Re: Victors Non-linear!!!
Quote:
RMS current of swithced inductor |
Re: Victors Non-linear!!!
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. |
Re: Victors Non-linear!!!
Quote:
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?) |
Re: Victors Non-linear!!!
[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. |
Re: Victors Non-linear!!!
Here is what I was refering to:
http://www.chiefdelphi.com/forums/sh...12&postcount=4 http://www.chiefdelphi.com/forums/sh...69&postcount=2 |
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:
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:
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:
|
Re: Victors Non-linear!!!
Quote:
|
Re: Victors Non-linear!!!
Quote:
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. Quote:
|
Re: Victors Non-linear!!!
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. |
Re: Victors Non-linear!!!
Quote:
:) |
Re: Victors Non-linear!!!
Quote:
|
Victors linear!!!
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? |
Re: Victors Non-linear!!!
Quote:
Quote:
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? |
Re: Victors Non-linear!!!
%$#& 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 Step functions PS, Al is it ok if we ignore the 0.004 ohms resistance in the FETs? :D |
Re: Victors Non-linear!!!
Quote:
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. |
Re: Victors Non-linear!!!
Quote:
Yes the victors are linear, but the motors are not... power curves. :eek: |
Re: Victors Non-linear!!!
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?
|
Re: Victors Non-linear!!!
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. |
Re: Victors Non-linear!!!
Quote:
As long as about 5-3 ticks each way of deadzone can be kept, I don't see why not. |
| All times are GMT -5. The time now is 20:49. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi