Bad Data Detection
DSE evaluates source-level fit and individual measurements after a solution. Bad-data statistics use the configured physical measurement uncertainty 1/sigma, while the nonlinear solver continues to use internally normalized weights for numerical conditioning.
Detecting Source Fit
For each source, DSE calculates the weighted sum of squared measurement residuals and the effective residual degrees of freedom. The effective degrees of freedom are the sum of 1 - h_i, where h_i is the leverage of each usable measurement. DSE reports:
• Confidence Score: 100 times the chi-square p-value for the source fit. Higher values indicate greater confidence.
• Confidence Level: Low, Medium, or High, determined from the confidence score using DSE_CONFIDENCE_THRESHOLDS.
• Normalized Misfit: The root-mean-square normalized misfit, calculated as the square root of the weighted residual sum of squares divided by the effective degrees of freedom.
Detecting Which Data is Likely Bad
DSE calculates a normalized residual for each testable measurement:
r_i_normalized = |e_i| / sqrt((1 - h_i) / w_i^2)
where e_i is the measurement residual, h_i is its leverage, and w_i is its physical measurement weight 1/sigma. A measurement is flagged as bad when its normalized residual exceeds DSE_BADDATA_RES_TOL. Measurements with leverage effectively equal to one have insufficient residual variance for this test and are treated as untestable.
Computing Measurement Confidence
For each testable measurement, let T be DSE_BADDATA_RES_TOL. DSE calculates:
• Consistency score = 100 * (1 - min(r_i_normalized, T) / T).
• Redundancy score = 100 * (1 - h_i).
• Measurement confidence score = the lower of the consistency and redundancy scores.
The score is limited to the range 0 through 100 and mapped to Low, Medium, or High using DSE_CONFIDENCE_THRESHOLDS. A small normalized residual raises the consistency score, while low leverage raises the redundancy score. The lower score controls so a measurement must be both consistent with the solution and independently testable to receive high confidence.
Post-Bad-Data Processing
DSE_POST_BADDATA_HANDLING controls what happens after bad measurements are found. DSE can leave the measurements unchanged, discard individual bad measurements, replace bad measurements with their power flow values, or discard all measurements on affected devices. When handling is enabled, DSE reruns the solution up to the configured limit because each rerun can expose additional bad measurements. Source and result tables retain the initial and final bad-data counts, rerun count, handled-row flags, normalized residuals, and confidence information for review