CURENT / andes

Python toolbox / library for power system transient dynamics simulation with symbolic modeling and numerical analysis 🔥
https://ltb.curent.org
Other
208 stars 108 forks source link

Running PFlow after TDS.run() #350

Closed MaKla89 closed 1 year ago

MaKla89 commented 1 year ago

Disclaimer: This might just as well be about me being dumb or using andes in a wrong way, but could also be a bug ;)

Describe the bug I use the ieee14 benchmark system. I can run powerflow (with PFlow.run()) and then run TDS for an arbitrary number seconds, even with interruptions and mid-simulation setup-changes (like loadjumps via Ppf and Qpf). But I cannot run PFlow at a later point (e.g. at the very end of the TDS). In short: Once TDS was started, I cannot run PFlow without getting the Slack generator is not defined/enabled for 1 island(s). Jacobian matrix is singular. error, eventhough everything in the system is fine (even according to the TDS)

Expected behavior Provide PFlow-results based on the system configuration at the end of a TDS

Actual bevhior Slack generator is not defined/enabled for 1 island(s). Jacobian matrix is singular. Suspect diagonal elements: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 144, 145, 146, 147, 148] Jacobian matrix is singular. Suspect diagonal elements: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 144, 145, 146, 147, 148] Jacobian matrix is singular. Suspect diagonal elements: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 144, 145, 146, 147, 148] Jacobian matrix is singular. Suspect diagonal elements: [49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 144, 145, 146, 147, 148] NaN found in solution. Convergence is not likely Simulation terminated at t=20.0000 s. NaN found in solution. Convergence is not likely Simulation terminated at t=20.0000 s.

Desktop (please complete the following information):

cuihantao commented 1 year ago

Hello,

Thanks for reporting. Running power flow is no longer permitted after the dynamic components have been initialized. There are a couple of reasons:

  1. Static generators have been replaced with dynamic generators already
  2. The differential-algebra equations size has been increased to include all dynamic components. That means the algebraic equations contain both the network equations and device equations and thus must be solved along with the differential equations through numerical integration.
  3. The power flow is actually solved at each integration step but using the injections of the dynamic devices.

Other tools, such as PSS/E, won't allow solving the power flow after initializing dynamic models for similar reasons. Hope it helps.