Battery theory