@@ -50,10 +50,13 @@ def calculate_control_output(self, measured_value: float, dt: float) -> float:
50
50
:param dt: Time difference since the last update
51
51
:return: Control output
52
52
>>> 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)
55
58
>>> adrc.calculate_control_output(0.5, 0.1) # Simple test with dt=0.1
56
- 0.8
59
+ 0.05
57
60
"""
58
61
# Extended State Observer (ESO) Update
59
62
error = self .system_output - measured_value
@@ -72,8 +75,11 @@ def reset(self) -> None:
72
75
Reset the estimated states to zero.
73
76
74
77
>>> 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)
77
83
>>> adrc.reset()
78
84
>>> adrc.system_output, adrc.system_velocity, adrc.total_disturbance
79
85
(0.0, 0.0, 0.0)
0 commit comments