Text this: Optimizing Renewable Energy Integration in Weak Grids withUPQC Controller