Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to create reactive power capability curve for solar plant in PSS/E?

I am trying to plot solar PV reactive power capability curve. However, I am not get expected. Anyone can share python codes or any useful material for it? Thank you in advance.

How to create reactive power capability curve for solar plant in PSS/E?

I am trying to plot solar PV reactive power capability curve. However, I am not get expected. Anyone can share python codes or any useful material for it? Thank you in advance.

import pssepath pssepath.add_pssepath(35.5) import psspy import dyntools import numpy as np import matplotlib.pyplot as plt psspy.psseinit() import csv

casefile=r"C:\Users\SMIB.sav" psspy.case(casefile)

Set parameters

stepsize = 0.3 # MW increment for active power pmin = 0.0 # Minimum active power (MW) pmax = 3.0 # Maximum active power (MW) voltagetarget = 1.0 # Voltage magnitude at the point of connection (p.u.) inverterbus = 200 # Bus where the solar inverters are connected poibus = 100

Prepare results file

outputfile = "pqcapabilitycurve.csv" with open(outputfile, mode='w', newline='') as file: writer = csv.writer(file) writer.writerow(["P (MW)", "Qmin (MVAR)", "Qmax (MVAR)"])

Loop through active power steps

for p in np.arange(pmin, pmax + stepsize, stepsize): # Set active power output psspy.machinechng2(inverter_bus, "1", realar1=p, realar2=1.8)

# Set voltage at the point of connection
psspy.bus_chng_3(poi_bus, realar1=voltage_target)

# Solve power flow with Q maximized
ierr = psspy.fnsl([0, 0, 0, 1, 1, 0, 99, 0])
if ierr == 0:
    q_max = psspy.busdat(inverter_bus, 'QGEN')[1]
else:
    q_max = None

# Solve power flow with Q minimized
psspy.machine_chng_2(inverter_bus, "1", realar1=p, realar2=-1.8)
ierr = psspy.fnsl([0, 0, 0, 1, 1, 0, 99, 0])
if ierr == 0:
    q_min = psspy.busdat(inverter_bus, 'QGEN')[1]
else:
    q_min = None

# Write results to file
with open(output_file, mode='a', newline='') as file:
    writer = csv.writer(file)
    writer.writerow([p, q_min, q_max])

print(f"P-Q capability curve data saved to {output_file}")

How to create reactive power capability curve for solar plant in PSS/E?

I am trying to plot solar PV reactive power capability curve. However, I am not get expected. Anyone can share python codes or any useful material for it? Thank you in advance.

import pssepath pssepath.add_pssepath(35.5) import psspy import dyntools import numpy as np import matplotlib.pyplot as plt psspy.psseinit() import csv

casefile=r"C:\Users\SMIB.sav" psspy.case(casefile)

Set parameters

stepsize = 0.3 # MW increment for active power pmin = 0.0 # Minimum active power (MW) pmax = 3.0 # Maximum active power (MW) voltagetarget = 1.0 # Voltage magnitude at the point of connection (p.u.) inverterbus = 200 # Bus where the solar inverters are connected poibus = 100

Prepare results file

outputfile = "pqcapabilitycurve.csv" with open(outputfile, mode='w', newline='') as file: writer = csv.writer(file) writer.writerow(["P (MW)", "Qmin (MVAR)", "Qmax (MVAR)"])

Loop through active power steps

for p in np.arange(pmin, pmax + stepsize, stepsize): # Set active power output psspy.machinechng2(inverter_bus, "1", realar1=p, realar2=1.8)

# Set voltage at the point of connection
psspy.bus_chng_3(poi_bus, realar1=voltage_target)

# Solve power flow with Q maximized
ierr = psspy.fnsl([0, 0, 0, 1, 1, 0, 99, 0])
if ierr == 0:
    q_max = psspy.busdat(inverter_bus, 'QGEN')[1]
else:
    q_max = None

# Solve power flow with Q minimized
psspy.machine_chng_2(inverter_bus, "1", realar1=p, realar2=-1.8)
ierr = psspy.fnsl([0, 0, 0, 1, 1, 0, 99, 0])
if ierr == 0:
    q_min = psspy.busdat(inverter_bus, 'QGEN')[1]
else:
    q_min = None

# Write results to file
with open(output_file, mode='a', newline='') as file:
    writer = csv.writer(file)
    writer.writerow([p, q_min, q_max])

print(f"P-Q capability curve data saved to {output_file}")

