@@ -50,10 +50,13 @@ def calculate_control_output(self, measured_value: float, dt: float) -> float:
5050 :param dt: Time difference since the last update
5151 :return: Control output
5252 >>> adrc = ADRC(10.0, 5.0, 2.0)
53- >>> (adrc.system_output, adrc.system_velocity,
54- ... adrc.total_disturbance) = (1.0, 2.0, 3.0)
53+ >>> (
54+ ... adrc.system_output,
55+ ... adrc.system_velocity,
56+ ... adrc.total_disturbance,
57+ ... ) = (1.0, 2.0, 3.0)
5558 >>> adrc.calculate_control_output(0.5, 0.1) # Simple test with dt=0.1
56- 0.8
59+ 0.05
5760 """
5861 # Extended State Observer (ESO) Update
5962 error = self .system_output - measured_value
@@ -72,8 +75,11 @@ def reset(self) -> None:
7275 Reset the estimated states to zero.
7376
7477 >>> adrc = ADRC(1.0, 2.0, 3.0)
75- >>> (adrc.system_output, adrc.system_velocity,
76- ... adrc.total_disturbance) = (1.1, 2.2, 3.3)
78+ >>> (
79+ ... adrc.system_output,
80+ ... adrc.system_velocity,
81+ ... adrc.total_disturbance,
82+ ... ) = (1.1, 2.2, 3.3)
7783 >>> adrc.reset()
7884 >>> adrc.system_output, adrc.system_velocity, adrc.total_disturbance
7985 (0.0, 0.0, 0.0)
0 commit comments