See the whole article here: https://www.avdweb.nl/solar-bike/hub-motor/mid-drive-vs-hub
Here is described how to simulate e-bike motors up to 250W at different speeds and road inclinations: hub motors, 2-speed hub motors and mid-drive motors. The mid-drive motor can be simulated at a constant cadence.