First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

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

asked Jan 6 '5

Tayab gravatar image

updated Jan 8 '5

jconto gravatar image

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.

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

# Set parameters
step_size = 0.3  # MW increment for active power
p_min = 0.0      # Minimum active power (MW)
p_max = 3.0    # Maximum active power (MW)
voltage_target = 1.0  # Voltage magnitude at the point of connection (p.u.)
inverter_bus = 200     # Bus where the solar inverters are connected
poi_bus = 100
# Prepare results file
output_file = "pq_capability_curve.csv"
with open(output_file, 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(p_min, p_max + step_size, step_size):
    # Set active power output
    psspy.machine_chng_2(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}")

1 answer

Sort by » oldest newest most voted
0

answered Jan 6 '5

Alex P gravatar image

You should also record P&Q at your point of reactive capability compliance and plot those. (usually the POI or the high side of the main power transformer (MV-HV), if any). Also, usually the inverter capability chart is more complicated than what you have here, and it's appropriate to sweep around the perimeter of the inverter P-Q capability chart.

link

Comments

Thank you for your support Alex. You mean I should add the pre define values of P-Q based on OEM inverter capability chart than run load flow and record PQ?

Tayab gravatar imageTayab (Jan 6 '5)

Exactly! Also, the OEM P-Q curves usually have a voltage dependency and there's no way in PSS/E to model this directly. It's possible but not straightforward to do this in python, but it requires iteratively solving the loadflow until the Q output and terminal voltage are within the capability.

Alex P gravatar imageAlex P (Jan 9 '5)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Jan 6 '5

Seen: 416 times

Last updated: Jan 07