A dynamic threshold generator is employed for detecting faults in λ-tuned control loops. To this end, an optimizationalgorithm for dynamic threshold generators is proposed. The a priori-information from λ-tuning is used in designing astate estimator with integral action. A dynamic threshold generator for the residual of this state estimator is derived and the optimization algorithm is applied. Simulations with measurement data from an experimental water tank setup show that the method is capable of detecting a small fault without generating false alarms.