HILDE: A Human-in-the-Loop Differential Evolution Framework for Rapid PID Tuning in Robotic Systems

1Department of Computer and Information Science, University of Michigan-Dearborn 2Department of Electrical and Computer Engineering, University of Michigan-Dearborn

Abstract

Tuning Proportional-Integral-Derivative (PID) gains for fast, stable control in robotic applications can be challenging, especially for nonlinear systems. This paper presents a Human-in-the-Loop Differential Evolution (HILDE) framework that combines automated global search with real-time human feedback to guide parameter exploration. Using a simulated small-scale differential-drive robot performing a 90° turn, HILDE dynamically adjusts the mutation factor in response to operator “Reject” or “Confirm” inputs, thereby balancing global exploration against local refinement. Experimental results show that HILDE converges to a shorter settling time (~0.96 s) in only 55 iterations, a ~94.5% reduction in iterations relative to a conventional DE method, while trading off a higher overshoot.


I. Introduction

Proportional-Integral-Derivative (PID) controllers are widely used in robotics due to their simplicity and effectiveness in managing continuous processes. However, tuning the PID gains (Kp, Ki, Kd) to achieve optimal performance, such as short settling times and low overshoot, remains challenging, particularly for nonlinear systems. Traditional methods, like Ziegler-Nichols, often struggle in these scenarios, resulting in suboptimal control outcomes.

Evolutionary algorithms (EAs), including Differential Evolution (DE), provide systematic approaches for exploring large parameter spaces but may propose unsafe or infeasible solutions without human oversight. Although Human-in-the-Loop (HIL) methods can mitigate these risks by leveraging expert feedback, such approaches are often time-consuming and may not fully harness the strengths of automated optimization.

To address these challenges, this paper introduces a Human-in-the-Loop Differential Evolution (HILDE) framework that integrates DE optimization with real-time human feedback for PID tuning. Specifically, “Reject” feedback cues larger mutations, facilitating broader exploration, while “Confirm” feedback supports more fine refinement of promising solutions. Demonstrated on a small-scale differential-drive robot performing a 90-degree in-place rotation, this combined automated-human strategy accelerates convergence, improves PID tuning efficiency, and offers a flexible balance between performance metrics like settling time and overshoot.


II. Methodology

A. Optimization Formulation

Consider a differential-drive robot performing a 90-degree in-place rotation. Let e(t) denote the angular error. The PID control input is presented in Equation (1):

u(t) = Kp * e(t) + Ki * ∫(0 to t) e(τ) dτ + Kd * de(t)/dt

where (Kp, Ki, Kd) are proportional, integral, and derivative gains. To achieve fast settling with controlled overshoot, we solve Equation (2):

min  Ts  subject to  O ≤ Omax,  Tr ∈ [Tr,min, Tr,max]

B. Human-in-the-Loop Differential Evolution

We use the metaheuristic DE algorithm to optimize (Kp, Ki, Kd) with human feedback guiding the mutation scale F. After each 90-degree turn, the robot measures {Ts, O, Tr}. If “Reject,” F increases to promote exploration; if “Confirm,” F decreases to refine promising solutions. Algorithm 1 details the complete logic.

Robot performing 90-degree turn (example image)
Fig. 1. Example screenshot from the robot simulation and real-time results visualization, during the 90-degree in-place rotation execution.
Algorithm 1 Human-in-the-Loop DE (HILDE)
1: Input: Population size N, maximum generations Gmax, gain bounds, mutation factor F, crossover rate Cr.
2: Initialize: Randomly generate {x0i}i=1..N within gain bounds.
3: for generation g = 0 to Gmax do
4:   for each individual n = 1 to N do
5:       Mutation & Crossover: Create trial vector vgn from xgn using standard DE operators (mutation scale F, crossover rate Cr).
6:       Evaluation: Apply vgn = (Kp, Ki, Kd) on the robot, execute a 90° rotation, measure {Ts, O, Tr}.
7:       Human Feedback:
8:         • Reject → Increase F (promote exploration).
9:         • Confirm → Decrease F (promote refinement).
10:      Selection: Compare vgn to xgn. Keep the one with better Ts (discard if O > Omax or Tr out of range).
11:   end for
12: end for
13: Output: Best performing gains (Kp, Ki, Kd) based on final settling time Ts and constraints.

