Fixed: T_p = T_d = 5 s, T_i = 5 s, dt = 0.05 s, T_sim = 30 s. Disturbance step at t = 5 s. FF is the gain-only form G_ff = -K_d / K_p.
Top: output y(t) (red = FB only, blue = FF+FB, grey dashed = setpoint r=0) / bottom: control input u(t) (orange = u_fb, purple = u_ff, green = total) / vertical line: disturbance at t=5 s
For a step disturbance entering a first-order process through a disturbance path, this tool compares the step response under feedback alone and under feedback combined with feedforward compensation.
Process transfer function (control path) and disturbance-path transfer function:
$$G_p(s) = \frac{K_p}{T_p s + 1},\qquad G_d(s) = \frac{K_d}{T_d s + 1}$$The output is the superposition of the two paths:
$$y(s) = G_p(s)\,u(s) + G_d(s)\,d(s)$$PI feedback law (error e = r - y):
$$u_{fb}(t) = K_c\,e(t) + \frac{K_c}{T_i}\int_0^t e(\tau)\,d\tau$$Ideal feedforward compensator and the gain-only simplification used in this tool:
$$G_{ff}(s) = -\frac{G_d(s)}{G_p(s)},\qquad G_{ff} \approx -\frac{K_d}{K_p}$$The total control input is u = u_fb + u_ff. When T_p = T_d the gain-only form gives perfect cancellation, slashing the peak deviation.