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.
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.
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]
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.
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.
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:
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.
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.
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 |
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.