I wasn't happy with the power that I was getting from the motor. Furthermore, it wasn't as smooth as I would have liked. Field Oriented Control (FOC) can alleviate these problems. I have gone through the theory of FOC control in FOC control theory. There is also a good video by vedder himself on the topic: vedder video. The controller I am using is a Vedder Electronic Speed Controller or Vedder ESC or VESC, which is basically a standard ESC that is open source and developed by Benjamin Vedder.
Hall effect sensors are used for position control. These sensors are particularly important for estimating rotor position when the motor is stationary. I think the VESC that I'm using uses Back EMF sensing at high speeds anyways because it's more accurate. However, hall sensors work well independent of speed. When a pole is seen the output latches until the opposite pole is seen. I thought that these hall sensor ICs had a voltage output, but it actually acts more like a switch, so an external voltage must be applied to test them.
Fig 1.1 The hall sensors that are in my hub motor
Long story short, just connect power ground and the three hall sensor wires to the VESC and you're good to go 😅
Fig 2.1 The setup window used in the BLDC tool software to setup a VESC for FOC
The steps for using the BLDC tool are as follows:
The power was still limited after setting up FOC. I did a bit of testing. The BLDC tool has some nice graphing and data acquisition tools with it. So I tested the maximum power output in a stall.
Fig 3.1 A graph showing voltage, current and power for the motor
The problem was that the motor current was limited to 30 amps. Which means the maximum power was 30A*50V=1.5kW peak. This... is not enough 😈 I want more power!!! ⚡ So I increased the motor current limit to 60A which means the motor can now have peak power of 60A*50V=3kW. Much better 😊 I could have increased the limit even more, however the battery current limit was reached at 10A and I did not want to exceed 10A. I believe the motor current can exceed the battery current because the controller has large capacitors that store energy for when there is a peak in power consumption from the motor. This decreases stress on the motor.