Piezoelectric materials can be introduced as the additional components into the periodic structures as they can couple the mechanical and electric fields. However, the added mass is always constrained in practical engineering. A method is needed to guide how to posit the piezoelectric materials on the host structure under the mass limit. In this work, we develop a numerical method to determine the best distribution of piezoelectric materials on the host structure in order to control the wave propagation in the periodic structures. This is based on the fact that the propagation properties of the waves in the mechanical field can be regulated by electric impedance shunted to the piezoelectric materials. The coupling strength between the mechanical field and the electric field is quantified by the wave electromechanical coupling factor (WEMCF). It is related to the geometric of the piezoelectric materials only. As the periodic structures are constructed by the identical unit cell, the aim is to design the distribution of the piezoelectric materials on the unit cell. There is no constrain on the shape of piezoelectric materials in the optimized method, only the overall mass is limited. A linear weighing of stress components is proposed as the criterion to determine the priority of locations for piezoelectric materials. In the proposed method, the piezoelectric materials are introduced to the FE model by adding the additional piezoelectric element layers on the host structure. Details for handling polarization direction, electrode connection and the electric circuit parameters selection are also presented. A 1D thin-wall box beam is taken as the application example. Results show that the Bragg band gap can be adjusted to cover the target frequency range under the optimization design with the 10% mass limitation.