to be able to vary the output voltage of the pwm signal
Yes you have been told on other threads that you can not / do not want to / do not need to do this.
but how can I contorl it i mean when I enter 300 I recive 250 Hz actually it should be 300 hz as well
No there is no direct collation like that. What is wrong with a look up table to map the two.
There are things you can do to speed up the code like having a multiply factor not of 100 but of a power of two like 256. This means that instead of dividing by 100 you can use the shift operation >> to shift the number 8 places to the right which is much quicker than divide by 256. Also you should pre calculate values that you end up recalculating.
So in this code:-
ul_duty1 = sine[ul_count/100%size]; // 1st sine wave output 0 degree phase shift
ul_duty2 = sine[(ul_count/100+(size/3)) %size]; // 2nd sine wave output 120 degree phase shift
ul_duty3 = sine[(ul_count/100+(2*size/3))%size];// 3rd sine wave output 240 degree phase shift
You have a calculation size / 3 calculated twice. Does it change from sample to sample - no so only calculate 'size / 3' and '2* size / 3' once when you calculate size.