Se está descargando tu SlideShare.
×

- 1. An-Najah National University Faculty of Engineering Electrical Engineering Department Power factor correction by Static Variable Compensator Prepared by: Mohammed AbdallateefAbdaljawwad 11005554 Amjad Mohammad Adarba 11001713 Eyad Riad Amer 11001996 Supervised by: Dr. Kamil Salih
- 2. Acknowledgement we take thisopportunitytoexpress ourprofoundgratitude anddeepregardsto ourguide Dr.Kamil Salihforhisexemplaryguidance,monitoring, continued support andconstant encouragement throughoutthe course of thisproject.
- 3. Table of Contents Chapter 1...................................................................................................1 Section 1.1 :Introduction..........................................................................1 Section 1. 2 . Objectives............................................................................2 Chapter 2...................................................................................................4 Section 2.1 : Literature review.................................................................4 Section 2.2 :Theoretical background..................................................... 5 Chapter 3: components of the project ……............................................8 Section 3.1 : zero crossing detector ………….…………………………8 Section 3.2 Triac ………….………………………………….…………9 Section 3.3 : Arduino ……………...…………………..…….…………10 Chapter 4 :Methodology…………………………………….……….….11 Section 4.1: Static Variable Compensation in closed loop control..….11 Section 4.2: : Static Variable Compensation in open loop control …..14 Section 4.2.1: PM meter ……………………………………………….15 Section 4.2.2: determine the firing angle …………………………….18 Section 4.2.3: Generating the firing angle………………….................24 Chapter 5: results and conclusions…………………………………...26 References ………………………………………………………..33 Appendix A……………………………………………………….34 Appendix B ……………………………………………………….37
- 4. List of Figures Figure.1: Load connectedto the Generatorthrough a Transmission line..............................................................................................................5 Figure.2: Lag betweenvoltage and current..........................................6 Figure.3:Compensatedloadon The Transmission line.......................6 Figure.4:Schematic of the relation betweenPF with the Apparent power, Powerangle and Reactive power................................................6 Figure 5: The current and voltage citation after correction................7 Figure 6: circuit of zero crossing detection……………………………….8 Figure 7: the Triac symbol and a simplifiedcross sectionofthe device………………………………………………………………………………………9 Figure 8: simulation of closedloopsystem ………………………….12 Figure 9 : power factorbehavior at closedloopsystem ……………13 Figure 10 : zero cross detectoroutput ……………………………….15 Figure 11 : comparing betweenthe voltage signaland ZCD ……….16 Figure 12 : triac operation……………………………………………19 Figure 13:the shape of firing equation ……………………………..20 Figure 14 : a graphicaldepiction of the bisection method…………21
- 5. Figure 15:the code of bisectionmethod to determine firing angle..22 Figure 16:changing alfa with changing load condition……………24 Figure 17: arduino results 1 ……………………………………….26 Figure 18:arduino results 2 ……………………………………….27 Figure 19 :arduino results 3 ………………………………….…….28 Figure 20 :arduino results 4 ………………………………….…….29 Figure 21:arduino results 5 ………………………………….…….30 Figure 22:comparing betweenalfa 1 and current ZCD …………...31 Figure 23:comparing betweenalfa 2 and current ZCD …………...31 Figure 24:comparing betweenalfa 3 and current ZCD …………...32 Figure 25:comparing betweenalfa 4 and current ZCD …………...33
- 6. List of Tables Table 1 : the relationbetweennumber of iterationand the max error knowing that the value of alfa included in the interval of [0 , pi]…………23
- 7. :Nomenclatureor list of symbols Z = Circuit impedance, Ω. R = load Circuit resistance, Ω. XL = load inductive reactance, Ω.. Xc= capacitor reactance L= inductance value (Henry) C= capacitive value (Farad) I = Load current, A. PF= power factor Vrms= rms value of voltage at the shunt compensator Vm= peak value of the voltage supplied by the source P= real power consumed by the resistive part of the load Qc= reactive power generated by the capacitor branch Ql= reactive power consumed by the inductor (load branch) S= apparent power transmitted from the source to the load α= firing angle of the Triac Ɵ= phase shift between voltage and currentat the end of the transmission line W= radial frequency of the source f= frequency of the source in Hz Ton= the time of the periodic signal that gives ONE value ZCD= zero cross detector
- 8. ABSTRACT The objective of this project is to improve power factor of transmission lines using SVC (Static Variable Compensator). Static VAR Compensation under FACTS uses TSC (ThyristorSwitched Capacitors) based on shunt compensation duly controlled from a programmed microcontroller. done bypower factor compensation wasPrior to the implementation of SVC, .or switched capacitor bankssynchronous condenserlarge rotating machines such as These were inefficient and because of large rotating parts they got damaged quickly. This proposed system demonstrates power factor compensation using thyristor switched capacitors. Shunt capacitive compensation – This method is used to improve the powerfactor. Whenever an inductive load is connected to the transmission line, power factor lags because of lagging load current. To compensate for this, a shunt capacitor is connected which draws current leading the source voltage. The net result is improvement in power factor. The time lag between the zero voltage pulse and zero current pulse duly generated by suitable operational amplifier circuits in comparator mode are fed to two interrupt pins of the 8 bit microcontroller of Arduino family. Thereafter program takes over to actuate appropriate number of opto-isolators duly interfaced to back to back SCRs. This results in bringing shunt capacitors into the load circuit to get the power factor till it reaches unity. Further the project can be enhanced to thyristor controlled triggering for precise PF correction instead of thyristor switching in steps.
- 9. 1 Chapter 1 Section1.1 : Introduction Modern civilization depends mostly on electrical energy for agricultural, commercial, domestic, industrial and social purposes [1]. The electrical energy is exclusively generated, transmitted and distributed in the form of alternating current(a.c.). Any load can be presented basically in three elements which are resistor , inductor and capacitor. The resistor consumes active energy in which the electrical energy takes a new form of energy (eg. Heat , mechanical, illumination …etc) while the inductor and capacitor store the electrical energy in magnetic field and electric field respectively which means the electrical energy still in its original form. The actual amount of power being used, or dissipated, in a circuit is called real power. Reactive loads, inductors and capacitors dissipate zero power, yet they drop voltageand draw current giving the deceptive impression that they actually do dissipate power. This “phantom power” is called reactive power[2]. More precisely power dissipated by a load is referred to as real power where as power merely absorbed and returned in load due to its reactive properties is referred to as reactive power. However in nature, most of the loads are inductive loads consuming reactive power and resulting in low lagging power factor, on the other hand capacitive load (capacitor banks) generating reactive power and resulting in leading power factor. So the capacitors and inductors loads have a opposite effect on power factor . Effects of reactive power flow in line network 1- Poor transmission efficiency Losses in all power system elements from the power station generator to the utilization devices increase due to reactive power drawn by the loads, thereby reducing transmission efficiency. 2- Poor voltage regulation Due to the reactive power flow in the lines(higher current), the voltage drop in the lines increases due to which low voltage exists at the bus near the load and makes voltage regulation poor. 3- Low power factor The operating power factor reduces due to reactive power flow in transmission lines. 4- Needof large sized conductor Power factor correction allows to obtain advantages also for cable sizing. In fact, as previously said, at the same output power, by increasing the power factor the current diminishes. This reduction in current can be such as to allow the choice of conductors with lower cross sectional area. 5- Increase in KVA rating of the systemequipment Generators and transformers are sized according to the apparent power S. At the same active power P, the smaller the reactive power Q to be delivered, the smaller the apparent power. Thus, by improving the power factor of the installation, these machines can be sized for a lower apparent power, but still deliver the same active power.
- 10. 2 6- Reduction in the handling capacity of all systemelements Reactive component of the current prevents the full utilization of the installed capacity of all system elements and hence reduces their power transfer capability. A power system is expected to operate under both normal and abnormal conditions and under these conditions it is desired that the voltage must be controlled for system reliability, the transmission loss should be reduced and power factor should be improved (Rajesh Rajaramanet.al., 1998). In this paper the effect of line reactive power flow on transmission efficiency, voltage regulation and power factor with and without VAR compensation techniques are presented. 7- Penalties on consumers. Consumers pay extra fees on bills for poor factor, e.g. in Palestine there is a penalty for PF < 0.92 Section 1.2 : Objectives The objective of the project is to minimize the effects of reactive power flow in the line network, where the project will contributes the generator in supplying the load by reactive power, so the project will reduce the power flow from generators to load, therefore reducing the current, which in turn reduce the effects of reactive power flow in the line network. Now starting with the common methods which are used for solving poor PF of loads problem, which are Capacitor Banks and Synchronous Condenser.[3] Capacitor Banks is a method of adding capacitors in parallel at the load to generate a part of the needed reactive power rather than the reactive power totally generated by the power supply, they are a group of capacitors that are connected together depending on how poor the PF load is, which reflects that the load requires more reactive power. The main disadvantage of this method is that it requires high load to sense the change on the power factor, therefore the generated reactive power by the capacitor banks changes in steps and not in a smooth way, so we can't achieve a specific PF at some loads. Synchronous Condenser is a Synchronous motor which is over excited and most of the time it's at no load or low load, itgenerates reactive power controlled accurately by the field current, and the PF can be raised smoothly to achieve the required value. Synchronous Condenser usually used for heavy load due its high cost. [3] Taking into consideration the previous methods, the project tried to take the advantages of both methods and avoid the disadvantages as much as possible. The method of this project uses one large capacitor bank in series with a Triac. The firing angle of the Triac controls the flow of reactive power from the capacitor. The controller specifies the firing angle of the Triac to supply a part of reactive power of the load depending on the reference PF. The main advantages of this method are low cost with respect to the mentioned methods, this method is sensitive to any changes at the load even for small changes and by this method a specific PF can be achieved.
- 11. 3 components blocks of the project
- 12. 4 Chapter 2 Literature review Section 2.1: Citation relevant work and results There are too many research on the ordinary methods of PF correction. Arteche is a huge company in Spain which is a major manufacturer of reactive compensation and harmonic mitigation products, this company published a research aboutmany types of capacitor compensation, their research shows differenttypes of compensation to different types of load, and also shows the importanceof reactive power compensation. A group of companies called ABB is a leader in power and automation technologies that enable utility and industry customers to improve performancewhile lowering environmental impact. ABB inserted the TSC (thyristor switched capacitors ) as one of the mean technique in PF correction methods and mentioned that this method could replace synchronous condenser, where this method can correct the PF smoothly. This method suffer from harmonics and ABB gave visualization for solving this problem in their published paper (Technical Application Papers No.8 Power factor correctionand harmonic filtering in electrical plants).
- 13. 5 Section 2.2 Theoretical background From the expertise that have been gained through past courses it was easier to deal with the project. The PF correction has been mentioned in different courses such as Electrical Circuits, Fundamental Machines and Power Systems. Many other courses helped us in performing this project such as Power Electronic, 'Signals and Systems', Drive of Electrical Machines and modeling using Matlab. The following figuer.1 shows a load connected to a generator through a transmission line, where Vs is the terminal voltage of the generator. Figure.1 SL = 𝑃 + 𝑗𝑄𝑙 The power factor present the ratio between the real power consumed at the load to the apparent power delivered to the load : 𝑃𝐹 = 𝑃 𝑆 = 𝑃 √𝑃2 + 𝑄𝑙2 Also the PF gives an indicator of the phase shift between current wave and voltage wave, where PF is the cosine of the angle between current and voltage, a lagging PF means that the current lags the voltage by an angle ( cos−1 𝑃𝐹) and a leading PF means that the current leads the voltage by an angle ( cos−1 𝑃𝐹). As much as the angle become bigger the power factor becomes smaller and vice versa. In real life the loads always have lagging power factor due to inductive loads Figure.2 shows a schematic for a current lags voltage with relatively low PF:
- 14. 6 Figure.2 For adding a shunt compensation (shunt capacitor branch ) to the load it will contribute the generator in generating reactive power to the load . Figure.3 shows the compensated load: Figure.3 *note that the load will consume the same amount of real and reactive power SL = 𝑃 + 𝑗𝑄𝑙 Shunt Compensation will generate reactive power to the load at a value of Qc that will correct the PF by reducing the amount of reactive power delivered by the generator which in turn reduce the apparent power : 𝑃𝐹 = 𝑃 𝑆 = 𝑃 √𝑃2 + ( 𝑄𝑙 − 𝑄𝑐)2 Figure.4: schematic the relation between PF with apparent power , power angle and reactive power Where Figure.4
- 15. 7 Figure.5 shows the current and voltage citation after correction: Figure.5 We notice that the enhanced PF the smaller phase shift be. Now the importance of PF correction is that the reactive power transmitted will be smaller so the apparent power will be reduced 𝑆. 𝑜𝑙𝑑 = √ 𝑃2 + 𝑄𝑙2 𝑆. 𝑛𝑒𝑤 = √ 𝑃2 + ( 𝑄𝑙 − 𝑄𝑐)2 Which in turn reduce the current at the transmission line 𝐼. 𝑜𝑙𝑑 = 𝑆. 𝑜𝑙𝑑 𝑉 = √𝑃2 + 𝑄𝑙2 𝑉 𝐼. 𝑛𝑒𝑤 = 𝑆. 𝑛𝑒𝑤 𝑉 = √𝑃2 − ( 𝑄𝑙 − 𝑄𝑐)2 𝑉 Then the voltage drop will decrease , the losses at the transmission line will reduce , which enhance the efficiency of the transmission line ,avoid extra fees on bills and the rated power of the system equipment will be reduced ,that’s means we need smaller sized and cheaper equipment and transmission lines.
- 16. 8 Chapter 3: main components of the project Section 3.1: zero crossing detector The zero cross detection circuit is the most critical part for designing a PF meter in our project. This circuit will watch the input voltage and current waveforms and detect when this waveforms cross the zero axis . Zero cross detection circuits are mainly used in cases when the PF needs to be measured by micro controller. In that case, the micro-controller needs to know the zero cross detection point of the voltage waveform, so that it can calculate the angle offset to send the trigger pulse to the gate of the triac. Here is an example calculation. Suppose that the AC power oscillates in a 50Hz cycle. This means that each cycle will take 1/50Hz = 20 mSec to be completed. During those 20mSec, the waveform will cross the zero point two times, one at the beginning and one in the middle of the cycle, that will be after 20/2 = 10mSec. If we want the capacitor to inject reactive power from applying a half waveform of the voltage , then the microcontroller needs to send a pulse in the middle of each semi-cycle. Thus, a pulse must be sent after 5mSec after each time the waveform passes the zero point. For this to be done, the microcontroller will watch the zero cross detection circuit (ZCD) for a pulse. When the ZCD send this pulse, the micro controller will count 5 mSec and then will trigger the gate of the triac. The following circuit will perform a Zero Cross Detection circuit. This circuit is very stable and accurate, and has a controllable pulse width. Another great advantage is that because of the transformer, this circuit has a complete galvanic isolation with the mains supply so that it makes it completely safe and risk free of destroying the microcontroller due to power peaks.[4] Figure 6
- 17. 9 Section 3.2 : Triac The Triac or bi-directional Thyristor, is a device that can be used to pass or block current in either direction. It is therefore classed as an AC power control device. It is equivalent to two Thyristor in anti-parallel with a common gate electrode. As only one device is required there are cost and space savings. Figure 7. The Triac has two main terminals. TE1/ TE2 (power in and load out) and a single gate connection. The main terminals are connected to both p and n regions since the current can be conducted in either direction. The gate is similarly connected, since a Triac can be triggered by both negative and positive pulses. The ON state voltage or current characteristics resembles a Thyristor. The Triac static characteristics show that the device acts as a bi-directional switch. The condition where terminal TE2 is positive with respect to terminal 1 is denoted by the term TE2+. If the Triac is not triggered the low level of leakage current increases as the voltage increases until the break over voltage V is reached and then the Triac turns ON. The Triac can be triggered below V by a pulse to the gate, provided that the current through the device exceeds the latching current I before the trigger pulse is removed. The Triac has a holding current value below which conductance cannot be maintained. If terminal 2 is negative with respect to terminal TE2 the blocking and conducting conditions are similar to the TE2+ condition, but the polarity is reversed. The Triac can be triggered in either direction by both negative or positive pulses on the gate. The actual values of gate trigger current and holding current as well as latching current can be slightly different in the different operating quadrants of the Triac due to the internal structure of the device. [5]
- 18. 10 Section3.3: Arduino The Arduino Uno isa microcontroller board based on the Atmega328 which can be programmed withthe Arduino software. Ithas 14 digital input/outputpins(of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, the Arduino Uno can be powered viathe USB connection or with an external power supply. The power sourceis selected automatically. The Atmega328 has32 KB memory (with 0.5 KB used for the boot loader). It also has 2 KB of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library). "Uno" means onein Italian and is named to mark the upcoming release of Arduino 1.0. TheUno and version 1.0 will be the reference versionsof Arduino, movingforward. TheUno is the latest in a series of USB Arduino boards, and thereference modelfor the Arduino platform; for a comparison with previousversions. [6]
- 19. 11 Chapter 4: Methodology This chapter will explain the used method for calculating the power factor, firing angle for the triac and time of phase shift also dealing with zero cross detector and Arduino programming. In the last semester it was discussed that the Static Variable Compensation mainly works on measuring the PF of the load then the controller will keep adjusting the amount of reactive power that should be injected to the load by controlling the firing angle of the traic until the new PF will be equal to reference (needed) PF which means that the methodology used a closed loop system. In this semester, due to the high difficulty finding some of important tools to achieve the project in mentioned methodology (closed loop method), it could be found some of these tools but with a high cost. So we concentrated on the main units of the project which are PF meter and control unit which responsible to generate the firing angle to the triac, so the applied voltage to the capacitor bank is controlled then the amount of reactive power generated from the capacitor and injected to the load also is controlled. This chapter will include two sections. At first section we will discuss the closed loop methodology in correcting the power factor which is very efficient and practical method . The second section discuss use open loop method which means there is no feedback comes from the load to the controller, because actually to deal with a real load we need instruments tools such as current and potential transformers to convert the real voltages and currents to measurable values suites the control unit, but unfortunately these instruments transformers are difficult to find at the market
- 20. 12 Section4.1:Static Variable Compensationin closedloopcontrol In the last semester we built simulation on MATlap for static variable compensation in closed loop control manner, see figure Figure 8 As seen from the figure the module consist of load, measuring instrument for the load's current and voltage, PF meter, a capacitor bank connected in series with a triac, and most critical part which is the control unit. The control unit will keep adjusting the value of firing angle until that the the measured PF on the load exactly equal the reference PF, where as seen the control unit take the measured PF as feedback. The main element in the control unit is the integration which actually the controller, this controller obviously works in integral manner, where the output of this element is additives depending on the inputs(reference PF and the feedback measured PF), it can be noted that when the
- 21. 13 reference PF equals the measured PF then the difference between them is zero, therefore the output of the integration unit is constant or DC value, this DC value is translated to the value of firing angle (alfa) for the triac by using a saw tooth oscillator and comparators. The module is able to correct the PF under changing load and achieve the reference PF, the following figure shows how was the module able to correct the PF under changing load and achieving the reference PF(0.9 in our case). Figure 9 The main advantages of this method are The simplicity of its control specially using Arduino In this method there is need only for a PF meter at the load There is no need for KW meter at the load and there is no need to measure the voltage and the current at the load because the controller specify the value of the firing angle depending on the value of the PF on the load and the reference PF Ability to supply exact amounts of reactive power to achieve specific reference PF regardless for light or heavy load, where traditional ways to correct the PF face problems to deal with different load sizes The module is able to deal with the changing the voltage at the bus of the load
- 22. 14 Section 4.2: Static Variable Compensation in open loop control In this semester we obliged to work in open loop Static Variable Compensation control system because to deal with a real load we need instruments tools such as current and potential transformers to convert the real voltages and currents to measurable values suites the control unit (control’s voltage-level is low), but unfortunately these instruments transformers are difficult to find at the market, and because we couldn’t bring instruments transformers we didn’t try to test our project on a real load bring such as an induction motor. Open loop method which means there is no feedback comes from the load to the controller, so the accuracy to achieve the reference PF will be less than it for closed loop In our methodology of open loop Static Variable Compensation we need a PF meter and KW meter, we were able to build a PF meter as will be discussed in this section but we assumed that we have constant consumption of real power instead of KW meter and also a constant voltage at the load, this section will show why these assumptions made. So briefly in our project we will show how the controller changes the value of the firing angle depending on the measured PF. The used methodology consists of mainly two parts. First part is building a PF meter. Secondly, determining the suitable value of the firing angle, which is supposed to control suitable voltage to control the amount of reactive power the must be generated to the load achieve the reference PF.
- 23. 15 Section4.2.1 : PF meter The firstpart of calculatingthe PFisto findthe phase shiftbetweenthe voltage andcurrent waveforms,thatmeanswe have tofindthe time difference betweenwhenthe voltage cross the zero axisandwhenthe currentwave cross the zeroaxis,inorder to applythe previous,a ZeroCross DetectorCircuit(ZCD) isused. As mentionedbeforeZCDcircuitgivespulse phase modulationPPMtogive an indication whenthe signal (sinusoidalinthe project) startto rise or fall fromthe zeroaxis,whichgive a duplicate the frequencyatthe output,wheneverthatoccursthe generatedpulse givesan indicationthatthere isa zerocross inthisplace . The followingfigure showsthe outputsignal fromZCDcircuit Figure 10 However,if bothvoltage andcurrentappliedtoZCDcircuits,we can findthe phase shift betweenZCDof voltage andZCD of current andthat meanswe findthe phase shiftbetween the voltage andthe current waveformsthemselves. the current shouldpassthrougha resistance inordertoconvertit to a voltage:Note waveformbecause the ZCDcircuits dealswithvoltage input,andthe resistance makesno phase shiftforthe current. The followingfigure showsthe relationbetweenvoltageorcurrentwaveformwithitsZCD
- 24. 16 Figure 11 The secondpart is to use the PPMfromthe twoZCD circuitsto determine the powerfactor, the ZCD for the voltage andthe current will be connectedtoarduinoinput,pinforeach(D2 for voltage andD3 for current),we wrote a code to findoutthe time betweenthe ZCD pulsesof the voltage andthe ZCD pulsesof the current thencalculate the phase shift betweenthesetwoinputs,whichmeansthatwe foundthe phase shiftbetweenthe original waveformsof voltage andcurrent. There isa functionatthe arduinocalled“micros()”,whichisabuiltintimerstartto count in microsecondsince the processerstartsto work,we use thisfunctiontocapture the time storedinthe micros functionwhenthe voltage crossesthe zero,afterthatwe capture the time storedinthe microsfunctionwhenthe currentcrossesthe zero,sosimplythe time of phase shiftwill be the difference betweenthe capturedtime of current ZCDand the capturedtime of voltage. Here is an example of simple microsfunctioncode todeterminethe knowntime,where in thiscode we capture the time of the micros andsimplyapplyadelayby1000 mille second and againcapturedthe storedtime at microsthenwe findthe differencebetweenthe two captures,the difference will me inmicrosandto findthe resultinmille secondwe dividethe resultby1000, finallywe showedthe resultatthe monitortocompare betweenthe code resultandthe appliedtime delay:
- 25. 17 The followingshowsthe monitoroutputresults which shows that the difference in reading the micros function match the supposed delay (1000 Milles). There isa small errorineach cycle of the programequal to 20 microsecondat most which is high precision. Aftercalculatingthe time betweenthese twoinputs,the phase shiftcanbe calculatedin linearmannerwhere full periodoccursafter20 mille seconds(1/freq=1/50second) correspond360 degree,sothe relationbetweenphaseshiftandtime of phase shiftis: 𝑝ℎ𝑎𝑠𝑒 𝑠ℎ𝑖𝑓𝑡 = 𝑡𝑖𝑚𝑒 𝑠ℎ𝑖𝑓𝑡 ∗ 360 20 Then the PF will be equal to cosin the phase shift in radial as in the equations: Ɵ = 𝑝𝑎𝑠ℎ𝑒 𝑠ℎ𝑖𝑓𝑡 ∗ 𝜋 360 𝑃𝐹 = 𝑐𝑜𝑠Ɵ
- 26. 18 Section4.2.2:determine the firing angle In order to control the generated reactive power from the capacitor bank we have to control the value of either the capacitance or the applied voltage to the capacitor bank according to the following equation: 𝑄𝑐 = 𝑉𝑟𝑚𝑠2 ∗ 𝑊 ∗ 𝐶 Traditional method control the capacitance to control the reactive power generated, in our project we control the applied voltage to the capacitor bank. The main relation is between the firing angle (α) of the triac and the applied voltage according to the following equations: 𝑉𝑟𝑚𝑠 = √ 1 𝜋 ∫ (𝑉𝑚 sin 𝑊𝑡)2 𝜋 𝛼 𝑑𝑤𝑡 = √ 𝑉𝑚2 𝜋 ∫ (sin 𝑊𝑡)2 𝜋 𝛼 𝑑𝑤𝑡 = √ 𝑉𝑚2 𝜋 ∫ 1 2 (1 − 𝑐𝑜𝑠2𝑤𝑡) 𝜋 𝛼 𝑑𝑤𝑡 = √ 𝑉𝑚2 2𝜋 [𝑤𝑡 − 𝑠𝑖𝑛2𝑤𝑡 2 ] ; 𝑤𝑡 =∝ 𝑡𝑜 𝜋 = √ 𝑉𝑚2 2𝜋 [𝜋 − 𝑠𝑖𝑛2𝜋 2 − 𝛼 + 𝑠𝑖𝑛2𝛼 2 ] = √ 𝑉𝑚2 2𝜋 [𝜋 − 𝛼 + 𝑠𝑖𝑛2𝛼 2 ] = √ 𝑉𝑚2 2𝜋 [𝜋 − 𝛼 + 𝑠𝑖𝑛2𝛼 2 ] Then 𝑉𝑟𝑚𝑠 = 𝑉𝑚√ 1 2𝜋 [𝜋 − 𝛼 + 𝑠𝑖𝑛2𝛼 2 ]
- 27. 19 The following figure shows the relation between the firing angle of the triac and the applied voltage to the capacitor Figure 12 As mentioned before we assumed that the consumption of real power of the load is constant because it is hard to build KW meter also we assumed that the voltage at the load is constant and equal to the nominal voltage, we also assumed that the worst PF at the load is 0.4. Now after finding the PF we found the required amount of generated reactive power according to the following equation 𝑄𝑐 = 𝑃 (tan (acos𝑃𝐹𝑜𝑙𝑑) − tan(acos 𝑃𝐹𝑛𝑒𝑤)) Now to generate required reactive power to achieve reference PF the voltage should be set according to the following 𝑄𝑐 = 𝑉𝑟𝑚𝑠2 ∗ 𝑊 ∗ 𝐶 Then 𝑉𝑟𝑚𝑠 = √ 𝑄𝑐 𝑊 ∗ 𝐶
- 28. 20 To control the applied voltage, the firing angle (α) should be set according to following equations 𝑉𝑟𝑚𝑠 = 𝑉𝑚√ 1 2𝜋 [𝜋 − 𝛼 + 𝑠𝑖𝑛2𝛼 2 ] With some manipulations with this equation we reached the following equation sin2α − 2α = 𝑐𝑜 Where 𝑐𝑜 = 𝑉𝑟𝑚𝑠2 𝑉𝑚2 ∗ 4𝜋 − 2𝜋 To solve this equation we use numerical method called Bisection Method The shape of sin 2α − 2α will be as followed Figure 13 When alfa included inside the interval of [0,π], it can be concluded that the value of “co” has a range between 0 and -6.3
- 29. 21 -Bisection method The bisectionMethod,whichisalternativelycalledbinarychopping,interval halving,or Bolazan’s method,isone type of incrementalsearchnumerical methodinwhichthe interval isalwaysdividedinhalf.If afunctionchangessignoveraninterval,the functionvalueatthe midpointisevaluated.The locationof the rootsisthendeterminedaslying atthe midpoint if the subinterval withinwhichthe signchange occurs.The processisrepeatedtoobtain refinedestimates.A simple algorithmforthe bisectioncalculatedinthe nextstepsanda graphical depictionof the methodisprovidedin the followingfigure [7]. Figure 14
- 30. 22 The main methodologyof programmingthe bisectionmethod(numerical) Step1-Choose lowerxl andupperxu guessesforthe rootsuch that the functionchanges signoverthe interval.Thiscanbe checkedbyensuringthatf(xl)*f(xu)<0 Step2-Anestimate of the root xris determinedby xr=(xl+xu)/2 Step3-Make the followingevaluationstodetermine inwhichsubinterval.Thereforeset xu=xrand a) if f(xl)*f(xr)<0,the rootliesinthe lowersubinterval.Therefore,setxu=xrandreturnto step2 b) if f(xl)*f(xr)>0,the rootliesinthe uppersubinterval.Therefore,setxl=xrandreturnto step2 c) if f(xl)*f(xr)=0,the root equal x;terminate the computation. Dependsonthe previous,the followingfigure showsthe bisectionusedcode toestimate the value of alfain orderto control the rms voltage appliedtothe capacitorto control the injectedreactive powertothe loadto correctthe powerfactorof the load. Figure 15
- 31. 23 as the numberof iterationincrease the errorwill rapidlydecrease:Note followingtable showsthe relationbetweennumberof iterationandthe max errorknowing that the value of alfaincludedinthe interval of [0, pi]. Number of iterations Max Error (%) Max Error (degree) 1 50 90 2 25 45 3 12.5 22.5 4 6.25 11.25 5 3.125 5.625 6 1.56 2.808 7 0.78 1.404 8 0.39 0.702 9 0.19 0.342 10 0.097 0.1746 Table 1
- 32. 24 Section4.2.3:Generating the firing angle Thissectioninterestedatthe usedmethodologiestogenerate the firingangle tothe triacin orderto control the appliedvoltageatthe capacitorbank. Simplythe projectuse twodifferentmethodologiestogenerate alfa afterfindingitin numerical methodas mentionedinthe previoussectionof thischapter. -first methodology :- The firstmethodologymakesatestat everypossible”time point”of the period tofindoutif thisisthe correct time togenerate alfaor not The test mainly comparesbetweenthe foundedalfaintime domainwiththe difference betweenthe presenttime andthe time where the ZCDof the voltage start, if theyare equal thena highvoltage will appliedtooutputpinfora small periodof time (0.5in our project), thenthe program start fromthe beginningtorepeatthisgenerationateverycycle with difference firingangle dependsonthe new conditionof the load. So if there isa newloadpowerfactor, the controllerwill make averyfast new firingangle to control the amountof injectedreactive power. Figure 16
- 33. 25 - secondmethodology :- The secondmethodology hasthe same testwhichcompare betweenthe foundedalfa in time domainwiththe difference betweenthe presenttime andthe time wherethe ZCDof the voltage start,alsoif theyare equal thena highvoltage will appliedtooutputpinfora small periodof time (0.5in our project),themaindifference isthat the programgenerates the same alfa for50 times(one second) bycalculatingitonce inthe second,thenthe program start fromthe beginningtorepeatthisgenerationateverysecondwithdifference firingangle dependsonthe newconditionof the load. Thismethodologyalsohasafast and practical response tothe changinginthe load conditions, Althoughthe second methodologyhas slowerresponse,it hasgoodaccuracy and evermore practical effectiveness.
- 34. 26 Chapter 4: results and conclusions This chapter shows the ability of the project to correct the PF of the load by generation the firing angle to control the applied voltage of the capacitor bank, the results shows both of the positive and negative parts of the sinusoidal signal have a generated alfa related to the measured PF of the load, As mentioned before. the PF calculated related to the time of phase shift between the voltage and current ZCD which frequency duplicated from the sinusoidal signal, this because of the ZCD should applied to both positive and negative part of the sin wave, Using arduino monitor, we get the result of calculating the time of phase shift, PF and firing angle. The fpllowing figures shows that results for different values :- Figure 17
- 35. 27 Figure 18
- 36. 28 Figure 19
- 37. 29 Figure 20
- 38. 30 Figure 21
- 39. 31 Also we get results from the oscilloscope to get the results comparing different values of the generated firing angle with respect ZCD of the voltage as shown in the following figures :- Figure 22 Figure 23
- 40. 32 Figure 24 Figure 25
- 41. 33 References: [1] B.R.Gupta, (1998), Power System Analysis And Design, Third Edition , S.Chandand Company Ltd [2] Van Cutsem T., 1991, “A method to compute reactive power margins with respect to voltage collapse”, IEEE Transactions on Power Systems, pp 145 [3] Stephen J. Chapman,2004, Electric Machinery Fundamentals, p(363,364). [4] http://pcbheaven.com/wikipages/Dimmer_Theory [5]http://www.sprags.com/summary.html http://arduino.cc/en/Main/arduinoBoardUno[6] [7] book-numerical method for engineering, 6th Edition 2009 Chapra Canal, page 124
- 42. 34 Appendix A int VZD = 2; // voltage zero cross at pin 2 int IZD = 3; // current zero cross at pin 3 int fire =8;// output pin for fireing angle pin 8 float tv; // initial time of shifting calculatio from voltage crossing float ti; // fianl time of shifting calculatio from current crossing float Ton; double theta; const float pi = 3.14; double PF; float alfa; float alfa1; float TF=4000; int flag1=0; int flag2=0; int flag3=0; int flag4=0; double co; double Vrms; int Vm=326; int P = 5000; int C=0.0014; double PFn=0.95; double xl; double xu; double xr; double xrold; int iter; double fxl; double fxr; double test; double ea; int es=2; double Qc; double ea1; void setup() { Serial.begin(9600); pinMode(VZD,INPUT); pinMode(IZD,INPUT); pinMode (fire,OUTPUT); } void loop() { // finding the time of voltage ZCD while (digitalRead(VZD) != 0 ){ tv = micros() ; flag3=1; // allow to genrate alfa flag4=1; // allow the current code }
- 43. 35 if ((micros()-tv)>=TF && flag3==1){ // generat alfa if it's in the regon between ZCD of voltage and current digitalWrite (fire , HIGH ); delay (0.5); digitalWrite (fire , LOW ); flag3=0; } //finding the time of current ZCD if (flag4==1){ while (digitalRead(IZD) != 0 ){ ti = micros() ; flag1=1; } } if (flag1==1){ // there is a measured time shift between the two inputs flag1=0; Ton = ti-tv; // find the time between tv and ti Ton=Ton/1000; // transfer the time phase shift to milli second if (Ton >0.1 && Ton <4.359){ // the accepted values of Ton related to the accepted values of PF // calculating PF theta = Ton * pi/10 ; // finding the phase shift angle in rad PF=cos(theta ); // calculating the power factor // finding the firing angle using bisectional method xr=0; xl=0; xu=pi; Qc=P*(0.328- tan(theta)); Qc=abs (Qc); Vrms = sqrt(Qc/C*100*pi); co=((Vrms*Vrms)/8419)-(6.28); // co=((Vrms*Vrms)*4*pi/(Vm*Vm))-(2*pi) iter = 0; while (iter <=10 && ea<es ){ xrold=xr; xr=(xl+xu)/2; iter++; if (xr != 0){ ea1=(xr-xrold)/xr; ea =(abs(ea1))*100; } fxl=sin (2*xl)-(2*xl)-co; fxr=sin (2*xr)-(2*xr)-co; test = fxl*fxr; if (test<0){ xu=xr; }
- 44. 36 else if (test >0){ xl=xr; } else { ea=0; } } alfa = xr;// firing angle in rad TF=alfa*10000/pi;// finding the fiering angle as time in micro second flag2=1; // there is allowed values to print } else if (Ton <=0.1 && Ton >=0){ theta = Ton * pi/10 ; PF=cos(theta ); alfa=pi; flag2=1;//there is allowed values to print } else if (Ton <=5 && Ton >=4.359){ theta = Ton * pi/10 ; PF=cos(theta ); alfa=0.01; flag2=1;//there is allowed values to print } alfa1= alfa*180/pi; // firing angle in degree...only for monitoring TF=alfa*10000/pi;// finding the fiering angle as time in micro second if (flag2==1){ // variables to be prented flag2=0; Serial.println("time of phase shift : "); Serial.println(Ton); Serial.println(""); Serial.println("value of power factor"); Serial.println(PF); Serial.println(""); Serial.println("value of fiering angle"); Serial.println(alfa1); Serial.println(""); } } if ((micros()-tv)>=TF && flag3==1){ // generat alfa if it's not in the regon between ZCD of voltage and current digitalWrite (fire , HIGH ); delay (0.5); digitalWrite (fire , LOW ); flag3=0; } }
- 45. 37 Appendix B int VZD = 2; // voltage zero cross at pin 2 int IZD = 3; // current zero cross at pin 3 int fire =8;// output pin for fireing angle pin 8 float tv; // initial time of shifting calculatio from voltage crossing float ti; // fianl time of shifting calculatio from current crossing int flag1=0; float Ton; double theta; const float pi = 3.14; int flag2=0; double PF; double alfa; float TF=4; int flag3=0; int counter; double co; double Vrms; int Vm=326; int P = 5000; int C=0.0015; double PFn=0.92; double xl; double xu; double xr; double xrold; int iter; double fxl; double fxr; double test; double ea; int es=2; double Qc; double ea1; int counter ; void setup() { Serial.begin(9600); pinMode(VZD,INPUT); pinMode(IZD,INPUT); pinMode (fire,OUTPUT); } void loop() { while (digitalRead(VZD) != 0 ){ tv = micros() ; flag3=1; // can search for TF }
- 46. 38 } while (digitalRead(IZD) != 0 && flag3==1 ){ ti = micros() ; flag1 =1; flag3=0; } if (flag1==1){ //PF meter flag1 =0; Ton = ti-tv; // find the time between tv and ti Ton=Ton/1000; // transfer the time phase shift to milli second flag2=1; if (Ton > 5){ flag2=0; } if(PF>0.95|| PF<0.2){ flag1=0; } } if (flag1 ==1){//dteremining the value of alfa (firing angle) using neumerical Bisectional metheod theta = Ton * pi/10 ; // finding the phase shift angle in rad PF=cos(theta ); // calculating the power factor PF=abs (PF); Serial.println("time of phase shift : "); Serial.println(Ton); Serial.println(""); Serial.println("value of power factor"); Serial.println(PF); Serial.println(""); flag2=0; xr=0; xl=0; xu=pi; Qc=P*(0.328- tan(theta)); Vrms = sqrt(Qc/C*100*pi); co=((Vrms*Vrms)*12.56/(106276))-(6.28); // co=((Vrms*Vrms)*4*pi/(Vm*Vm))-(2*pi) iter = 0; while (iter <=10 || ea<es ){ xrold=xr; xr=(xl+xu)/2; iter++; if (xr != 0){ ea1=(xr-xrold)/xr; ea =(abs(ea1))*100; } fxl=sin (2*xl)-(2*xl)-co; fxr=sin (2*xr)-(2*xr)-co; test = fxl*fxr; if (test<0){ xu=xr; } else if (test >0){
- 47. 39 xl=xr; } else { ea=0; } } alfa = xr; if(PF>0.92){ alfa=pi; } alfa=alfa*180/pi; TF=alfa*20/360;// finding the fiering angle as time in mille second Serial.println("value of fiering angle"); Serial.println(alfa); Serial.println(""); } counter = 0; while (counter<100){ while(digitalRead(VZD) != 0){ TF = TF+1; delay (TF); digitalWrite (fire, HIGH); delay (1.1); digitalWrite (fire, LOW); counter ++; } } }