|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
|||||
|
|||||
|
Re: Using Kevin's PWM outputs for a quieter drive system.
I'm going to say it's not related to your ADC oversampling. Blaming it on the ADC oversampling implies that the ADC code is taking a moving average of the analog input and thus damping the current feedback signal, but this simply isn't how the ADC code works. I think you're just seeing the mechanical dynamics of the system coupled with a slow control loop and delayed response from the Vics. I'd say you can compensate by increasing the PWM loop rate like we've been talking about and very carefully bumping up your gains. IR compensation is a little tricky since the electrical dynamics of the system are an few orders of magnitude faster than the mechanical dynamics. If you increase your gain too much, the IR compensation starts overshooting and you get chatter in your motor and it sounds even worse than they usually do. So I'd say speed up the loop and tweak up your gains till things start sounding off, then back them down a little and just assume that's the best you're going to do.
|
|
#17
|
|||||
|
|||||
|
Re: Using Kevin's PWM outputs for a quieter drive system.
Since I stared this thread, it has been interesting to watch and learn.
Something that I have learned while playing with the "IFI" vs "Kevin" PWM outputs is that there is appreciable less delay between request and response with the Kevin code. Case in point, at the beginning of auto mode, my code starts setting the position of the steering motor. On the bench (since I didn't have a feedback pot hooked up) the RC called for motion on the steering motor right away. I just had a Victor hooked up and I was looking at the indicator LED. I am using the process_gyro() loop to detect when new feedback is available, and I was setting BOTH the pwm5 and pwm15 at the same point in the code. So, with the victor plugged into pwm5, I click on Auto mode, and a heart-beat later, the Victor light goes off. However with the victor plugged into pwm15, the victor light goes off almost instantly after I click auto on (no perceivable delay). The difference seems much longer than anything associated with a fraction of a normal OI update cycle (perhaps as much as 100-200ms) , so I'm confused but pleased. I think our steering will be tighter in the future using pwm15. I even decided to move 2 of our 4 wheels controler to the upper range as well. |
|
#18
|
|||||
|
|||||
|
Re: Using Kevin's PWM outputs for a quieter drive system.
I finaly stumbled across the reason for my noisy drive train.
The problem ended up being caused by noisy throttle inputs on the OI. The noise that was being seen by the OI was bouncing the motor speed in and out of the deadband of the Victor when a slow speed was being requested. My joystick deadband logic may have been part of the problem... I first check to see if the input is outside the deadband, and if so,I subtract the deadband from the current reading. This then gives me a speed signal that is continous all the way to zero. Unfortunately, this also makes the output to the victor continous from zero up, so any noise on the joystick can bounce the victor in and out of it's minimal activation signal, thus causing the motor to start and stop based on the joystick noise. This rapid on-off action was being transmitted into the gearbox and causing all sorts of ugly noises. Rather than re-offsetting the levels, and possibly changing the other characteristics of the signal, I now just pass the joystick requests through a FIR filter (like oversampling the RC inputs), and so the victor doesn't see the noise. Suddenly I have a MUCH quieter drive system.... YAY... Phil. |
|
#19
|
||||
|
||||
|
Re: Using Kevin's PWM outputs for a quieter drive system.
As a note:
I have played around with the victors to figure out what the highest update rate is, and have found for some older Victors the 100Hz rate is pushing it a little. The drives will occasionally give you random motor outputs at this rate. We have been using high update/high resolution pwm for a few years now, with much success. As to the 100Hz/120Hz thing: If I remember right, the IFI advertised maximum signal input is 100Hz and the chop output is 120Hz regardless of input frequency. Anyhow, here's my question, and I'm hoping someone can answer it for me as I've asked IFI before: IFI offers only one drive, the Victor 883, with a 2KHz chop frequency. One common thread between many FIRST robots is their angry buzzing noise (from the 120Hz chop) that they all make, as opposed to the more intelligent sounding high frequency hum common among industrial servomotors and the like. What I'm wondering is, why doesn't IFI use a higher chop frequency? Also, why not allow shorter pulses for the PWM input to get a higher update frequency? The microchip timers are capable of doing shorter pulses without any loss of accuracy/resolution. Alternatively, perhaps using PWM as an interface to the motor drives isn't the best idea for rapid updates anyways. Maybe some kind of simple serial bus? Since the victor's don't have to give any feedback, it could be as simple as a dip switch on each one to specify an address, then just use good ol TTL serial. (At 115200baud, at maximum capacity you should be able to send 4800 24-bit values/second (8-bit address and 16-bit data), or, run 16 victors at an update rate of 300Hz) The major advantage of higher frequency chopping (2KHz+) with very low output duty cycle capability would be the ability to finally do high speed variable dynamic braking, without the robot looking like you just threw a wrench in it. -q p.s. I'm not saying you can't do dynamic braking with the current drives, our robot does this this year and I'm sure others do as well, however, I would like to be able to do it more smoothly than is currently possible with the victor drives. Last edited by Qbranch : 09-03-2008 at 15:39. |
|
#20
|
|||
|
|||
|
Re: Using Kevin's PWM outputs for a quieter drive system.
Phil,
The difference in delay between the "IFI" PWMs and "Kevin's" is because PWMs 1-12 are generated by the master processor, while PWMs 13-16 are generated by the user processor. The master processor PWMs will only occur after the communication has taken place between the two (roughly every 26.2 milliseconds), while the user processor PWMs are generated immediately. More details about this delay can be found here. Mike |
|
#21
|
|||||
|
|||||
|
Re: Using Kevin's PWM outputs for a quieter drive system.
Phil et al,
I feel a need to go back to the original line of questions. The 120 HZ Victor output repition rate more closely matches the brush timing on the many of the motors we use. Previous versions of the Victors had a higher rep rate. This design then allows a smoother control of the motors due to the averaging of current in each winding in the motor as it contacts the brush assy. This is especially true at low speeds where everyone wants the greatest control. A higher output frequency (2kHz with the 883) gives relatively short pulse width for the brush timing at low speeds. Often the pulse could occur during the transition from one commutator segment to another. This gives a much more erratic response at low speeds. As long as the drive system uses a pulse to drive the motors there will be some noise. Remember that a variable DC current (no pulses) needs to be at a certain voltage level to just get the shaft turning. That level may be too fast for the kind of control you require. The full +12 volt pulse starts the motor turning and still gives you relatively low drive current (speed) with a short duration pulse. As to lubing the Banebot transmissions, I am sure there are some people who would disagree with the addition of heavy or thick lubricants as the efficieny starts to drop with this type of lubricant. Remember that an intermittant application like ours, does not allow the transmissions to reach full operating temperatures for which those lubricants were developed. I think I would rather have a loud and efficient transmission than a quiet one in this application. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with PWM outputs on RC | Adam Richards | Control System | 1 | 20-02-2007 06:37 |
| Using kevin's code for driving and camera tracking | razzoc | Programming | 3 | 18-02-2007 08:50 |
| What drive system is your team using? | dpick1055 | Technical Discussion | 22 | 27-01-2007 23:29 |
| Using 6 motors in a drive system? | FIRST JerseyKid | Motors | 7 | 12-01-2005 23:49 |
| relay and pwm outputs | nick_champ_2 | Electrical | 1 | 31-01-2003 13:08 |