Skip to content

Commit 4f55931

Browse files
committed
cleaning
1 parent d853bed commit 4f55931

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

edg/abstract_parts/AbstractPowerConverters.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ class Values(NamedTuple):
210210
input_capacitance: Range
211211
output_capacitance: Range
212212

213+
inductor_avg_current: Range
213214
ripple_scale: float # divide this by inductance to get the inductor ripple current
214215
output_capacitance_scale: float # multiply inductor ripple by this to get required output capacitance
215216

@@ -279,6 +280,7 @@ def _calculate_parameters(cls, input_voltage: Range, output_voltage: Range, freq
279280

280281
return cls.Values(dutycycle=dutycycle, inductance=inductance,
281282
input_capacitance=input_capacitance, output_capacitance=output_capacitance,
283+
inductor_avg_current=output_current,
282284
ripple_scale=inductance_scale, output_capacitance_scale=output_capacitance_scale,
283285
inductor_peak_currents=inductor_peak_currents,
284286
effective_dutycycle=effective_dutycycle)
@@ -375,7 +377,7 @@ def generate(self) -> None:
375377
current=self.output_current, # min-bound only, the real filter happens in the filter_fn
376378
frequency=self.frequency,
377379
experimental_filter_fn=ExperimentalUserFnPartsTable.serialize_fn(
378-
self._buck_inductor_filter, self.get(self.output_current).upper, values.ripple_scale)
380+
self._buck_inductor_filter, values.inductor_avg_current, values.ripple_scale)
379381
))
380382
self.assign(self.actual_inductor_current_ripple, values.ripple_scale / self.inductor.actual_inductance)
381383

@@ -444,8 +446,8 @@ class Values(NamedTuple):
444446
input_capacitance: Range
445447
output_capacitance: Range
446448

447-
ripple_scale: float # divide this by inductance to get the inductor ripple current
448449
inductor_avg_current: Range
450+
ripple_scale: float # divide this by inductance to get the inductor ripple current
449451

450452
inductor_peak_currents: Range # based on the worst case input spec, for unit testing
451453
effective_dutycycle: Range

0 commit comments

Comments
 (0)