PWM for 3-phase Inverter

Hi,
I tried this code and find it awesome as a new Arduino adventurer, changed delay and UVW to UWV without much ado and love it. I need to add a ramp up and down and fwd reverse function and would like to know if someone did that already?
I would like to add an I2C 16x2 LCD to see the frequency, amps x 4 in and volts x 4 in.
Will the Mega 2560 at 16Mhz be able to alllow me to change the output frequency from about zero to 50Hz and still read 4 currents ( supply and 3 phases), 4 voltages (Supply and 3 phases) or must I use a faster Clock or 2 Mega 2560 chips to do that?
Did someone add the V/F ratio in yet for ramping and other speed selections?
Did someone write code yet for vector control function also?
Sorry for the many questions in one message but this is exciting stuff.
Here is my small adjustments to make it slow so I can see the 3 Led`s phase changing!
void setup_cosines ()
{
for (int i = 0 ; i < 0x400 ; i++)
{
float a = PI * i / 0x200 ;
cosine = round (127.0 * cos (a)) ;

  • }*
    }
    int phase = 0 ; // taken modulo 1024
    int amplitude = 200 ; // 201 is maximum value without overflow.
    void loop ()
    {
  • phase ++ ; // phase increment, normally this would be done by DDS loop*
    _ int newu = (cosine [phase & 0x3FF] * amplitude + 0x1F) >> 6 ;_
    _ int newv = (cosine [(phase + 0x155) & 0x3FF] * amplitude + 0x1F) >> 6 ;_
  • int neww = - newu - newv ;*
  • newu += HALF ;*
  • newv += HALF ;*
  • neww += HALF ;*
  • noInterrupts () ; // interrupt-safe updating of u,v,w*
  • u = newu ;*
  • w = newv ;*
  • v = neww ;*
  • interrupts () ;*
  • delayMicroseconds (1000) ;*
  • }*