This section of my web site covers my information about using a small battery to power a scale locomotive, controlled via a radio-frequency-based throttle.
In the late 1800s and early 1900s, model railway locomotives were powered by a clockwork wind-up mechanism. Later, using electricity and a transformer, modelers could power their locomotive by applying the transformer's output to the track. A knob of some kind on the transformer controlled how much voltage was applied to the rail, and therefore controlled the speed of the locomotive. The big disadvantage was when you wanted to run more than one locomotive, because both were controlled by the same track voltage. The only way to control two or more engines independently was by breaking the layout up into electrical blocks, where each block was controlled by a separate transformer, thus allowing the operator to run the train in one block separately from a train in another block. Wiring was complex, and the operator felt more like he/she was operating the layout, rather than the trains.
In the 1960s, thanks to the invention and commonly-available transistor, "Command Control" or "Carrier Control" was created. The idea is to embed a signal into the track power, and each signal is uniquely received by only one engine. Many independent and proprietary systems were invented and sold into the late 1970s.
In the early 1990s, the modernday DCC system was standardized by the NMRA, allowing the modeler to pick and choose components to fit their system, controlling his/her engine independently.
However, regardless of which system you use to control your locomotives, the fundamental fact remains that the locomotives must pick up electricity from the rails upon which they run (two-rail or three-rail systems). Some systems use radio frequency to control the behavior of the locomotive, but, still, the engine picks up its power from the rails.
To be able to control a specific locomotive on your layout, you must be able to communicate with it and single it out from the rest of the engines on your layout. Modernday control systems use an embedded signal in the electricity sent via the rails to the engines. All engines receive the same electricity and signals, but a small printed-circuit board in the locomotive can be programmed to ignore all the signals except the ones intended for its use. This board is called a decoder, because it "decodes" the signal from the track and only processes that which is intended for its use. A decoder is assigned an "address" (much like your house is assigned a street address, so that the mail man can deliver mail only intended for you). This address is typically a number. Most decoders are pre-programmed with the default value of "3", but that number can be easily changed. Most modelers will use the number on the engine as the address, or use the last two digits of that number, if they don't have too many engines.
The advent of radio frequency communications allows for signals intended for a specific locomotive to be sent through the air to the decoder in the locomotive. To be able to receive that signal, the locomotive must be equipped with an additional printed-circuit board called a "receiver". If the control signal is sent via the rails, such a board is not needed. However, to start the process of moving away from getting information from the rails, the receiver is necessary. This works in the same way that a television's remote control works. It sends your command from the remote control through the air to a receiver built into the television, which then interprets the signal/command and does the appropriate thing. Television remote controls use infrared signals to communicate with the television (which requires line-of-sight), but for model railroading that can be impractical, so we use radio-frequency communication, which does not require that you aim the throttle at the engine you are controlling. Infrared is cheaper and easier to manufacture, but you can imagine if your locomotive is inside of a tunnel and you need to stop it quickly; line-of-sight will not work in a tunnel; radio-frequency will.
So, radio-frequency-based communication will remove the need to embed the control signal in the rail, and you can hold the throttle any way you want to. There is an upper limit to the distance such a signal can be communicated to the engine, and materials such as metal can interfere with the signal. However, most people nowadays walk with their locomotives as they operate their layout, so that is not a problem. Even if you prefer a central control panel, the distance is usually well within the size of most home layouts.
As described above, regardless of which control system you may have used in the past or are currently using, they all rely on getting the electricity, used to move the locomotive, from the rails. If the rails, the wheels, or the contact strip inside the locomotive are dirty or corroded, electricity will not flow. If a piece of rail doesn't have a wire or a rail joiner connected to it to send it the electricity, or if the wire has eventually worked itself loose, this can also lead to electrical-continuity problems. Either way, the engine will stammer or stop. If the locomotive has enough momentum, it might, mechanically, move itself past a dirty spot on the track and thus be able to pick up the electricity again to keep running. In the past this was acceptable, however, with today's DCC and sound-equipped locomotives, it is very noticeable, in that the locomotive's sound all of a sudden stops and starts over again. Very annoying. Lately, companies have been coming out with an extra part or circuit board that you can install that will store some electricity to keep the system "on" when such a power loss occurs. A "super capacitor" or a "stay-alive" circuit board will help.
However, if you have your locomotive completely powered by a rechargeable battery, none of that will be needed, and the cleanliness of your layout's track or your locomotive's wheels is of little or no concern. Due to the size of battery needed to power model locomotives, this technology was first implemented in the large garden-gauge locomotives. However, with the advent of small cell phones, and the continuous improvement and miniaturization of cell phones, batteries have gotten smaller and more powerful over the years. They can now be easily installed in O-, S-, HO-, and even some N-scale locomotives.
If you can imagine your locomotive carrying its own supply of electricity, you can visualize your layout without the need for complicated wiring for such special track work as turnouts, crossings, reversing loops, and turntables. Depending on your needs, you might even be able to go as far as not having any electricity hooked up to your track work at all! Imagine the time you can save by completely skipping, or significantly simplifying, the wiring phase of your layout's construction!
(external link: How Li-Po Batteries Are Made)