Power System State Estimation using Weighted Least Square Method. Measurements are voltage magnitude, power injection and power flows.
Praviraj PG (2020). Power System State Estimation using WLS (https://www.mathworks.com/matlabcentral/fileexchange/23052-power-system-state-estimation-using-wls), MATLAB Central File Exchange. Retrieved .
Nice coding. I noticed that for the power flow calculations it is being considered the G and B (capital) as the real and imaginary parts of the Y matrix. The correct formula uses the g and b, which is the 1/r and 1/x without the minus signals when the element is off the diagonal. Thanks a lot for your code, it helped me a lot.
The code is very useful! But there might be a small mistake!
In the function "WLS_SE", the 76th line, the condition "n==k" may be changed to "n==zdata(k,4)". The current code works well for the given zdatas, but if the measurement of voltage magnitudes are different, there might be mistakes for the current condition "n==k".
A perfect code. Thanks so much.
The code is running for almost half an hour now. Does it take that long? (I am using a very simple 4 bus system)
Thanks a lot.
can someone tell me how to get the z-data from zdatas (num) file
useful reference value but slightly error exits.
H12 should be "n == fbus(k)".
It should be aware the measurement function and the derivative of power flow at transformer branch are different from transmission lines, the tap should be considered.
what Hasnae Bilil said is wrong, the code is right here.
My code show that "Undefined function or variable 'wls_function'. " how to get wls_function file?
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?
I apologize, there is no mistake in the file wls.m, as mentioned on my previous message. Congrats
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)));"
hi i want to use this program with more grip I do?
Does someone maybe has an example for WLS Topology Error Detection And Identification???
It would mean me a lot...
What is the problem Ammara
Is there anyone to help me. I could not run this file, I dont know why..
Anybody know how to run decouple state estimation or its code? in matlab
thanks for your help
Thank you, very useful and perfectly developed
Very nice, congrats and many thanks!
Great work, but i need some info on how to incorporate PMU measurements.
Thanks for Benevolence
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
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
the calculation of H12(element of Jacobian Matrix) is incorrect.
It was useful.
You are legend :)
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.
Hi Pravi, coded neat and clean. Just wondering how come ur ans doesnt match with LF ones? thx
someone has a version of the state estimator in C language ????