Trying to find a place to park downtown is often pretty hard. With too many cars chasing too few parking spaces, the result is too much congestion and pollution, not to mention the aggravation that goes with finding a place to park. As much as 30 percent of downtown traffic can be attributed to drivers circling streets in search of a spot, according to the International Parking Institute.

Parking garages help, but they're expensive. They can cost anywhere from $20,000 to $50,000 per parking space, based on development and construction costs, and are usually subsidized, so drivers never pay the true cost to park, according to Norman Garrick, a professor of civil and environmental engineering at the University of Connecticut.

Some cities are beginning to install sensors that detect when a space is vacant, so that drivers with a smartphone can find out where and when they can park. But the technology is just beginning to emerge and does nothing to reduce the large amount of downtown land that must be reserved for parking spaces.

That’s why the solution to downtown parking woes may be something far more ambitious.

The city of Somerville, Mass., and Audi, the German carmaker, have signed an agreement to not only create self-driving cars that park themselves but also build the infrastructure that such a technology would require (and allow). It could save the city as much as $100 million, according to Audi.

The concept could benefit a city in several ways.

First, self-driving cars need less room to self-park, making it possible to squeeze more cars into a garage -- up to 60 percent more, according to Audi. Second, parking garages would no longer have to be located downtown -- drivers and their passengers could exit the vehicles in the city and the cars would self-drive to the garages on the downtown’s periphery. Third, with garages capable of storing more cars, cities wouldn’t need to devote so much space for curbside parking, freeing up valuable land for public transit, pedestrians and bicyclists, and reducing the congestion that comes from drivers searching for a place to park.

Somerville, which is located just a few minutes from downtown Boston, is New England’s most densely populated city, with 78,000 people packed into little more than 4 square miles. Congestion has become such a problem that the city has set a goal of shifting 50 percent of vehicle trips to either biking or public transit.

“But we recognized the fact that the automobile has a role to play as well." said Mayor Joseph Curtatone.

The self-parking project, set to begin testing in 2018, will take place in an area known as Assembly Row, a former industrial district that the city hopes to transform into residences, offices, retail space, leisure amenities and a hotel. Currently, around 40 percent of the area within the Assembly Row project is dedicated to parking spaces. A garage that allows cars to self-park could save 26 percent of parking spaces for other uses, according to Audi, which calculates that each space is worth $25,000, or approximately $100 million in total savings by the time the project is completed in 2030.

Self-driving technology can park a car so precisely that lanes with a width of three meters are adequate, leaving just 10 centimeters of space between the mirrors of parked cars, according to Audi. By packing more cars into less space, the company says that the amount of parking can be reduced by as much as 60 to 80 percent in some cases.

Will it work?

The technology that can guide a self-driving car into the tight confines of a “smart” parking garage exists, but even after the testing that will take place in Somerville, it will be years before cities could see a noticeable impact on downtown congestion along with the conversion of curbside parking into other uses.

But Curtatone argues that innovation doesn’t happen when the technology has already been tested and proven. It has to start now, he said, if you want to tackle problems around congestion and mobility before they become too costly to fix.

And innovation, he argues, is going to happen in cities -- not at the state or national level.

“Cities have been the innovators, the change agents, when it comes to mobility and sustainability,” he said, adding that “this is more than how we’re going to drive, move and park, but how we’re going to live as a society.”