Wavelet Theory and Applications for Estimation of Active Power Unbalance in Power System

Power system is a complex, dynamic system, composed of a large number of interrelated elements. Its primary mission is to provide a safe and reliable production, transmission and distribution of electrical energy to final consumers, extending over a large geographic area. It comprises of a large number of individual elements which jointly constitute a unique and highly complex dynamic system. Some elements are merely the system's components while others affect the whole system (Machowski, 1997). Securing necessary level of safety is of great importance for economic and reliable operation of modern electric power systems.


Introduction
Power system is a complex, dynamic system, composed of a large number of interrelated elements.Its primary mission is to provide a safe and reliable production, transmission and distribution of electrical energy to final consumers, extending over a large geographic area.It comprises of a large number of individual elements which jointly constitute a unique and highly complex dynamic system.Some elements are merely the system's components while others affect the whole system (Machowski, 1997).Securing necessary level of safety is of great importance for economic and reliable operation of modern electric power systems.
Power system is subject to different disturbances which vary in their extent, and it must be capable to maintain stability.Various devices for monitoring, protection and control help ensure reliable, safe and stable operation.The stability of the power system is its unique feature and represents its ability to restore the initial state following a disturbance or move to a new steady state.During transient process, the change of the parameters should remain within the predefined limits.In the case of stability loss, parameters either increase progressively (power angles during angle instability) or decrease (voltage and frequency during voltage and frequency instability) (Kundur, 1994;Pal & Chaudhuri, 2005).Accurate and fast identification of disturbances allows alerting the operator in a proper manner about breakdowns and corrective measures to reduce the disturbance effects.
Several large blackouts occurred worldwide over the past decade.The blackout in Italy (28th Sept. 2003) which left 57 million people in dark is one f the major blackouts in Europe's history ever.The analyses show that the most common causes are cascading propagation of initial disturbance and failures in the power system's design and operation, for example, lack of equipment maintenance, transmission congestion, an inadequate support by reactive power, system operating at the margin of stability, operators' poor reactions, and low or no coordination by control centres (Madani et al., 2004).It would, therefore, be beneficial to have automatic systems in electric power systems which would prevent propagation of effects of initial disturbance through the system and system's cascade breakdown.In order to prevent the already seen major breakdowns, the focus has been placed on developing algorithms for monitoring, protection and control of power system in real time.Traditionally, power system monitoring and control was based on local measurements of process parameters (voltage, power, frequency).Following major breakdowns from 2003., extensive efforts were made to develop and apply monitoring, protection and control systems based on parameters, the so-called Wide Area Monitoring Protection and Control systems (WAMPC).These systems are based on systems for measuring voltage phasors and currents in those points which are of special importance for power system (PMU devices -Phasor Measurement Unit).This platform enables more real and dynamic view of the power system, more accurate measurement swift data exchange and alert in case of need.Traditional "local"devices cannot achieve optimal control since they lack information about events outside their location (Novosel et al., 2007;Phadke & Thorp, 2008).
On the other hand, wavelet transformation (WT) represents a relatively new mathematical area and efficient tool for signal analysis and signal representation in time-frequency domain.It is a very popular area of mathematics applicable in different areas of science, primarily signal processing.Since the world around us, both nature and society, is constantly subjected to faster or slower, long or short-term changes, wavelets are suitable for mathematical tools to describe and analyse complex process in nature and society.A special problem in studying and analysing these processes are 'non-linear effects' characterised by quick and short changes, thus wavelets are an ideal tool for their analysis.
Historically, the WT development can be tracked to 1980s' and J.B.J. Fourier (Fig. 1a).Namely, in 1988, Belgian mathematician Ingrid Daubechies (Fig. 1b) presented her work to the scientific community, in which she created orthonormal wavelet bases of the space of square integrable functions which consists of compactly supported functions with prescribed degree of smoothness.Today, this is considered to be the end of the first phase of WT development.Since it has many advantages, when compared to other signal processing techniques, it is receiving huge attention in the field of electrical engineering.Over the past twenty years, many valuable papers have been published with focus on WT application in analysis of electromagnetic transients, electric power quality, protection, etc., as well as a fewer number of papers focusing on the analysis of electromechanic oscillations/transients in power system.In terms of time and frequency, transients can be divided into electromagnetic and electromechanic.Frequency range for transients phenomena is provided in Table 1.
Electromagnetic transients are usually a consequence of the change in network configuration due to switching or electronic equipment, transient fault, etc. Electromechanical transients are slower (systematic) occurrences due to unbalance of active power (unbalance in production and consumption of active power) and are a consequence of mechanical nature of synchronous machines connected to the network.Such systems have more energy storages, for example, rotational masses of machines which respond with oscillations to a slightest unbalance.(Henschel, 1999).
Table 1.Typical Frequency Ranges for Transients Phenomena in Power System (Henschel, 1999) If electric power system has an initial disturbance of 'higher intensity', it can lead to a successive action of system elements and cascade propagation of disturbance throughout the system.Usually the tripping of major generators or load busses results in under-voltage or under-frequency protective devices operation.This disturbance scenario usually results in additional unbalance of system power.Moreover, power flow in transmission lines is being re-distributed which can lead to their tripping, further affecting the transmission network structure.
Frequency instability occurs when the system is unable to balance active power which results in frequency collapse.Monitoring df/dt (the rate-of-change of frequency) is an immediate indicator of unbalance of active power; however, the oscillatory nature of df/dt can lead to unreliable measuring (Madani et al., 2004(Madani et al., , 2008)).
Given its advantages over other techniques for signal processing, WT enables direct assessment of rate of change of a weighted average frequency (frequency of the centre of inertia), which represents a true indicator of active power unbalance of power system (Avdakovic et al. 2009(Avdakovic et al. , 2010(Avdakovic et al. , 2011)).This approach is an excellent foundation for improving existing systems of under-frequency protection.Namely, synchronised phasor measurements technique provides real time information on conditions and values of key variables in the entire power system.Using synchronised measurements and WT enables high accuracy in assessing of active power unbalance of system and minimal underfrequency shedding, that is, operating of under-frequency protective devices.Furthermore, if a system is compact and we know the total system inertia, it becomes possible to estimate total unbalance of active power in the system using angle or frequency measuring in any system's part by directly assessing of rate of change of a weighted average frequency (frequency of the centre of inertia) using WT.In order to avoid bigger frequency drop and eventual frequency instability, identification of the frequency of the centre of inertia rate of change should be as quick and unbalance estimate as accurate as possible.Given the oscillatory nature of the frequency change following the disturbance, a quick and accurate estimate of medium value is not simple and depends on the system's characteristics, that is, total inertia of the system (Madani et al., 2004(Madani et al., , 2008)).
This chapter presents possibilities for application of Discrete Wavelet Transformation (DWT) in estimating of the frequency of the centre of inertia rate of change (df/dt).In physics terms, low frequency component of signal voltage angle or frequency is very close to the frequency of the centre of inertia rate of change and can be used in estimating df/dt, and therefore, can also be used to estimate total unbalance of active power in the system.DWT was used for signal frequency analysis and estimating df/dt value, and the results were compared with a common df/dt estimate technique, the Method of Least Squares.

Basic wavelet theory
Wavelet theory is a natural continuation of Fourier transformation and its modified shortterm Fourier transformation.Over the years, wavelets have been being developed independently in different areas, for example, mathematics, quantum physics, electrical engineering and many other areas and the results can be seen in the increasing application in signal and image processing, turbulence modelling, fluid dynamics, earthquake predictions, etc.Over the last few years, WT has received significant attention in electric power sector since it is more suitable for analysis of different types of transient wavelets when compared to other transformations.

Development of wavelet theory
From a historical point of view, wavelet theory development has many origins.In 1822, Fourier (Jean-Baptiste Joseph) developed a theory known as Fourier analysis.The essence of this theory is that a complicated event can be comprehended through its simple constituents.More precisely, the idea is that a certain function can be represented as a sum of sine and cosine waves of different frequencies and amplitudes.It has been proved that every 2π periodic integrible function is a sum of Fourier series Today, Fourier analysis is a compulsory course at every technical faculty.Although the contemporary meaning of the term 'wavelet' has been in use only since the 80s', the beginnings of the wavelet theory development go back to the year 1909 and Alfred Haar's dissertation in which he analysed the development of integrable functions in another orthonormal function system.Many papers were published during the 30s'; however, none provided a clear and coherent theory (Daubechies, 1996;Polikar, 1999).
First papers on wavelet theory are the result of research by French geophysicist and engineer, Jean Morlet, whose research focused on different layers of earth, and reflection of acoustic waves from the surface.Without much success, Morlet attempted to resolve the problem using localization technique put forward by Gabor in 1946.This forced him to 'make up' a wavelet.In 1984, Morlet and physicist Alex Grossmann proved stable decomposition and function reconstruction using wavelets coefficients.This is considered to be the first paper in wavelet theory (Teofanov, 2001;Jaffard, 2001).
Grosman made a hypothesis that Morlet's wavelets form a frame for Hilbert's space, and in 1986 this hypothesis was proved accurate by Belgian mathematician Ingrid Daubechies.In 1986, mathematician Ives Meyer construed continuously differentiable wavelet whose only disadvantage was that it did not have a compact support.At the same time, Stephane Mallat, who was dealing with signal processing and who introduced auxiliary function which in a certain way generates wavelet function system, defined the term 'multiresolution analysis' (MRA).Finally, the first stage in the wavelet theory development was concluded with Ingrid Daubechies' spectacular results in 1988 (Graps, 1995).She created orthonormal wavelet bases of the space of square integrable functions which consists of compactly supported functions with prescribed degree of smoothness.Compact support means that the function is identically equal to zero outside a limited interval, and therefore, for example, corresponding inappropriate integrals come down to certain integrals.Daubechies wavelets reserved their place in special functions family.The most important consequence of wavelet theory development until 1990 was the establishment of a common mathematical language between different disciplines of applied and theoretical mathematics.

Wavelet Transform
Development of WT overcame one of the major disadvantages of Fourier transformation.Fourier series shows a signal through the sum of sines of different frequencies.Fourier transformation transfers the signal from time into frequency domain and it tells of which frequency components the signal is composed, that is, how frequency resolution is made.Unfortunately, it does not tell in what time period certain frequency component appears in the signal, that is, time resolution is lost.In short, Fourier transformation provides frequency but totally loses time resolution.This disadvantage does not affect stationary signals whose frequency characteristics do not change with time.However, the world around us mainly contains non-stationary signals, for whose analysis Fourier transformation is inapplicable.Attempts have been made to overcome this in that the signal was observed in segments, that is, time intervals short enough to observe non-stationary signal as being stationary.This idea led to the development of short-time Fourier transformation (STFT) in which the signal, prior to transformation, is limited to a time interval and multiplied with window function of limited duration.This limited signal is then transformed into frequency area.Then, the window function is translated on time axis for a certain amount (in the case of continued STFT, infinitesimal amount) and then Fourier transformation is applied (Daubechies, 1992;Vetterli & Kovacevic, 1995;Mallat, 1998;Mertins, 1999).
The process is repeated until the window function goes down the whole signal.It will result in illustration of signals in a time-frequency plane.It provides information about frequency components of which the signal is composed and time intervals in which these components appear.However, this illustration has a certain disadvantage whose cause is in Heisenberg's uncertainty principle which in this case can be stated as: 'We cannot know exactly which frequency component exists at any given time instant.The most we can know is the range of the frequency represented in a certain time interval, which is known as problem of resolution.' Generally speaking, resolution is related to the width of window function.The window does not localize the signal in time, so there is no information about the time in frequency area, that is, there is no time resolution.With STFT, the window is of definite duration, which localizes the signal in time, so it is possible to know which frequency components exist in which time interval in a time-frequency plane, that is, we get a certain time resolution.If the window is narrowed, we get even better time localisation of the signal, which improves time resolution; however, this makes frequency resolution worse, because of Heisenberg's principle.

Fig. 2. Relation between time and frequency resolution with multiresolution analysis
Δt i Δf represents time and frequency range.These intervals are resolution: the shorter the intervals, the better the resolution.It should be pointed out that multiplication Δt*Δf is always constant for a certain window function.The disadvantage of time-limited Fourier transformation is that by choosing the window width, it defines the resolution as well, which is unchangeable, regardless of whether we observe the signal on low or high frequencies.However, many true signals contain lower frequency components during longer time period, which represent the signal's trend and higher frequency components which appear in short time intervals.
When analysing these signals, it would be beneficial to have a good frequency resolution in low frequencies, and good time resolution in high frequencies (for example, to localise highfrequency noise in the signal).The analysis which meets these requirements is called multiresolution analysis (MRA) and leads directly to WT. Figure 2 illustrates the idea of multiresolution analysis: with the increase of frequency Δt decreases, which improves time resolution, and Δf increases, that is, frequency resolution becomes worse.Heisenberg's principle can also be applied here: surfaces Δt*Δf are constant everywhere, only Δt and Δf values change.

161
WT is based on a rather complex mathematical foundations and it is impossible to describe all details in this chapter of the book.The following chapters will provide basic illustration of Continuous WT (CWT) and Discrete WT (DWT), which have become a standard research tool for engineers processing signals.
In 1946, D. Gabor was the first to define time-frequency functions, the so-called Gabor wavelets (2005/second reference should be Radunovic, 2005).His idea was that a wave, whose mathematical transcript is  should be divided into segments and should keep just one of them.This wavelet contains three information: start, end and frequency content.Wavelet is a function of wave nature with a compact support.It is called a wave because of its oscillatory nature, and it is small because of the final domain in which it is different from zero (compact support).Scaling and translations of the mother wavelet  x  (mother) define wavelet basis, and it represents wave function of limited duration for which the following is applicable: The choice of scaling parameter a and translation b makes it possible to represent smaller fragments of complicated form with a higher time resolution (zooming sharp and short-term peaks), while smooth segments can be represented in a smaller resolution, which is wavelet's good trait (basis functions are time limited).
CWT is a tool to break down for mining of data, functions or operators into different components and then each component is analysed with a resolution which fits its scale.It is defined by a scale multiplication of function and wavelet basis: where asterix stands for conjugate complex value, a and b   , ab R  are scaling parameters (He & Starzyk, 2006;Avdakovic et al. 2010, Omerhodzic et al. 2010).when compared to the mother wavelet, are moved on time axis for value b and 'stretched' for scaling factor a (when a>1).Therefore, continued wavelet transformation of signal f(x) is calculated so that the signal is multiplied with wavelet function for certain a and b, followed by integration.Then parameters a and b are infinitesimally increased and the process is repeated.As a result we get wavelet coefficients CWT (a,b) which represent the signal in time-scale plane.The value of certain wavelet coefficient CWT (a,b) points to the similarity between the observed signal and wavelet generated by shifting on time axis and scaling for values b and a.It can be said that wavelet transformation shows signal as infinite sum of scaled and shifted wavelets, in which wavelet coefficients are weight factors.Using wavelets, time analysis is done by compressed, high-frequency versions of mother wavelet, since it is possible to notice fast changing details on a small scale.
Frequency analysis is done by stretched high-frequency versions of the same wavelet, because a large scale is sufficient for monitoring slower changes.These traits make wavelets an ideal tool for analysis of non-stationary functions.WT provides excellent time resolution of high-frequency components and frequency (scale) resolution of low-frequency components.
CWT is a reversible process when the following condition (admissibility) is met: where . Inverse wavelet transformation is defined by: where it is possible to reconstruct the observed signal through CWT coefficient.
CWT is of no major practical use, because correlation of function and continually scaling wavelet is calculated (a and b are continued values).Many of the calculated coefficients are redundant and their number is infinite.This is why there is discretization -time-scale plane is covered by grid and CWT is calculated in nodes of grid.Fast algorithms are construed using discrete wavelets.Discrete wavelets are usually a segment by segment of uninterrupted function which cannot be continually scaled and translated, but merely in discrete steps, where j, k are whole numbers, and 0 1 a  is fixed scaling step.It is usual that 0 2 a  , so that the division on frequency axis is dyadic scale.0 1 b  is usually translation factor, so the division on time axis on a chosen scale is equal,

22
, Parameter a is duplicated in every level compared to its value at the previous level, which means that wavelet doubles in its width.The number of points in which wavelets are defined are half the size compared to the previous level, that is, resolution becomes smaller.This is how the concept of multiresolution is realised.Narrow, densely distributed wavelets are used to describe rapid changing segments of signal, while stretched, sparsely distributed wavelets are used to describe slow changing segments of signal (Mei et al., 2006). .Filters h(n) and g(n) are associated with the scaling function and wavelet function, respectively (He & Starzyk, 2006): and equals to: DWT is an algorithm used to define wavelet coefficients and scale functions in dyadic scales and dyadic points.The first step in filtering process is splitting approximation and discrete signal details so to get two signals.Both signals have the length of an original signal, so we get double amount of data.The length of output signals is split in half using compression, that is, discarding all other data.The approximation received serves as input signal in the following step.Digital signal f(n), of frequency range 0-F s /2, (F s -sampling frequency), passes through lowpass h(n) and highpass g(n) filter.Each filter lets by just one half of the frequency range of the original signal.Filtrated signals are then subsampled so to remove any other sample.We mark cA 1 (k) and cD 1 (k) as outputs from h(n) and g(n) filter, respectively.Filtrating process and subsampling of input signal can be represented as: where coefficients cA 1 (k) are called approximation of the first level of decomposition and represent input signal in frequency range 0-F s /4 Hz.By analogy, cD 1 (k) are coefficients of details and represents signal in range F s /4 -F s /2 Hz.Decomposition continues so that approximation coefficients cA 1 (k) are passed through filters g(n) and h(n) that is, they are split to coefficients cA 2 (k) which represent signal in range 0-F s /8 Hz and cD 2 (k), range F s /8 -F s /4 Hz.Since the algorithm is continued, that is, since it goes towards lower frequencies, the number of samples decreases which worsens time resolution, because fewer number of samples stand for the whole signal for a certain frequency range.However, frequency resolution improves, because frequency ranges for which the signal is observed are getting narrower.
Therefore, multiresolution principle is applicable here.Generally speaking, wavelet coefficients of j level can be represented through approximation coefficients of j-1 level as follows: The result of the algorithm on signals sampled by frequency F s will be the matrix of wavelet coefficients.At every level, filtrating and compression will lead to frequency layer being cut in half (subsequently, frequency resolution doubles) and reducing the number of sampling in half.
Eventually, if the original signal has the length 2 m , DWT mostly has m steps, so at the end we get approximation as the signal with length one. .Assembling components, in order to get the original signal without losing information, is known as reconstruction or synthesis.Mathematical operations for synthesis are called inverse discrete wavelet transformation (IDTW).Wavelet analysis includes filtering and compression, and reconstruction process includes decompression and filtering.

Frequency stability of power system -An estimation of active power unbalance
Stability of power system refers to its ability to maintain synchronous operation of all connected synchronous generators in stationary state and for the defined initial state after disturbances occur, so that the change of the variables of state in transitional process is limited, and system structure preserved.The system should be restored to initial stationary state unless topology changes take place, that is, if there are topological changes to the system, a new stationary state should be invoked.Although the stability of power system is its unique trait, different forms of instability are easier to comprehend and analysed if stability problems are classified, that is, if "partial" stability classes are defined.Partial stability classes are usually defined for fundamental state parameters: transmission angle, voltage and frequency.Figure 4. shows classification of stability according to (IEEE/ CIGRE, 2004).Detailed description of physicality of dynamics and system stability, mathematical models and techniques to resolve equations of state and stability aspect analysis can be found in many books and papers.

Fig. 4. Classification of "partial" stability of electric power system
Frequency stability is defined as the ability of power system to maintain frequency within standardized limits.Frequency instability occurs in cases when electric power system cannot permanently maintain the balance of active powers in the system, which leads to frequency collapse.In cases of high intensity disturbances or successive interrelated and mutually caused (connected) disturbances, there can be cascading deterioration of frequency stability, which, in the worst case scenario, leads to disjunction of power system to subsystems and eventual total collapse of function of isolated parts of electric power system formed in this way.In a normal regime, all connected synchronous generators in power system generate voltage of the same (nominal) frequency and the balance of active power is maintained.Then all voltage nods in network have a frequency of nominal value.When the system experiences permanent unbalance of active power (usually due to the breakdown of generator or load bus), power balance is impaired.Generators with less mechanic then electric power due to unbalance redistribution start slowing down.Because inertia of certain generators vary, as well as redistribution of unbalance ratio, generators start operating at different speeds and generate voltage of different frequencies.After transient process, we can assume that the system has a unique frequency again -frequency of the centre of inertia.
During long-term dynamic processes, there is a redistribution of power between generators, and subsequently redistribution of power in transmission lines, which can lead to overload of these elements.In case of the overload of elements over a longer period of time, there are overload protective device which tripping overloaded elements.This leads to cascading deterioration of system stability, and in critical cases (if interconnecting line is tripping), disjunction of system to unconnected elements -islands.In general, this scenario of disturbance propagation causes major problems in systems which have large active power unbalance and small system inertia.Usually, when these critical situations take place, under-frequency protection tripping the generators, additionally worsening the system.In border-line cases, this cascading event can lead to frequency instability, and complete collapse of system function.

Power system response to active power unbalance
In order to understand the essence of dynamic response of power system, one must be familiar with the physicality of the process, that is, one must do the quality analysis of dynamic response.An example of quality analysis of dynamic response of a coherent group of the effect of a sudden application at t=0 of a small load change P k at node k is analyzed in (Anderson & Fouad, 2002).The analysis was carried out on a linear model of system response to a forced (small) disturbance of active power balance.Although it is an approximatization, the analysis helps understand physicality of the process of dynamic response of power system to active power unbalance .This chapter provides main conclusions of the aforementioned analysis.Distribution of the forced power unbalance P k (0 + ) between generators during system response is done in accordance with different criteria.When the synchronous operation of generators is maintained (stability of synchronous group is maintained), a new stationary state is established in the system after transient process, namely, new power balance.If criteria for disturbance distribution differ for generators (which is mostly the case), transient process has an oscillatory-muted character.Oscillations of the parameters of state, mostly active power, angles and frequency of generators, reflect transition between certain criteria for unbalance distribution.Generally, three quality criteria for unbalance distribution can be distinguished: Immediately before unbalance (in t=0 + ) power balance in the system is maintained on the basis of accumulated electromagnetic energy of generators.Distribution of balance between generators is done according to the criteria of electric distance from the point of unbalance (load at node k).Certain generators take over a part of unbalance P k (0 + ) depending on coefficients of their synchronizing powers 1 P Sik (t).Therefore, generators closer to the load bus k (those with lower initial transmission angles and bigger transmission susceptanse) take over a bigger part of unbalance P i (t).Due to a sudden change in power balance, certain generators start to decelerate (Anderson & Fouad, 2002).The change of generators' angle frequency i is defined by a differential equation governing the motion of machine by the swing equation: If unbalance P i (t) is expressed in the function of total unbalance , then according to (Anderson & Fouad, 2002) the aforementioned equation becomes: Equation ( 13) provides first criterion for distribution of active power unbalance : Initial slowing down of generators depends on a.) relative relation of coefficient of synchronising power P Sik (t) and total synchronising system power and b.) inertia constant of generator's rotor H i.
It is clear that some generators will have different initial slowdowns.Therefore, in transient process, frequencies of different generators vary.Synchronizing powers maintain generators in synchronous operation and if transient stability is maintained, oscillations of frequency and active power for a coherent group of generators have a muted character.When the system retains synchronised operation, it is possible to define system's retarding in general, that is, to define a medium value of frequency of a group of generators.To produce an equation to describe the change of medium frequency, we introduce the term "centre of inertia ".The angle of inertia centre __  and angular frequency __  is defined as follows: The equation describing the moving of inertia centre according to (Anderson & Fouad, 2002) is as follows: 1 Synchronising power of a multi-machine system is defined by: and it shows the dependance of the change of electric power of i machine with the change of of the difference in angles i and j, provided that the angles of other machines are fixed.
This equation points out an important trait of power system: Although some generators retarding at different rates (d i /dt), which change during transient process, the system as a whole retarding at the constant rate   Frequencies of some generators approach the frequency of inertia centre because synchronizing powers in a stable response mute oscillations.After a relatively short time (t=t 1 ), of few seconds, all generators adjust to the frequency of inertia centre, that is, the system has a unique frequency.Distribution of unbalance P k (0 + ) at moment t 1 between generators is defined per criterion (Anderson & Fouad, 2002), which is as follows: This equation provides second criterion for unbalance distribution: After lapse of time t 1 since the unbalance occurred, the total value of unbalance P k (0 + ) is distributed between generators depending on their relative inertia in relation to the total inertia of a coherent group of generators.Therefore, unbalance distribution according to this criterion does not depend on electric distance of the generator from the point at which the unbalance occurred.. Finally, if the generators' speed regulators are activated, they lead to the change in mechanical power of generator and redistribution of unbalance depending on statistic coefficients of speed regulators.After a certain period of time, an order of ten seconds (t=t 2 ), the system establishes a new stationary state.Frequency in the new stationary state depends on total regulative system constante2 .This leads to a third criterion for unbalance distribution: After lapse of time t 2 since the unbalance occurred, the total value of unbalance P k (0 + ) is distributed between generators depending on their constant of statism of speed regulators.
The previous analysis, although it does not take into account the effects of load characteristics on the amount of power unbalance , credibly illustrates quality processes in power systems with active power unbalance .

An estimation of active power unbalance -Computer simulation testing
Algorhytam for identification and estimation of unbalance in electric power system presented in Refs.(Avdakovic et all, 2009(Avdakovic et all, , 2010) ) assumes availability of WAMS.Today, these systems are in force in many electric power systems worldwide, and one of their main functions is to identify current and potential problems in power system operation in relation to the system's safety and support to operators in control centres when making decisions to prevent disturbance propagations.Phasor Measurement Unit technology (PMU) enabled full implementation of these systems and measurement of dynamic states in wider area.Current control and running of power system is based upon local measurement of statistic values of system parameters of power system (voltage, power, frequency ...).WAMS are based on embedded devices for measuring phasor voltage and current electricity at those points in power system which are of particular importance, that is measuring amplitudes and angles in real time using PMUs.Such implemented platform enables realistic dynamic view of electric power system, more accurate measurement, rapid data exchange and implementation of algorithms which enable coordination and timely alert in case of instability.
Depending on the nature of active power unbalance, the system disturbance can be temporary (short circuit at the transmission line with successful reclosure) or permanent (tripping generators or consumers).Disturbances with permanent power unbalance are of a particular interest.As shown earlier, dominant variables of state which define power system response to a permanent active power unbalance are the change of frequency and generator's active power.Less dominant variables, but not to be ignored, are voltage and reactive power.
In short, algorithm for on-line identification of active power unbalance can be described as: Analysis of the response of change of generator's frequency ω i (t) during the period of first oscillation makes it possible to define transient stability.If transient stability is maintained, then the application of DWT (using low-frequency component of signal) makes it possible to estimate with high precision the change of the frequency of inertia centre.Furthermore, provided that the values of inertia of all generators are known as well as system inertia as a whole, it is possible to define the total forced unbalance P k (0 + ).
To illustrate estimate of active power unbalance in power system, WSCC 9-bus test system has been chosen (Figure 5.).Additional data on this test system can be found in (Anderson & Fouad, 2002).The following example has been analysed in details in (Anderson & Fouad, 2002).Connection of nominal 10 MW (0.1 pu) of active power to bus 8 as three phase short circuit circuit with active resistance 10 p.u. is simulated.The change of angle speed or frequency of some generators and centre of inertia (COI) after simulated disturbance are shown in Figure 6. and the show oscillations of machines after the disturbance and slow decrease of frequency in the system.It can be seen that some generators slow down by oscillating around medium frequency of the centre of inertia.The slow down around 0.09 Hz/s is presented as direction (ω COI ).
Specialised  6. Speed deviation following application of a 10 MW resistive load at bus 8 (Avdakovic et al., 2011) Here, the estimation of df/dt was done in Matlab using polyfit and polyval functions.Figure 7 shows calculated value of polynomial at given points (yp), using values of angle frequency ω 1 from Figure 6   The estimate of values df/dt, that is, values dω/dt for signals ω i (i=1,2,3) with the DWT application will be provided later on.Frequency range [F m /2 : F m ] of every level of decomposition of DWT is in direct relation with signal sampling frequency, and is presented as F m = F s /2 l+1 , where F s present sampling frequency and l present the level of decomposition.
The sampling time of 0.02 sec or sampling frequency of analysed signals of 50 Hz were used in order to present this method and simulations,.Based on Nyquist theorem, the highest frequency a signal can have is F s /2 or 25 Hz.Example of the fifth level of ω 1 signal decomposition from Figure 6, using Db4 wavelet function, is given in Figure 8, while frequency range of analysed signals at different levels of decomposition is given in Table 2 sec), so base on the on the basis of (12), it is easy to determine distribution of unbalance of active power in the system per a generator, and subsequently, the total unbalance of active power in the observed system.
The aforementioned analysed example demonstrates the procedure for estimating df/dt value using DWT.It is possible to define (simulate) the value of forced unbalance of active power in more complex power systems in the exact same way.An example of a more detailed analysis and application of this methodology is provided in Ref. (Avdakovic et al., 2010), while simulations and analyses were done on New England 39 bus system.When analysing more complex power systems, the frequency range of low frequency electromechanic occurrences/oscillations is in the range of 5 Hz, so it is a matter of practicality to choose sampling time of 0,1 sec or 10 Hz.With further multiresolution analysis in this chosen frequency range and the availability of WAMS, it becomes possible to obtain some very important information for monitoring and control of power system.This is mostly information related to the very start of some dynamic occurrence in the power system which we obtain from the first level of decomposition of analysed signals.Since electric power systems are mostly widespread across huge geographic area, it is necessary to have information on the location of initial disturbance in the power system, which is easily obtained from DWT signal filters with the frequency range of 1 -2 Hz.Frequency range of 1 -2 Hz is the space of local oscillations in power system and by a simple comparison of power values of signals in this frequency range, analysed from multiple geographically distant locations , it is easy to establish the location of disturbance.From the power point of view, power values of local oscillations of signals measured/simulated closer to the disturbance will have higher energy power values compared to those distant from the location of disturbance.Furthermore, as we proceed to the higher levels of decomposition (or lower frequency ranges of filters) of chosen signals with sampling frequency of 0.1 sec, we enter the intra-area and inter-area of oscillations which can represent a real danger for electric power system, and should it be that they are not muted, can lead in a black-out.These signals make it possible to identify intra-area and inter-area oscillations, their character and how to mute them.Furthermore, by comparing these signals it is possible to obtain more information on the system's operation as a whole after disturbance (Avdakovic & Nuhanovic, 2009).In line with what has been demonstrated in the example, low frequency component of signal angle or frequency serves to estimate values df/dt, that is, to define total forced unbalance of active power in power system.

