Application of Enhanced CPC for Load Identiﬁcation, Preventive Maintenance and Grid Interpretation

: Currents’ Physical Components (CPC) theory with spectral component representation is proposed as a generic grid interpretation method for detecting variations and structures. It is shown theoretically and validated experimentally that scattered and reactive CPC currents are highly suited for anomaly detection. CPC are enhanced by recursively disassembling the currents into 6 scattered subcomponents and 22 subcomponents overall, where additional anomalies dominate the subcurrents. Further disassembly is useful for anomaly detection and for grid deciphering. It is shown that the newly introduced syntax is highly effective for identifying variations even when the detected signals are in the order of 10 − 3 compared to conventional methods. The admittance physical components’ transfer functions, Y i ( ω ), have been shown to improve the physical sensory function. The approach is exempliﬁed in two scenarios demonstrating much higher sensitivity than classical electrical measurements. The proposed module may be located at a data center remote from the sensor. The CPC preprocessor, by means of a deep learning CNN, is compared to the current FFT and the current input raw data, which demonstrates 18% improved accuracy over FFT and 45% improved accuracy over raw current i ( t ). It is shown that the new preprocessor/detector enables highly accurate anomaly detection with the CNN classiﬁcation core.


Introduction
Anomaly detection attracts considerable research efforts, mostly by means of analytic models [1][2][3]. Work was performed regarding various types of anomaly detectors and various objectives such as: Vacca's review book about anomaly detection on computer networks intrusion detection systems [4], Kovanen et al. performed anomaly detection survey work on encrypted traffic [5], part of a book "Lecture Notes in Computer Science" by Springer, and Kamat et al. performed an anomaly detection survey work for preventive maintenance [6]. Multi-channel anomaly is a more sophisticated since it requires multiplicative computation resources and sometimes a collaboration of the channels: generation of a collaborative view. By "collaborative" it is meant that this is an aggregative view. "Multi-channel anomaly detection" work was performed on C-LSTM networks with a good review section by Tae-Young et al. [7] for computer networks: web traffic covers the majority of today's intrusion detection systems: contents of data and C-LSTM is a cascading of "Convolutional Neural Networks" and "Recurrent Neural Networks" deep neural networks. Zhang et al. performed anomaly detection research for the electric grid using time-series data [8], mainly for intrusion detection. Calafon et al. and L. Zhang et al. reported that electric grid anomaly detection uses multi-channel detection [9][10][11][12]. A characterization of the grid works is that they are quite effective using statistical and artificial intelligence (AI) methods. However, the works do not use specific electricity normal. Classical machine learning architectures must be mentioned herein for anomaly detection, such as classifying (supervised learning) and clustering (unsupervised learning) algorithms. There is a wide variety of such algorithms: Support-Vector-Machines, logistic regression, random forest, K-means, K-nearest neighbor, bootstrap-bagging. Their main advantage is low computational cost, less required dataset, and their disadvantage is lack of self-feature generation and less accuracy provided that the deep learning is operating effectively, which is a major if. The self-feature generation enables a variety of grid segment types and anomaly detection. The other group that may be used is the Convolutional Neural Network (CNN), which is also a deep learning network that is used for automatic feature generation-its first advantage herein. It also excels, as shall be shown, in "spectral" feature generation-another consideration, since CPC is a spectral theory [18]. The RNN feature generation stems from multi-variate and multi-step learning and implementation, and at the most may stem from a few neural layers. The CNN features are known to be powerful. On the other hand, the RNN family excels in time-series processing [7,24] and may require less data. Last is, that with CNN, the convolution operation is naturally "collaborating" multi-channels if properly inserted, and this assures the construction of a multi-channel dimensional space. In the current work, grid interpreting denotes extraction of loads, equivalent R, L, C electric scheme. This paper focuses, however, mainly on anomaly detection. CPC is a priori found to be a potential candidate suitable candidate for the objective of grid interpreting, as it originally disassembles the current into five physically meaningful components.
If such R, L, C sensitive CPC + CNN models, for example, are effective, then they are suitable for (1) real-time, (2) remote, (3) multi-channel, (4) highly accurate, (5) require less data and faster decision for objectives of (a) preventive maintenance [26][27][28][29], (b) grid anomaly detection, and load extraction through measurement. Such circuit extraction methods are found in scientific branches parallel to electric machinery, such as Lithium battery equivalent schematic [30] deconstruction. Previous interesting work on load extraction and biological systems equivalent electric load schematics is found in [31]. A similar methodology was also developed in RF circuit measurements [32,33]. Preventive maintenance and cyberattack prevention are important for human safety and components defect tracking. For example, avionics electric infrastructure and manufacturing assembly lines require defect tracking [34], and electric transformers require corona/arc preventive identification. The paper suggests the usage of CPC as a grid and machinery deciphering mechanism. Generic electric anomaly detection sensory models aim at a sensitivity increase by a factor of 1000 compared to conventional models. This paper wishes to observe whether the CPC "scattered current" is very sensitive to true anomalies. This paper shall investigate an enhancement of "information less" physical components in terms of "change detection" through new disassembly using CPC rational recursively in order to extract additional scattered-like currents instead of one, and additional rationally reasoned current physical components instead of 5 currents in original CPC theory. Moreover, the proposed approach exhibits advantages for electric load scheme deconstruction. Initially, this paper investigates the subcomponents of a current physical component with the majority of anomalies when there is a minor change in the system. One of the main goals of CPC theory is, of course, determining the parameters of balancing reactive power compensators, while the overriding goal of CPC theory is to assign physical phenomena to currents; thus, they are easily recognizable and interpreted. For anomaly detection, disassembly is justified and is potentially intriguing due to possibility of some of the current's physical components being natural anomaly detectors. "Preventive maintenance" and "cyberattack identification" using CPC, if operational, is real-time, remote and potentially multi-channel due to facilitation of anomaly detection; it is continuously monitoring the grid compared to manual proximate periodic maintenance. It is remote, performed at the data center. It is real-time with a provided IoT sensor, such as a waveform recorder, which refreshes the data center every minute or at periodic instances. A question may arise as to why we should consider embedding CPC sensory models cascaded to deep learning when deep learning exists?
A potential answer that shall be studied: large factories, such as power plants, nuclear reactors, and offshore drilling rigs, contain approximately X10,000-X100,000 analog signal sensors; the proposed method requires at least X10,000 less input. Considering detection without CPC: handling the signals as raw data generates large data that computationally loads the deep learning anomaly detection core beyond certain IoT channel counts. Then, we need to take the output anomaly yes/no of each such a subcluster of IoT-s and insert it into a second hierarchal layer. This forces the IoT sensory channels to form clusters in small counts; otherwise, the computations are too numerous for the server. Handling them as spectral and physically meaningful quantities reduces signal dimensionality tõ 40 for the harmonics count and 5 for the currents physical components count of compact anomaly data. Finally, another reason is that considerable research effort is devoted to analytic anomaly modules and less to sensory preprocessing models. Much work exists on the analytics module with relative neglect of preprocessing to the AI and data preparation model. The first attempts to use CPC for anomaly detection in smart grids were reported in [26,27]. Using raw data: there is no guarantee that the correct anomalous signal subcluster of highly correlated signals will be selected, thereby reducing the collaborative anomaly detection probability. Another advantage over these scalable solutions is that this sensor preprocessing CPC model assures real-time early alert (1) because it consumes much less raw data and (2) due to the collaborative anomaly space integrating infinitesimal parametric changes. CPC may also explain electric power phenomena through physical significance [18]. To obtain these goals, some micro-enhancements shall be studied. First, the usage of the currents' physical components is studied in this paper, not as RMS values, but as time-domain and spectral-domain "signatures"; does it provide significant information, even if negligible changes exist that are not detectable by other theories? The second aspect that is addressed in this paper is an enhancement of CPC theory by recursive operation of "CPC rational" to further disassemble the existing currents. From the power transport theory used for "active filtering", it makes no sense to further disassemble the currents. However, for anomaly detection, it can be justified. Preventive maintenance and cyberattack identification using CPC, if operational, is real-time and remote. It continuously monitors the grid compared to periodic manual human maintenance. From load deciphering and more sensitive anomaly detection points of view, it is interesting to investigate (a) whether it is possible to further disassemble the currents and (b) whether it is significantly useful. Another theory enhancement performed in the paper is called the "CPC Z-transform" [23], which analyzes the "admittance transfer function" rather than only currents and uses its counterpart Laplace transform to study the possibility of load "equivalent electric scheme" extraction for linear loads or linear load approximations. The proposed method does not require signal injection. It is based on the grid voltage inherent noise. By combining the two methods (a) "time-domain CPC" and "spectral-domain CPC" amplitude and phase signatures as mathematical preprocessing virtual sensors (to the classification core), features are generated for future machine learning usage for anomaly detection. (b) Admittance functions "CPC + Laplace transform" are briefly demonstrated for load extraction. Combined with the fact that meters with waveform recording capability are spread in some countries in high-, medium-, and low-voltage grid segment substations, and some voltage consumers and energy manufacturers, remote preventive maintenance, load extraction, and load diagnostics are possible instead of on-site technologies. Another conclusion from this study, if successful, is that current physical components are physically meaningful components as implied by this paper. It may be reinforced herein, as they may show different behavior under the onset of anomalous phenomena, as opposed to opinions referring to them as mathematical-only components [18]. All this development, if it succeeds, leads us to suggest referring to CPC as beneficial for the "grid interpreting method/mechanism", and this is novel to its previous roles in active filtration and flicker analysis of wind turbines. Toward data science, in a second example of a rectifier AC/DC converter, features generated using high-order dimensional spaces are shown by example. CPC is the main issue of this paper. In order to demonstrate that it is a natural anomaly de-tector by itself, it is cascaded with a deep learning network serving as an anomaly detector. The deep learning network enables then to compare three types of data system behavior: raw data, FFT operated on raw data and CPC operated on raw data. Since CPC is a spectral theory, it may be visualized as "raw data−→ FFT −→ CPC". CPC original disassembly shall yield five currents physical components and a certain expected sensitivity that shall be validated. The research shall demonstrate that there is still room for improvement: what are CPC limitations that are desired to be improved? CPC current disassembly rational is not taken all the way down. That is because in assignments where CPC is used, there is no necessity for further disassembly. With active filtration, known circuit analysis, electric power computation, analysis of wind-turbine flicker noise-CPC is sufficient and more. Anomaly detection [23] and grid interpreting are relatively novel applications of CPC. Let us mention some of the requirements from such a system: remote, real-time and not post-processing, multi-channel, more accurate, faster decision, and less required raw data. The research shall study whether these properties are benefited from incrementing the physical component count. A question is asked how does the "components count" affect grid interpreting? This is attended briefly herein. The physical components are incrementing the number of "measured currents" from one to quite a few. More currents comprise more information. Multiply this by the CPC spectral nature-let us say 50 harmonics, and that enables generating many equations instead of a single equation. When interpreting the grid beyond a certain volume of branches and R, L, C components circuit complexity, the same total signature can be mapped to various topological circuits. Additional equations eliminate the various options, leaving only a single matching circuit.
The research shall study whether the addition of physical components applies only to the single phase, as mostly presented in paper, or does it apply perfectly to three phase three/four wire; the same with suitability to harmonic-generating-load (HGL), which is not trivial as shall be shown. That comparison enables a quantitative estimation of CPC preprocessor added value, and also enable attempts to generate a multi-channel anomaly detector. The proposed anomaly detector is a completely different implementation. It starts with a CPC preprocessor, which we shall attempt to prove, digesting the anomaly and does nearly all the anomaly detection task. It is intriguing what shall happen when a digested time serial where anomaly is intensified to binary 0,1 levels time series of some of the physical components. It acts as data balancer. Two extreme directions may occur: it may direct the CNN automatic feature generation to make the detection even more precise. In that way, it may require much less data for detection, shortening detection period. On the other hand, it may cause a problem to the CNN since it is now a series 00011100001. If on one hand the CNN shall require less data cascaded to CPC, then maybe that vacancy could be exploited in favor of multi-channel at the same computation cost. The main paper's objective is to investigate CPC, and the secondary it to explore its co-work with CNN anomaly detector. In this paper, a paper website is set with scrambled code (DLL) implementing the proposed CPC theory and enhanced CPC and a table of the theorems to assist during reading the testing chapter to correlate the results to theorems. This paper's objective is to demonstrate that CPC representation boosts interpreting electric grid and machinery signals, primarily for anomaly detection but also for cyber-attack Intrusion Detection System (IDS).

