# Power Profiling of Smart Grid Users Using Dynamic Time Warping +
## 5 Power Profiling Model
### Analysis  
To evaluate our power profiling model, we analyze time-disordered power usage data to identify the corresponding power load type. Daily power usage data, acquired over three consecutive months (a total of 92 days), is extracted from AMPd2. These days include 66 workdays and 26 weekends (Saturdays and Sundays), with no holiday. Load pattern sets of WoLP and WeLP are employed, using their load factors and DTW similarity as criteria to detect the input power load's profile. For each day, the load factor is matched to the load factors of both WoLP and WeLP. Depending on the matching, the similarities between its power data sequence and both power load pattern sets are measured using DTW. Based on the measured distance and load factor matching, a power profile (e.g., a workday or a weekend) is assigned. Figure 5: DTW distance, warp path, and the straight-line fit between the workday load patterns set and the power consumption data sequences measured on a sample workday (**a**) (DTW = 1030) and a sample weekend (**b**) (DTW = 1872). Based on Table 2, if the distance to the workday load patterns set, measured by DTW algorithm, is less than 1165.80, the corresponding day is classified as a workday (WoLP); otherwise, it is classified as a weekend. Similarly, it is classified as a weekend if its power data time-series' distance to the weekend load patterns set is less than 1244.75. The workday profile is assigned if the data sequence has a distance greater than 1244.75 to WeLP. Load factor matching is used to confirm the DTW-based profiling. Furthermore, it can be considered for those sample sets that could not be classified based on DTW similarities. To evaluate the performance of the clustering, we set up its confusion matrix. This summarizes the clustering performance by comparing the number of correct predictions to the number of incorrect predictions. Based on this matrix, we calculate the sensitivity/recall rate, precision rate, F-score, and accuracy, which are shown in Tables 3 and 4. It should be noted that the power load clustering is based on the lowest DTW distance. We first use the workday load pattern set, and the profiling is performed by measuring DTW similarity to this set. Based on DTW distance, the measured load set is clustered as either a workday (WoLP) or a weekend (WeLP). Table 3 shows the accuracy of this profiling. Similarly, Table 4 shows the clustering accuracy based on similarity to the weekend load pattern set. Our evaluation shows that using the workday load-patterns-based clustering leads to better clustering of load types. Using this set for profiling correctly clusters workday load types (WoLP) with sensitivity and precision (\(P\)) rates of 81.82% and 85.71%, respectively. These rates are lower for clustering weekend load types (WeLP), as shown in Table 3: 65.38% for sensitivity and 58.62% for precision. The overall accuracy of this clustering is 77.17%. We observed that measuring distance to the weekend load patterns set does not provide acceptable accuracy for clustering either load type. Due to a high rate of false positives when clustering workday load types and a high rate of false negatives when clustering weekend load types, weekend load-patterns-based clustering results in low F-score values and accuracy. As shown in Table 4, we achieve 75.00% sensitivity and 24.49% precision for clustering workday load types due to a high false positive rate, and 17.78% sensitivity and 66.67% precision for clustering weekend load types. The F-score values are 0.3692 and 0.2807 for WoLP and WeLP, respectively. The accuracy of this clustering is 32.79%, which is not comparable to workday load-patterns-based clustering. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Performance Measures** & \multicolumn{2}{c}{**Power Profiles**} \\  & **Workday Profile (WoLP)** & **Weekend Profile (WeLP)** \\ \hline Sensitivity/Recall (\%) & 75.00 & 17.78 \\ Precision (\%) & 24.49 & 66.67 \\ F-Score & 0.3692 & 0.2807 \\ Accuracy (\%) & 32.79 & 32.79 \\ \hline \hline \end{tabular}
\end{table}