Just to add yet another way of looking at the problem - separate out the demanded output (how much speed the user is requesting) from the actual output (what speed you are currently delivering). Instead of simply making the actual output match the demanded output directly, you would use the demanded output to make incremental changes to the actual output. For example, one strategy would be to run some code every 100 ms which moves the actual speed a little bit closer to the demanded speed, giving the impression of inertia. You can control how much inertia by how often you update the speed and how much you update it by.