I have extracted the PID Controller into it's own class. Do you see any issues with this…
- User
I have extracted the PID Controller into it's own class. Do you see any issues with this implementation?
class SelfAdjustingPIDController: def init(self, mv_initial, mv_min, mv_max, sample_interval = 0.1) -> None: # PID controller parameters - will self-adjust self.Kp = 0.5 # Proportional gain self.Ki = 0.1 # Integral gain self.Kd = 0.05 # Derivative gain self.integral = 0 self.last_error = 0 self.sample_interval = sample_interval # seconds self.recent_adjustments = [] # Manipulated variable parameters self.mv = mv_initial self.mv_min = mv_min self.mv_max = mv_max
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.