#!/usr/bin/env python3 import numpy as np iout_max = 0.5 # A vout_min = 1.5 # V vout_max = 12.0 # V vin_min = 5.0 # V vin_max = 12.0 # V K = 0.4 # factor fsw = 1200e3 # Hz vin_max = vin_min = 12 vout_max = vout_min = 4 L_max = (vin_max - vout_min) / (fsw * K * iout_max) * vout_max / vin_max dI_L = vout_max / vin_max * (vin_max - vout_min) / (L_max * fsw) I_L_peak = iout_max + dI_L / 2 I_L_rms = np.sqrt(iout_max**2 + dI_L**2 / 12) print(f"ΔI_l = {dI_L*1e3:7.3f} mA") print(f"L(max) = {L_max*1e6:7.3f} μH") print(f"I_L_peak = {I_L_peak*1e3:7.3f} mA") print(f"I_L_rms = {I_L_rms*1e3:7.3f} mA")