how to solve Varing duty cycle value while using Pulsein()
I would start by removing Serial interrupts from the pulseIn period.

void loop() {
    pwm_value_H = pulseIn(PWM_PIN, HIGH);
    pwm_value_L = pulseIn(PWM_PIN, LOW);
    Serial.println(pwm_value_H);
    Serial.println(pwm_value_L);
    D = ((pwm_value_H) / (pwm_value_H + pwm_value_L)) * 100.0;
    Serial.print("D=");
    Serial.println(D);
    Serial.print("D=%");
    Serial.flush();
}


For higher accuracy I would then look to the Timer based Input Capture. 

Cheers!