Adaptive Power Management for Environmentally Powered Systems