Algebraic Real-Time Algorithm for B-Spline Sinusoidal Pulse Width Modulation in Three Phase Voltage Source Inverters