Idea for PID?

So i was looking at doing PID and i thought of the idea of instead of calculating velocity and what not with an encoder what if you had a constant gain going with a really simple program. Of course you would want to be able to have a cap which wouldn’t be hard. And you could have multiple buttons that can change the speed to a number and set the cap as that number and have a constant gain going. Would something like this work or am I just crazy?

I’m not sure what you’re trying to describe exactly.

What simple program are we talking about here? Is it a modified TBH loop or another controller that limits the motor?

That’s the same thing as setting the target value for any other velocity controller. I’m just not sure if the loop you described would be able to adjust to a cap that is set below the current value. Could you be a little more descriptive?

Well the programs would allow you to set a new cap with a button and there would be a constant addition of speed that won’t go over the cap so it won’t go under the actual speed allowing faster fire rate

Maybe post some pseudo-code or actual code so we can get a better idea of what you’re talking about?

If I’m understanding correctly, you want to have the power of the flywheels increase until it hits a certain value, your “cap,” and then you also want to be able to change the cap value by pushing different buttons. You also said “instead of calculating velocity” so I’m assuming your new program wouldn’t do that.

What happens if you want to achieve a lower speed then? A constant addition of speed seems to imply that you’ll only be able to make the flywheel go faster.

Honestly, if you don’t want to deal with calculating velocity you could use an oversimplified version of bang bang code.

By that I’m assuming you mean just setting the flywheels to a certain power.

motor[flywheel] = 127;

Bang bang code would also require velocity calculation.

My mistake then. I don’t know why I thought that bang bang didn’t calculate velocity.

So thanks for the help but i realize now that i made a very clear mistake with this idea, my team has decided to just do our own idea of TBH. Thank you for the help!