Preferential attachment model with degree bound and its application to key predistribution in WSN