BOSTON — Gov. Charlie Baker has filed legislation he says will encourage the development of solar energy projects in Massachusetts.

Baker said the bill he filed on Friday will raise existing caps on the state’s “net metering” program that allows homeowners, businesses and local governments to sell excess solar power they generate back to the electrical grid in exchange for credit on their bills.

Activists said 171 communities across the state that have reached the cap and some larger solar projects have stalled without access to the guaranteed revenue.

The Massachusetts Senate recently passed legislation to lift the net-metering caps and direct the Department of Energy Resources to create a new solar incentive program when the state’s 1,600 megawatt goal of installed solar capacity by 2020 is reached.

Baker said his plan will help the state meet that goal well ahead of schedule.

The cap is calculated as a percentage of each utility’s highest historical peak load – the most electricity consumed by their customers at any one time. Private facilities are capped at 4 percent, public facilities at 5 percent in the amount of solar energy available for net metering credits.

Baker would raise those private and public net metering caps two percent each to 6 and 7 percent.

Baker said the increase will provide immediate support for projects being developed in service areas where the caps have already been reached. The bill also gives the Department of Public Utilities the authority to raise the caps further, as needed.

He said the change would provide an additional revenue stream for solar projects.

“Massachusetts continues to boast a nation-leading solar industry, and this legislation will build upon that continued success while ensuring that our state’s solar market remains viable and sustainable for years to come,” Baker said in written statement.

Baker, through a spokesman, had previously distanced himself from calls to lift caps.

Utilities have argued that customers without solar panels are helping foot the bill for those who use net metering.