Method and an apparatus in tuning a PID-regulator