charge injection calculation