Trains have a romantic attachment to America’s past. From the building of the first transcontinental railroad, to the thousands of towns that sprung up at important track junctures, trains were an essential part of the development of the country. Today, more freight than ever is moved by rail, as trains more than a mile long pull thousands of tons of raw materials and finished products across the country. While today’s trains may not look that different from those that ran down the same tracks two decades ago, technology has played a remarkable role in making rail transport more efficient and safer than ever before.

According to Department of Transportation statistics, rail freight shipments are projected to increase by 41 percent by 2040. In anticipation of this growth, railroad companies across the country have been making significant reinvestments in their rail systems, spending around $100 billion in just the last four years.

“America is home to the greatest freight rail network in the world, and we are putting technology to work to keep it that way,” said Association of American Railroads (AAR) President and CEO Edward R. Hamberger. “Next-generation innovations like drones, lasers and automated technologies are revolutionizing how we run a railroad.”

A new report issued by AAR shows how railroads are using cutting technology to better maintain and monitor both their trains and the tracks they run on. America has about 40,000 locomotives and more than 1.6 million railcars operating on 140,000-miles of rail. This is a lot to monitor at any given time. As a result, the industry has been turning more and more to technology to find ways to increase fuel efficiency, monitor wear on tracks and trains, and to better target areas of preventative maintenance.

“Technological advances, combined with ongoing private investment, uniquely position the freight rail industry to meet the most significant transportation challenges of the 21st century,” the AAR wrote in its report.

Railroads routinely use ultrasound technology to scan their rails in search of potential flaws in the metal which are then marked for replacement. They also use ground-penetrating radar to assess the condition of the ballast placed underneath the rails. Since 2008, mainline track accidents have dropped by 50 percent, in large part due to these and similar changes. The present accident rate is now at an all-time low.

However, the rails are only part of the equation when it comes to train safety. Just as important is the condition of the trains themselves. As sensors and even drones have become less expensive, railroads have also adopted them as a means of cheaply monitoring the condition of wheels, brakes, and axles as trains rush past. The use of machine imaging and scanning has advantages over the previous inspection system, which relied on people and was subject to human error.

The investments American railroads have made in technology have paid off in terms of fuel efficiency and reduced accident rates. According to the AAR report, over the last decade, the mainline train accident rate has fallen 32 percent. Railroads also doubled their average miles per gallon between 1980 and 2017, moving one ton of freight an average of 479 miles per gallon of fuel and increasing rail traffic 84 percent. All this occurred as overall tonnage hauled by rail also increased and emissions decreased.

As railroads update their existing fleets of diesel locomotives to “Tier 4” machines, which have even more advanced sensors and fuel efficiency programs, emissions are expected to drop even further–perhaps by as much as 90 percent, including a reduction of nitrogen oxide emissions by 80 percent.

“Railroads move approximately one-third of all U.S. exports and intercity freight volume in the United States,” the report says. “Despite the large volume of freight moved, U.S. EPA data show freight railroads only account for 0.5% of total U.S. greenhouse gas emissions and just 2.0% of emissions from transportation-related sources.”

The idea of moving freight by rail may not be novel. That doesn’t mean that today’s railroads are not in a permanent state of innovation, always looking for ways to move more cargo more efficiently and more safely.

“This 200-year-old industry is poised to meet the challenges of tomorrow,” added Hamberger. “Building on the technology of today, such as Positive Train Control and Big Data analytics, the industry will continue to do what it has always done for the American economy – deliver.”

Follow Erin on Twitter.