Commit 340579a3 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Fixes bug in _compute_tx_volt

Showing with 1 addition and 1 deletion
+1 -1
......@@ -511,7 +511,6 @@ class OhmPiHardware:
# ax.plot([0, vab_max], [0, vmn_upper_bound * vab_max / vab[k]], '-r', alpha=(k + 1) / n_steps)
# ax.plot([0, vab_max], [0, vmn_lower_bound * vab_max / vab[k]], '-g', alpha=(k + 1) / n_steps)
# bounds on rab
print(f'rab_lb: {vab_list[k] / iab_upper_bound}')
rab_lower_bound = np.max([0.1, np.abs(vab_list[k] / iab_upper_bound)])
rab_upper_bound = np.max([0.1, np.abs(vab_list[k] / iab_lower_bound)])
# bounds on r
......@@ -540,6 +539,7 @@ class OhmPiHardware:
print('stopped on maximum number of steps reached')
k = k + 1
vab_list[k] = np.min(vabs)
time.sleep(0.5)
vab_opt = vab_list[k]
print(f'Selected Vab: {vab_opt:.2f}')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment