What is the device that is being controlled by the PWM signal? Is it MOSFETs? IGBT? Whatever the switch is, you can predict the drop across it when it is turned on. Assuming it is a MOSFET, you can set up current source that pulls current through a resistor that is tied to the drain of the FETs. You can then set up a comparator to look at the voltage drop across the resistor versus the voltage drop across the FETs. If the drop across the FETs exceeds the drop across the resistor, then you have an OC condition.
Iocp = Iset*R/Rds(on)
where
Iset = current source current
R = resistor value tied to current source and FET drain
Rds(on) = Rds(on) of FETs
You would have to take into consideration the increase in Rds(on) due to the increase in temp of the FETs from ambient temp increases and self heating. If the switching is inductive, there is likely to be a peak and a valley, so that would likely need to be taken into account as well.