Pages

Friday, April 26, 2013

Power Quality Issues I: Voltage Sag and Swell


      Power Quality is one of the trend topics in energy industry. The term "Power Quality" simply focuses on the measurable features of the supplied power in a power system. Supplied power for some load is basically said to have quality (actually this is an hypothetical term), if the supplied voltage magnitude is at rated value and the frequency of it is constant at system synchronous frequency with no other frequency components. In addition to this simple definition, the term power quality can be enlarged to general term to represent a power system that does not contain any unintended, harmful components of voltage, current or power and any unintended phenomena at supplied voltage.
     All loads in a power system are designed to operate at its design specifications which are determined considering the rated values of an ideal mains supply. Thus, any unintended failures, voltage phenomena or harmful current components nearby are harms most of the loads. Actually, some of them are very vulnerable to unintended behaviours of mains. A supply with less quality (do not forget this is an hypothetical term) causes trouble to industrial loads and consequently this means the loss of labor, time and money for industrial plants. The power quality problems may be seen in supply voltage, frequency or nearby currents.In this article, I will mention one of the supply voltage problems that the industrial plants mostly face namely "voltage sag and swells".
     These kind of distortions  are usually due to overloading of huge loads, short-circuit failures or lightning discharges. Voltage sag is defined as the case when the magnitude of the mains voltage is reduced below 90% of rated voltage for a short while. Similarly, voltage swell is defined as the case when the mains voltage is increased above 110% of rated voltage for a short while. Actually, the interconnected network can not prevent these situations; however, it can only be protected by the protection devices after the failure is detected. In medium voltage level, the typical time that should be passed for a protection device to act on a failure is 100 msec. Thus the voltage sags and swells may last typically from 100 msec to a couple of seconds. During this time the voltage magnitude is reduced/increased significantly and the vulnerable loads should be protected during this time interval. Figure 1 illustrates a real voltage sag which is measured by a Class A power quality measurement device in field. As can be seen in figure 1, the three phase voltage sag is so severe that the supply voltage is dropped down to 90 V from 210 V.

Figure 1: Three Phase Simultaneous Voltage Sag

Similarly figure 2 illustrates a real voltage sag and swell happenning at the phase voltage components at 20kV Medium Voltage (MV) level.

Figure 2: Voltage Swell and Sag in a Three Phase Voltage

Actually, the voltage sag or swell lasts for a very short time in degrees of some hundreds of miliseconds; however, they may cause harmful results for industry. The harmful results of voltage sag/swell may be stoppage of pruduction, damages on motor drives, damages on raw or processed materials etc. For example, figure 3 represents the supply voltage and load current of an industrial printing house at the instant of the voltage sag occus.


As can be seen from figure 3, after voltage sag the load current is significantly reduced, which means a production stoppage. For these kind of instants ,actually, their motor drives loses their states and the paper inside the rolling machines are cut due oscillations in motor torque. This situation causes printing office to lose 2 hours in production and they should be throw away both the printed and raw paper which is inside the machine at the instant that voltage sag/swell occurs.
   
     The solution for this issue
     Power electronic sytems can solve this problem, since they detect the failure and act in about some tens of microseconds. Some of the systems that can solve this problem is Dynamic voltage restorer (DVR) and dynamic UPS.

Tuesday, April 16, 2013

Quadratic Equation Solver for Android

     Solving quadratic equations is actually very straightforward operation. However, a tool for doing all the operations for solving quadratic equation on behalf of you is very useful. My first android application is a quadratic equation solver and graph drawer called QuadE. QuadE simply asks for the quadratic equation parameters from the user. The parameters as you know are stated as below;
