PID tuning 50 W cartridge in Marlin
Besides the P, I and D values, you may also have to tune PID_FUNCTIONAL_RANGE and PID_INTEGRAL_DRIVE_MAX.

Basically, the functional range disables PID control when more than the set number of degrees away from the target temperature and just puts the heater to zero/maximum power. The integral drive max parameter limits the value of the integral term of the PID controller.

The RepRap wiki notes: (note this wiki is dated! some options might not be available)


  In Marlin, the parameters that control and limit the PID controller can have more significant effects than the popular PID parameters. For example, PID_MAX and PID_FUNCTIONAL_RANGE, and PID_INTEGRAL_DRIVE_MAX can each have dramatic, unexpected effects on PID behavior. For instance, a too-large PID_MAX on a high-power heater can make autotuning impossible; a too-small PID_FUNCTIONAL_RANGE can cause odd reset behavior; a too large PID_FUNCTIONAL_RANGE can guarantee overshoot; and a too-small PID_INTEGRAL_DRIVE_MAX can cause droop.


My hunch is that the functional range may be too small; the PID doesn't kick in until close to the desired temperature at which point you will already have overshot the target (due to the high power heater and delay in the measurements). Once you've overshot the target temperature the integral term starts growing (negative) which causes the massive undershoot.