Stochastic Modeling and Analysis for Environmentally Powered Wireless Sensor Nodes