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:
if (PWM=0) accel=0; else accel=p2*PWM*(1-RPM/(p1*PWM));
accel=p2*(PWM-RPM/p1); // assume linear speed vs torque motor curve
if (accel<0) accel=0; // assume no regen braking
if (RPM<=0) decel=0; else decel=p3*RPM+p4;
accel -= decel;
I tuned the model to behave somewhat like the real world open-loop with a 0 to +1 PWM step input and a +1 to 0 PWM step input.
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.