Introducing CPC Theory-An Introduction Directed to Anomaly Detection and Grid Interpreting
CPC theory is presented herein briefly-anomaly detection and grid interpretation oriented. A full introduction is given in the papers described in introduction section and in [18]. Figure 1 illustrates the currents construction procedure, harmonic by harmonic. The following disassembly of total current into physical components is performed: where: i total (t)-total current i active (t)-active current i scatter (t)-scatter active current i reactive (t)-reactive current i unbalanced (t)-unbalanced current i customer (t)-customer current Each of these currents has a physical meaning. The CPC disassembly procedure takes each harmonic, and initially disassembles the current harmonic according to propagation direction, left hand (|ϕ i | > π/2) or right (|ϕ i | < π/2 hand. The current propagating left-hand from grid to load is named distribution current i Distribution and the current propagating right-hand from load to grid is named customer current i Customer . The distribution current is then harmonically further disassembled. Each current harmonic contains a real component which is named active, and an imaginary component which is named reactive. The active current component in the Budeanu sense [35]. CPC does not split the distribution reactive current harmonic, but it splits the active into active, fixed named simply i active and active, scattered named i scattered . After classification, all the harmonics belonging to same current type are summed according to following rule.
where: N type -the set of all harmonics of type ∈ {one of: active, scattered, reactive, unbalanced, customer} i n -current harmonic v n ∈ voltage harmonic U 0 -voltage DC component Since harmonics are orthogonal and "real and imaginary" are also orthogonal, the physical components also abide to following equation: This paper shall investigate whether some of these currents may provide information as regards to anomaly. Then CPC is a simple procedure and if it preprocesses the data to an actual machine learning anomaly detector, observe what is happening. Further this paper shall investigate into the potential of wealth of information that is provided by each separate physical component. In large circuits the generated two-ports signature may fit several optional circuits. Eliminating options and selecting the most probable is easier with additional equations, and these may come from the separate physical components.

Introducing "A Preprocessor Cascaded to Anomaly Detection Core" Design
A preprocessing virtual sensor located at the data center may greatly benefit anomaly detection. If it saves computational resources from the core and arrives at the conclusion with regard to faster anomalies, then it may better serve two issues: (1) enabling the anomaly detection core to process vectorial multi-IoT channel sensors and (2) being realtime. After the development of the properties of the newly proposed preprocessing detector, collaboration with the AI anomaly detection deep learning core is presented. The vision of the proposed work, which is not fully described herein, is to enable faster, less required raw data, more sensitive and multi-channel analog anomaly detector and enable grid interpreting. For that, it is required that we investigate and prove several issues: (1) attempt to prove that CPC is a natural and strong grid anomaly detectorthe current's physical components being the anomaly detectors. Benefit from electricity knowledge to anomaly detection (2) their benefit in three dimensions: (1) required amount of data, (2) required amount of time, (3) accuracy-as compared to other technologies. After evaluating that subject of the current paper, connect in cascade to a CNN anomaly detector. The architecture that is the subject of this paper is described in the following scheme. Figure 2 left is demonstrating a classical anomaly detector scheme, where anomaly detection core such as deep learning, is receiving raw data and processes it. Right represent another. Architecture: right figure is flowing from right to left. A preprocessing module is preceding the core. At the preprocessing front-end, some new knowledge is insert, such as electricity knowledge. The front-end is inevitably directing the core training and selffeature generation if it exists. Regarding the core during training stage as an optimizer of optimization problem, the front-end redirects the optimization procedure. A conventional grid anomaly detector is often receiving raw data. Proposed scheme is using CPC as a preprocessor to the anomaly detector, using electricity knowledge to facilitate identification and act as a data balancer. If some of the currents shall be strong anomaly detectors then the anomaly shall be refined. Data shall be more balanced. The study is then whether this couple-CPC + CNN-is benefiting. First of all, the CNN is capable of accepting any time series: raw data, or FFT, or CPC. If CNN is benefiting in the three properties described above, then it shall be an achievement. The research shall show two additional benefits: (1) grid interpreting. During reverse engineering from two-ports voltage and current waveform measurement, the signature fits quite a few circuit options. The multitude of physical components generates additional equations used to extract additional data as regards to circuit structure. A series of 14 theorems lay the precise foundations of grid interpreting using CPC and general electricity theory. (2) multi-channel anomaly detection. If the cascade facilitate the CNN work, then computation power may be exploited for multi-channel. CNN being may automatically feature generate a multi-dimensional space through the repeated convolution layers. Next chapter is initiating the theory development.

Development of CPC Time-Domain and Spectral-Domain Model Sensing
The CPC original theory is presented in [18]. The first sensor models used were discrete Fourier transforms of the voltage and current physical components.
where: i k (t)-current physical component of type k in the time domain I k (n)-current physical component of the type k FFT transform at spectral frequency n k-CPC current physical component type ∈ {Active, Scattered, Reactive, Customer, Unbalance }: Active-spectral fixed admittance current component Scattered-spectrally varying current component of total active current Reactive-reactive current component Customer-customer current component Unbalance-load unbalance current n-harmonic index 1,2,3 |I k (n)|-absolute value amplitude-discrete spectra of the current physical component of CPC type k, harmonic index ϕ k (n)-phase angle spectra of the current physical component relative to the kth harmonic voltage.
Herein, the phase spectral signature is not considered less important than amplitude spectra.

Enhancement of CPC in Favor of Grid Deciphering Mechanism-Formulation of E-CPC Theorems
Development of the idea of using CPC as a grid deciphering method/mechanism: E-CPC rule 1: an enhancement may be applied to CPC, as the separation of "reactive current" into reactive fixed spectrum and reactive scattered current, which is the same as active and active-scattered in the original theory: where: i A,total (t)-active current in the classical Budeanu [35] meaning. Current that aligns phase angle with voltage i R -reactive current in the classical Budeanu [35] meaning. Current that is ±π/2 gap phase angle with voltage i A,total (t)-active current component in the time-domain formulation, such that when visualized in the spectral plane it is the steady-state component in the CPC sense [18] i A,Scattered (t)−active current component in the time-domain formulation, such that when visualized in the spectral plane, the frequency variable component is the CPC sense [18] i R (t), i R, f ixed (t), i R,Scattered (t)-same as the above currents accordingly, only reactive currents are disassembled.
In the Budeanu sense, it may be shown that original Budeanu power [35] is equivalent to CPC in the manner that it may be expressed as proven in appendix work [36] in Sections 6.1. CPC cluster of all active components is equivalent to conservative active current definition. Same applies to reactive. Powers are as follows: where: v(t)-total instantaneous current, i(t)−total instantaneous voltage v n , i n -voltage and current harmonics of order n as computed by FFT over a single period The CPC definition is equivalent, but it splits currents into customers and distributions and then fixed and scattered. This is shown theoretically by the broad appendix work [36].
i(t)-in the sense of the sum of harmonics i n , where each harmonic current is phase shifting π/2 as referred to the voltage harmonic. This is different than shifting entire current by (grid − period)/2 since for each harmonic π/2 is a different time delay.
The preceding theorems regarding diagnostics applies for describing preventive maintenance that would benefit from following theorems, are for example [37][38][39]. Assisting signal processing and mathematical works used herein for proving the following theorems are [40][41][42][43].
A note regarding the coming henceforth graphs: a rather complete set of graphs may be found in [44].
Theorem 1. Scattered current sensitivity theorem: The scattered current may be significantly smaller than the total active/reactive current, yet the 'spectral change' information is located there.
Proof of Theorem 1. Because sensitivity measure S I R/A ω of the system change is there, S I R,A ω − I R/A sensitivity with respect to ω is as follows: where: S y x -sensitivity measure of y with respect to x (standard definition) I R,A -reactive or active current (equation holds for both) ω-electric frequency.
Considering Equation (7) the effect of the scattered current is semi-equivalent to the phenomena described in Figure 3. In Equation (7) differentiation can also be operable over discrete frequencies as difference rather than differentiation. The mean field and "fluctuations around the mean field" are explained in [18,45,46], and the proof and discovery are presented in the current work: where: I n (ω n ), V n (ω)-voltage and current harmonics, where ω n = nω 1 , where n is the variable. ω 1 -grid frequency, or grid frequency prime harmonic G e -CPC load equivalent conductance G n -harmonic load conductance In Equation (8), this shift in terminology is comprehendible. i a is mean field and spectrally fixed. i Scatter is spectral fluctuations around the mean field. The probability of identifying anomalies in the scattered current is intensified by the spectral signature over a nonfixed spectral function. That is due to change integration: where: ∆i change -signature measure, integration over the spectral range i A/ R, total -active/reactive current: sum of scattered plus fixed as expressed in the frequency domain (post FFT) Discussion: The scattered current fluctuates around the mean field. The mean field is {active current and reactive} "non scattered current". If the anomaly is onset and still weak, then it is more apparent in the "fluctuations around the mean field". It is not observable within the mean field.

Theorem 2.
Reactive scattering current sensitivity. The reactive→ {fixed or scatter} current signature is more likely to catch changes than the total current or active current. Signature is in the sense of observing the entire spectra, or as expressed in Equation (9).
Proof of Theorem 2. Changes over reactive components due to external effects such as current/voltage are likely to arise. The resistive spectral relation is fixed and reactive is pole/zero dependent: where: i R (s)-resistive current, current through a resistor converted to Laplace domain(s) i C (s), i L (s)-capacitive and inductive currents accordingly, Laplace transform-ed s-Laplace variable which is a complex variable σ-real component of s expressing attenuation/gain "exponential coefficient" ω-frequency.
Theorem 3. Reactive current sensitivity. Phase may contribute to anomaly detection not less than the amplitude signature in reactive components.
Proof of Theorem 3. Reactive currents of purely reactive components are: where expressions of Equation (10) are developed for purely linear capacitive and inductive loads. E-CPC rule 2: Orienting CPC toward being an electric grid interpreting mechanism, further current disassembly that makes sense may be performed with CPC customer current: (1) breaking it into active and reactive current components-the same disassembly method taken from classical CPC, deciphering oriented: where customer/distribution current is based on a selection rule operated over harmonic components: phase delay >, < π/2. CPC customer current is a current physical component in which the net is outgoing from customer to grid. Reasons for customer current are as follows: (a) open delta connection-inward current through phase R goes outwardly from the load into the grid through phase S. (b) More obvious scenario: harmonic generating load (HGL): a nonlinear load generates a harmonic current that does not exist in the voltage waveform. Some of them are net outward from load to grid. Currently, expression for admittance is not always possible. The difference from classical CPC current deconstruction is that at CPC for distribution current [18] following relation is correct: where: Y n -admittance of harmonic index n, computed as specified by the equation and defined by CPC I n , V n -current and voltage harmonics of index n after FFT transformation of timedomain variables G n , B n -Real (active) and imaginary (reactive) admittance components. However, decomposition of "customer current" into harmonics is possible, and decomposition into real and imaginary is possible, if a modification from CPC is made in favor of anomaly detection, as shall be shown at Equation (27). For example, interpretation of current harmonics of wind farms, using CPC may be found in [37]. The motivation for using CPC as an early alert model is that some current physical components may constitute only a fraction (~0.1%) of the total current. That specific component may contain anomaly information, especially if it is the spectral changed component. Using, "conventional electrical" methods -it is demonstrated that it is occasionally unnoticeable. For example, "measurement/distribution transformers", prior to arc or corona occurrence, tend to mechanically vibrate. One among many papers on the topic is [38]. A mechanical vibration inserts an electric inter-harmonic vibration. The second example is an AC/DC rectifier with slowly varying load or grid voltage observed from the grid. Justification that specific physical components are effective for both anomaly detection and load extraction is provided in text bellow.

Generation of Additional Scatter and Reactive Currents by Recursive Operation of CPC
Even if there is no physical meaning, the proposed mathematical disassembly: (a-1) evidently generates anomaly signals as scatter and reactive signals, and (a-2) generates additional equations, which assists in identifying additional unknown variables during grid interpretation. However, we show below that it has a physical meaning because CPC disassembly does not go all the way down. CPC [18][19][20] and the proposed E-CPC single-phase executables and recorded dataset are available in [44] (access to this dataset is available by request). The original CPC does not break down to all the possible physical components using the same initial reasoning. It is shown here how additional disassembly may be performed, and its advantages for anomaly detection and grid interpreting. (1) Grid and premise anomaly detection for preventive maintenance and intrusion detection systems. (2) Grid interpretation: additional equations may enable more parameter extraction. Figure 4 shows the proposed disassembly. (1) As shown in Equation (2), the reactive current is disassembled into fixed and scattered current, as with classical active current in the Budeanu sense, i.e., the sum of distribution and customer reactive currents. (2) The customer current disassembles into active and reactive currents, as shown in Equation (7). Furthermore, these subcurrents are disassembled according to the proposed E-CPC theory into fixed and scattered components. This disassembly generates 22 current physical components, which, as Czarnecki evidenced in [18], are mathematical components. This situation is analogous to L.D. Landau quasiparticles [45]. They are virtual particles, but they describe microscopically complicated systems and explain numerous effects in condensed matter physics. There are two advantages to the E-CPC proposed disassembly representation. (1) six scattering currents arise rather than one. The testing chapter inspects the theory that scattered currents occasionally carry anomaly detection information. It should also be determined whether the new scatter/reactive scatter subcurrents act as anomaly detectors once the apparently information-less components are disassembled into 10 −3 and 0.999. (2) Whether much weaker phenomena unnoticed with the proposed signatures in Equation (1) in classical CPC is noticed by disassembly of E-CPC. The disassembly of reactive current may be performed simply by analyzing the reactive current as active. E-CPC rule 3-reactive phase shift:

Reuse of Existing CPC Functions
where: j-is the complex √ −1 and v(t) is the measured voltage. i reactive, f ixed -the spectral mean-field component of reactive current as defined by CPC i reactive, scattered -the spectral fluctuations around the mean field as defined by CPC that changes the reactive current into active and then is disassembled into "active" and "scattered". The customer current separation into active and reactive is performed by recursively operating CPC over the customer current. There, it is not disassembled yet into active/reactive, and so therefore it contains both segments. The analysis is performed over the customer current shifted by π/2. That is because active/reactive current is performed over distribution current and the operation −j = e −jπ/2 switches the distribution and customer: {i customer,active , i customer, The same objective may be obtained by operating it over −j * i customer . Then, the distribution current, which is the customer current, changes to zero. Then, it is again disassembled into fixed and scattered subcurrents. This paper is about applying CPC as an anomaly detection preprocessor prior to the anomaly detection core. It must be understood that this reoperation of CPC reasoning over CPC physical components generates six scattering currents and six reactive currents, which are shown in the experiments to increase sensitivity to a new level such that CPC is less sensitive. It has already been shown in theorems 1 and 2 that they are potentially more sensitive than the rest of the currents.

Benefits of Enhanced CPC as a Grid/Machinery Deciphering Method
The CPC is effective for reverse engineering an electrical scheme by measuring a single two-port. Two groups of equations are derived from the CPC. The theory is built as if parallel branches with the same voltage operate on each current physical component [23]. In Figure 6, the currents are constructed as if parallel in CPC. The following set of theorems is correct. Theorem 4. "admittance function separability theorem". As observed in the above schematics, the admittance transfer function may be modeled as composed of several admittance physical components: where: m-branch admittance index Y Total (Z)-total admittance as computed at two ports and measured from The relation is maintained with an enhanced CPC with 22 currents. (a) It must be clear that the CPC Z-transform [23] is more than a Z-transform of CPC, but is rather the admittance transfer function. All Z/S transform tools are enabled to CPC, (b) an understanding that CPC disassembles admittances and not only currents. (c) Note that, for the first time, CPC is the ultimate electricity anomaly/change detector. Theorem 5. "Current physical component separability theorem". Looking at an electric scheme with n parallel branches, the following current relation is maintained in the CPC: where: i m,total -total current physical component of type m index ∈ {CPC, enhanced CPC current types} and n branch index i n,m -current in-branch n of CPC type m ∈ {Active, Reactive, Scattered, Customer, Unbalance} or m ∈ {E − CPC current types} ω-electric angular frequency In addition, the following CPC admittance relation is maintained: where: Y m,total -total current physical component 'admittance' of type m ∈ {CPC current types} Y n,m -current physical component 'admittance' in parallel branch n of CPC type m including the enhanced CPC of this paper Proof of Theorem 5. the theorem's proof is nearly self-explanatory. Rigorous proof is possible but is not detailed here. Taking a "devil's advocate" approach, the capacitive branch current may occur opposite in direction and equivalent in magnitude to the inductive other branch current, violating Equation (17). The reactive branch currents hypothetically contribute to the total active current. However, this may only occur at a certain resonance frequency. In the "entire spectral range" perspective, Equations (17) and (18) are correct.
The following theorems are qualitatively verified in test case 1. There is a hidden assumption that the total current reflects the load and not only customer current. Theorem 6. "RL serial circuit admittance disassembly" reactive admittance theorem: for a linear load that includes only resistors and inductors (such as an induction AC motor, the total→ reactive→ scatter admittance, that is computable equals the sum of all parallel reactive 'admittances' of the branch's RLC connection.
An example of a serial connection for reactive admittance is: where: L m , R m -branch indexed n: inductance and resistance serial linear components Y total−→reactive -total "reactive" E-CPC admittance component, which means the sum of Y Customer−→reactive + Y Distribution−→reactive Y total−→reactive−→ scattered -total E-CPC reactive component, its subcurrent Reactive→ Scatter, which in the case of purely linear parallel branches of serial RL of Figure 5 is equivalent to Equation (19). Another issue in using CPC expansion (24) may be estimated as the Reactive −→ f ixed component is rather small but not zero, and component Reactive −→ scatter is the larger component observed by Equation (19). Figure 7 is illustrates circuit of Theorem 6, a parallel array of serial R, L connected components. The theorem is written because it may mistakenly be considered that the following is correct: Y total→reactive = ∑ m 1/(jωL m ). This is in accordance with Theorem 5 Equation (18). However, for serial RL per branch, admittances do not accumulate, as in Equation (18).

Proof of Theorem 6:
This is simple arithmetic of serial RLC admittance per branch, then summation. Theorem 7. "RL serial circuit active admittance disassembly theorem": for linear loads with resistive elements in the parallel branches, the customer→ active→ fixed admittance that is computable equals the sum of all resistors and admittances. Let 'i' be branch index. Example for serial RL: This is written because the following may mistakenly be considered correct: Y total→active = ∑ m 1/R m or Y customer→active shall mistakenly be considered equal to it. Theorem 8. "RLC serial circuit reactive admittance theorem": for linear loads with a serial mixture of inductors and capacitors in the load parallel branches, the total→ reactive admittance, which is computable, equals the sum of all parallel imaginary segments of branch admittances: where: R m , L m , C m -branch indexed n, serial RLC "linear components" per each branch m. Y total−→reactive -total "reactive" E-CPC admittance component, which denotes the sum of Y Customer−→reactive + Y Distribution−→reactive Y total−→reactive,m -total reactive current in-branch index m Y total,m -total current in-branch index m Theorem 9. "RLC serial total admittance separability": for linear loads with a mixture of inductors and capacitors in the load parallel branches, the total admittance, which is computable, equals the sum of all parallel active admittances separately + reactive admittances separately. Example for a circuit with parallel branches of serial RLC connection is Figure 8: where: R m , L m , C m -branch indexed n, serial RLC "linear components" per each branch m. Y total -total admittance at two ports of measurement. These are most of the left ports in Figure 8. Theorem 10a. "admittance correlation to CPC". Equating the transfer measured-computed admittance function for linear load, the total (customer + distribution)→ reactive→ fixed current is close to zero. Although the reactive component of, for example, the parallel branches of serial RLC look spectral, in CPC, a spectrally constant component is extracted according to [18]: where: R m , L m , C m -branch indexed n, serial RLC linear components n-harmonic index, m-branch index N D -set of harmonic indices that are in the distribution current [18] N C -set of harmonic indices that are in the customer current [18] This theorem relates to an important issue. The component-based active/reactive admittance transfer functions from Equation (19) are based on "total" active and reactive currents and not only customer. But for HGL there is a required extension to be described at Equation (2) bellow, because admittance computation cannot be obtained according to Equation (13) because there is no matching voltage harmonic. For linear loads above is immediate. Figure 9 illustrate how grid parallel branches' components may be drawn based on CPC harmonic admittances. Theorem 10b. relation between CPC and classical theory: i reactive,total = i CPC,reactive,distribution + i CPC,reactive,customer i active,total = i CPC,active→ f ixed + i CPC,active→scattered distribution where: I reactive,total -reactive subcomponent of total current. CPC is the sum of "customer→ reactive" and "distribution reactive" currents I active,total -active subcomponent of the total current. CPC is the sum of the "distribution active" current plus the "customer active" current. E-CPC terminology active current is again the sum of "fixed" and "scattering" currents I CPC,reactive,distribution -the E-CPC distribution current and its reactive subcomponent I CPC,reactive,customer -the E-CPC customer current, its reactive subcomponent Equation (25) is important because "measured-computed admittance" is based on Equation (23). CPC+Z-transform [23], whereas the proposed electric scheme for comparison is described by Equation (22).
Theorem 11. For a linear load, the total (customer + distribution)→ active→ scatter current is not zero. It is based on Equation (23). The theorem is given so as not to mistakenly assume that Y total,real = ∑ n 1/R n simply becausei total,real = ∑ n i n,real . The active component of each branch contains spectral reactive components. Theorem 12. Method enlargement to HGL: Theorems 3-5 are also correct for the harmonic generating load (HGL) [18]. Practically, there might be changes. Mathematically formulating it referring to paper [18]: where: N C , N D , N C + N D -population of all harmonics belonging to the customer current, distribution current, and total current, respectively n-a harmonic index Example: Following Equation (14) it is correct for n ∈ N c , N D , N C + N D . Figure 10 illustrates Theorem 12. Enhancement to HGL poses a CPC limitation for usage in favor of grid interpretation and anomaly detection. There are current harmonics without a matching voltage harmonic. The admittance cannot be computed. The following "non-CPC" enhancement enables HGL treatment. Experimental proof is not the subject of this paper: I e = P/ u I n = FFT{i(t)} I Active = I Active, f ixed + I Active,Scatter = Re{I(n)} I Reactive = Imag{I(n)} {I r,n } I n = I r,n − I r,e ⇒ I scatter,HGL = ∑ n I n e jω n t (27) where: P-active power u-voltage RMS I n , I(n)-current i(t) Fourier transform I Active -HGL active sum of active, fixed and scattering currents I Reactive -HGL reactive customer current I Scatter, HGL -scatter HGL current Theorem 13. anomaly enhancement by admittance. Admittance physical components improve anomaly detection. Proof: spectral sensitivity is a measure of 'the change' signature since it is based on 'many frequencies change detection': where: Y m -total admittance measured/computed at the current indexed m index ∈ {CPC, enhanced CPC current types} .
i m -total current in-branch indexed n v m -voltage in-branch indexed n Equation (28) is correctly interpreted not as the admittance dependency stand alone on current i /i and over-voltage v /v. The correct interpretation, is that "admittance is independent of voltage amplitude". Since the current depends on the voltage through i = Yv, the voltage-dependent component is approximately subtracted leaving only the "non-voltage dependent". Simulations performed with various voltage sources, white noise + pure sine, sawtooth, and rectangular waveform, yield identical spectral admittance functions. Theorem 13 is especially important: admittance is indifferent to grid input, and both anomaly and grid interpreting are intensified. Admittance normalizes with the voltage amplitude, as shown in Figure 11. Figure 11. Admittance normalizing the current by grid effects, equating all harmonics and leaving only the grid internal characteristics. If V 1 is 100 times stronger, it does not matter for the Y 1 , Y 2 ratio.
Extraction of the grid scheme from measured spectra is demonstrated in Figure 12. Comment: drawing functions such as Equation (23), this summation of rational polynomials is shown in Figure 11 and is also drawn for RC circuits. Each parallel branch is a min-max pair in Figure 12. Theorem 14. separability of inductive and capacitive admittances. Inductive and capacitive components may be separated from the total (customer + distribution)→ reactive→ scatter admittance. Proof: using at least two harmonics i = 1, 2: (29) where: Y customer−→reactive (ω i )-CPC customer reactive admittance subcomponent at any harmonic frequency ω i Y customer−→reactive−→scattered (ω i )-CPC scattered subcomponent of customer→ reactive admittance. Scattered admittance only approximately equals the reactive current for linear circuits and usually for nonlinear circuits.
Y inductive (ω i ), Y capacitive (ω i )-inductive and capacitive reactive admittance components Hence, in the following Theorems 1-14, the terminology "enhanced CPC as a grid/machinery interpreting method" is comprehended. Theorem 15 has yet to complement the series when cascading an anomaly detection core with an E-CPC preprocessor.
Theorem 15. Separability of inductive and capacitive admittances. Inductive and capacitive components may be separated from the total (customer+ distribution)→ reactive→ scatter admittance. Proof: using at least two harmonics i = 1, 2: Hence, following Theorems 1-15, the terminology "enhanced CPC as the grid/machinery deciphering method" is comprehended. Theorem 16 has yet to complement the series when cascading an anomaly detection core with an E-CPC preprocessor.

Enhancement to Three-Phase Three-Four Wire and Inclusion of Unbalanced Load
The E-CPC model constructed above is single-phase. Enhancement of E-CPC-and E-CPC-assisted anomaly detection to three-phase three or four wires is straightforward. Except for the unbalanced case, all phase descriptions are independent. This means that having a software module per single phase may be multiplied to handle three phases and, if required, neutral. The unbalanced current physical component remains. The CPC unbalanced component shown in [18] following equation shows an enhancement to CPC spectral components: The unbalanced current computation at [18] is per a single harmonic. Equation (31) enhances straightforwardly to a multi-harmonic case. The unbalanced current following E-CPC rationale may also be disassembled into active, reactive components and from there to fixed, scatter.

Quantitative Comparative Evaluation of the E-CPC Model Anomaly Detection Property Using a CNN Deep Learning Core-Enablement of Multi-Channel "Anomaly Detection" Presentation of the Concept
The following chapter is implemented with E-CPC/CPC to clarify what is innovative. The objective of this chapter is to demonstrate that the innovation of the E-CPC preprocessor, as the "natural" anomaly detector, exceeds the scope of a sensor and enables a "multichannel anomaly detection core" that is remote and real time. Collaboration indicates that all IoT signals collaborate in anomaly detection; negligible changes are aggregated into a single significant anomaly signal. The E-CPC preprocessing unit proceeds in the current experiment to a deep learning classification core, which is located at the datacenter. It is known that the CNN has a "self-generating features" capability through the preliminary CONV neural layers. CPC/E-CPC directs feature generation; as a natural anomaly detector, it performs effective classification. CNNs are selected from various deep learning anomaly detectors for the following reasons: (1) Natural "collaboration" of multiple IoT channels through repeated convolution, which naturally generates a multivariable space. (2) Excel in spectral analysis [30][31][32][33], where CPC is a spectral theory. It is worthwhile mentioning that while CNN increases virtual space dimensions through self-feature generation, AI techniques for dimensionality reduction are available [47]. Collaboration is why CNN is used rather than LSTM, which excels in time-series anomaly detection. It is suspected that the CPC/E-CPC preprocessor will benefit other deep learning cores or even clustering anomaly detectors. This issue is beyond the scope of this paper. (3) It is presented that E-CPC/CPC reduces the required quantity of raw data inserted into the anomaly detection core. The available computational power by the core may be used to significantly increase the fan-in. The latter is only briefly presented herein and should be the subject of another paper. Instead of guessing which IoT channels are correlated and clustering them, there is room now for more channels. (4) The core enables comparative quantitative estimation of (1) E-CPC (2) vs. raw data, (3) vs. FFT, and (4) vs. CPC. Due to paper length, only CPC vs FFT, the 2nd best technology, is presented. (5) Speech recognition has a frequency range similar to that of the recording apparatus; kHz persuaded the team to use this model. This is a minor cause. The success of the cascading E-CPC/CPC preprocessor with a deep learning anomaly detection core opens several new opportunities that appear to have not been possible, at least at such quality, before. (1) A highly accurate "multichannel analog" cyberattack Intrusion Detection System (IDS). Previously, most IDS were communication protocol based. (2) A "preventive analytics" system. Both systems are now suitable with an E-CPC/CPC preprocessor for electric grids and industrial premises. Multi-channel effect is less researched experimentally by current work and theoretical foundations are researched. This is because E-CPC executes most anomaly detection, making computational room for IoT multi-channel without deep learning core collapse or a large epoch count due to computational complexity. To (1) comparatively estimate the benefit of E-CPC over existing technologies, (2) complete the theoretical frame into a complete system, (3) and to evaluate suitability to a (3.1) multi-channel (3.2) remote (3.3) real-time anomaly detector, where the E-CPC preprocessor is located at the datacenter, a cascading to deep learning CNN classification system core is performed. An increase in multi-channel ability makes it closer to accomplish two systems at least at an improved level: (1) remote real-time multichannel preventive maintenance stand alone, (2) remote real-time multi-channel preventive maintenance combined with Non-Intrusive Load Monitoring (NILM) and (3) remote real-time cyberattack IDS, again stand alone or combined with NILM. The NILM algorithm separates the electrical loads, thereby enabling anomaly detection at a single load level. First, the quantity of required data for core training is of the order of magnitude of 50,000 times less than raw data. That factor is variable, but the reason is demonstrated here. A 4 kHz sampler transmits 4000 time-series data pieces per second. Let us assume that the anomaly that has been sensed is evolving for at least 1 sec. Since E-CPC is harmonic, it decreases/concentrates the data into 800 samples/cycles. Let us take the first 40 harmonics as sufficient, as shown in the Results chapter, meaning an X100 condensate factor. E-CPC was shown empirically and semi-theoretically in previous paper sections to decrease the required anomalous signal by 10 3 . This is because according to the original significance of the scatter currents, "the spectral fluctuates around the "spectral" mean field". Scatter and reactive scattering currents are entirely constructed of anomalies, although 100% of anomalies are not necessarily present. It does not matter that it is not 100% of the anomaly as long as close to 100% of scatter currents are anomalous. It is not difficult to conclude that fluctuations around the mean field may be 10 3 times smaller than the mean field (raw data). Two multiples have been identified: 100 and 10 3 . This leads to the theoretical conclusion that a 100,000 factor exists between E-CPC and raw data in noticing the onset of anomalies, and a 1000 factor exists between FFT and E-CPC. The following CNN anomaly classification core is suggested. A natural question may arise as to why to employ CNN and not LSTM, which specializes in time series. The answer is because the process is considered spectral because CPC is spectral. To comprehend in-depth why CNNs are considered spectral, the following theorem is discussed. Even if a deep learning CNN is known for its "self-feature-generation", it does not prevent data preparation by the E-CPC preprocessor. CNNs may self-generate features after the leap performed by E-CPC, and they may shorten the epochs count required to converge because clustering is a more definite a priori. The latter shortening is not the subject of the current paper; integration E-CPC + CNN is. Figure 13 illustrates the data concentration relationship between raw data, and FFT taking only the first 40 harmonics sampled at 4kHz, and power-based E-CPC.

Proof.
Step a: demonstration of spectrality. Convolutional means convolution operation: where c(n)-1D CNN neural network neuron coefficients of the CONV layer x(n)-input time-series vector/scalar. For this paper, current raw data, or E-CPC/CPC current data y(n)-time-series output of the convolution CONV layer working over the time series x(n) At frequency domain where X(ω n ) = FFT{x(n)} : where: ω n -frequency (rad/sec) in rad/sec of harmonic n, meaning ω n = nω 0 X(ω n )− = X(n) FFT transform of time-series x(n) C(ω n )− = C(n) FFT transform of "CONV layer coefficients" matrix Y(ω n )− =Y(n) FFT transform of output of CONV layer y(n).
Step b: Demonstration of the actual spectral behavior occurrence. During testing and training, long time series are inserted, and many epochs are executed using a stochastic gradient descent backpropagation algorithm; emphasis is on stochastics. If signals are ergodic, then the spectral point of view is legitimate [44].

"CNN for the E-CPC Anomaly Detection" Scheme-A Multi-Channel Anomaly Space
The implemented CNN is presented here. It is inspired by speech recognition CNNs [48][49][50][51], (1) primarily due to E-CPC spectral nature (2) and due to the similarity between sound frequencies and the waveform recorder sampler frequency enabling easier knowledge transfer. There is no actual limitation to kHz domain. It is observed that apparently, it was a spectral issue, and then the network acts as a transfer function. Act 2: prove that the process is spectral. During the testing stage. Time-series raw data. If it is semi-periodic for long periods of time as compared to the sampling frequency, i.e., seconds and longer, it is an ergodic process; therefore, it has a spectral statistical nature X(ω n ). It is sufficient that it is a transfer function during the test stage. During the training stage, 1000 epochs with the stochastic gradient descent (SGD) backpropagation algorithm is a statistical process, and 1000 epochs for the 4 kHz sampled signal is~0.25 s. Therefore, even during the training stage, it is a statistical procedure; only the neural network is not a linear matrix because it also has a slow envelope time variance. It must be emphasized that each neuron has an activation gate that prevents saturation but also inserts some nonlinearity. Figure 14 is exact schematic of implemented CNN. Figure 14. Classification core CNN architecture used once cascaded to E-CPC, second time cascaded to FFT of raw data, and a third time to raw data. Some schematic descriptions are oriented to the current work [46][47][48][49] of the network building block. The convolution operation is 1D as defined in Equation (26). It shifts one time-series left each time. The max pool takes the max of these scalar operations at each CONV block. Batch normalization is a preprocessing technique to standardize the data between the layers and make it unit 1 order of magnitude. Everyone familiar with a normal distribution knows this normalization. It avoids unnecessary saturation by setting values to ±1 around a zero virtual mean yet enabling outliers, meaning exceptions outside the standard deviation: where: Z N -Normalized (N tag) variable at the interface between layers. Not to be interpreted as exponent N of Z m z -mean of neuron data s z -standard deviation of neuron data Upon receiving E-CPC data, which are processed, the CNN generates features using the CONV layers; based on the processed data, the scattering current is similar to a logistic sigmoid and intensifies the anomaly. It potentially reduces the required epochs count. A fully connected layer indicates that all layers of neurons are connected to the previous layer. This is different from layers that are not fully connected with some wiring "cut". The question is why this CNN acts as an anomaly detector core. The generated features highlight the anomaly. Repeating CONV both at the time-series level and the several-layer level generates detection. The code was implemented using the Keras Python library. Since E-CPC was implemented in MATLAB R2021a, it converted MATLAB to Python 3.9.5 using "libermate" from the GitHub open-source-code library. Table 1 provides a high-level view of experiments as a whole is explained so the experimental objective is better comprehended throughout their presentation and the context relating to theoretical presentation is better comprehended. For correlation of results to theory look for "in accordance with theorem x, Equation y: theorem title"; this is so that correlation is comprehended. Theorem title is maintaining essence of theorem. Throughout the entire testing, the reader is referred to the "deciphering theorem table" [44] for convenience since this chapter contains references to theorems and equations. Testing is conducted with a loaded AC motor that is allowed to slightly vibrate by releasing motor chassis screws. Five currents' physical components, each (Equation (41)), CPC and proposed E-CPC single-phase executables and recorded datasets and reports are available in [44]. The objective of this section is to show that CPC is sensitive to mechanical phenomena unnoticed from the total current. Figure 15 is showing experimental results of "all screws closed" vs. "6 bench screws only mildly open". Supply voltage and supplymeaning total current. At amplitude spectra-cannot confidently notice a change between the scenarios. Time domain view appears the same. By confidently it is meant: "with high confidence level".

Experimental Layout
The differentiating signals are shown here. Full graphs are shown in [44]. Observing Figure 16 bellow, several results are noticeable: (i) the active and mainly scattered current physical components show a difference between normal/anomalous, both at amplitude and spectra.
The scattered current/admittance as a successful anomaly detector is in accordance with Theorem 1 Equation (7): "Scattered current sensitivity theorem". Theorem 3 Equation (11) is also demonstrated: "reactive current sensitivity". The phase spectra are not less important for matching Theorem 3 Equation (11), Theorem 2 Equation (10). The signature measures the spectral change in current, and spectral "change" from each frequency to another is more sensitive to anomalies. Theorem 7 Equation (20): "RL serial circuit active admittance disassembly theorem" demonstrates that it penetrates active admittance but is less frequency dependent. (ii) When closing the screws, the result is repeatable, which is important. If results are not repeatable, there is nothing to train. Figure 17 shows how a 4 loosen screws situation manifests in reactive current harmonic amplitude and phase spectra.   A contributory factor to repetends is that Theorems 1-14 are generic. (iii) The difference is unnoticeable through entire currents i total (t), i active,classical (t) even with amplitude and phase spectra. This means that the conventional electricity technique does not identify these initially weak anomalies. (iv) The scatter and active currents are only~10 −3 of the total current, yet they are the currents detecting the anomaly for matching to Theorem 1 Equation, Theorem 2 Equation"reactive scattered current", and Theorem 3 Equation (11) "reactive current theorem". (v) The phase spectra are a contributory signature on top of the amplitude spectra. Rationally, scattering currents fluctuate around the mean spectral field, and a small change appears there initially. Electric information is remembered by phase: capacitors and inductors behave in accordance with Theorem 3 Equation (11): "reactive current sensitivity". (vi) Anomaly intensity is intensified by the "differentiation", i.e., scattering currents. Observing reactive current also identifies the anomaly in accordance with Theorem 2 Equation and Theorem 6 Equation"RL serial circuit admittance disassembly". Phase is sensitive to reactive changes. Scattering current is 10 −3 of the total current. In Figures 13 and 14, the admittance intensifies detection in accordance with Theorem 13 Equation" anomaly enhancement by admittance". The spectra are normalized by voltage spectral variance, and only changes in reflecting load characteristics are computed. Generally, mechanical vibrations are typical of distribution, power, and measurement transformers. They vibrate prior to developing a corona or an arc. Using the method is for transformer "preventive maintenance", for example. The waveform recorder used was a standard class 0.2 s smart meter collaborating with a standard power quality monitor module Satec INC PM 180 and 4 kHz waveform recorder.

Case Study 2: Enhanced CPC-By Further Disassembling the Currents
This section demonstrates that the E-CPC yields more sensitive anomaly detection than the CPC. The mildly opening of 6 motor screws attaching the motor to the bench was noticed with the CPC but unnoticed by the conventional electricity theory. However, below the opening of 6 screws, vibration was unnoticed by the CPC. Next, whether the "enhanced CPC" is more sensitive to changes was tested, as theoretically suggested in Materials and Methods. All graphs are shown in [44]. One screw open vs. all screws closed is shown in Figure 18. Harmonic amplitudes and locations are different. The admittance function intensifies the anomaly, and the admittance phase spectra are also distinguished, as discussed and in accordance with Theorem 13 Equation (28)" anomaly enhancement by admittance". Extraction of equivalent scheme details: observation of loaded AC motor equivalent scheme is correlated to the graphs. Observing the admittance spectra, in Figures  15 and 16, change is intensified. The admittance normalizes with the voltage. The reactive→ scattered current is modified as described by and in accordance with Theorems 1-3 Equations (7)- (11). The entire reactive current is apparently unchanged due to vibration. The reactive→ fixed current is close to zero, but it looks different between the two incidents [44] (reactive→ reactive). This is because reactive fixed is not entirely zero in accordance with Theorem 6 Equation (14). The zero-ness of reactive→ fixed current in Theorem 10 Equation (23) indicates that the majority of the reactive component is net spectral, while the B e admittance is much smaller. Another point is that customer→ reactive identifies change more than the original (distribution current→) reactive. The first current is computed from n ∈ N D , while the second current is computed from n ∈ N C . The reactive→ scattered admittance is in accordance with Theorem 6 Equation (14) "RL serial circuit admittance disassembly", while customer→ reactive→ scattered is also included in total reactive→ scattered current. It should be noted (!) that the motor scheme is not entirely a parallel branch scheme. However, the scheme is close enough for equation (19) to be maintained, being only a single branch and a single voltage division. Resistive components: the total current and its equivalent scheme are known. Resistive elements are fixed; however, in the RL scheme, they contribute to spectral admittance, both active and reactive, in accordance with Theorem 6 Equation (19) "RL serial circuit admittance disassembly" and Theorem 7 Equation (20) " RL serial circuit active admittance disassembly theorem". The measured-computed customer admittance is not fixed in accordance with Theorem 7 Equation (20). Sanity checks performed from analysis. (1) For customer currents, the distribution current should be zero. (2) For reactive current -active current should be zero. (3) The sum of all current physical components must equal the initial start of the current. (4) The customer→ active→ scattered is close to zero and contains the customer G e admittance defined by and in accordance with Equation (23). The customer→ reactive, fixed is not zero but close to it and contains the customer B e admittance defined by and in accordance with Theorem 10a Equation (23) "admittance correlation to CPC". The major sensitive component is customer→ reactive→ scattered and is in accordance with Theorem 5 Equation (19) "Current physical component separability theorem". (5) If enhanced CPC implementation uses CPC(j * i customer ) to force active, scattered, it switches 'also' active and reactive and should be reminded. (6). Complete graphs are given in [44]. Figure 19 shows a case where a single screw loosen and how it reflects in the customer→ reactive current. Amplitude of first harmonics is small but different and it is repetitive. Figure 19. 'customer→ reactive → fixed' current and admittance are small but not entirely zero (10 −19 ). Reflects that reactive component Equation (24) C n = 0 (capacitance at reactive admittance).

Case Study 3: Diagnosing a Mild Change in Electric Load Over a Rectifier-Grid Measurement
The objective of this case study is (1) to present a multivariate problem and (2) demonstrate a completely different content world than an AC induction motor. In this example, a series of tests was performed, where at each point, a small modification of either the load resistance or the output DC voltage was performed. Small enough steps such that when observed from the grid, no significant modification of input total current was observed. The AC/DC converter is a nonlinear load and HGL [18] and tested whether CPC may be applied for anomaly detection. Figures 20 and 21 demonstrate an experiment with fixed output voltage and slightly varying load resistance. Figure 20 is voltage, and Figure 21 is current-first time-domain then amplitude and phase spectra. The observation: unnoticeable differences at total current spectra and at voltage, except perhaps current phase spectra but with apparent insufficient confidence level.
Test program: a matrix of work points {v out,DC : 24 ÷ 30 V} -X {R out : 9.79 ÷ 10.87 Ω} that slowly vary with small steps of (0.5 V, 0.4 Ω) is generated. For each work-point, waveforms v grid (t), i grid (t) are recorded for 10 sec. Figures 18 and 19 demonstrate that for two work points, {v out = 24 V, R out = 10.86 Ω } and {v out = 24 V, R out = 10 Ω }. The test starts with a comparative study of the total current vs. CPC, similar to test case 1. Observations from Figure 20 above. (1) Total, active, reactive currents-changes are relatively minor. Figures 20 and 21 show CPCs of the same voltage, and slightly different loads. There are apparently observable changes point-to-point unnoticed from supply voltage/current, observable in active→ scattered current in accordance with Theorem 1 Equations (7) and (9) "Scattered current sensitivity theorem".

Case Study 4: A Systematic Approach of Generating Features for AI Anomaly Detection
The objective of this study is to provide a systematic study by example of an adaptation of a multivariate problem to E-CPC and AI feature generation. In addition to analyzing the case study of AC/DC inverters, opportunities are exploited to demonstrate how effectively CPC is used for feature generation and multidimensional space is defined for anomaly identification. Features are inserted either into multidimensional space [45][46][47] or into multivariate deep learning, such as Recurrent Neural Networks (RNN) and the representative LSTM, which is beyond the scope of this paper. It is reminded that the view here is as observed from the grid. The first step is feature generation, constructing a multidimensional space as described in Figures 20 and 21. Two types of experiments were conducted: (1) slightly modifying the load over the rectifier and maintaining a fixed output voltage and (2) slightly modifying the output voltage while maintaining the fixed load. Generalized graphs were designed. Figures 22-24 describe a sample of the results b for V out = 30 V, V out = 28 V.   Conclusions are similar to the rest of the voltage range. The entire graphs are shown in [44]. The feature formulation is as follows: where f n -frequency of harmonic n r out -output resistance V out -output voltage. A parameter in the below graphs i m -current physical component where index m is {active, scattered, reactive, customer and for 3-phase load, unbalanced} Using high-order dimensional space in machine learning is possible, not necessarily as described, for example, in [45][46][47]. Future work will compare the insertion of CPC features into a deep learning autoencoder vs. letting the RNN autoencoder generate its features. High-dimensional space enables visualization of normal and anomalous work points, as located in different locations in that space. Conclusions from the comparative study. (1) A difference is observed in ((total)& (customer))→scattered in accordance with Theorem 1 Equation (9), and reactive current in accordance with Theorem 2 Equation (10) and Theorem 3 Equation (11). (2) Customer current is relatively high due to being an AC/DC converter; many new harmonics are generated by the AC/DC converter, which is an HGL load that is in accordance with Theorem 14 Equation (26) "Separability of inductive and capacitive admittances". (3) Most importantly, the total current to the rectifier's input is relatively stable with a modified output voltage and with a modified amplitude, meaning conventional electricity theory does not sense load changes as early. (4) Scattered current, which is less than 10% of the total current, senses both output voltage changes and rectifier load changes in accordance with Theorem 1 Equation (9) "scattered current sensitivity theorem". Again, it is shown that the CPC-based spectral physical components are sensor sensing components that are nearly unnoticeable otherwise. Experimenting with constant load and variable output voltage, observing Figures 20-22, the conclusions are similar. (1) The total current is primarily customer current in accordance with Theorem 14 Equation (26). (2) Small currents, such as scatter and reactive currents, are indicators of changes in load or output voltage better than total current.

Case Study 5: Results of the Comparative Study of E-CPC vs. FFT Over Raw Time-Series Data and Theoretical Discussion
The next issue is how data are inserted into the CNN test results and the following theoretical summary. The time series x(n) is broken into chunks forming an image-like 2D array. The theorem above is simply reformulated as 2D. Three data types are comparable: (1) raw data x(n) = v(n), i(n). (2) FFT data each period or each second taking one period.
(3) E-CPC each period or each second taking a period. The tested recordings are of the AC induction-motor. Figure 25 is snapshot from accuracy results at simulation between FFT data -top results and CPC data-bottom result.  Figure 13. Results are similar in the other tests. E-CPC scattering currents are indifferent to WGN, as spectrally, it is a flat line. This may be exploited as an advantage: fixed currents are WGN anomaly detectors, while scattering currents may be used to indicate that WGN may be a normal signal arriving from electric devices. The CPC preliminary anomaly detection sensor, located at the data center, preprocesses the raw data prior to the classification core as follows. Table 2 emphasizes the four apparent benefits of E-CPC as a preprocessing smart virtual sensor: (1) more sensitive, (2) much fewer data than raw data required to feed the classification core to arrive at the conclusion anomalous/un-anomalous, (3) less required time to identify anomaly due to two factors: (a) faster sampling rate, (b) less required data by E-CPC preprocessor, and (4) multichannel. Figure 26 illustrates the time and sensitivity scales at raw data, versus FFT and CPC. Maximal speed of decision from anomaly onset "multiplication factor" (assuming at least 4000 samples) due to sampling rate (*) Training and testing stages  Observing Figure 26, during the onset of anomalies, the FFT preprocessor requires O(I total (ω)) for anomaly identification (traffic light red), which consumes time T. The E-CPC preprocessor requires O I scatter ∼ 10 −3 I total (ω) for anomaly identification and that consumes, heuristically assuming linear onset~10 −3 T. A ratio of~100 exists between the raw data and FFT assuming a 4 kHz sampler. FFT observes~40 first harmonics and deduces within 2 cycles normal/not normal, while no-preprocessor requires~1 sec data meaning 4000 samples. O() indicates the order of magnitude. The scattering current at E-CPC acts as an activation gate, ReLU or sigmoid function. The value of scattering current in anomaly jumps is in terms of percentile by hundreds-of-percent. A green light indicates normal, while a red light indicates abnormal. The FFT decreases data from 4000 samples/s into 40 harmonics selected from 400, thus enhancing the speed. E-CPC is a spectral theory. The scattering and reactive/reactive scattering currents are focused on the "fluctuations around the mean field". They are shown to be experimentally~10 −3 of the total current and yet very strong anomaly detectors. This multiplication of FFT data cut and earlier alert yields up to 40,000 times faster. This may not be too much, as the difference is from 1 s to 0.25 × 10 3 s. However, cyberattacks over electric grids are often unnoticed in real time even after many seconds during the onset period. It is evident through the experiment that the sensitivity improvement and the data shrinking improvement. The max "decision-making speed" multiplication factor is theoretical and is driven by Theorem 16: "CNN behavior as a spectral transfer function". The last row is the estimation and is the subject of another study.

Comparison of the Proposed CNN Architecture to Other Studies
(a) Similar work on electric grids: when discussing previous comparative work, the more accurate location to look for is not grid anomaly detection in general; that yields tens of references. Samples of non-electric anomaly detection are [51,52], none of grid anomaly detectors, is multichannel. Example 1D CNN works are [53][54][55] and LSTM works are [56] and CNN LSTM work [7]. A literature survey was performed starting in 2010. The conclusion is as follows: similar work has been performed on multichannel anomaly detection but probably not with regard to implementation for electric grids. Only or mostly a single-channel work has been performed over an electric grid. (b) For usage of electricity theory knowledge for data preparation (preprocessor), no other work has been found, so this may be the first one, or at least the first one with extensive electricity knowledge. (c) Accuracy: 95 ± 5% is the highest reported accuracy among all reported detectors, but some comparative work over anomaly detection datasets must be performed to make a solid conclusion. Currently this is not sufficiently established. There have been reports of 92% accuracy. The average reported accuracy is~70%.
(d) Grid references are based on the energy load profile as input, which has a low sampling rate of 0.001 Hz (every 15 min). This work is based on current and voltage recordings, which are rapidly sampled at 4 k Hz and may work well with 1 kHz. There are many voltage and current waveform recording probes in the grid at many deployments worldwide; therefore, this work does not require IoT installation in such projects. These probes are used for (1) fault location (2) and power quality monitoring.

Future Research
E-CPC has considerable potential as follows: (a) "Fan-in of IoT signals". Due to the vacancy of 40,000 times less raw data, this may imply that fan-in with the same computational complexity can increase to up to 40,000 times larger than the raw data fan-in, which remains to be determined. However, it is shown that a preprocessing virtual sensor located at the data center, i.e., remote, much less raw data consumption, and more accurate, potentially leads to larger fan-in. The collaborative features make this sensor leap at anomaly detection. (b) "E-CPC + grid interpreting"-pushing the sensitivity limit further with electricscheme-based anomaly detection. The E-CPC preprocessor, although executing a leap at anomaly detection, is not brought to its maximal performance. This may be achieved using grid deciphering theorems, especially 10-a, and Figure 8, if each of the electric components is inserted as a distinct anomaly detection signal. This has not yet been performed and is a future work of the group. (c) E-CPC as a generic preprocessor and virtual sensor. Not confined to the boundary of electric currents and voltages. This extension horizon is two-fold: there are five content worlds with equivalent physics to electric circuits, meaning there are pairs of signals {x, y} equivalent to {voltage, current}: (1) magnetic, (2) heat transfer, (3) direct motion, (4) rotation motion, and (5) fluid dynamics. These contents worldwide are completely equivalent to electric circuits, so the results of this paper should be valid there. However, any signal x(t) may be split into active: Real{x(t)} and reactive: Imaginary{x(t)}. Assuming some mean-field value extraction may be computed, fluctuations may be computed. The entire extent of E-CPC may be computed. There are fixed and scattered signal subcomponents. The current rule i Total = ∑ n i n is matter conservation, a rule existing in many/most world contents. The power rule: is energy conservation. It exists in all world contents, so E-CPC must be a generic preprocessor suitable for any signal.

Conclusions
Theoretical results were generically formulated by fifteen theorems majorly to linear loads but extended also to HGLs. The presented research obtained the following two functional goals: (1) Improvement of grid anomaly detection for two objectives-grid "preventive maintenance" and grid "intrusion detection system". (2) The other goal was "grid interpreting". In order to obtain these goals a proposed architecture of CPC preprocessing Head-End-System, cascaded to a CNN 1D architecture was proposed and tested. The main focus of current paper was on CPC. CPC exhibited several micro-improvements that were proved and demonstrated in favor of enhancement of the two mentioned main goals:

1.
Enlargement of "CPC physical components" components count, where each component serves as another type of grid sensor, all this without installing additional sensors: • "Scatter and reactive currents" are natural anomaly detectors. They act nearly as 0/1 logic output. They were not invented by proposed work, but rather applied to the stated objectives.

•
The "scattered currents" are insensitive to White-Gaussian-Noise (WGN) since that interference is spectrally constant, meaning fixed. • Active/reactive fixed currents do notice WGN since they contain the spectrally fixed component. WGN may/or may not be an anomaly. • "Customer current" is detecting current/harmonics arriving from load. Againnot invented, simply looked again at new perspective of grid change detection. • Distribution current is detecting flow arriving from grid to load. • Unbalance current is a natural detector of load unbalance.
CPC preprocessor may now be regarded as a "special phenomena" detector and classifier. Focus was mainly on anomaly and less on grid interpreting.

2.
Anomaly detection by CPC shown to be three folded-thereby enhancing its effect: • Anomaly detection via the current's physical components. • CPC as good grid interpreting method, enables potentially anomaly detection at electric scheme level and R, L, C components. This was demonstrated by two theoretical example experiments: (a) an array of parallel branches of serial R, L, C load. (b) separability theorem demonstrating how CPC enables through harmonic analysis to separate inductive load from capacitive load. • CPC in collaboration with CNN anomaly detector. The collaboration is stronger than each sub-component. The paper is focused on CPC, and CNN was used to enable comparative research over the input data. It is clear now that 'CPC + CNN' has a virtue of its own and should be further investigated.

3.
Suitability to handle three phase three or four wire circuits was demonstrated: it was not invented. The enhancement was shown theoretically. Suitability to handle non-linear Harmonic Generating Loads (HGL): either as customer current that is not disassembled such as CPC acts, or at E-CPC at customer current's proposed disassembly.

4.
A new point of view has been shed on CPC, that's different than original view but is mathematically, 100% equivalent. New point of view is effective for usage in the new disciplines and due to universality to other content worlds. That was not issue of current paper, simply a notification to generate incentive for a future paper: (i) "scatter current" is a spectral fluctuation over spectral mean field-This is a technique known from physical theories. (ii) "Active/reactive fixed currents" are the "spectral mean field". (iii) "Active current" may be regarded as real component of spectral represented current, Reactive may be regarded as the imaginary component -thereby this is paving the way towards CPC as universal anomaly detector and universal data/fluid flow grid interpreter. That is beyond paper scope. Paper has triggered the curiosity.

5.
Electricity theory knowledge was poured into deep learning architecture via preprocessing and data preparations: the cascade "CPC + CNN" was performed. There is usage of electric parameters by other works on grid analytics, but mainly as "statistical parameters". 6.
Improved data quality: comparatively over four simulations-the study showed that this enhances detection accuracy as compared to raw data, and FFT. (CPC is enhancement on FFT). 7.
Speed-up the anomaly decision making and smaller amount of data-these points require further study, but the potential was shown. Due to FFT-only the 40 primary harmonics represent the loads well, and further compression due to CPC is obtained. At raw data 4kHz sampled~800 time-series points exist for the same data. 8.
Multi-channel IoT anomaly detection -multi-variate separate channels, as the CNN has been shown to be successful MV-CNN in other disciplines-that is not paper's contribution. But usage cascaded with CPC, is the paper's contribution, and multichannel usage for grid although not novel, is shown herein differently. Potentially "multi-channel collaborative"-generate an aggregative anomaly detection through proper usage of convolution operation is implied by paper, although not demonstrated. 9.
Grid interpreting. This is shown by two examples: (4.1) in Figure 7 as enabling "N parallel branches of serial R, L, C interpretation, where N is unknown", (4.2) and at "separation of L, and C extraction" using CPC as theorem shows. Without CPC reactive admittance is sum of inductive and capacitive impedances (serial case)/admittances (parallel case). Relevancy to "grid interpreting" is not the main subject of paper, but it may be shown preliminary as additive added value, and we mention it.
The results were experimentally shown for two test cases: (1) mild mechanical vibration of a loaded induction motor and (2) modified load, or output voltage of an AC/DC converter. Each example was demonstrated as reflected in the grid. The benefit of using CPC currents as anomaly detectors, even phenomena that occur at device outputs as seen from the grid, was demonstrated. Regarding the relatively conventional CPC, using theorems such as the "frequency signature", it was shown that generic and systematic anomaly detection is enabled, provided that spectral amplitude and phase are used, rather than time waveforms or RMS values. The 14 theorems were correlated to anomaly case studies. In Figure 6, they were used to run and draw graphs of theoretical computed admittance. It was clearly demonstrated that for parallel branches with serial RLC, each branch has a clear signature that is traced to the circuit structure. The subject of grid deciphering is a future paper, and the current paper is focused on grid generic anomaly detection. For test cases, the first case study suggests effectiveness for mechanical vibration identifications and hidden anomalies in induction motors. This is effective for preventive maintenance of equipment tested for vibrations, such as transformers and motors, in assembly lines, or post installation. In the 2nd case study, an AC/DC converter fits plenty of electrical equipment with a converter power supply. Alt.: cyberattack identification. Here, again, it suggests remote preventive maintenance, as observed from the grid. A 2nd case study was used to further demonstrate feature generation using CPC and enhanced CPC for anomaly detection. The method constructs multi-dimensional spaces from the features. Theoretical reasoning was demonstrated for several issues generically, exceeding the two test cases: (1) the scatter current was shown to be potentially sensitive to change detection due to being spectrally variable ∂i active /∂ω = ∂i scattered /∂ω = 0. (2) Enhancement of CPC (E-CPC) following its original construction reasoning was performed to finally include 6 scatter subcurrents rather than one in classical CPC and 22 subcurrent physical components overall compared to 5 currents in classical CPC. This was shown to be used efficiently (a) for sensitive anomaly detection of initially weak phenomena and (b) for the grid/machinery deciphering method. While classical CPC sensed 4 out of 6 screw openings, the enhanced CPC robustly sensed even a single screw vibration. (3) Fourteen new CPC-based and other electric rules that are expressed by Equations (7)-(29) were developed for disassembly of admittance and current types, enabling visualization only of components of a certain type such as only reactive or only active. (4) Regarding the new rules: (a) for parallel branches including only a mixture of resistors and inductors, it was shown using CPC that the total → reactive → scattered current reflects a spectral mixture of resistive and reactive components. (b) The total → active, customer → active current reflects both a spectral and a fixed component. It might have been 'mistakenly' assumed that if admittances of the same type are summed from parallel branches following CPC, then the total active admittance is ∑ m 1/R m and total reactive admittance would mistakenly look like this: ∑ m j(ωC m − 1/ωL m ). Branch active/ reactive admittances are a mixture expression of resistors and capacitors and inductors. The uniqueness of CPC and enhanced CPC admittance physical components was shown. (5) Disassembly was shown to be effective for identifying changes that the original CPC did not notice. It was shown, for example, that customer → reactive → scattered current admittance is sensitive to mechanical vibration, in accordance with the theorems. There is a reasonable basis to assume that these results are generic and reproducible for many other cases. This theory has the potential to decipher the grid and electric machinery, as observed at a single measurement point. Future research should be conducted as follows.
(1) Anomaly detection should be tested comparatively to determine whether deep learning combined with enhanced CPC generates features or multidimensional space, as presented in case study 2-the tradeoffs: computational cost + consumption time versus accuracy. The lower the cost is, the more local anomaly software modules may be installed. Finally, with regards to the experiments in the current paper, a comparative study was performed demonstrating that E-CPC as a preprocessor is pushing the limits of (1) multichannel, (2) more accurate, (3) fewer data, (4) remote, and (5) real-time anomaly detection up to enabling grid/industrial premise IDS and preventive maintenance. A deep learning anomaly detection core was developed using a CNN and inspired by the content world of "speech recognition" [46][47][48][49]. A study of (1) raw data processed with E-CPC, (2) raw data processed with FFT, and (3) raw data processed with raw data was conducted. The study showed the same superiority over existing academic technologies, FFT and raw data, for 100% of the systems.
Finally, the future horizons of E-CPC are as follows: (i) larger fan-in, multichannel anomaly detection, (ii) fusion of E-CPC and the grid deciphering demonstrated by this paper enables anomaly detection at the electrical device and electrical component levels.
(iii) Finally, it has been implied that E-CPC will work on any signal x(t) and not necessarily electrical current. This puts E-CPC in the position of being the natural ultimate anomaly detection system.

Patents
This work is protected by provisional patents funded by the TAU proprietary and knowledge commercialization company.