|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#31
|
||||
|
||||
|
Re: Modeling motor control
The motors are barely warm.
I think I have to run them for 10-15 minutes at full power to warm them up. |
|
#32
|
|||||
|
|||||
|
Re: Modeling motor control
Marshall,
In looking at the schematic, the data for Vout would appear to be a calculation based on the supply voltage to the output stages (Vsense) and the percent of the output PWM commanded for output. In most cases, this should give you good data in the normal operating range for FRC motors. It cannot compensate for voltage drops due to wiring and motor lead length nor can it compensate for LR distortions at low values of pulse width as discussed earlier. At true free speeds, is likely to be inaccurate as well. As an edit, I just thought of something. Are these brand new motors that you are testing? There may be some discontinuity while the brush assembly is wearing into the commutator shape. Also, I wonder what the reaction time to a command is once the motor starts to speed up. It surely will take a finite time to get the mass moving at a new speed. I wonder if 200msec is long enough. (thinking out loud here) Last edited by Al Skierkiewicz : 04-01-2011 at 18:50. |
|
#33
|
||||
|
||||
|
Re: Modeling motor control
Would you give an estimate on the accuracy?
Neither of these motors are new. The first one has at least 20 hours of sine-wave operation. The second one has been used as a drill and a robot manipulator. |
|
#34
|
|||||
|
|||||
|
Re: Modeling motor control
Can you explain that?
I wouldn't know where to start with an estimate. I am wondering why you are trying to evaluate for torque now that we have arrived at this spot. Except for the low RPM, you should be able to make calculations from the current and motor voltage since the variables will remain rather constant. Are you just trying to keep part count low? |
|
#35
|
||||
|
||||
|
Re: Modeling motor control
I'm trying to make this software based, using hardware other teams have easily available.
It's a motor-selection tool, to determine the speed and torque requirements of your mechanism. |
|
#36
|
||||
|
||||
|
Re: Modeling motor control
Why not mathematically solve this using motor specifications and force / torque calculations?
|
|
#37
|
|||||
|
|||||
|
Re: Modeling motor control
I've now deciphered the current sampling strategy employed by the Jaguars. It's a pretty simple scheme, they probably just wanted a robust fast solution over the broad range of motor inductances, etc. Anyways, the current, bus voltage, analog input, and temperature are sampled every PWM cycle, with an offset to put the sample in the middle of the PWM pulse (15.625 kHz). Voltage, analog, and temperature are used as-is, no filtering whatsoever.
The voltage returned over CAN is, indeed, the instantaneous bus voltage scaled by the percent command. Current, on the other hand, is put through a 16x super-sampling, 8-point moving average filter. That is, 16 consecutive samples are put into a bucket, and when the bucket is full, it's averaged with the last 7 buckets, and that's your new current value till the next bucket's full. So you end up with something like a 976Hz update rate for the current, but a bandwidth of something like 122Hz or less. Of the instantaneous value in the middle of the PWM pulse, lest we forget. This is the value reported back over CAN, and also used for current control mode. Interestingly, the instantaneous value is used for I2T overcurrent protection, which is set for 23A over 46A for 2 seconds (ie. 69A for 2s, or 78A for 1s, etc.). No, I don't know why the overload specs differ from the specs in the data sheet. Either they fudged the DS numbers down for safety, or their conversion functions are wrong by that amount, which seems unlikely. This is all assuming the FRC firmware is identical in these regards to the reference design firmware on Luminary Micro's site, of course. I'm not going to decompile the FRC firmware unless lives are at stake of something. |
|
#38
|
||||
|
||||
|
Re: Modeling motor control
Quote:
So the Jag firmware is doing both: digital filtering and phase-locking the sample to the bridge switching. Quote:
Quote:
Last edited by Ether : 04-01-2011 at 20:29. |
|
#39
|
|||
|
|||
|
Re: Modeling motor control
Marshall -
To account for motor heating, consider re-ordering your tests pseudo-randomly. This will spread the time dependent effects across your sample space. Hopefully, this will result in a curve that makes more sense (but will likely be "wider"). Calculating effective motor voltage from Vbus * Duty Cycle is actually a pretty good method as long as the motor current is continuous (doesn't go to zero), and your measurement of Vbus is good enough. Measuring Vbus half way through the pulse is a reasonably standard method. Assume that the applied voltage waveform looks roughly like a trapezoid: It starts at Vbus nominal when the switch starts, linearly(ish) droops due to increasing IR loss, and then goes to zero when the switch stops. The measured Vbus looks just like this, but with some ugly ringing around the transitions. By measuring halfway through, we kill two birds: 1) We are far away from the ringing. 2) We effectively take the average of the Vbus across the cycle (if it droops linearly). Pretty sweet, eh? Simple way to get a darn good estimation. If you think about 2) a bit, you'll see why there usually isn't a filter in place - it would mess up the reading! If there is one, it usually has a very small time constant compared to the pulse width. Continuous current is absolutely key to using effective motor voltage calculations - if the current stops, the underlying assumptions fall apart entirely. This is "The Big Difference"(TM) between Jaguars and Victors, and is why they have such different responses. In a continuous current control mode, the effective motor voltage is (nearly) equivalent to what would happen with a pure DC source of the same voltage. The reason for this gap is that when current is stops flowing, the motor is effectively floating with no applied voltage. If current is always flowing, the motor controller is always in control of the applied voltage. Continuous current occurs whenever the off period is shorter than the amount of time it takes the current to decay to zero. Mathematically, this puts a relationship between switch frequency (on and off periods, actually) and minimum average current. That is to say that for a given frequency and duty cycle, there is a minimum average current to establish continuous current control. For a Jaguar, this is a few amps. For a Victor, this is a few hundred. |
|
#40
|
||||
|
||||
|
Re: Modeling motor control
Quote:
Will 5A at 4v produce the same internal torque as 5A at 10v? Is the internal torque of a GEARBOX proportional to its speed? Last edited by kamocat : 04-01-2011 at 23:19. |
|
#41
|
||||
|
||||
|
Re: Modeling motor control
Here's a CIM with a toughbox, using the same measurement system. Sorry, there's no encoder on it yet.
![]() EDIT: Here's a test using a random sampling sequence. ![]() Last edited by kamocat : 05-01-2011 at 00:41. |
|
#42
|
||||
|
||||
|
Re: Modeling motor control
It depends on what you mean by "proportional". To me, "proportional" means means a y=k*x relationship. So the answer is no, because at zero speed there is a non-zero static friction torque loss.
Is torque loss linear with speed? Not really, but for simplicity it is usually modeled that way. For example, see this spreadsheet. Here are some interesting links about internal torque loss vs speed for Globe and FP motors. Quote:
Quote:
|
|
#43
|
||||
|
||||
|
Re: Modeling motor control
Look at the difference in current waveforms for a CIM with locked rotor driven at 5% duty with a Jag vs a Victor. This is a simulation using R=0.090 ohm & L = 200uH. At 15KHz, the current varies from ~7.4amps to 7.7amps. The RMS is 7.6amps and the algebraic average is 7.6amps. At 150Hz, the current varies from ~1.8amps to 18.7amps. The RMS is 8.4amps and the algebraic average is 6.7amps. Since average motor torque is created by algebraic average current, and motor heating is created by RMS current, the 150Hz waveform produces less average torque and more motor heating. Last edited by Ether : 05-01-2011 at 02:09. |
|
#44
|
||||
|
||||
|
Re: Modeling motor control
Thank you for the straightforward answers.
How would I measure it in a way that any waveform with the same current would create the same torque? You said algebraic average? |
|
#45
|
||||
|
||||
|
Re: Modeling motor control
Quote:
If the waveform is nice and flat like a 5% 15Khz CIM curve then any sample taken with be both the algebraic average and the RMS, approximately. If the waveform is an exaggerated sawtooth like a 5% 150Hz CIM curve, then you'd have to sample the instantaneous current and run it through a low-pass filter of some sort. You'd have to make sure your samples captured a reasonable picture of the entire waveform and were set up in such a way that aliasing didn't distort the results. OR, I think a better way would be to hardware-filter the raw analog signal (the amplified voltage across the shunt resistor) before it goes to the ADC. I think a filter could be designed that would give the algebraic average. Last edited by Ether : 05-01-2011 at 02:48. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Encoder Motor Control | Wicked | NI LabVIEW | 3 | 11-02-2009 18:21 |
| Motor control problem | Lablabla | Programming | 3 | 17-01-2007 15:27 |
| Motor Control Systems | Astronouth7303 | Programming | 3 | 05-04-2005 19:35 |
| Four motor control | judson | Programming | 1 | 14-02-2005 20:17 |
| Motor Control | archiver | 2000 | 1 | 23-06-2002 23:01 |