III. Experimental Setup

HILDE was evaluated in a simulated differential-drive robot environment, with the PID control loop running at a fixed rate based on simulated IMU data. Each iteration of HILDE proceeds as follows:

  1. Upload candidate gains (Kp, Ki, Kd) to the simulator.
  2. Simulate a 90° turn from rest and record {Ts, O, Tr}.
  3. Operator optionally provides a “Reject” or “Confirm” response.

Solutions exceeding Omax or violating Tr ∈ [Tr,min, Tr,max] are discarded. Feasible candidates are ranked by Ts, and DE evolves toward parameter sets that minimize settling time. Human oversight eliminates poor-performing gains early and refines promising solutions more quickly, improving convergence speed and final accuracy.


IV. Results and Discussion

Table 1 compares the final PID parameters and performance metrics for the conventional DE method (labeled “Conventional DE”) and the proposed HILDE strategy. HILDE converges in 55 iterations, a ~94.5% decrease relative to the 1000 iterations needed by Conventional DE, while achieving a lower settling time of 0.96 s (an ~18% reduction compared to 1.17 s). Despite this advantage, the HILDE solution shows a higher overshoot (22.35% vs. 14.31%) due to more aggressive gains. Figure 2 indicates that HILDE quickly converges to near-optimal settings, whereas Conventional DE requires many more generations to achieve comparable settling performance.

Comparison of HILDE vs Conventional DE
Fig. 2. Converged settling time over iterations for both Conventional DE and HILDE. HILDE requires significantly fewer iterations to reach a similar or better performance.
Method No. Iterations Kp Ki Kd Ts (s) O (%)
Conventional DE 1000 9.94 1.98 0.003 1.17 14.31
HILDE 55 28.49 3.28 1.31 0.96 22.35

V. Conclusion

In summary, the HILDE framework leverages human feedback to guide the mutation scale in real time, accelerating convergence and more effectively filtering out undesirable parameter sets compared to conventional DE. Specifically, HILDE achieves a ~94.5% reduction in iteration count while improving settling time by ~18%. Although the resulting gains exhibit higher overshoot, the framework offers a flexible mechanism through overshoot constraints or adjusted human feedback to tailor performance objectives. These findings highlight the benefit of combining automated global search with expert oversight, offering a promising avenue for wider application in robotic and mechatronic control-system tuning tasks.


References

  1. J. G. Ziegler and N. B. Nichols, “Optimum settings for automatic controllers,” Trans. ASME, vol. 64, pp. 759–768, 1942.
  2. J. R. Koza, Genetic Programming: On the Programming of Computers by Means of Natural Selection. MIT Press, 1992.
  3. J. Kennedy and R. C. Eberhart, “Particle swarm optimization,” in Proc. IEEE Int. Conf. on Neural Networks, 1995, pp. 1942–1948.
  4. R. Storn and K. Price, “Differential evolution—a simple and efficient heuristic for global optimization over continuous spaces,” Journal of Global Optimization, vol. 11, pp. 341–359, 1997.
  5. A. Kothari, M. Mehl, and S. Ramsaran, “Closing the control loop with human input: A survey on human-in-the-loop control,” Annual Reviews in Control, vol. 50, pp. 120–134, 2020.
  6. S. Bhattacharjee, S. Das, and A. Biswas, “Human-in-the-loop optimization: A survey,” Archives of Computational Methods in Engineering, vol. 30, no. 5, pp. 2901–2936, 2023.