Re: UNDERVOLTAGE PROTECTION
Basically, take the rectified and filtered input voltage (across the input cap) through a divider, and compare it to a reference. When the input voltage is below a threshold your comparator will have to shut down the PWM chip.
Note that the voltage on the input cap will by higher than your input RMS voltage. Also, it will have some ripple on it. Design the comparator so as to take into account these. Make sure you design enough hysteresis to prevent the ripple from making you comparator "chatter".