Why u use built in generator. Try to make your own. I think u are doing things in simulink. In simulink u can generate pwm on your way. Process is: First u take a signal generator. Make its duty cycle 50 percent and period according to your switching frequency.Signal generators on and off value should be 2 and 0. Then substract 1 from signal generator output. This will give you a square wave of +1 and -1 repeatedly. Now take a 1/s(integrator) block and integrate the square wave. Gain the output by value 2* switching frequency. This will give you a triangular wave of 0 to +1 then again 0. Now as you have this triangular wave next thing is very simple. How much duty cycle do u need. Just campare the value with triangular wave and u will get your desired PWM. To drive lower switch of H bridge just complement it.