Spice-aided modelling of the UC3842 current mode PWM controller with selfheating taken into account