Fixed: plant time constant T_p = 1 s, nominal model K_n = 2 / T_n = 1 s, PI integral time T_i = 1 s, sampling dt = 0.02 s. With the set point r = 1 held, the disturbance d is applied continuously in real time, and PI alone (the disturbance causes a deviation) is shown next to DOB+PI (which holds the set point). The Q-filter bandwidth is ω_Q = 1/τ_Q.
Top: output y (red = PI alone drifts / blue = DOB+PI holds the target r = 1 / grey dashed = target r). Bottom: true disturbance d (orange) and DOB estimate d̂ (green) overlapping as the estimate tracks. Reducing τ_Q improves the blue tracking and lets d̂ catch up with d faster.
When an input disturbance $d$ acts on the first-order process $G_p(s) = K_p/(T_p s + 1)$, the DOB estimates the disturbance using the nominal model $G_n(s) = K_n/(T_n s + 1)$.
Disturbance estimate (ideal form and Q-filtered form):
$$\hat{d}_{\text{raw}} = G_n^{-1}(s)\, y - u, \qquad \hat{d} = Q(s)\,\hat{d}_{\text{raw}}$$$G_n^{-1}$ is improper, so the low-pass Q filter $Q(s) = 1/(\tau_Q s + 1)$ makes the implementation realizable.
Final control input (DOB+PI):
$$u = u_c - \hat{d}, \qquad u_c = K_c\, e + \frac{K_c}{T_i} \int e\, dt$$Discrete update: $\hat{d}[k] = (1-\alpha)\,\hat{d}[k-1] + \alpha\,\hat{d}_{\text{raw}}[k]$, with $\alpha = dt/(\tau_Q + dt)$.