That's ok, IanB, I know you are very busy. Perhaps someone else can help me. Perhaps PID and C-coding is not your best hand of cards. Thanks anyway for trying and for the help you've so far given.
I agree that I am verbose, but I try to be entertaining and I write so much so as to make very complicated ideas clear.
Sometimes I can't resist to remark about someone's comments that are so confused or false, or so very far off from fact. And I can't help commenting if someone gives advice(that might be read not just by me but possibly many others) that is so patently false that it, to not say something, will only serve to further the cause of misinformation, ignorance, myth and confusion.
If someone fails to comment on false information, then that person does not help me or others to correctly understand how things actually work in this very complicated field of electronics. And what is this board about, if it is not to help others by sharing knowledge, not false information?
If I had the system and the code on my work bench I could make it work very easily, but that isn't the case so I'm limited to trying to offer suggestions.
I have advised you that you are unlikely to need derivative action in your controller, but you refused this advice. Derivative action works as a look ahead function to compensate for overshoots when systems have a delayed action to control inputs. Your motor speed control system does not have this property. The motor will accelerate as long as the energy supplied by the motor is greater than the energy dissipated by the system. If you reduce power to the motor the system will stop accelerating instantly, there is no delayed action at all.
You have an inherently jerky system as you recognize. There is sloshing and movement of the load in the tub, and there is a certain amount of free play in the motor drive belt. The key to smooth control of a jerky system is constant application of torque and slow, smooth control variations. Your control system should be slow acting, should have filters to suppress noise and jitter, and should not try derivative action as this will amplify noise and produce instability. Your control responses should have a settling time of one or two seconds, not fractions of a second.
Since you have a low limit below which you cannot get a reliable speed measure you should not try closed loop speed control in this low speed range. You cannot control what you cannot measure. As I mentioned you need to use open loop control in this region where you apply low power to the motor from standstill in a measured fashion and wait until you detect a good speed signal before you close the loop. (For an analogy consider cruise control in a car. It doesn't work below some minimum speed like 30 mph. You have to manually speed the car up from a standstill before cruise control can take over.)