First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
https://www.pti-us.com/pti/company/enewsletter/2008july/HandlingUserWrittenModelsin_PSSE31.html
This is not in Python, but I think it is more appropriate for your purposes. Unless you can "fake out" PSSE by modeling the UPFC using an existing device and varying its parameters dynamically. Regardless, a custom DLL is probably a better way.