Submarine
The United States also used hydrogen peroxide in an experimental midget submarine, X-1. It was originally powered by a hydrogen peroxide/diesel engine and battery system until an explosion of her hydrogen peroxide supply on 20 May 1957. X-1 was later converted to use diesel–electric drive.
Today several navies use air-independent propulsion. Notably Sweden uses Stirling technology on the Gotland-class and Södermanland-class submarines. The Stirling engine is heated by burning diesel fuel with liquid oxygen from cryogenic tanks. A newer development in air-independent propulsion is hydrogen fuel cells, first used on the German Type 212 submarine, with nine 34 kW or two 120 kW cells. Fuel cells are also used in the new Spanish S-80-class submarines although with the fuel stored as ethanol and then converted into hydrogen before use.
One new technology that is being introduced starting with the Japanese Navy's eleventh Sōryū-class submarine (JS Ōryū) is a more modern battery, the lithium-ion battery. These batteries have about double the electric storage of traditional batteries, and by changing out the lead-acid batteries in their normal storage areas plus filling up the large hull space normally devoted to AIP engine and fuel tanks with many tons of lithium-ion batteries, modern submarines can actually return to a "pure" diesel–electric configuration yet have the added underwater range and power normally associated with AIP equipped submarines.

Nuclear power: Steam power was resurrected in the 1950s with a nuclear-powered steam turbine driving a generator. By eliminating the need for atmospheric oxygen, the time that a submarine could remain submerged was limited only by its food stores, as breathing air was recycled and fresh water distilled from seawater. More importantly, a nuclear submarine has unlimited range at top speed. This allows it to travel from its operating base to the combat zone in a much shorter time and makes it a far more difficult target for most anti-submarine weapons. Nuclear-powered submarines have a relatively small battery and diesel engine/generator powerplant for emergency use if the reactors must be shut down.
Nuclear power is now used in all large submarines, but due to the high cost and large size of nuclear reactors, smaller submarines still use diesel–electric propulsion. The ratio of larger to smaller submarines depends on strategic needs. The US Navy, French Navy, and the British Royal Navy operate only nuclear submarines, which is explained by the need for distant operations. Other major operators rely on a mix of nuclear submarines for strategic purposes and diesel–electric submarines for defense. Most fleets have no nuclear submarines, due to the limited availability of nuclear power and submarine technology.
Diesel–electric submarines have a stealth advantage over their nuclear counterparts. Nuclear submarines generate noise from coolant pumps and turbo-machinery needed to operate the reactor, even at low power levels. Some nuclear submarines such as the American Ohio class can operate with their reactor coolant pumps secured, making them quieter than electric subs. A conventional submarine operating on batteries is almost completely silent, the only noise coming from the shaft bearings, propeller, and flow noise around the hull, all of which stops when the sub hovers in mid-water to listen, leaving only the noise from crew activity. Commercial submarines usually rely only on batteries, since they operate in conjunction with a mother ship.
Several serious nuclear and radiation accidents have involved nuclear submarine mishaps. The Soviet submarine K-19 reactor accident in 1961 resulted in 8 deaths and more than 30 other people were over-exposed to radiation. The Soviet submarine K-27 reactor accident in 1968 resulted in 9 fatalities and 83 other injuries. The Soviet submarine K-431 accident in 1985 resulted in 10 fatalities and 49 other radiation injuries.

Alternative: Oil-fired steam turbines powered the British K-class submarines, built during World War I and later, to give them the surface speed to keep up with the battle fleet. The K-class subs were not very successful, however.
Toward the end of the 20th century, some submarines—such as the British Vanguard class—began to be fitted with pump-jet propulsors instead of propellers. Though these are heavier, more expensive, and less efficient than a propeller, they are significantly quieter, providing an important tactical advantage.

