|
Re: Question about encoders to control motor
We use a bang-bang controller very successfully. It is very simple:
1) decide on the RPM you want for your shooter. Let's call it DesiredRPM.
2) You have the RPM from your encoder. Call it ActualRPM.
3) Implement your LabVIEW code as follows:
if (ActualRPM < DesiredRPM)
MotorOutput = 1.0;
else
MotorOutput = 0;
The keys to this working well are:
1) Do NOT filter or use averaging of your RPM reading from your encoder.
2) Run it in the fast loop. We do it in a 30 ms loop and we get good results.
If you have any questions or want any help with setting it up or testing, come find me in our pit on Wednesday evening. I won't be at the competition during the day on Thursday and Friday (I'll be at work).
__________________
-
An ounce of perception is worth a pound of obscure.
|