File Exchange

image thumbnail

Power System State Estimation using WLS

version 1.0 (6.74 KB) by

Power System State Estimation using Weighted Least Square Method

15 Ratings



View License

Power System State Estimation using Weighted Least Square Method. Measurements are voltage magnitude, power injection and power flows.

Comments and Ratings (26)

pagna kean

My code show that "Undefined function or variable 'wls_function'. " how to get wls_function file?

Min Zhou

thank you, it's helpful.

Very good code. But for the 30 bus case the output is showing for bus 1 -27, bus 28,29 and 30 is missing. What can be the reason?

Hasnae Bilil

I apologize, there is no mistake in the file wls.m, as mentioned on my previous message. Congrats

Hasnae Bilil

Thank you, the code is very good. However, I think the code has a littre mistake in file wls.m, line 60, defining the function of the active power flow as
"h4(i) = -V(m)^2*G(m,n) - V(m)*V(n)*(-G(m,n)*cos(del(m)-del(n)) - B(m,n)*sin(del(m)-del(n)));"
The minus before V(m) needs to be removed. This the correct function,
"h4(i) = V(m)^2*G(m,n) - V(m)*V(n)*(-G(m,n)*cos(del(m)-del(n)) - B(m,n)*sin(del(m)-del(n)));"

nirali rathod

Preeti Jain

thanku sir

hi i want to use this program with more grip I do?


Does someone maybe has an example for WLS Topology Error Detection And Identi fication???
It would mean me a lot...
Thank you.

Fiaz Ahmad

What is the problem Ammara

Ammara Gul

Is there anyone to help me. I could not run this file, I dont know why..


zahid (view profile)

Hello all
Anybody know how to run decouple state estimation or its code? in matlab


thanks for your help


EMI (view profile)

Thank you, very useful and perfectly developed

juliana Klas

Very nice, congrats and many thanks!


abujem (view profile)

Great work, but i need some info on how to incorporate PMU measurements.


meysam (view profile)

Thanks for Benevolence


Mahdi (view profile)

thanks alot


Umar (view profile)

Apologies for above comment but still the output for 14 bus system gives only 13 results while that for 30 bus system only 27 results are being obtained


Umar (view profile)

Dear Sir, For 30 Bus System there is an error [In wls at 230
Warning: Matrix is singular, close to singular or badly scaled.
Results may be inaccurate. RCOND = NaN. ] Also there is no measurement file for 57 bus system

Venkatesh Yadav

the calculation of H12(element of Jacobian Matrix) is incorrect.

Mehdi Davoudi

It was useful.
You are legend :)

Nacer Hussam

It is very good, but i'm very happy to get the WLS method with Hypothesis Testing instead of Normalized Residuals, for my final year project.
pleas help me, I'll so thankful.


Qian (view profile)

Hi Pravi, coded neat and clean. Just wondering how come ur ans doesnt match with LF ones? thx


gb8 (view profile)

someone has a version of the state estimator in C language ????

MATLAB Release
MATLAB 7.6 (R2008a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today