Let me try to explain in simple terms.
One sine cycle corresponds to one 360 change in phase. Therefore one cycle (360deg) should correspond to one rotation of the armature.
However, almost all common motors have more than one pole-pairs. If the motor has, say 10 pole pairs we shall see that one cycle of the current through the motor will cause rotation of one pole pair from the current step to the next equivalent step.
In the same manner, if your motor is having 10 pole pairs, you will see 10 pulses coming out from each sensor if you turn the motor by hand one full cycle.
If your motor is having PM construction, you can feel when you turn the rotor by hand because the rotor will latch at every pole pairs.
In other words, one current cycle from the power line will turn the motor only by 1/10 of a turn. Hence 10 cycles of the current must flow before the motor moves one whole cycle. Thus physical cycle and electrical cycle can be different.
Now for the above calculation, we ignore the physical cycle. We focus on 360 degree for the time being. If you want the motor to turn x RPM, it is x/60 rotation per sec or x*360/60 degree (mechanical) rotation per sec or x*n*360/60 current cycle per second where n is the number of pole pieces.
Now you need to focus on the PWM frequency. Let us say it is 10 kHz pwm. We have 10000 pulses per sec. We must increment the phase such that 10000 pwm pulses cover x*n*360/60 degrees. This basically becomes the phase-inc ---> x*n*360/60 divided by 10000.
Why 2? They are trying the center the pulse but the idea is not difficult.
Interesting point is that if you have low PWM frequency, you cannot run the BLDC motor very fast. The same circuits are used for gas centrifuges that run at 100000 rpm- the motors are simple to design but the driver is rather tricky.
- - - Updated - - -
First concentrate on the speed: if the phase-inc is const, the motor is running at a constant speed. If you want to increase the speed, you need to calculate new phase-inc (it depends on x, the RPM) and slowly increase (or decrease) the phase-inc over a period of few seconds to get the new speed. Torque is current dependent. Let us leave it for the time being. If the thing is working we shall return back to this point later. The computations must be done in integer mode.