Inverters in a power station (PS) may have different control algorithms and be made by different manufactures. To ensure small-signal stability at different equilibrium points, systematic analyses and design are required. However, analytical small-signal models of each inverter are not available to the PS operator due to intellectual property (IP), which hinders the stability analysis and improvement. To overcome this problem, firstly, a gradient-based black-box modeling technique of the inverter is proposed. The gradient-based black-box model should be provided by the manufactures. Based on it, an optimization method is proposed to improve the stability margin of the PS, which should be completed by the PS operator. Under the given work-flow, the IP rights would not be infringed.