Text this: Design of a Grid-Connected Battery Energy Storage System for Active Power Injection and Reactive Power Compensation