link the pedals of a bike on a stand to a car alternator of a generator. Put a very heavy duty variable resistance load across that generator/alt. It will need a heat sink. As you make the load higher the resistance will get higher. For $75 you can buy a unit to set your bike in that will do exactly that. If you want to go hydro. Connect your bike to a washing machine pump or something similar. make a looped system where the pump is continually circulating your liquid. Place a valve in the system that you can easily adjust and that will make the force easy or difficult.