![]() |
simulation/analysis of motorized shooter
I coded a very simple dynamic model of a motorized shooter wheel. The model has constant kinetic friction and RPM-dependent drag, but no mechanical free play between motor and wheel. The model has no sensor noise or phase lag. I'm running the model at 1 microsecond steps. Here's the model. p1 thru p4 are tuning parameters: Code:
I then ran the model with 3 different speed controllers running at 10ms iteration rate: 1) Bang-Bang 2) Integration Only 3) Take-Back-Half The results were interesting, but I'm not sure the model is good enough to trust the results. So... has anyone done a more comprehensive simulation of the motorized shooter and studied the behavior of various speed control algorithms for spinup response, recovery response (disturbance rejection), accuracy, and stability? Especially interesting would be the effect on the different control algorithms of sensor noise and phase lag, and mechanical free play between the motor and wheel. |
Re: simulation/analysis of motorized shooter
Curious, in your accel equation, "PWM" cancels out in numerator and denominator - so it would have no effect on accel. It looks like you are trying to estimate torque based on a delta to final speed?
Personal preference, I would prefer to see an inertia term in there explicitly so you have some relation to the physical world instead of just p1 / p2, so you can sort of check whether the parameters you end up with are realistic. I'm curious enough to try this myself, if you can explain your accel reasoning (I think you know far more about motor modeling than I!) |
Re: simulation/analysis of motorized shooter
1 Attachment(s)
Quote:
|
Re: simulation/analysis of motorized shooter
Quote:
accel = p2*PWM*(1-RPM/(p1*PWM)) = p2*(PWM-RPM/p1) It probably would have been better to formulate it like that, because there would be no problem with divide-by-zero and I could have removed the conditional logic. Quote:
Quote:
Quote:
|
Re: simulation/analysis of motorized shooter
Thanks for the clarification, operator precedence got me.
I do have a couple environments I can try, I will do so and let you know the results (may be a couple days though). FWIW I would normally model speed-dependent friction as a square of speed term instead of linearly. It would probably change one's decision on which code is best, at least if you didn't have decent (ballpark) gains to start with. |
Re: simulation/analysis of motorized shooter
Quote:
Quote:
|
Re: simulation/analysis of motorized shooter
Quote:
Is this still on your plate? |
Re: simulation/analysis of motorized shooter
Quote:
|
Re: simulation/analysis of motorized shooter
Mark, For rough ballpark: assume load moment of inertia of a 3 pound 6" dia uniform disk. Assume CIM shaft coupled directly to wheel. 5300 RPM free speed, 343 ounce-inches stall torque, linear. At setpoint of 4000 RPM, tune so decel (motor command = 0) is 1/3(?) of accel (motor command = 1). Controller: bang-bang needs no explanation. TakeBackHalf can be found here. |
| All times are GMT -5. The time now is 12:47. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi