Based on the motor location, electric bicycles are divided into mid-mounted-motor models ("mids") and in-hub-motor models ("hubs"). The in-hub motors are usually in the rear hub. There are also front-hub & AWD e-bikes but they are very rare. When discussing hub motors, people often say "rear hub motor" or just "rear motor", but keep in mind that the hub motor can also be in the front.
A mid-drive motor is located in between the pedals:
It powers the chain and takes mechanical advantage of the gear system to maintain the optimal motor RPM across different riding conditions and speeds. Just like a car engine, electric motors have an optimal RPM range for efficiency, and being able to shift gears helps maintain this sweet spot. However, to keep the motor within the optimal operating range regardless of speed, you have to pay as much attention to the correct gearing as you would on a non-electric bike.
A rear motor is integrated into the hub:
It's fixed to the wheel and operates independently of the bike’s drivetrain, meaning the e-bike is very forgiving when you are in a gear which doesn't match the speed. Even if you are on the most wrong gear at the moment, the motor doesn't "know" that since it acts on the wheel without intermediaries - gears don't exist in its universe. But it's working in its optimal RPM range only when you are not too slow and not too fast - very roughly, between 12 km/h (8 mph) and 28 km/h (17 mph).
The first photo shows the Himiway D7 Pro - a model with a mid motor, which I tested when I decided to buy an e-bike after 5 months of riding a rear-hub e-bike borrowed from my son (he stopped using it when he bought an American Bully puppy who turned out to have separation anxiety - my son tried not to leave her at home alone). I was very determined to buy the Pro! It's built like a tank, has a 400lb load capacity (important due to my extra weight), is extremely convenient in riding due to fat tires acting as shock absorbers, the big distance between the wheels (that kills manoeuvrability but increases the riding "softness", which is more important to me) and the exceptional "four-bar" geometry of its rear suspension. That geometry prevents the real shock absorber from compressing when you are pedaling and braking, which improves control and reduces annoying bouncing and energy loss. A few videos mentioned that it's better than the suspension in many much more expensive models with different geometry.
I had read and watched videos that said that mid drive is cool. Oh yeah, it's for real bikers! All those e-bikes with a 5-digit dollar price have mid motors! And hub is for beginners who don't understand anything and buy $500 e-bikes in Walmart. One video even arrogantly and condescendingly said that - ok, you can start getting acquainted with e-bikes with a simple rear motor, gradually gain experience and over time "grow up" to a mid motor.
So, I decided to go mid - I always prefer the best products that I can afford (I used to save money and buy something cheaper, and then regret it, but for some reason I never regretted the money spent). The Himiway D7 Pro seemed like the perfect model! But after testing it on the streets of the nearby industrial zone where the bike shop is located, and riding between buildings, I was unexpectedly disappointed... Yes, the bike was firm like a motorcycle and incredibly comfortable, but I had a feeling that it constrained my freedom compared to my son's bike. I decided to dive into the topic deeper and didn't take the credit card from my wallet (that was hard since the budget was approved by my loved minister of finance). The result of my research was the purchase of the regular (non-Pro) version of D7 with all the same advantages but with a rear motor. I fell in love with it! It's shown on the second photo.
The research results, mixed with my own experiences, are listed below. You will see that neither of the two solutions is better or worse in itself, but each has its own attractive sides and its own problematic points - you just have to choose which option is best for you.
PROS OF MID MOTOR:
Due to the reduction (lowest) gears, a higher torque is applied to the wheel, so you experience more power than from a hub motor of the same wattage. Most mid-s apply around 120-130Nm of torque, while most rear-hubs - only around 80Nm. In other words, mids deliver 50% more power to the wheel. Because of this, mids are able to climb steeper hills, or climb moderate hills faster and with more confidently.
Due to the overdrive (highest) gears, mids are more energy-efficient on very high speeds since they are working on slower RPM. That increases the electric range, reduces heat buildup and increases the lifespan of the motor. However, on flat terrain, the bike is moving at high speeds largely by inertia. You need a lot of power to accelerate it initially, but then you are using only a tiny fraction of the motor power - just to help your pedaling to maintain the already gained speed. When I am riding at high speed on my rear hub D7 with the torque sensor, the motor barely works. Often, it turns off completely, and turns on again only to prevent the gained speed from dropping if my legs alone can't handle it. But that is on flat terrain. The discussed advantage of mids definitely exists when you're riding uphill, even not steep, very fast for a long time - that requires a lot of constant power from the motor. If you face this situation while riding a hub motor bike, you can ride just fast but not "very fast", so the motor will not go to crazy RPM and overheat.
BTW, hub motors, adapted for fast driving, have begun to appear recently. One of them is installed on the D7. Here's what its official page says: "1000W upgraded brushless geared hub motor uses the latest updated inner ring specialized in high temperature resistance and better heat dissipation, which can reduce the motor magnets’ attenuation speed to guarantee a longer life expectancy." It's even a pity that I don't ride fast very and, so, don't utilize this feature.
Placing the motor at the center distributes the bike's weight more evenly. This results in a better balance and stability, making the bike easier to handle and maneuver, particularly when cornering.
To provide the same casual riding experience as with a rear motor, a mid motor can have a lower wattage, which allows to not break the law. For example, in Canada, where I live, the maximum permitted power is 500W, and some states in the US have a 500W-750W limit. 500W mid motors are very torquy, but hub motors are usually 750W-1000W. However, judging by social media groups, the max wattage law is not enforced as long as the e-bike looks like a bicycle, not a motorcycle, and you are riding calmly and civilized, without breaking traffic rules.
Mid motors make it possible to use in-hub gear boxes - stepped or CVT. They have the following advantages over the sprocket cassette with derailleur: the ability to change gears when the bike is stationary (for example, if you had to brake urgently and remained in a high gear); much less maintenance (the gears are in a completely enclosed housing and are protected from dust and dirt); the ability to use a belt instead of a chain (this is my secret dream!).
PROS OF HUB MOTOR:
Easier to use, requires much less gear shifting. There is no importance of staying on the right gear - the motor works seamlessly when you are on any gear since, as I already mentioned, gears are not in the game of the motor with the wheel at all. As a result, you don't need to downshift before each stopping. Whatever gear you're in, you can come to complete stop without touching the shifter since the bike must not be on a low gear when you then re-start. The re-start algorithm: set the bike in motion with the throttle, achieve the desired speed, start pedaling and release the throttle. In fact, you can apply the throttle just for a second and start pedaling immediately - the pedals sensor (be it cadence or torque sensor) will turn on the motor almost right away, so you can release the throttle and keep achieving the desired speed by pedaling. In my Himiway D7, I am sometimes start on a high gear even with no throttle - I press the pedal with one foot and push off the ground with the other, so the torque sensor engages the motor.
As it was mentioned, the hub motor is working in its optimal RPM range only at medium speeds. But the big difference with the mid motor is that e-bikes with the hub motor are designed to work on non-optimal RPM, especially when we are talking about low RPM. In situations when, due to being in a too high a gear, the mid motor is unable to move the bike (or can even break the chain), or is able to move but subjecting the chain and sprockets to incredible stress and wear, the hub motor will do its normal daily job. But it will only have to work non-optimal for a few seconds - just to put the bike in motion.
You can see a "shiftless" start in the next video fragment. Pay attention that, before the start, the bike is on its highest, 7th gear!
A quote from the Internet:
"The mid drive may give more torque but it's a tiny sweet spot then you gotta shift repeatedly. The hub gives half the power seamlessly from stop till silly fast, shifting is optional."
The ability to start on any gear could be not so needed on a country road with no frequent stops. But shiftless accelerations are invaluable for those who commute on city roads with all their traffic light, stop signs and just dangerous situations. Sometimes they need to stop suddenly, having no time to downshift. I almost never ride on roadways, preferring bicycle recreational trails. But it's still a big city, and these trails constantly cross car roads, where you have to stop and wait for a chance to pass. Intersections with big roads are equipped with bicycle traffic lights, but when crossing small roads you still have to slow down considerably, sometimes to minimum speed, to make sure there is no car from either side. So, on a mid, you'd have to flick the gears switch quite often due to stops or just speed changes. On a hub - never.
All that means that the hub motor enables the "single-gear bike mode" effortlessly - without killing the drive train and your knees. You can set the gear you are riding on mostly, and be on it through the whole trip, like in the next review of an e-trike, where the guy is on gear 7 from the start to the end of the video:
Note that this e-trike has a torque sensor. Since you need to switch absolutely anything while riding, the combination of a torque sensor with a hub motor has some similarity with an automatic transmission (find more details here).
Obviously, you don't want the highest gear with a high PAS level if your goal is exercise, and not just transporting your body as fast as possible with minimal effort. But even for fitness-oriented riding, you may like the single gear mode, just select a gear in the middle of the range, and adjust the hardness of pedaling by changing the PAS level.
I have a monotropic brain (difficulty with multitasking due to inability of processing multiple channels of incoming information simultaneously), so I appreciate not having to think about shifting gears. That allows me to use my limited attention resource for other purposes like driving safely, changing the PAS level or enjoying the scenery.
You can switch gears while the motor is working at high power from the throttle. That can save the next situation. Let's say, you have forgotten to downshift before uphill, or underestimated the steepness of ascent and downshifted not enough. When you figure that out when you are already climbing, on a hub motor bike, simply press the throttle and downshift with ghost pedaling. In mids, that's impossible: when the throttle is pressed, the chain is so tight that shifting gears is out of the question. So, a mid bike will quickly loose momentum and stop. Then you will need to lift the rear wheel off the ground and twist the pedal "in the air" to shift into the first gear. There is even a good chance that you may not need to utilize this advantage of the hub motor, if pressing the throttle alone is enough to climb the hill.
When riding on very uneven terrain, dirt and rocks, hub motors are more secure. In this type of riding, conditions can change quickly, and you may suddenly need to slow down for highly technical riding over big bumps. If you weaken pedaling on a mid drive bike to downshift when you badly need to pedal hard, you can at best stall, and at worst fall. But a hub motor gives you the confidence that you will get over the obstacles simply by pressing the throttle - without even thinking about gears.
Hub motor bikes are more reliable. They are less likely to break down due to the lack of the mechanism that combines the torques of the motor and pedals. It's quite complex and not only increases the price of the bike, but is also prone to breakage, especially if you overload it by starting or driving in a too low gear. Less moving parts in rear hubs = less chances for something to go wrong. If you find a post about mid motor breakdown in an Internet community, most probably it's not the motor itself that break down, but that very mechanism that is in the same housing as the motor.
Gentle mode for the transmission. Less strain on the chain, less wear of the crank and gears. They are only subjected to load from your feet - no more than on a non-electric bike (in fact, much less).
If the chain or the derailleur break, you can still press the throttle and ride home (if you've been riding not too far) or to a nearest car road where you can call taxi/friend/family to pick you up (if you've been off-roading).
A hub motor bike is cheaper than a mid motor bike identical in all other parameters. If you are ready to spend a certain amount only, then a hub motor model will either be higher-end than a mid bike for the same price, or have the rear suspension.
SO, WHICH OF THEM TO BUY?
Simply ask yourself the next two questions:
Is the increased climbing power more important for you than the ability to not shift gears constantly?
Where you are actually riding, will you ever come across such a steep hill where a mid could handle it, but a hub could not?
Unless you live in a mountainous area, the ability to climb steeper hills is beneficial only in very "niche" situations most people will probably never be in. If you are riding on roads, in parks and on urban bicycle trails, any climbs are guaranteed to be amenable to rear motor bikes. Don't forget that non-electric bikes are riding there too, and they were riding there for decades before electric bikes came along. So even if you're very untrained or overweight, and your e-bike is very heavy, in the worst case scenario, the hub motor will equalize your capabilities with lean and trained non-electric cyclists, even if you do have to do some legwork.
Note that the videos that demonstrate the e-bikes ability to climb uphill, use only throttle. But you still have legs - the purpose of the motor is helping them, not replacing them. That's why there are very expensive mid bikes with only 50Nm of torque - for example, S-Works Turbo Levo for $17,000 (it's a mountain bike, for which the torque is especially important!). Obviously, this is a well-thought-out decision rather than a desire to make the bike cheaper. So, the 80Nm of your cheaper hub-motor bike must be at least not worse.
Also, these videos usually show grass-covered climbs in parks that are good to test the e-bike power and collect likes, or show it off to admiring friends, but that most of us, ordinary amateurs, will never ride in real life.
Nevertheless, it must be said that it is quite possible to encounter some fairly steep climbs. There are two of them in the huge park near my house. Technically, they are "amenable" to my rear motor bike, but it is going slowly, at the limit of its capabilities, and I am putting a lot of effort into pedaling. I am sure that a mid motor bike would fly up these climbs like a butterfly.
HOW TO HAVE THE BEST OF BOTH THE WORLDS?
If big torque is critical in your riding conditions and yet you want the freedom of no need to switch gears, consider the next options:
A mid motor model with an automatic gear box. Definitely the best choice, even though expensive. If I ever upgrade by e-bike, it will be an automatic mid with a belt!
A rear hub with as much torque as a mid. Here's the first thing google came up with (I was searching for a rear motor bike with torque sensor, full suspension and fat tires - these are my requirements): BikTrix RogueHawk FS ST, 1500W. Its 155 Nm exceed the standard 120 Nm of most mid bikes. There are quite a few of them.
But this option significantly breaks the law on the maximum power of the e-bike.
A dual hub motor model. If you're a serious off-road/dirt/mountain rider, also consider this: buying an AWD, you not only get a total torque greater than in most mid motor bikes, but you also get... an AWD! It's a huge advantage in itself, leave the increased power alone.
You can also convert your existing rear-hub model to AWD by installing a front motor wheel. You can find many conversion kits on the Internet, contact the vendor of your bike, or an e-bike shop in your area. Even if you do the simplest throttle-only installation with its own battery and no connection to the existing controller and pedal sensor, it's still a very good idea. You press two throttles and get the total torque like in a super-crazy mid bike! Of course, a mid bike can be converted to AWD too to enjoy the shiftless start on a high gear. But the total torque will be a useless overkill, so the entire setup will be unjustifiably overpaid for.
The AWD option not just breaks the law on the maximum power, but the two motors will immediately catch the eye of the police officer - that is obvious that the total power of two motors exceeds the legal limit.
MY CHOICE
Powerful mid-motor bikes really excel in extremes. But the real life is prosaic - I use the hub motor's "shiftless start" many times in any trip, and really love this magic. There's no way I'm willing to give up the "single-gear mode" and become a slave to the correct gear for more torque. You know what? If one day I face a so steep uphill that the hub motor gives up, I'm willing to walk, carrying the bike by hands (there is a special mode for that in the settings, when the motor is moving the bike with the speed of 6 km/h, so you don't put in any effort). But constantly downshift-upshift, downshift-upshift, downshift-upshift? This is not what I would like.
Obviously, the hub motor is the clear winner for me. That is my personal choice which could be the opposite of yours since we are in different circumstances, or just see things differently - that's fine! My goal was to acquaint you with my opinion, not to convince you otherwise. I am not a mid-drive hater (as I mentioned, my next e-bike will be an automatic mid) - I just wanted to break the common stigma.