Technicians examine the $2 billion Alpha Magnetic Spectrometer instrument in a work stand ahead of its planned launch on NASA's space shuttle Endeavour. The AMS instrument will search for cosmic rays from the International Space Station.

A cutting-edge experiment hunting for antimatter galaxies and signs of dark matter that was very nearly cancelled is finally poised to voyage into orbit aboard the next-to-last space shuttle mission.

The ambitious Alpha Magnetic Spectrometer is a more than 15,000-pound (6,900-kilogram) device searching for cosmic- rays — high-energy charged particles from outer space. The nearly $2 billion experiment will ride up to the International Space Station on the shuttle Endeavour on Friday (April 29).

The instrument will employ a nearly 4,200-pound (1,900 kg) permanent magnet to generate a strong, uniform magnetic field more than 3,000 times more intense than Earth's. This deflects cosmic rays so that a battery of detectors can analyze their properties, such as charge and velocity, and beam their findings to Earth. [Video: Sifting Through the Cosmic Sand for Dark Matter]

But while the Alpha Magnetic Spectrometer promises big discoveries for the field of astrophysics, just getting the instrument on the launch pad has been a challenge.

An artist's concept of the Alpha Magnetic Spectrometer installed on the International Space Station. (Image credit: NASA/MIT)

After the 2003 Columbia shuttle accident, NASA initially cancelled the mission that would deliver the spectrometer to the space station. The mission was reinstated after substantial lobbying from lawmakers and scientists. Last year, engineers replaced the big magnet on the spectrometer with a longer-lasting one to get more science out of the instrument through 2020, the expected end life of the space station. [Photos: Shuttle Endeavour's Last Mission]

"It took 17 years and 600 physicists from 16 countries to get this far — it's been a major international effort," Nobel laureate Samuel Ting, principal investigator for the Alpha Magnetic Spectrometer,told SPACE.com. "We've checked and rechecked everything to make sure it's right. Now we're just waiting to launch it."

The hunt for cosmic rays and antimatter

Cosmic rays can pack up to millions of times more energy than any manmade particle accelerator is capable of. As such, they can reveal details about the universe that no experiment on Earth could. By analyzing cosmic rays, researchers hope the Alpha Magnetic Spectrometer could help solve a number of science's most baffling mysteries, such as whether antimatter galaxies exist and what dark matter is made of.

One of the most perplexing questions in physics is why matter seems to dominate the known cosmos when it should be made of equal parts matter and its mirror image antimatter, and it may be that antimatter does exist in vast amounts in the universe. If the Alpha Magnetic Spectrometer detects anti-helium or heavier antimatter elements, that could be strong proof of antimatter galaxies, as such large bits of antimatter could likely only be made by antimatter stars.

Another enigma is the nature of unseen, as-yet-unidentified dark matter makes up about 85 percent of all matter in the universe, which scientists know exists because of the gravitational effects it has on galaxies. One of the leading candidates for dark matter is a particle known as the neutralino. If neutralinos exist, when they collide with each other, they should give off a large number of high-energy anti-electrons that the Alpha Magnetic Spectrometer can detect.

Besides exploring known mysteries in science, "this is the first time we will study cosmic rays in space over a long duration with very high accuracy, so we're entering a new area where we really do not know what we will find," Ting said.

A $2 billion space experiment is born

The Alpha Magnetic Spectrometer was first conceived by Ting and his colleagues in 1994. The aim is to study cosmic rays in space, as the Earth's atmosphere is a barrier for investigating them on the ground. [Wacky Physics: The Coolest Little Particles in Nature]

Endeavour shuttle commander Mark Kelly, left, and Nobel laureate Sam Ting (principal investigator for the Alpha Magnetic Spectrometer) look over the instrument as it sits in a work stand at NASA's Kennedy Space Center in Florida. Kelly will command the STS-134 mission to take the AMS to the International Space Station. The cutting edge instrument is the brainchild of Ting. (Image credit: NASA/Cory Huston )

"In space, there are two types of particles. One has no charge, namely light rays and neutrinos, and traditionally, over the last century, all our understanding about space has been based on study of these from many, many telescopes in space and on the ground," Ting said. "When it comes to charged particles such as cosmic rays, "because they carry a charge, they must have mass, and because they have mass, they get absorbed in Earth's atmosphere, so you therefore have to got to space to look at them."

Investigating the electrical charge on charged particles requires a magnet. Originally the Alpha Magnetic Spectrometer was going to fly with a superconducting magnet that would last for three years until the liquid helium needed to keep it cool ran out.

"When we tested the superconducting magnet in a thermal vacuum chamber to simulate space, we found it could only be operated for three years before it needed to get its liquid helium refilled, and there's really no way to do so without the space shuttle, which has been terminated," Ting explained.

Rather than have the Alpha Magnetic Spectrometer operate with a superconducting magnet for only three years "and become a museum piece," Ting said, they decided to go with a permanent magnet that actually flew on a 1998 shuttle flight.

Although the permanent magnet is weaker than the superconducting one — essentially making it 30 percent less sensitive — President Barack Obama extended the life of the International Space Station through at least 2020 instead of shutting it down about 2015, effectively granting the experiment six times as much time to collect data, "so you have a tremendous net gain," Ting explained.

Gaining approval for the project has been an uphill battle.

In fact, NASA originally cancelled the shuttle mission to deliver the device to the International Space Station following the 2003 Columbia shuttle disaster. Congress later approved funding for its flight upward.

"Many leading scientists and major political leaders in the Senate and House spoke up for the Alpha Magnetic Spectrometer," Ting said. "The idea is that if building the International Space Station cost $100 billion, there should really be a good science project there."

Follow SPACE.com contributor Charles Q. Choi on Twitter @cqchoi. Visit SPACE.com for the latest in space science and exploration news on Twitter @Spacedotcom and on Facebook.