T_p = T_d = 5 s, T_i = 5 s, dt = 0.05 s, and T_sim = 30 s are fixed. A disturbance step is applied at t = 5 s. FF uses gain-only compensation, G_ff = -K_d / K_p.
While paused, moving a slider updates the results immediately.
Before disturbance d → Gd disrupts the output, d → Gff (purple) anticipates it and adds compensation to the manipulated variable. After the disturbance is applied, a purple pulse travels through the compensation path.
Top: output y(t) (red = FB only, cyan = FF+FB, gray dashed = target r=0) / bottom: control input u(t) (orange = u_fb, purple = u_ff, green = total) / vertical line: disturbance applied at t=5 s. As the playhead moves from left to right, FF+FB (cyan) barely moves when the disturbance arrives, while FB only (red) deviates substantially.
Compares the step responses of feedback alone and feedback with feedforward compensation for a step disturbance entering a first-order process through the disturbance path.
Transfer functions of the process (control path) and disturbance path:
$$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 both paths:
$$y(s) = G_p(s)\,u(s) + G_d(s)\,d(s)$$PI feedback (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 simplified version used in this tool (gain only):
$$G_{ff}(s) = -\frac{G_d(s)}{G_p(s)},\qquad G_{ff} \approx -\frac{K_d}{K_p}$$u = u_fb + u_ff. When T_p = T_d, even gain-only compensation achieves complete cancellation and can greatly reduce the peak deviation.