Measurement of internal resistance of a battery

I found two circuits online of almost same approach to measure internal resistance of a battery. Both the methods excite the battery at 50Hz using a square wave and AC voltage drop is measured across the battery (as per my understanding). And apparently, this voltage drop corresponds to the internal resistance of the battery

In the method 1, it is mentioned that the voltage measured divided by 10 gives the internal resistance of the battery. And method 2 says, the internal resistance is 10 times the voltage measured. I request someone to please breakdown why it is so? What's happening in these circuits and what is the difference between them? And how reliable are these methods?

First one, of we assume the 18A is accurate, the peak-to-peak voltage is 18mV/m$$\\Omega\$$, average is half of that. An average-reading multimeter (not a true-RMS type) will read about 11% (just $$\\pi\$$/$$\\sqrt{8}\$$) high so you’ll get about 10mV/m$$\\Omega\$$. Divide the reading in mV by 10 to get m$$\\Omega\$$. Whether the 18A is accurate depends on the actual resistance and battery voltage and presumes the battery is not loaded too much.

The second one uses about 1/100 the current variation (170mA rather than 18A), uses an actual current sink rather than simple resistors (so the battery voltage does not matter as much). Same idea so you get about 100mV per ohm reading on the DMM. Multiply voltage reading by 10 to get ohms. They also preload the battery, which the first circuit does not do. simulate this circuit – Schematic created using CircuitLab

It's important to note that the DMM on VAC mode is expected to block the DC voltage coming from the battery and display only the average value of the measured square wave variation, adjusted upward by 11.1% as a meter characteristic. In other words in the idealized circuit shown above the voltage reading is identical to what you would measure if you could apply a meter directly across the internal resistance.

In practice the lead resistance and contact resistance could add to the reading, which is why they tell you to measure the voltage directly at the battery terminals not at the clips or at the circuit. This is a type of 4-wire AC resistance measurement, and is vitally important if you want accurate readings of low resistances.

Batteries are ornery creatures, and the internal resistance will vary with state of charge, with loading due to polarization effects, and with temperature (including self-heating), and probably a bunch of other factors.

The internal resistance of a battery is generally calculated from its open circuit voltage Vo, load voltage Vl, and the load resistance Rl:

Ri = (Vo/Vl - 1) * Rl.

It's that simple and you can manually make such a circuit easy.

There can be many alternate methods but in a general sense the easiest one is usually recommended.

Some basic info with example can be seen here.