Energy storage element charging formula