The sucker‐rod pumping (SRP) system is the most used artificial lift method in oil wells in Brazil and in the world. This method stands out for its simplicity and low cost in investments and maintenance, and can be operated in a large range of flow rates, with fluids of different compositions and viscosities. However, the SRP units as well as all other mechanical equipment require periodic adjustments and maintenance, whether corrective or preventive. Two important procedures commonly made at the SRP units are the adjustment for counterbalancing the pumping unit and the adjustment of the polished rod stroke length. Performing these procedures requires stopping the production of the well. Usually, such adjustment procedures are made manually by a work team that is transported to the place where the pumping unit is located. In this context, Petrobras in partnership with Federal University of Rio Grande do Norte and other companies developed a new type of pumping unit, called smart sucker rod pump (SSRP), which is capable of counterbalancing the unit and adjusting the polished rod stroke length without mobilizing a team to go to the field. Thus, this work proposes to develop a strategy to automatically control the SSRP. The development of this strategy aims to ensure that the equipment operates under proper conditions and within its safety limits (previously set by the operator), as well as to optimize the well production. In order to test the control strategy developed for the SSRP, simulations were performed using synthetic wells. It was observed that the developing strategy reached the proposed goals for which it was developed; that is, to keep the parameters of the SSRP within the limits set by the operator and optimize the production flow rate.