EBIKE Speed limit to throttle using pwm signals and hall sensor

you should have a way to measure RPM of the wheel so this will be the input to control maximum speed