Simulink battery model with buck converter
By its very nature, the current a switching regulator draws is pulsed.  You can't change that.

If you want to keep that pulsed current from disturbing other parts of your circuit, then you need to use a filter.

The idea with the capacitor was good, but you didn't quite do it right.

What you did was this (where U1 represents your switching regulator:)







simulate this circuit &ndash; Schematic created using CircuitLab

No matter how large a capacitor you use for C1, you will still be measuring the pulses that the switching regulator draws.

What you needed was this:







simulate this circuit

This will filter out the pulses from the switching regulator so that AM1 (ampere meter) will measure a smooth current flow.  VM1 (voltage meter) will also show a steady voltage - more to the point, it will show a voltage that slowly changes in response to changes in the load.

Values for Rf and Cf depend on the following:


Switching frequency
Load


Any low pass filter calculator on the internet can help you figure Rf and Cf - but, those assume that the load is pretty much zero (open circuit.)

You would choose Rf to be much lower than RL (preferably like 1/10 of RL.)  Then you decide the cutoff of the filter.  Since you are using 10kHz as the switching frequency, a cutoff of 1kHz would be a good starting point.

Now, take Rf and the cutoff frequency and use a low pass filter calculator (like this one) to calculate the needed capacitance.

Put the values that you calculate for R and C into Rf and Cf and see how well it cleans up the pulses at AM1.

For a load of 10 ohms (as in your example,) I took Rf = 1 ohm and the cutoff as 1 kHz.  I came up with 160µF.

I didn't simulate it because I don't feel like trying to duplicate your switching circuit using the simulator here on the site.

It shouldn't be too difficult for you to modify your simulated circuit, though.  It's really just adding a couple of passive parts in the right place - and being sure you are measuring what you meant to measure.



I am not an electrical engineer.  The suggestions are pretty much just "eyeballed" (I took numbers that seemed like they ought to fit.)

Try it out.  If it helps (and it should,) then you could ask another question about how to properly calculate the filter and dimension the parts so that it works well.