  Based on the locality principle of insulating superlattices, we apply the
method of Wu {\it et al} [Phys. Rev. Letter {\bf 101}, 087610 (2008)] to the
piezoelectric strains of individual layers under fixed displacement field. For
a superlattice of arbitrary stacking sequence an accurate model is acquired for
predicting piezoelectricity. By applying the model in the superlattices where
ferroelectric and antiferrodistortive modes are in competition, functional
piezoelectricity can be achieved. A strong nonlinear effect is observed and can
be further engineered in the PbTiO$_3$/SrTiO$_3$ superlattice and an interface
enhancement of piezoelectricity is found in the BaTiO$_3$/CaTiO$_3$
superlattice.
