General Debugging Tips


For users not accustomed to making large scripts describing circuits, finding errors can seem a daunting task. Here are some checks you can do to better expose errors:


1. Do Set VoltageBases=[... expected voltage bases ... ], Calcvoltagebases, and then Show Voltage LN Nodes and look for unexpected zero voltages or incorrect voltage bases. This should be a near-zero load power flow and all the voltages should be approximately.


2. Do Solve mode=faultstudy followed by Show Fault and make sure the fault currents look reasonable. They will generally be high on the low voltage side of a transformer and decline at buses farther from the transformers. This will verify reasonableness and connectivity if there are currents where you think there should be.


3. Do Show Isolated. This report will show branches and buses with no path back to the main source. Inspect the circuit tree for the connected elements to make sure it makes sense.


4. If you have an Energymeter at the head of the feeder, you can do Show Loops to check for inadvertent connections that yield loops when you were expecting radial circuits. You can also dump the Energymeter zone using Energymeter.MyMeter.Action=ZoneDump and inspect it for obvious errors.


5. Do Show kvbasemismatch. This report will identify loads and generators whose voltage base does not match the bus to which it is connected. The command also suggest scripts for correcting the problem.


6. If you define voltage bases, look for per unit voltages after a solution that are unexpectedly outside the normal voltage band of 0.9 to 1.1 per unit. (Neutral voltages may be legitimately near zero.)


7. Do Dump Debug on particularly difficult cases. This will show primitiveY matrices and circuit connectivity. Note that it will also print the System Y matrix, which can be huge.


8. Do Dump Transformer.* Debug if, for example, you think there is a problem with one of the transformers. You can replace Transformer with any class.


9. If you are have trouble with messages about maxcontroliterations being exceeded, do Show EventLog to see what control devices are causing the problems.


10. Do Show Convergence if you think the power flow does not converge quickly. Look for nodes, particularly neutral nodes, that are not meeting convergence criteria. Assign a voltage base to the bus if there is none assigned. That will often help with convergence criteria.


11. Do everything in a consistent manner.


Always Use Explicit Bus Connection Specifications


Until you get really comfortable with specifying the BusNode connections always explicitly put the node designations in rather than taking the shorthand defaults. This is where a lot of errors creep in. This often results in isolated nodes or entire buses, which may be found with some of the techniques above.


Use a computer program to generate scripts


Consider using a computer program (such as a VBA macro in Excel or Access or Notepad ++ ) to generate your circuit description scripts. This reduces human error.