After user enters the parameters the tool calculate the roots. Actually there are two cases for the solution of the quadratic equation, the first is the real roots case the other is imaginary roots case. Consider the real root case, for the roots to be real the delta of the equation should be zero or positive. For this case the roots are real and the curve corresponding to quadratic equation intercepts the x axis. If delta of equation is positive, curve intercepts the x axis at two different points. If delta is zero , the real roots are coincide and there are only one root so that only one interception of x axis. The latter case is as I said imaginary roots case. If delta is negative, the roots are imaginary meaning that the curve corresponding to quadratic equation do not intercept the x axis at any point.Please note that the imaginary roots should be in a form that they should be their complex conjugates.

     The root calculation procedure is reviewed, now we can continue with the key part of the tool, curve drawing. Actually curve drawing is simple, the main idea underlying drawing the equation curve is simply apply all the points in the x axis and find the corresponding y axis coordinates that holds the quadratic equation. However, the challenging part is that what will be the x and y axis scales so that we can see all the critical points on the graph. To achieve this goal, showing all the critical points in the graph, we should determine all of the critical coordinates and determine a scale which is more than all of the critical values. The scale determination algorithm is as follows; 

- find the roots(if any) X1 and X2 
- give 0 to x and calculate f(0) , so that we can find y interception, Y.
- find the maximum or minimum value, take the derivative of the quadratic equation with respect to x and equate it to the zero. (this gives us the point that the slope is 0 which means max or min value) f'(x) = 2ax + b
- solve the 0 = 2ax + b to find Xext, and apply F(Xext) to find Yext.
- Now we have all of the critical values; X1, X2, Y, Xext, Yext.
- The scale should be a larger value than the maximum of critical values. For example scale can be 4 times larger than the maximum critical value, so that the user can see all of the critical points.

After finding the scale value, the other things are very easy, just divide the whole x axis by for example 2000 values and find the corresponding y values for them. After finding all of the coordinates simple connect the neighboor coordinates by a straight line. If we take enough coordinates for the curve, the straight line combinations will be seen as a smoothly changing curve. 



     My application can be freely downloaded from the android market with a name of Quadratic Equation Solve/Graph at an address of https://play.google.com/store/apps/details?id=com.emred.android.quade . Please rate the labor at android market and do not forget to leave comments for enhancement of further releases.

Download Quadratic Equation Solve/Graph / Android

Recommended to be run on

http://www.bestbuy.com/site/searchpage.jsp?_dyncharset=ISO-8859-1&_dynSessConf=&id=pcat17071&type=page&sc=Global&cp=1&nrp=15&sp=&qp=&list=n&iht=y&usc=All+Categories&ks=960&fs=saas&saas=saas&st=samsung+galaxy+s4

http://www.gohastings.com/catalog/search_all.cmd?form_state=global-search-form-form&keywords=samsung+galaxy+s4&search-button.x=-1006&search-button.y=-68&search-button=true&productType=0&query=&form_state=siteSearchForm&department=AllSearch&departmentName=AllSearch&dynamic=&search=true&source=global&condition=0

Thursday, April 4, 2013

POWER SYSTEM HARMONICS IN DETAIL: Subject 2: Effect of FFT Window Size on Harmonic Spectrum

     Power system harmonics are integral parts of Power Quality concerns. Harmonics causes lots of harms on fragile loads in the system and they cause overloading of the power system elements such as transformers or cables. Therefore, they should be eliminated, however, in order to eliminate them totally ,at first we should correctly measure their magnitudes by our control system.
     
Our aim : Measuring the whole harmonic spectrum of a signal of any Power System variable.
Tools we have: We have measuring probes, interface electronic card and a microcontroller based control system. 