Conclusion
Power system is a complex dynamic system exposed to constant disturbances of varying intensity.Most of these disturbances are common operator's activities, for example, swich turning on or off system elements, and such disturbances do not have a major influence on the system.However, some disturbances can cause major problems in the system, and the subsequent development of events and cascading tripping of system elements can lead to a system's collapse.One of the most severe disturbances is the outage/failure of one or more major production units, resulting in unbalance of active power in the system, that is, frequency decrease.Many factors influence whether or not the severity of frequency decrease will trigger under-frequency protection.Today, under-frequency protection is based on local measurements of state variables and provides only limited results.Their operation is frequently unselective and affects the whole system.
This chapter illustrated the estimate of unbalance of active power in the power system with DTW application, provided WAMS is available.Estimate of df/dt value is a genuine indicator of active power unbalance, and given the oscillatory nature of signal frequency, its estimate is rather difficult.Taking into account its advantages in signal processing when compared to other techniques, WT enables direct estimate of medium value of the change of frequency of the centre of inertia, providing a complete picture the system's operation as a whole.In way, and provided with the complete inertia of the system, we obtain very important information about a complete unbalance of active power in the system, in a rather simple manner.In addition to this particularly important piece of information obtained from the low-frequency component of the signal angle or frequency, other levels of signal decomposition in frequency range encompassing low-frequency electromechanic oscillations provide information about the onset of some dynamic occurrence in the system, localize system disturbance, identify and define the character of intra-area and inter-area oscillations and provide insight into the system's operation after the disturbance.All of this points to a possible development of such under-frequency protective measures which will operate locally, that is, whose operation will be at (or in the vicinity of) the disturbance, in Fig. 1. a) Jean B. J. Fourier (1768 -1830) (http://en.wikipedia.org) and b) Ingrid Daubechies (August 17, 1954 in Houthalen, Belgium) (http://www.pacm.princeton.edu) CWT is function of scale a and position b and it shows how closely correlated are the wavelet and function in time interval which is defined by wavelet's support.WT measures the similarity of frequency content of function and wavelet basis a=1 and b=0,   x  is called mother wavelet, a -scaling factor, b -translation factor.By choosing values 0, ab R  , mother wavelet provides other wavelets which, DWT is the most widely used wavelet transformation.It is a recursive filtrating process of input data set with lowpass and highpass filters.Approximations are low-frequency components in large scales, and details are high-frequency function components in small scales.Wavelet function transformation can be interpreted as function passing through the filters bank.Outputs are scaling coefficients , ).Signal analysis which is done by signal passing through the filters bank is an old idea known as subband coding.DTW uses two digital filters: lowpass filter  , to reconstruct any input signal on the basis of output signals if filters are observed in pairs.High frequency filter is associated to low frequency filter and they become Quadrature Mirror Filters (QMF).They serve as a mirror reflection to each other.

Fig
Fig. 7. Curve fitting Fig. 8. MRA analysis signal of angular speed ω 1 literature provides many techniques to estimate frequency and the level of frequency change, that is, df/dt.One of the methods used with estimating df/dt is the Method of Least Squares.It represents one of the most important and most widely used methods for data analysis.Mathematical details which elaborate this method can be found in a number of books and papers.
and polynomials of third degree.The estimate of df/dt, that is, dω/dt for signals ω i (i=1,2,3), are provided in Table2.

Table 2 .
Frequency range of analysed signals Decomposition of signals ω 2 i ω 3 from Figure6was done in the same manner.A5 low frequency components of all three signals and centre of inertia are illustrated in Figure9.It can be seen that the low frequency components of analysed signals are very similar to the calculated value of the centre of inertia, and therefore, suitable for defining values df/dt, or in this case, the analysed dω/dt.Estimate is given in Table3.As can be seen, both methods provide rather good results, and estimated values are very similar to the calculated vales.

Table 3 .
Comparison of estimates of df/dt, and dω/dt using the Method of Least Squares and DWT