Armament: The success of the submarine is inextricably linked to the development of the torpedo, invented by Robert Whitehead in 1866. His invention (essentially the same now as it was 140 years ago), allowed the submarine make the leap from novelty to a weapon of war. Prior to the development and miniaturization of sonar sensitive enough to track a submerged submarine, attacks were exclusively restricted to ships and submarines operating near or at the surface. Targeting of unguided torpedoes was initially done by eye, but by World War II analog targeting computers began to proliferate, being able to calculate basic firing solutions. Nonetheless, multiple "straight-running" torpedoes could be required to ensure a target was hit. With at most 20 to 25 torpedoes stored on board, the number of attacks a submarine could make was limited. To increase combat endurance starting in World War I submarines also functioned as submersible gunboats, using their deck guns against unarmed targets, and diving to escape and engage enemy warships. The initial importance of these deck guns encouraged the development of the unsuccessful Submarine Cruiser such as the French Surcouf and the Royal Navy's X1 and M-class submarines. With the arrival of anti-submarine warfare (ASW) aircraft, guns became more for defense than attack. A more practical method of increasing combat endurance was the external torpedo tube, loaded only in port.
The ability of submarines to approach enemy harbours covertly led to their use as minelayers. Minelaying submarines of World War I and World War II were specially built for that purpose. Modern submarine-laid mines, such as the British Mark 5 Stonefish and Mark 6 Sea Urchin, can be deployed from a submarine's torpedo tubes.
After World War II, both the US and the USSR experimented with submarine-launched cruise missiles such as the SSM-N-8 Regulus and P-5 Pyatyorka. Such missiles required the submarine to surface to fire its missiles. They were the forerunners of modern submarine-launched cruise missiles, which can be fired from the torpedo tubes of submerged submarines, for example, the US BGM-109 Tomahawk and Russian RPK-2 Viyuga and versions of surface-to-surface anti-ship missiles such as the Exocet and Harpoon, encapsulated for submarine launch. Ballistic missiles can also be fired from a submarine's torpedo tubes, for example, missiles such as the anti-submarine SUBROC. With internal volume as limited as ever and the desire to carry heavier warloads, the idea of the external launch tube was revived, usually for encapsulated missiles, with such tubes being placed between the internal pressure and outer streamlined hulls. Guided torpedoes also proliferated extensively during and after World War II, even further increasing the combat endurance and lethality of submarines and allowing them to engage other submarines at depth (with the latter now being one of the primary missions of the modern attack submarine).
The strategic mission of the SSM-N-8 and the P-5 was taken up by submarine-launched ballistic missile beginning with the US Navy's Polaris missile, and subsequently the Poseidon and Trident missiles.
Germany is working on the torpedo tube-launched short-range IDAS missile, which can be used against ASW helicopters, as well as surface ships and coastal targets.

Sensors: A submarine can have a variety of sensors, depending on its missions. Modern military submarines rely almost entirely on a suite of passive and active sonars to locate targets. Active sonar relies on an audible "ping" to generate echoes to reveal objects around the submarine. Active systems are rarely used, as doing so reveals the sub's presence. Passive sonar is a set of sensitive hydrophones set into the hull or trailed in a towed array, normally trailing several hundred feet behind the sub. The towed array is the mainstay of NATO submarine detection systems, as it reduces the flow noise heard by operators. Hull mounted sonar is employed in addition to the towed array, as the towed array can not work in shallow depth and during maneuvering. In addition, sonar has a blind spot "through" the submarine, so a system on both the front and back works to eliminate that problem. As the towed array trails behind and below the submarine, it also allows the submarine to have a system both above and below the thermocline at the proper depth; sound passing through the thermocline is distorted resulting in a lower detection range.
Submarines also carry radar equipment to detect surface ships and aircraft. Submarine captains are more likely to use radar detection gear than active radar to detect targets, as radar can be detected far beyond its own return range, revealing the submarine. Periscopes are rarely used, except for position fixes and to verify a contact's identity.
Civilian submarines, such as the DSV Alvin or the Russian Mir submersibles, rely on small active sonar sets and viewing ports to navigate. The human eye cannot detect sunlight below about 300 feet (91 m) underwater, so high intensity lights are used to illuminate the viewing area.

Navigation: Early submarines had few navigation aids, but modern subs have a variety of navigation systems. Modern military submarines use an inertial guidance system for navigation while submerged, but drift error unavoidably builds over time.