Whoa. So you want to make a sensorless three phase controller ?
Not easy...
Here is how the system works:
The motor is a star configuration. Only two wires are powered at a time
ABC
+-.
.-+
-.+
-+.
.+-
+.-
The dot indicates the unpowered phase. So you need three top side mosfets and three bottom side mosfets. Each fet is driven by a pwm signal that is modulated using a sine table . So essentially you creat ac currents through the coils. This creates a very smooth operation. Around the time the pwm reaches 50 % duty cycle in the operation you disengage both mosfets and connect both ends of the actuated phases to a voltage level of 1/2 vcc. At that moment you need to measure the delta voltage between 1/2 vcc and the unused phase.
So if you are in step 1 and you approach 50% duty cycle of the sinewave you disengage the drive, connect phase a and b to 1/2 vmotor and you put a comparator that looks at the delta between 1/2 vmotor and phase c. If this voltage level changes sign meaning phase c goes from below 1/2 vmotor to above 1/2 vmotor or vice versa, the rotor has just passed the magnetic pole. You can now re-engage the drive logic.
The mechanism works by prediciting when the rotor will 'fly-by'. If it flys by too late it means that your field is rotating faster than the rotor can follow. Field breakage will stall the motor. If you fly by too early it means your motor is running faster than your set speed. Change the pwm table so you pump less current in the coils so you slow down. (Current x mechanical load determines speed. Drop current and speed goes down. )
So now you can do speed control.
There is another problem you will need to tackle : startup.
At startup there are two problems. 1) there is not enough back emf to sens the speed and close the control loop described above. So you simply need to make a mechansi. That steps the motor faster and faster until you get a stable feedback signal. Then you can engage the drive.
But there is a bigger problem.. Which way do we want to spin ? It is possible for the motor to take off in the wrong direction !
The trick is to find out where the rotor sits and start by energising the phases using the next logical step....
That mechanism i cannot disclose. There is a few around but they are all either patented or NDA. The ones i know are NDA... So i can't help you there.
The above is how a harddisk controller drives it bldc. Those controllers also employ additional trickery but i am not at liberty to disclose.