Quote:
Originally Posted by jyanof
I wanted to throw this out there and see what ideas you all have.
This all started when a buddy created a motor and vehicle model (mathematical) and tried to predict the acceleration performance of his future EV. I suggested we plug in the parameters for my vehicle and see how the predictions match reality.
It was pretty far off though - It said I should be in first gear for only a few seconds whereas it took nearly twice as long to accelerate to shifting speed.
So, i logged some data from the serial port to investigate what the controller was actually doing. Turns out that I was getting about 375A to the motor, despite flooring it, and we had assumed that the controller would be maxed at 500A.
I had set the kp and ki values for 'smoothness' and that resulted in a pretty slow control loop. consequently, the motor speed accelerated faster than the control loop could keep up. By the time it set a new PWM duty cycle, the motor speed had increased and the new PWM value isn't enough to maintain the commanded motor amps.
Increasing both kp and ki makes the control loop faster and I reached a point where I could maintain about 470A during acceleration. I even went too high at one point and the controller immediately went into hardware overcurrent protection with a slight press of the pedal.
However, as the loop speed increased, the 'smoothness' decreased. If I was at a dead stop with a little bit of slack in the gear train, the motor current would shoot up quickly and result in a jerky start that led to slowly damped torque oscillations. Also, abrupt changes in throttle position resulted in torque oscillations due to the elasticity in the geartrain, particularly in 2nd gear.
Has anyone else observed this? For the most part, this isn't necessarily a racing controller, but it might be nice to find a way to have the best of both: fast control loop for fast accelerations and a slower loop during start or cruising the parking lot.
The only idea I had was to allow for Kp and Ki to vary with some other parameter, maybe throttle position or PWM dutycycle. Any other ideas?
|
Hey Joe,
Ive seen this before.
When the controller was early development I was testing it in my golf cart. Since its a direct drive to the diff, you could feel everything.
When held on a hill just by stalling the motor, you can feel it pulsating the current. I would hold it on the hill like this to work at tuning the loop. I was going for the current to track throttle perfectly. Once it tracks perfect, the pulsating pretty much goes away.
Here it is while oscillating:
https://www.dropbox.com/s/odjoxu2kwm...%20Shudder.png
and here it is after perfectly tuned:
https://www.dropbox.com/s/7fbxmdev3a...27.41%20PM.png
and another:
https://www.dropbox.com/s/156arxi60h...33.47%20PM.png
See how the current feedback(CF) tracks throttle position perfectly?
Does this help at all joe?
-Adam