State Estimation in Distribution System
State Estimation in Distribution System
ECE
The Concept of SE
What is the state in the power system
• In general, power system has normal, emergency, and restorative states.
• To monitor system states, different measurements from all parts of the system
need to be utilized.
• State estimation is a data processing algorithm for converting redundant meter
readings into an estimate of the state of an electric power system.
ECE
The Concept of SE
SE is a widely-used tool in transmission systems. In the transmission
system SE, voltage magnitudes and phase angles are considered the
states of systems.
ECE
The Concept of SE
Why is it important to use SE in the power system-
[2] H. Wang and N. N. Schulz, “A revised branch current-based distribution system state estimation algorithm and meter placement impact,” IEEE
Trans. Power Syst., vol. 19, no. 1, pp. 207–213, Feb. 2004 5
ECE
The Concept of SE
[3] Zhong, Shan, and Ali Abur, “Combined state estimation and measurement calibration,” IEEE Trans. Power Syst., vol. 20, no. 1, pp. 458–465, Feb.,
2005
6
ECE
Conventional SE Method
Where 𝑥𝑥𝑛𝑛 is the state variable of bus n, 𝑧𝑧𝑚𝑚 is the m-th real measurements,
ℎ𝑚𝑚 is the nonlinear measurement function to connect x and z, and e is the
measurement error.
ECE
Conventional SE Method
ECE
Conventional SE Method
−1 𝑯𝑯 𝑇𝑇
∆𝒙𝒙 𝑘𝑘 = 𝑮𝑮 𝑘𝑘 𝒙𝒙 𝑘𝑘 𝑾𝑾(𝒛𝒛 − 𝒉𝒉 𝒙𝒙 𝑘𝑘 )
𝒙𝒙 𝑘𝑘 + 1 = 𝒙𝒙 𝑘𝑘 + ∆𝒙𝒙 𝑘𝑘
Where 𝑯𝑯 is the Jacobian matrix with respect to the state variables and real measurements.
J denotes the objective function of the WLS problem. G(k) is the system gain matrix.
[4] F. F. Wu, “Power system state estimation: a survey,” International Journal of Electrical Power & Energy Systems, vol. 12, no. 2, pp. 80–87, Apr. 1990. 9
ECE
Conventional SE Method
𝑥𝑥 = [𝑉𝑉, 𝜃𝜃]
State Variables
Measurement Variables 𝑧𝑧 = [𝐼𝐼, 𝑉𝑉, 𝑃𝑃𝑏𝑏 , 𝑄𝑄𝑏𝑏 , 𝑃𝑃𝐿𝐿 , 𝑄𝑄𝐿𝐿 , 𝑃𝑃𝐿𝐿𝑠𝑠 , 𝑄𝑄𝐿𝐿𝑠𝑠 ]
𝜕𝜕𝑃𝑃𝑏𝑏 𝜕𝜕𝑃𝑃𝐿𝐿
…
Jacobian Matrix of the 𝐻𝐻 𝑥𝑥 = 𝜕𝜕𝑉𝑉 𝜕𝜕𝑉𝑉
State Equations 𝜕𝜕𝑄𝑄𝑏𝑏 𝜕𝜕𝑃𝑃𝐿𝐿
…
𝜕𝜕𝜃𝜃 𝜕𝜕𝜃𝜃
The voltage here can be used for both prediction features and verifications. 10
ECE
Contents
• Introduction to State Estimation (SE)
- The concept of SE
- Conventional SE method
• Introduction to Distribution System State Estimation (DSSE)
- Transmission and distribution grids
- The concept of DSSE
- Conventional DSSE method
• DSSE Research Topics
- The challenges of DSSE
- Observability problem
- Metering device placement
- Unbalanced problem
- Topology configuration
- Renewable integration
- Robust DSSE methods
• Smart meter data analysis
• Conclusion 11
ECE
Transmission Grid vs. Distribution Grid
Differences between transmission system and distribution system
ECE
Transmission Grid vs. Distribution Grid
Differences between transmission system and distribution system
Items Transmission Network Distribution Network
The power supply situation is regional power
The general network topology is mesh-shaped and supply, the network topology in the region is
Topology
needs to be analyzed as a whole. radial, the closed-loop design between the
regions, and the open-loop operation.
The imbalance of the network is small and can The three-phase line parameters are
basically be ignored. It can be considered that the unbalanced, the R/X ratio fluctuates greatly,
Network imbalance three-phase line parameter balance and three- the three-phase load is unbalanced, and
phase load balance can be analyzed in single-phase there are single-phase and two-phase loads,
or positive sequence. which cannot be analyzed independently.
A small amount of real-time measurement, a
There are a large number of real-time large number of load pseudo-measurement,
SCADA measuring measurement devices and a small number of from the perspective of real-time
device pseudo-measurements, and the measurement measurement, the measurement redundancy
redundancy is high. is low, and the network value is generally
unobservable.
A typical network generally contains hundreds of A typical network generally contains 10,000
Network scale
buses to one or two thousand buses. to 100,000 nodes.
Mostly distributed DG distributed in the
Generally, thermal power, large-scale hydropower
Existing power feeder of the distribution network, the
and nuclear power generation, the output power is
plant output power fluctuates greatly, and has
basically stable and adjustable with the load.
certain controllability. 13
ECE
The Concept of DSSE
Why do we need to perform DSSE-
[5] “FERC staff report: Assessment of demand response and advanced metering - Dec. 2017.” [Online]. Available: https://www.ferc.gov/legal/
staff-reports/2017/DR-AM-Report2017.pdf.
[6] A. Primadianto and C. N. Lu, “A review on distribution system state estimation,” IEEE Trans. Power Syst., vol. 32, no. 5, pp. 3875–3883, Sep. 2017.
14
ECE
Transmission System SE vs Distribution System SE
• Data Availability:
• Transmission: Data is over-determined (the number of available measurements is
more than the number of estimations).
15
ECE
Transmission System SE vs Distribution System SE
• Measurement Jacobian Matrix:
Transmission: Distribution:
Reference: Sarada Devi, M. S. N. G., and G. Yesuratnam. "Comparison of State Estimation Process on Transmission and
Distribution Systems." Advances in Decision Sciences, Image Processing, Security and Computer Vision. Springer, Cham, 2020.
414-423. 16
ECE
Distribution System Real-time Measurements
[7] Energy Information Administration. (2017) Annual Electric Power Industry Report. [Online]. Available:https://www.eia.gov/electricity/data/eia861/
17
ECE
The Process of DSSE
Like transmission system SE, DSSE is the process of inferring the
values of the distribution system’s state variables using a limited
number of measured data at certain locations in the system [8].
ECE
The Method of DSSE
[10] M. E. Baran and A. W. Kelley, “State estimation for real-time monitoring of distribution systems,” IEEE Trans. Power Syst., vol. 9, no. 3, pp. 1601–1609, Aug.
1994
[11] D. A. Haughton and G. T. Heydt, “A linear state estimation formulation for smart distribution systems,” IEEE Trans. Power Syst., vol. 28, no. 2, pp. 1187–
1195, May 2013.
[12] C. N. Lu, J. H. Tang, and W. H. E. Liu, “Distribution system state estimation,” IEEE Trans. Power Syst., vol. 10, no. 1, pp. 229–240, Feb. 1995.
[13] M. E. Baran and A. W. Kelley, “A branch-current-based state estimation method for distribution systems,” IEEE Trans. Power Syst., vol. 10, no. 1, pp. 483–
491, Feb. 1995.
[14] M. Pau, P. A. Pegoraro, and S. Sulis, “Efficient branch-current-based distribution system state estimation including synchronized measurements,” IEEE
Trans. Instrum. Meas., vol. 62, no. 9, pp. 2419–2429, Sep. 2013.
[15] M. E. Baran, J. Jung, and T. E. McDermott, “Including voltage measurements in branch current state estimation for distribution systems,” In IEEE Power &
Energy Society General Meeting, pp. 1–5, Jul. 2009. 19
ECE
The Method of DSSE
1. Voltage-Based DSSE [10]-[12]
• State variables: node voltage magnitude and angle.
• Equations: WLS approach with PF, similar to the conventional SE
method.
• Shortage: High computational complexity, mainly used for meshed
networks, sensitive to line parameters. May not work satisfactorily for
networks with a high R/X ratio [16].
2. Branch Current-Based SE (BCSE) [13]-[15]
• State variables: branch current and angle.
• Equations: WLS approach and can be expressed using the rectangular or
polar form.
• BCSE is more insensitive to line parameters than the conventional node-
voltage-based SE methods [9] and has better computation speed and
memory usage [2].
[16] Mohamed Ben Ahmed and Anouar Abdelhakim Boudhir. 2018. Innovations in Smart Cities and Applications: Proceedings of the 2nd Mediterranean
Symposium on Smart City Applications (1st ed.). Springer Publishing Company, Incorporated. 20
ECE
Branch Current-Based SE Algorithm
The three-phase branch current, also known as the state variables
of the system, x can be expressed as:
ph , real ph , real ph , real ph ,im ph ,im ph ,im T
x = [I 1 ...I l ...I N ,I
1 ...I l ...I N ]
𝑝𝑝𝑝,𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝑝𝑝𝑝,𝑖𝑖𝑖𝑖
Where 𝐼𝐼𝑙𝑙 and 𝐼𝐼𝑙𝑙 represent the real and imaginary parts
of the three-phase branch current at branch 𝑙𝑙, respectively and 𝑁𝑁
represents the number of branches. The compact form can be
expanded as:
I la ,real I la ,im
b ,real b ,im
I lph ,real = Il I lph ,im = Il
I c ,real I c ,im
l l 21
ECE
Branch Current-Based SE Algorithm
The system measurements considered are power, current
magnitude, and voltage magnitude measurements. They are derived
as follows:
ECE
Branch Current-Based SE Algorithm
ph ,real 2 ph ,im 2
=Il ph
( Il ) + ( Il )
l =1
𝑝𝑝𝑝
where 𝑉𝑉𝑗𝑗 is the substation voltage.
23
ECE
Branch Current-Based SE Algorithm
Detailed Algorithm:
-Step 1 Initialization:
Set the initial value of voltage at every node, such as 1 pu.
Backward Step: Using the injected power at every node,
the values of state variables (branch current magnitudes and
phase angles) are computed starting from the end of
networks.
-Step 2 WLS
Using the WLS method, the state variable increments are
obtained.
Update the value of state variables.
24
ECE
Branch Current-Based SE Algorithm
Detailed Algorithm:
25
ECE
Block Diagram for solving WLS
problem:
ECE
Contents
• Introduction to State Estimation (SE)
- The concept of SE
- Conventional SE method
• Introduction to Distribution System State Estimation (DSSE)
- Transmission and distribution grids
- The concept of DSSE
- Conventional DSSE method
• DSSE Research Topics
- The challenges of DSSE
- Observability problem
- Metering device placement
- Unbalanced problem
- Topology configuration
- Renewable integration
- Robust DSSE methods
• Smart meter data analysis
• Conclusion 27
ECE
The Challenges of DSSE
Compared to transmission system SE, DSSE is facing some unique
challenges due to the characteristics of the system[2]. These
challenges include:
• Cyber-security issues
28
ECE
Observability Problem
• Unlike transmission systems with a high data redundancy level, the
distribution systems are generally undetermined with low observability.
29
ECE
Observability Problem
Distribution systems can be divided into three groups according to
observability: fully observable systems, partially observable
systems, and fully unobservable systems.
ECE
Observability Problem
Distribution System Real-time Measurements
Fig. 10 Percent of Residential Smart meter installation rate by state, 2016 [7].
31
ECE
Observability Problem
[17] A. Angioni, T. Schlosser, F. Ponci, and A. Monti, “Impact of pseudo-measurements from new power profiles on state estimation in low-voltage grids,” IEEE Trans. Instrum.
Meas., vol. 65, no. 1, pp. 70–77, Jan. 2016.
32
ECE
Observability Problem
• Encouraged to read:
[18] C. Muscas, M. Pau, P. A. Pegoraro, and S. Sulis, “Effects of measurements and pseudo-measurements correlation in distribution system state estimation,”
IEEE Trans. Instrum. Meas., vol. 63, no. 12, pp. 2813–2823, Dec. 2014.
[19] A. K. Ghosh, D. L. Lubkeman, M. J. Downey, and R. H. Jones, “Distribution circuit state estimation using a probabilistic approach,” IEEE Trans. Power Syst., vol.
12, no. 1, pp. 45–51, Feb. 1997.
[20] R. Singh, B. C. Pal, and R. A. Jabr, “Statistical representation of distribution system loads using Gaussian mixture model,” IEEE Trans. Power Syst., vol. 25, no.
1, pp. 29–37, Feb. 2010.
[21] R. Singh, B. C. Pal, and R. A. Jabr, “Distribution system state estimation through Gaussian mixture model of the load as pseudo-measurement,” IET Gener.
Transm. Distrib., vol. 4, no. 1, pp. 50–59, Jan. 2009.
33
ECE
Observability Problem
• Learning-Based Approaches:
Multiple machine learning algorithms have also been utilized to generate
active/reactive power pseudo-measurement and uncertainty assessment [22]-
[26].
• Encouraged to read:
[22] B. P. Hayes, J. K. Gruber, and M. Prodanovic, “A closed-loop state estimation tool for MV network monitoring and operation,” IEEE Trans. Smart Grid, vol. 6,
no. 4, pp. 2116–2125, Jul. 2015.
[23] D. Gerbec, S. Gasperic, I. Smon, and F. Gubina, “Allocation of the load profiles to consumers using probabilistic neural networks,” IEEE Trans. Power Syst.,
vol. 20, no. 2, pp. 548–555, May 2005.
[24] E. Manitsas, R. Singh, B. C. Pal, and G. Strbac, “Distribution system state estimation using an artificial neural network approach for pseudo measurement
modeling,” IEEE Trans. Power Syst., vol. 27, no. 4, pp. 1888–1896, Nov. 2012.
[25] Y. Yuan, K. Dehghanpour, F. Bu, and Z. Wang, "A Multi-Timescale Data-Driven Approach to Enhance Distribution System Observability," IEEE Transactions on
Power Systems, vol. 34, no. 4, pp. 3168-3177, July 2019.
[26] K. Dehghanpour, Y. Yuan, Z. Wang and F. Bu, "A Game-Theoretic Data-Driven Approach for Pseudo-Measurement Generation in Distribution System
State Estimation," in IEEE Transactions on Smart Grid.
34
ECE
Metering Device Placement
Optimizing the location of meters in distribution systems is a significant
subject for research, given the size of the system and potentially limited
financial resources [9].
[27] M. E. Baran, J. Zhu, and A. W. Kelley, “Meter placement for real-time monitoring of distribution feeders,” IEEE Trans. Power Syst., vol. 11, no. 1, pp. 332–337, Feb. 1996.
[28] T. C. Xygkis, G. N. Korres, and N. M. Manousakis, “Fisher information based meter placement in distribution grids via the d-optimal experimental design,” IEEE Trans. Smart Grid, vol. 9,
no. 2, pp. 1452–1461, Mar. 2018.
[29] B. Brinkmann and M. Negnevitsky, “A probabilistic approach to observability of distribution networks,” IEEE Trans. Power Syst., vol. 32, no. 2, pp. 1169–1178, Mar. 2017.
[30] S. Prasad and D. M. V. Kumar, “Trade-offs in PMU and IED deployment for active distribution state estimation using multi-objective evolutionary algorithm,” IEEE Trans. Instrum. Meas.,
vol. 67, no. 6, pp. 1298–1307, Jun 2018.
35
ECE
Three Phase unbalanced Problem
In distribution systems, loads can be three-phase, two-phase, or single-phase.
Hence it is desirable to use a three-phase model in DSSE [14]. The basic WLS SE
method was adapted for three-phase analysis to address the phase unbalanced
problem [31].
[31] U. Kuhar, M. Pantos, G. Kosec, and A. Svigelj, “The impact of model and measurement uncertainties on a state estimation in three-phase
distribution networks,” to appear in IEEE Trans. Smart Grid.
36
ECE
Three Phase unbalanced Problem - Solution
• Functions that relate measurements to the vector of state variables are
developed from a three-phase branch model.
• The BCSE method that was demonstrated earlier is modeled in three phases.
[32] Langner, Andre L., and Ali Abur. "Formulation of three-phase state estimation problem using a virtual reference." IEEE
Transactions on Power Systems 36.1 (2020): 214-223.
[33] A. Majumdar and B. C. Pal, "A three-phase state estimation in unbalanced distribution networks with switch modelling," 2016 IEEE
First International Conference on Control, Measurement and Instrumentation (CMI), 2016, pp. 474-478, doi:
10.1109/CMI.2016.7413793.
[34] F. Magnago, L. Zhang and R. Nagarkar, "Three phase distribution state estimation utilizing common information model," 2015
IEEE Eindhoven PowerTech, 2015, pp. 1-6, doi: 10.1109/PTC.2015.7232515.
37
ECE
High R/X Ratio Problem
ECE
High R/X Ratio Problem -Solution
ECE
Topology Configuration
DSSE relies on the basic assumption that we know the exact network model so
that we can write the measurement functions h(x). Hence, it is necessary to
perform topology configuration process to identify the current topology.
ECE
Topology Configuration
The existing topology configuration method can be roughly separated into two
categories:
These methods assume the basic topology of the network is known to the system
operator. However, due to local events, such as faults, line disconnections,
switching events, etc, the basic topology will undergo local changes over time.
[36]-[40].
[36] G. N. Korres and N. M. Manousakis, “A state estimation algorithm for monitoring topology changes in distribution systems,” in Proc. IEEE
Power Energy Soc. Gen. Meeting, San Diego, CA, USA, Jul. 2012, pp. 1–8.
[37] M. E. Baran, J. Jung, and T. E. McDermott, “Topology error identification using branch current state estimation for distribution systems,” In
IEEE Transmission & Distribution Conference & Exposition: Asia and Pacific, pp. 1–4, Oct. 2009.
[38] D. Singh, J. P. Pandey, and D. S. Chauhan, “Topology identification, bad data processing, and state estimation using fuzzy pattern matching,”
IEEE Trans. Power Syst., vol. 20, no. 3, pp. 1570–1579, Aug. 2005.
[39] G. Cavraro and R. Arghandeh, “Power distribution network topology detection with time-series signature verification method,” IEEE Trans.
Power Syst., vol. 33, no. 4, pp. 3500–3509, Jul. 2018.
[40] W. Luan, J. Peng, M. Maras, J. Lo, and B. Harapnuk, “Smart meter data analytics for distribution network connectivity verification,” IEEE Trans.
Smart Grid, vol. 6, no. 4, pp. 1964–1971, Jul. 2015.
41
ECE
Topology Configuration
The existing topology configuration method can be roughly separated into two
categories:
These methods assume that the system operator has very limited or no
knowledge of the basic topology of the network. Hence, the objective is to learn
the network’s topology using nodal and branch measurements [41]-[44].
[41] M. Babakmehr, M. G. Simões, M. B. Wakin, and F. Harirchi, “Compressive sensing-based topology identification for smart grids,” IEEE Trans.
Ind. Informat., vol. 12, no. 2, pp. 532–543, Apr. 2016.
[42] Y. Weng, Y. Liao, and R. Rajagopal, “Distributed energy resources topology identification via graphical modeling,” IEEE Trans. Power Syst., vol.
32, no. 4, pp. 2682–2694, Jul. 2017.
[43] S. J. Pappu, N. Bhatt, R. Pasumarthy, and A. Rajeswaran, “Identifying topology of low voltage distribution networks based on smart meter
data,” IEEE Trans. Smart Grid, vol. 9, no. 5, pp. 5113–5122, Sep. 2018.
[44] J. Yu, Y. Weng, and R. Rajagopal, “PaToPa: A data-driven parameter and topology joint estimation framework in distribution grids,” IEEE Trans.
Power Syst., vol. 33, no. 4, pp. 4335–4347, Jul. 2018.
42
ECE
Renewable Energy Integration
[45] Y. Weng, R. Negi, C. Faloutsos, and M. D. Ilic, “Robust data-driven state estimation for smart grid,” IEEE Trans. Smart Grid, vol. 8, no. 4,
pp. 1956–1967, Jul. 2017.
43
ECE
Renewable Energy Integration
[46] G. Valverde, A. T. Saric, and V. Terzija, “Stochastic monitoring of distribution networks including correlated input variables,” IEEE Trans. Power
Syst., vol. 28, pp. 246–255, Feb. 2013.
[47] A. Angioni, T. Schlosser, F. Ponci, and A. Monti, “Impact of pseudo measurements from new power profiles on state estimation in low voltage
grids,” IEEE Trans. Instrum. Meas., vol. 65, no. 1, pp. 70–77, Jan. 2016.
44
ECE
Cyber Security
Due to the vulnerability of the power system against cyber-
attacks has been observed in practice, several common types of
cyber-attack related to SE have been modeled in the literature:
ECE
Robust DSSE Methods
46
ECE
Robust DSSE Methods
• Least Absolute Value estimator (LAV): LAV estimator is based
on the minimization of the 𝐿𝐿1 norm of weighted measurement
residual [55].
ECE
Smart Meter Data Analytics
Why is it important to perform SM data analytics-
[59] Y. Wang, Q. Chen, T. Hong and C. Kang, "Review of Smart Meter Data Analytics: Applications, Methodologies, and Challenges," in
IEEE Transactions on Smart Grid, vol. 10, no. 3, pp. 3125-3148, May 2019.
[60] H. Sun, Z. Wang, J. Wang, Z. Huang, N. Carrington and J. Liao, "Data-Driven Power Outage Detection by Social Sensors," in IEEE
Transactions on Smart Grid, vol. 7, no. 5, pp. 2516-2524, Sept. 2016.
48
ECE
Smart Meter Data Analytics
Fig. 13 Number of publication about SM data Fig. 14 Number of publications in most popular
analytics。 journals.
49
ECE
Smart Meter Data Analytics
ECE
Conclusions
• The goal of DSSE is to infer the values of the distribution system’s state variables
using a limited number of measured data. The DSSE is a numerical process to
map data measurements to system state variables.
• To address these challenges, different methods are proposed for DSSE. Most
recent works are concentrated on using SM data analytics-based approaches to
improve the conventional DSSE.
51
ECE
Appendix I: Matlab Example of
Solving WLS Problem
A=importdata('H_data.m'); % import bus and line data with 5 columns, this is saved in another file
fbus=A(:,1); %From bus
tbus=A(:,2); %To bus
x=A(:,3); % Reactance in pu
Zm=A(:,4);% Impedance in pu
sig=A(:,5);% Susceptance in pu
buses=input('Enter the number of buses : \n');
B=input('Enter the reference bus : ');
for i=1:buses
H(i,fbus(i))=1/x(i);
H(i,tbus(i))=-1/x(i);
end
H(:,B)=[]; % Compute H matrix
for i=1:buses
R(i,i)=sig(i)^2; % Compute R Matrix
end
[nm,ns]=size(H);
if ns<nm
xest=[H'*R^-1*H]^-1*H'*R^-1*Zm; %Compute Gain matrix and forward sweep
else if ns==nm
xest=H^-1*Zm;
else if ns>nm
H'*[H*H']^-1*Zm;
end
end
end
Zt=H*xest; %True Value
e=Zm-Zt; %estimation error
fprintf(' The H Matrix \n');
disp(H);
fprintf(' The R inverse Matrix \n');
disp(R^-1);
fprintf('Estimated Value \n');
disp(xest);
fprintf('\n Measured value \n');
disp(Zm);
fprintf('\n True Value \n');
disp(Zt);
fprintf('\nError in equipment \n');
disp(e);
Display Results:
For 3 bus test case, use bus 1 as reference bus:
Error in equipment
-0.1076
0.2152
0.1345
Appendix II: VBSE Matlab Code
Using WLS Method
• The IEEE 14 bus system is used in this example.
Bus data:
% |Bus | Type | Vsp | theta | PGi | QGi | PLi | QLi | Qmin | Qmax |
busdata14 = [ 1 1 1.060 0 0 0 0 0 0 0;
2 2 1.045 0 40 42.4 21.7 12.7 -40 50;
3 2 1.010 0 0 23.4 94.2 19.0 0 40;
4 3 1.0 0 0 0 47.8 -3.9 0 0;
5 3 1.0 0 0 0 7.6 1.6 0 0;
6 2 1.070 0 0 12.2 11.2 7.5 -6 24;
7 3 1.0 0 0 0 0.0 0.0 0 0;
8 2 1.090 0 0 17.4 0.0 0.0 -6 24;
9 3 1.0 0 0 0 29.5 16.6 0 0;
10 3 1.0 0 0 0 9.0 5.8 0 0;
11 3 1.0 0 0 0 3.5 1.8 0 0;
12 3 1.0 0 0 0 6.1 1.6 0 0;
13 3 1.0 0 0 0 13.5 5.8 0 0;
14 3 1.0 0 0 0 14.9 5.0 0 0;];
Line Data:
iter = 1;
tol = 5;
while(tol > 1e-4)
%Measurement Function, h
h1 = V(fbus(vi),1);
h2 = zeros(npi,1);
h3 = zeros(nqi,1);
h4 = zeros(npf,1);
h5 = zeros(nqf,1);
for i = 1:npi
m = fbus(ppi(i));
for k = 1:nbus
h2(i) = h2(i) + V(m)*V(k)*(G(m,k)*cos(del(m)-del(k)) + B(m,k)*sin(del(m)-del(k)));
end
end
for i = 1:nqi
m = fbus(qi(i));
for k = 1:nbus
h3(i) = h3(i) + V(m)*V(k)*(G(m,k)*sin(del(m)-del(k)) - B(m,k)*cos(del(m)-del(k)));
end
end
for i = 1:npf
m = fbus(pf(i));
n = tbus(pf(i));
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)));
end
for i = 1:nqf
m = fbus(qf(i));
n = tbus(qf(i));
h5(i) = -V(m)^2*(-B(m,n)+bpq(m,n)) - V(m)*V(n)*(-G(m,n)*sin(del(m)-del(n)) + B(m,n)*cos(del(m)-del(n)));
end
% Residue
r = z - h;
% Jacobian
% H11 - Derivative of V with respect to angles, All Zeros
H11 = zeros(nvi,nbus-1);
%Objective Function
J = sum(inv(Ri)*r.^2);
% State Vector
dE = inv(Gm)*(H'*inv(Ri)*r);
E = E + dE;
del(2:end) = E(1:nbus-1);
V = E(nbus:end);
iter = iter + 1;
tol = max(abs(dE));
end
Display Results:
Del = 180/pi*del; --- State Estimation ---
E2 = [V Del]; % Bus Voltages and angles.. ----------------------------
disp('-------- State Estimation ------------------');
disp('--------------------------'); | Bus | V | Angle |
disp('| Bus |
disp('| No | pu
V | Angle | ');
| Degree | ');
| No | pu | Degree |
disp('--------------------------'); --------------------------
for m = 1:n
fprintf('%4g', m); fprintf(' %8.4f', V(m)); 1 1.0068 0.0000
fprintf(' %8.4f', Del(m)); fprintf('\n'); 2 0.9899 -5.5265
end
disp('---------------------------------------------'); 3 0.9518 -14.2039
4 0.9579 -11.4146
5 0.9615 -9.7583
You should get this in the console: 6 1.0185 -16.0798
7 0.9919 -14.7510
8 1.0287 -14.7500
9 0.9763 -16.5125
10 0.9758 -16.7476
11 0.9932 -16.5397
12 1.0009 -17.0203
13 0.9940 -17.0583
------------------------------
Appendix III: Three-Phase BCSE
Matlab Code Using WLS Method
with Power Flow Constraints
Case Study:
Three-Phase BCSE using WLS method using IEEE 13 bus
test feeder:
IEEE 13 Bus data example:
Bus V_0 V_1 V_2 d_0 d_1 d_2
1 1.0689 1.0569 1.0851 0 -120 -120
2 1.021 1.042 1.0174 -2.49 -121.72 117.83
3 1.018 1.0401 1.0418 -2.56 -121.77 117.82
4 0.994 1.0218 0.996 -3.23 -122.22 117.34
5 0 1.0311 1.0134 0 -121.9 117.86
6 0 1.0329 1.0115 0 -121.9 117.86
7 0.99 1.0529 0.9778 -5.3 -122.34 116.02
8 -0.9835 1.0553 0.9758 -5.56 -122.52 116.03
9 0 0 0.9738 0 0 115.78
10 0.9881 0 0.9758 -5.32 0 115.92
11 0.9825 0 0 -5.25 0 0
12 0.99 1.0529 0.9778 -5.3 -122.34 116.02
Importing data from file
bus=BUS.data(:,1);
branch=BRANCH.data(:,1);
from=BRANCH.data(:,2); to=BRANCH.data(:,3); %formation of R,X matrix
d_01=BUS.data(1,5)*pi/180;
d_11=BUS.data(1,6)*pi/180;
d_21=BUS.data(1,7)*pi/180;
for k=1:length(branch)
Zpu1=ybase*ft(k)*[r_00(k)+1i*x_00(k)r_01(k)+1i*x_01(k)
r_02(k)+1i*x_02(k)];
Zpu2=ybase*ft(k)*[r_10(k)+1i*x_10(k)r_11(k)+1i*x_11(k)
r_12(k)+1i*x_12(k)];
Zpu3=ybase*ft(k)*[r_20(k)+1i*x_20(k)r_21(k)+1i*x_21(k)
r_22(k)+1i*x_22(k)];
Zpu=[Zpu1(Zpu1~=0);Zpu2(Zpu2~=0);Zpu3(Zpu3~=0)];ypu=inv(Zpu);
end
Power Balance Equality constraints
for n=2:Nn
sumP_0=0;
for k=1:length(branch)
if ismember(n,from(k))&PhaseA(k)~=0
sumP_0=sumP_0+Ppq_0(k);
elseif ismember(n,to(k))&PhaseA(k)~=0
sumP_0=sumP_0+Pqp_0(k);
end;
end;
sumP_0=Pgen_0(n)-Pload_0-sumP_0;
end
where active and reactive power flows from node p to node q for phase
zero is given by:
for k=1:length(branch)
for p=1:Nn
for q=1:Nn
if ismember(p,from(k))&ismember(q,to(k))&PhaseA(k)~=0
CPpq_0=Ppq_0(k)-(V_0(p)_V_0(p)_Y(1,1)_cos(d_0(p)-d_0(p)-thetapp(1,1))+V_0(p)_V_0(q)_Y(1,1)_cos(d_0(p)-d_0(q)-
thetapq(1,1))+V_0(p)_V_1(p)_Y(1,2)_cos(d_0(p)-d_1(p)-thetapp(1,2))+V_0(p)_V_1(q)_Y(1,2)_cos(d_0(p)-d_1(q)-
thetapq(1,2))+V_0(p)_V_2(p)_Y(1,3)_cos(d_0(p)-d_2(p)-thetapp(1,3))+V_0(p)_V_2(q)_Y(1,3)_cos(d_0(p)-d_2(q)-
thetapq(1,3)));
elseif PhaseA(k)==0
CPpq_0=[];end;end;
end
end
Definition of all matrix
%Matrix of equality constraints
Con=[Eq1 Eq2];
%Matrix of variables
X=[V_0(2:length(V_0)) V_1(2:length(V_1)) V_2(2:length(V_2))
d_0(2:length(d_0)) d_1(2:length(d_1)) d_2(2:length(d_2))
Ppq Qpq PL_0P L_1 PL_2 QL_0 QL_1 QL_2];
ck=Con.’;
W=diag(W1);
%calculation of dX=inv(A)_B
%This will display total number of dX=inv(ANE)_BNE;
iterations, achieved tolerance and
estimated state vector values. %update new values X(k+1)=X(k)+dX (update just
variables,not lambda)
iteration Xlambda=Xlambda(1:length(X))'+dX(1:length(X));
epsObtained Xlambda=Xlambda';
Xlambda(1:length(X))’ iteration=iteration+1; % number of iterations
end
Appendix IV: Branch Current
based State Estimation Using WLS
and Artificial Neural Network
%load error V_true_mag_total = [];
w=3; V_true_phase_total =[]; %impedance
P_start=[0.2,0.2,0.2,0.2,0.2]; load('line_impedance_1.mat');
%for w = 10:10:60 error_voltage_mag = []; from_bus = Lineimpedance(:,1);
test_error_current_real = []; error_voltage_phase = []; to_bus = Lineimpedance(:,2);
test_error_current_img = [];
test_error_current_mag = []; error_voltage_real = []; temp = from_bus(~isnan(from_bus));
test_error_current_phase = []; error_voltage_img = []; from_bus = temp;
test_error_voltage_mag = []; test = []; temp = to_bus(~isnan(to_bus));
test_error_voltage_phase = []; record_time = []; to_bus = temp;
record_x_true_full = []; clear temp;
record_z_wls = []; for q = 1:1
tic bus_list=
P_load_est = []; union(from_bus,to_bus);
Q_load_est = []; error_percen_full = []; bus_num = length(bus_list);
record_final_residual = []; error_current_mag = []; line_num = length(from_bus);
record_test = []; error_current_phase = [];
error_current_real = []; Z_pu =
p_value = []; error_current_img = []; [Lineimpedance(:,3)+1j*Lineimped
ance(:,6),Lineimpedance(:,4)+1j*
phase_est_total =[]; phase_est_final =[]; Lineimpedance(:,7),Lineimpedance
mag_est_total = []; mag_est_final = []; (:,5)+1j*Lineimpedance(:,8)];
I(i,:)=[(temp_i(i,1)+1i*temp_i(i,2)),(temp_i(i,3)+1i*temp
_i(i,4)),(temp_i(i,5)+1i*temp_i(i,6))];
end
for i = 1:18
x_true_full=[x_true{1};x_true{2};x_true{3}]
V_true_real(i,:) = [V_true(6*(i-1)+1),V_true(6*(i-
;
1)+3),V_true(6*(i-1)+5)];
x_true_real_full=[x_true_real{1};x_true_rea
V_true_img(i,:) = [V_true(6*(i-1)+2),V_true(6*(i-
l{2};x_true_real{3}];
1)+4),V_true(6*i)];
x_true_img_full=[x_true_img{1};x_true_img{2
end
};x_true_img{3}];
[V_true_phase,V_true_mag] =
cart2pol(V_true_real,V_true_img);
record_x_true_full =
[record_x_true_full,x_true_full]; %Load data
temp = xlsread('BUS_NUMBER.xlsx');
%all meter real measurement temp = temp(:,3:5);
z_1 = I(1,:); temp(1,:)=[];
z_1 = [real(z_1);imag(z_1)]; load_pu = [];
estimate_testing_label =
net1_fine_tune(testing_data');
estimate_testing_label = estimate_testing_label';