A Modeling and Optimization Scheme for Battery Driven Small Size Electronic Systems