Methodology: At first we should determine frequency resolution for our harmonic spectrum. Generally 10 Hz resolution is enough for ordinary power system load currents and voltages as stated in the IEC 61000-4-7 recommendation for 50 Hz synchronous frequency. For 10 Hz resolution, the window size will be 1/10 = 0.1 sec. After knowing the window size, we can sample all the data included by the window and calculate the FFT(Fast Fourier Transform) for finding the harmonic spectrum.

     Effect of  FFT Window Size on Harmonic Spectrum

     Up to now it is seem to be well defined, however, this is not the actual case. If we have integer number of complete cycles for a harmonic in a measuring window, the result of FFT gives us the correct magnitudes. However, if the frequency of harmonic component is not the integer multiplication of fundemental frequency, then there won't be complete cycles in an FFT window. Therefore, the magnitude of the actual signal is shared by the nearby frequencies and most importantly high frequency components,which does not exist in reality, will appear at the harmonic spectrum. Let me try to explain what is the reason of this situation. FFT is a linear transform that transforms the time domain signals into the frequency domain. Actually for FFT calculations we never use the whole signal (it can not be practical since the signal is from -infinity to +infinity), instead of that we use a part of it and assume that the signal continues periodically as if it continues from the beginning of the window. Figure 1 illustrates what I try to explain.
Figure 1: Case when window size contains complete cycles of periodic signal

     As can be seen in figure 1 when we have complete cycles of periodic signal, the FFT behaves correctly to the signal. and if we have a 250 Hz signal at window size 100 msec, corresponding harmonic spectrum is as in figure 2.
Figure 2: Harmonic Spectrum of 250 Hz signal in 100 msec window(10 Hz resolution)

     As expected, 250 Hz component is appeared at harmonic order of 25. This is because we have 10 Hz resolution. Please draw your attention to that the signal magnitude is calculated correctly as 1 and there will be no high frequency components, their magnitudes are too small and they can be ignored. As a result, our FFT code calculates the magnitude of our signal which is sampled at 25 kHz correctly as 1, since the window contains 25 complete cycles. 
     Let me pass through the most impressive result. What if our frequency is slightly deviates to 255 Hz. Actually please consider that 255 Hz component is not the harmonic component of an ordinary load, this value can be an individual harmonic in addition to the characteristic harmonics. In other words, 255 Hz can not be generally appear as a characteristic 5th harmonic, this can only be happen if the system frequency  deviates to 51 Hz, which is an unlike situation 50 Hz deviates +-0.2Hz at max. We ,for this article, are dealing with the individual load harmonic of 255 Hz. This kind of harmonic components (inter-harmonics) can be encountered mostly in the loads of metal industry, especially for metal melting Induction Furnaces. If you want to reach this kind of load characteristics please contact me. Since we have 255 Hz signal, our FFT window contains 25 complete cycles and 1 half cycle, which means that our control system calculates FFT of a signal of 255 Hz which is distorted at every 100 msec. I try to explain this case in figure 3.
Figure 3: Case when window size does not contain complete cycles of periodic signal

     Figure 3 shows an exaggerated version of the case I try to mention but this is a good illustration. Actually in our case, the distortion happens once for every 25 cycle. Let us see what happens to frequency spectrum for this case.

Figure 4: Harmonic Spectrum of 255 Hz signal in 100 msec window(10 Hz resolution)

     Figure 4 shows the frequency spectrum when we have 255 Hz signal in 100 msec window. I can hear your criticisms like it is normal that the magnitude of the signal is reduced since our resolution is 10 Hz, thus the magnitude is shared by the nearby points. The criticism is totally correct, because in the IEC recommendation the harmonic components are calculated with geometric sum of nearby components for this kind of cases. However, the point I want to draw attention is that there are higher frequency components appearing in the harmonic spectrum which are actually does not exist. When you thoroughly look at the figure 4, you can see that the magnitude of 400 Hz component is about 3% of the individual harmonic, which is an important result. Unlike the harmonic spectrum in figure 2, this case creates the high frequency harmonic components which do not exist in reality. This situation is totally the result of wrong measurement and may cause limit exceeding for higher order harmonics, whose magnitude in reality do not exceed the limits.
     I tried to explain the effect of FFT window size on Harmonic Spectrum of a signal. Actually, the results I show are inevitable for inter-harmonics, since we can not form a window which contains the complete cycles of all harmonic components. However, if we increase our resolution, meaning size of the FFT window, we can significatly reduce the effect of this measurement defects. This time we should consider the storage and execution time concerns. Our control system can not calculate the FFT if our data is huge ,actually we can not even store them, and our process time increases significantly.