How to create reactive power capability curve for solar plant in PSS/E?

I am trying to plot solar PV reactive power capability curve. However, I am not get expected. Anyone can share python codes or any useful material for it? I use following codes for it. Thank you in advance.

casefile=r"C:\Users\SMIB.sav" psspy.case(casefile)

Set parameters

stepsize = 0.3 # MW increment for active power pmin = 0.0 # Minimum active power (MW) pmax = 3.0 # Maximum active power (MW) voltagetarget = 1.0 # Voltage magnitude at the point of connection (p.u.) inverterbus = 200 # Bus where the solar inverters are connected poibus = 100

Prepare results file

outputfile = "pqcapabilitycurve.csv" with open(outputfile, mode='w', newline='') as file: writer = csv.writer(file) writer.writerow(["P (MW)", "Qmin (MVAR)", "Qmax (MVAR)"])

Loop through active power steps

for p in np.arange(pmin, pmax + stepsize, stepsize): # Set active power output psspy.machinechng2(inverter_bus, "1", realar1=p, realar2=1.8)

# Set voltage at the point of connection
psspy.bus_chng_3(poi_bus, realar1=voltage_target)

# Solve power flow with Q maximized
ierr = psspy.fnsl([0, 0, 0, 1, 1, 0, 99, 0])
if ierr == 0:
    q_max = psspy.busdat(inverter_bus, 'QGEN')[1]
else:
    q_max = None

# Solve power flow with Q minimized
psspy.machine_chng_2(inverter_bus, "1", realar1=p, realar2=-1.8)
ierr = psspy.fnsl([0, 0, 0, 1, 1, 0, 99, 0])
if ierr == 0:
    q_min = psspy.busdat(inverter_bus, 'QGEN')[1]
else:
    q_min = None

# Write results to file
with open(output_file, mode='a', newline='') as file:
    writer = csv.writer(file)
    writer.writerow([p, q_min, q_max])

print(f"P-Q capability curve data saved to {output_file}")

click to hide/show revision 5
No.5 Revision

How to create reactive power capability curve for solar plant in PSS/E?

I am trying to plot solar PV reactive power capability curve. However, I am not get expected. Anyone can share python codes or any useful material for it? I use following codes for it. Thank you in advance.

casefile=r"C:\Users\SMIB.sav" psspy.case(casefile)

case_file=r"C:\Users\SMIB.sav"
psspy.case(case_file)

# Set parameters

stepsize parameters step_size = 0.3 # MW increment for active power pmin p_min = 0.0 # Minimum active power (MW) pmax p_max = 3.0 # Maximum active power (MW) voltagetarget voltage_target = 1.0 # Voltage magnitude at the point of connection (p.u.) inverterbus inverter_bus = 200 # Bus where the solar inverters are connected poibus = 100

poi_bus = 100 # Prepare results file

outputfile = "pqcapabilitycurve.csv" file output_file = "pq_capability_curve.csv" with open(outputfile, open(output_file, mode='w', newline='') as file: writer = csv.writer(file) writer.writerow(["P (MW)", "Qmin (MVAR)", "Qmax (MVAR)"])

(MVAR)"]) # Loop through active power steps

steps for p in np.arange(pmin, pmax np.arange(p_min, p_max + stepsize, stepsize): step_size, step_size): # Set active power output psspy.machinechng2(inverter_bus, psspy.machine_chng_2(inverter_bus, "1", realar1=p, realar2=1.8)

realar2=1.8)

    # Set voltage at the point of connection
 psspy.bus_chng_3(poi_bus, realar1=voltage_target)

 # Solve power flow with Q maximized
 ierr = psspy.fnsl([0, 0, 0, 1, 1, 0, 99, 0])
 if ierr == 0:
     q_max = psspy.busdat(inverter_bus, 'QGEN')[1]
 else:
     q_max = None

 # Solve power flow with Q minimized
 psspy.machine_chng_2(inverter_bus, "1", realar1=p, realar2=-1.8)
 ierr = psspy.fnsl([0, 0, 0, 1, 1, 0, 99, 0])
 if ierr == 0:
     q_min = psspy.busdat(inverter_bus, 'QGEN')[1]
 else:
     q_min = None

 # Write results to file
 with open(output_file, mode='a', newline='') as file:
     writer = csv.writer(file)
     writer.writerow([p, q_min, q_max])

print(f"P-Q capability curve data saved to {output_file}")

{output_file}")