I assume that you are asking how to take the 15.27V to 12.64V declining supply and to produce an efficient steady 12V out.
Solution Summary:
Use a proper battery box - the voltage drop you are seeing is completely unacceptable.
For testing the drop across the battery contacts form part of the load, which is OK, BUT as it obscures the battery voltage due to battery to contact voltage drops it causes measurement problems.
Proper charging
Your stated charging voltage of 15 Volt is too low. You need just under 18V to fully charge 12 x NimH in series. If you really only have 15V then the batteries will never fully charge and you will not get the full 2000 mAh/cell.
As you state that the starting loaded battery voltage is > 15V the charger MUST be > 15V max - measure it and determine how it changes with load.
Use a constant current load for testing. See below for details.
An LM317 and one resistor will provide this.
Check battery capacity is genuine.
Many batteries do not provide the claimed capacity.
Use a Buck converter.
A buck converter can add maybe 10 to 15% more run time after everything else is sorted out but is pointless until you fix the other major issues.
The most efficient way of converting a varying battery voltage to a lower output voltage is to use a buck converter.
BUT your figures suggest that there is "summat aglae" - something is very wrong indeed.
30 ohms load at 15V or less Vout should give 500 mA max.
2000 mAh / 500 mA = 4 hours.
Discharge rate is ` 500 mA/2000 mAh = C/4
At that level a NimH cell should be at an average of 1.15V or so and fairly flat across most of its range.
Where you measure end point of the battery depends very much where you measure the voltage. As you have such a terrible battery holder (dropping about 5V at 500 mA !!!) you should consider this part of the load and measure the voltage at the battery.
If you consider end point to be 1V/cell you should get about 4 hours down to 12V measured at the battery. As the battery contacts are interleaved with the batteries it is hard to tell which is load and which is holder loss and which is battery voltage etc.
The battery holder is a major issue - fix or replace it!
You report
15.27 / 12 = 1.27 V/cell initial
14.39 /12 = 1.2 V/cell at 1 hour
12.64 /12 = 1.05 V/cell at 2 hours
Regardless of the reasonableness of these with time, lets look at the conversion efficiency they represent with a linear regulator.
12/15.27 = 78.6%
12/14.39 = 83.4%
12/12.64 = 94.9%
You can easily get better than 78% with a buch regulator
You can get better than 83% with only moderate care.
You can get beter than 95% only with much effort and care.
So, the start mid and end point voltages are such that a buck regulator will help.
BUT if the buck regulator gives 95% out and you would otherwise average 85% it will extend time by only about 95/85 = about 12% more.
Whereas, fixing your battery box and wiring will double the run time.
That's assuming that the batteries really are giving 2000 mAh. That's something yo need to check.
A constant current load can very easily be arranged using an LM317.
Connect an R = V/I = 1.25V/500 mA =~ 2.5 ohm resistor from Vadj to Vout.
Voltage into Vin
Output from Vadj (NOT from Vout).
Yoi now have a constant current load that allows much more consistent testing.
Note that charging 12 batteries in series will require attention to balancing. Without this you are almost certain to get imbalance problems so that one or two cells fully discharge first under load leading to early failure.
Your reported charging voltage is too low.
NimH cells need about 1.45V each to fully charge.
12 x 1.45V = 17.4V= say 18V
If your voltage source used for charging does not reach 18V open circuit then your cells are not getting a full charge.
Your reported voltage of 15V/12 = 1.25V/cell is too low.
Change this to 18V and you may get 2 x the result.
As a test, charge the batteries in a commercial charger and see what results you get.
You should use DC-DC converters or dedicated battery packs for every voltage.
You should not use middle points of battery packs. This lead to different charge levels in cells. As a result you'll get an inverse voltage on cells which are discharged first and this will damage the battery and possibly the equipment.
Schematic below shows this.
Inverse voltage is appearing when one of the sells in a battery is completely discharged thus have no voltage across it. If other cells continue to deliver the power, current will still flow thus 'charging' the dead cell with negative voltage.
Load connected to the dead cell this way get reverse polarity supply voltage, thus, possibly, die.
simulate this circuit – Schematic created using CircuitLab
Most optimal (if you do not want to use other voltage rated devices) I think is to supply the most powerful device (6V headlight) directly and use step-up/step-down converters for all others.
Best Answer
Your discharge rate is too high.
You are drawing 10A from a 5000mAh battery. Most NiMh batteries are rated for discharge at a fraction of the mAh rating. The ones I used to work with were rated for discharge at .2 times the mAh rating. So, your battery pack shouldn't be discharged at more than 1A by the rules I used to work with.
When discharged at too high a rate, NiMh batteries go bad. The internal resistance increases everytime you discharge the battery too fast. That increase in internal resistance is permanent. Eventually, the internal resistance will be so high that you can't make effective use of the battery.
The battery still has its full capacity. If you slowly discharge a NiMh battery whose internal resistance has gone up due to mishandling, you will measure near its rated capacity. If you try to pull a higher current, though, the voltage will drop. This is the effect you are seeing.
The only fix that I know of is replacing the damaged cells
Back in the mid 1990s, Motorola brought out the Visor model portable two way radio. It was a fist sized radio capable of transmitting at 5Watts - the first radio that small to be that powerful.
The Visor was delivered with a 600mAh NiMh battery.
The company I worked for sold hundreds of the things. Everybody loved them - until the batteries started dieing.
Motorola replaced the 600mAh batteries with some "improved" batteries that delivered about 700mAh in the same physical size.
These died even faster than the originals.
We investigated, and found that typical battery analysers would give the "dead" batteries a clean bill of health. According to them, the batteries were fine.
The radios, however, would shut down and restart if the bad batteries were used.
I tested them with a rig I built out of a DAQ, LabView, and a current shunt, and found that the internal resistance of the batteries was ridiculously high. This made it impossible to draw high current from the bad batteries.
More investigation turned up the recommendation from the NiMh cell manufacturer to never discharge them at more than 0.2 of the rated capacity.
The Visor drew about 2A when transmitting at 5W. That's like 20 times the manufacturer's suggested maximum.
The solution was to use the optional high capacity battery for 5Watt operation, or just replace the small batteries when they died - most of our customers needed high power and small size, so they just budgeted for a LOT of replacements.
The company I worked for back then had good contact with Cadex. At our request, they added an internal resistance test for NiMh batteries to the C7000 so that we had a quick pass/fail for checking the batteries. That feature is still in the C7000 to this day.
I actually tested several batteries to destruction by simulating typical usage patterns. I ran the simulation at 5W with the 600mAh batteries, and they died. The same test at 1W didn't kill the 600mAh batteries. The larger batteries all survived the 5W tests.