If you want to derive the transfer function linking the current signature of the buck converter to the current going to the battery, you don't need to include the battery voltage in the calculation:
I gave a working example in my APEC 2017 seminar on EMI filter interaction with switching converters, slide 80. If you want to derive the transfer function linking the injected current of your buck converter to the current injected in the battery, you can use the fast analytical circuits techniques or FACTs as described in my book on the subject. The sketches are shown below and all is done by inspecting the circuits - no equation - so a simple process:
Once you have all the time constants you need, assemble them in a Mathcad sheet and compare the response with a SIMetrix plot:
The interesting result is the one located in the low-side right-corner and it links the high-frequency magnitude with the attenuation you want noted \$A_{filter}\$. The flow is a follows:
- determine the worst-case signature of the buck converter
- extract the fundamental value of the input current \$I_1\$ with an FFT, e.g. 1 A
- determine the ripple current you can accept in the battery, perhaps 15 mA at 10 kHz
- determine the filter attenuation at 10 kHz, 15m/1 = 15m or -36.5 dB
- position the cutoff frequency at \$\sqrt{0.015}\cdot 10k=\$1.2 kHz.
- check the attenuation at 10 kHz with the computed values:
I recommend to include the parasitics like the equivalent series resistors (ESR) of the capacitor and the inductor, \$r_C\$ and \$r_L\$, as they affect the transfer function and can defeat the response in some cases. Once you have the \$C\$ and \$L\$ values, you can complicate their model (in simulation) to include parasitic resonances and approach what you will have on the bench in the end. Watch out then for the interaction between this filter and the downstream converter as detailed in my APEC seminar.