Development of a Microcontroller-Based AC Voltage ...

1 downloads 0 Views 1MB Size Report
that of a TRIAC [1]. SCR is a reliable solution when it comes to AC voltage control at high power as they are available in higher ratings. However, SCR based ...
611

8th International Conference on Electrical and Computer Engineering 20-22 December, 2014, Dhaka, Bangladesh

Development of a Microcontroller-Based AC Voltage Controller with Soft Start Capability Arifur Rahman*, Nayeem Ansari, Nazneen Ahmed, Kazi Mujibur Rahman and Md. Zahurul Islam Department of Electrical and Electronic Engineering Bangladesh University of Engineering and Technology, Dhaka-1205, Bangladesh * [email protected] Abstract—This paper describes the development of a prototype of a microcontroller-based phase angle controlled single-phase AC voltage controller that can efficiently control AC voltage and also accommodates soft start capability for singlephase induction motors. The output voltage of the controller is regulated to maintain a desired fixed RMS value and provide stabilized output by implementing a feedback control system. One microcontroller generates PWM signals in synchronism with the supply voltage to control the firing angle of thyristors while a second microcontroller remains dedicated for measuring the RMS value of the output voltage and sending that to the main microcontroller for the purpose of feedback control. The provision for soft starting of a load is also incorporated into this prototype.

II. OVERVIEW OF THE DESIGN The development of the prototype is mainly composed of several stages of design consideration: 1) anti-parallel SCRbased voltage controller, 2) Gate-drive circuitry for SCRs, 3) PWM generation through microcontroller, 4) Phase and frequency detection, 5) RMS value calculation for feedback and 6) Input-output Interfacing. The functional block diagram of the system is shown in Fig. 1.

Index Terms—AC voltage controller, Automatic voltage regulation, Soft start

978-1-4799-4166-7/14/$31.00 ©2014 IEEE

Fig. 1 Functional block diagram of the voltage controller

III. HARDWARE IMPLEMENTATION A. Voltage Control Mechanism PWM+

2

R12

1

U4

1

6

1

165

R1

2

660 4

K

2 MOC3021

D10

SCR+

DIODE

A

SCR-

A

PWM-

D9 2

R11

1 1

U6

6

165

1

R9

2

660 2

R2 100

DIODE

4

L1

LOAD

VSINE

2

V1

1

5P4M 5P4M

K

I. INTRODUCTION PWM-based AC voltage controllers are widely used in UPS and high power flexible AC transmission systems. This varying voltage output is used for dimming street lights, varying heating temperature in homes and industry, speed control of fans and winding machines and many other applications. These systems need switching elements which can bear high voltage. Frequently, high power MOSFETS are used as the switching element. Their advantage is that they generate less lower-order harmonics. They have the physical limitation of maximum blocking voltage; excessive heating is also an issue for MOSFET based controllers. Amongst other options, an anti-parallel pair of SCRs has the advantage over a TRIAC in controlling highly inductive loads. Although TRIACs have the advantage of a comparatively simpler gate circuit, TRIACs have lower dv/dt ratings than SCRs and are available in only small ratings. Moreover, the reliability of a SCR is more than that of a TRIAC [1]. SCR is a reliable solution when it comes to AC voltage control at high power as they are available in higher ratings. However, SCR based system can only be controlled by phase angle control method. This method generates more harmonic distortions [2]. Moreover synchronization with AC supply is necessary when the control mechanism is provided by microcontrollers. The gating circuit required is relatively more complex. The provision of feedback allows output voltage to be stable and maintain the same RMS value of voltage while there is change in the supply voltage [3]. The gain of the error signal of the feedback control system can be varied to obtain a slower or faster response of the system thus allowing soft start.

50mH

MOC3021

Fig. 2 The main circuit diagram for the prototype

A pair of anti-parallel SCRs is used as the switching device for controlling the AC voltage. The circuit diagram of the SCR based voltage control circuit is shown in Fig. 2. Due to the nature of the connection the two cathodes of the two SCRs corresponds to two different nodes. Thus each gate pulse must

612

be isolated from each other. This is achievved through optical coupling provided by MOC3021 optoccouplers [4]. The mechanism is shown in Fig. 3. gate current

A

K

DIODE

D1

SCR 5P4M 2

R1

660

1

gate current

Fig. 3 Path of gate current when optocoupleer is turned on

B. Synchronization The PWM signals must match accurately in phase and frequency with the AC supply line. Evven a very small deviation in frequency can gradually lead too the PWM signals becoming out of phase with the supply. A modified zero o synchronization. crossing detector is used for the purpose of The circuit diagram is shown in Fig. 4.

C. PWM Generation WM signals must fulfil certain To control the SCRs the PW criteria: 1) The PWM signals must m be inverted (space comes before mark), 2) The frequenncy of the PWM must match exactly with the supply, 3) The T phase information of the supply must be available and 4) 4 The PWM frequencies must be twice the frequency of the AC C supply. An AVR microcontroller, ATmega32, A was used for the purpose of PWM generation [5]. Even though it is possible to drive the two SCRs with thee same PWM signal, a slight mismatch in timing can result in unwanted triggering in the next half cycle. Two PWMs woorking in an interleaved manner eliminates the risk of such trigggering. Thus during the positive half cycle the PWM controllingg the reverse SCR is set to be zero and during the negative haalf cycle the PWM controlling the forward SCR is set to zeroo. Fig. 6 shows the two PWM signal generated and the resultaant output voltage alongside the supply voltage. Resultant Output Voltage 400 AC supply voltage Output voltage

200 0

A

D4

A K

D1

4 A

2

0

50

100

150

200

250

300

350

250

300

350

250

300

350

PWM for dri ving forward SCR

R3

Synchronization

10k

2

D2 DIODE

6 5

KA

DIODE

1

4N35 1

D3 SUPPLY

-400

K

DIODE

1

2

21.5k

Pulse

2

R2

K

1

-200

7 74HC14

1 0.5 0 -0.5

OPTOCOUPLER-NPN

0

50

100

DIODE

150

200

PWM for dri ving reverse SCR 1 0.5 0

Fig. 4 Synchronization circuit, a modified zero crossing c detector

The final output of this circuit is a PWM signal which should ideally have a logic level 0 at the positive half cycle and logic level 1 at the negative half cyclee. However due to the presence of resistance in the input circuuit the signal mark (logic level 1) starts a little earlier than thhe start of negative half cycle and ends a little later (by the sam me amount of time) than the end of the negative half cycle. The timing is shown in Fig. 5.

-0.5

0

50

100

150

200

Fig. 6 PWM control c signals

D. RMS Value Calculation: The RMS value of the outtput cannot be determined by simply dividing the peak value by b √2 due to the output voltage being a distorted sinusoidal wavve [6]. In order to calculate the RMS value of the output vooltage we have used another microcontroller, AVR ATmegga8 [7]. This is due to the consideration that the burdenn of the excess calculation required for this step mightt hamper the time sensitive operation of the main microconntroller. If the output voltage is sampled over a full cycle of thee supply voltage and N samples are obtained, the RMS value is i calculated by the following equation. ∑

Fig. 5 Timing diagram of synchronization pulses p

The error in time can be calculated byy the equation (1) which is based on the relative positions of the AC supply and the synchronization pulses. ⁄2 1 2 Tmark and Ttotal is calculated using one of the timer resources available in the microcontroller annd Terror is obtained from the above equation. Ttotal is also the period of the AC supply. Thus both frequency and phasse information is obtained.

2

However since the analoguue to digital converter of the AVR microcontroller only alloows the conversion of positive voltages, the symmetric nature of the output is exploited and the output is sampled in one hallf cycle only. The result is then fed to the main microcontroller for the purpose of feedback. E. Input/output Interface For the provision of manuual input to set the reference voltage value we have used a variable v resistor. A 16x2 LCD module is interfaced for displayying various data related to the operation. The reference voltagee value and the resultant output voltage are displayed on the LCD L display. The frequency of

613

the supply voltage respective microcontroller is also displayed.

to

the

clock

of

the

IV. ALGORITHM AND EXECUTION When the device is started up it automatically measures the value of Ttotal and Terror. From Fig. 5 it is apparent that the rising edge of the synchronization pulse arrives at Terror time earlier than the end of the positive half cycle. Thus every rising edge means that there Terror time left until the negative clock cycle begins. If TPWM is the time starting from the beginning of the PWM cycle then on every positive edge TPWM should be equal to (Ttotal/2-Terror). The two PWMs necessary are not generated separately. Rather, the same PWM is fed through two different pins of the microcontroller to deliver them to the respective SCR drive circuit at the appropriate time. After the end of each PWM cycle the pins are swapped. The flow chart of the synchronization process is shown in the Fig. 7.

and KI respectively. The total error is also subjected to an overall gain of K. The new target output voltage is thus determined as, 4 The value of the target firing angle required to achieve the particular value of RMS output voltage Vtarget is determined. For this purpose a look-up table of 64 data point is stored in the microcontroller. For any point that does not match with the desired value linear interpolation is used. The target duty cycle D is thus obtained from the target firing angle. Fig. 8 shows the flowchart for determining target duty cycle.

Fig. 8 Flow chart of duty cycle updating

Fig. 7 Flow chart of re-synchronization

The target output voltage value is updated continuously. The target output voltage is determined by the manual input reference and the value of the output voltage obtained from feedback. A voltage error Ve(or Vep) is calculated as, 3 The error is not utilized directly rather a PID controller is implemented. The proportional, differential and the integral part of the error is calculated and each assigned a gain KP, KD

V. RESULTS AND DISCUSSIONS Theprototype was tested with pure resistive loads. Fig. 9 shows an input-output relationship where the input is given as the firing angle. The expected output is also plotted in the figure. In Fig. 10 the output power is plotted with varying duty cycle. The relationship is non-linear in nature as the relationship between the voltage and the duty cycle. Due to almost a fixed amount of power loss of the operating circuit the efficiency of the device is very low when the power output is comparable to this small loss of power. The efficiency approaches unity as the load is increased and is in the range of any practical load. Fig. 11 shows the change of efficiency with change of output power. Fig. 12, 13 and 14 shows the output power spectrum for 90˚, 120˚and 150˚ firing angles respectively. The contribution of harmonics towards the total power of the output is visibly high for the last two firing angles. So the preferred zone of operation should be firing angles less than or equal 90˚.

614 Power Spectrum for 120 degree firing angle 1

RMS output voltage vs. Firing angle 0.9

250 Expected Actual Power(% of total power)

0.8

RMS voltage(V)

200

150

0.7 0.6 0.5 0.4 0.3

100 0.2 0.1

50 0

0

0

20

40

60

80 100 120 Firing angle(degree)

140

160

0

50

100

150

200 250 300 Frequency (Hz)

350

400

450

500

Fig. 13 Power spectrum for 120˚ firing angle

180

Fig. 9 RMS output voltage vs. firing angle

Power Spectrum for 150 degree firing angle 1 0.9

Output Power Vs. Duty Cycle 250

Power(% of total power)

0.8

Output Power(V)

200

150

100

0.7 0.6 0.5 0.4 0.3 0.2 0.1

50

0

0

0

10

20

30

40 50 60 Duty Cycle(%)

70

80

90

Efficiency Vs. Ouput Power 100 90 80

Efficiency(%)

70 60 50 40 30 20 10 0

0

20

40

60

80 100 120 Output Power(V)

140

160

180

200

Fig. 11 Efficiency vs. output power

0.9

[2]

Power(% of total power)

0.8 0.7 0.6

[3]

0.5 0.4 0.3

[4]

0.2

[5]

0.1

50

100

150

200 250 300 Frequency (Hz)

350

150

200 250 300 Frequency (Hz)

350

400

450

500

REFERENCES [1]

0

100

CONCLUSIONS The feasibility and effectiveness of the proposed project is evaluated with simulation studies and practical real-time implementation. A microcontroller-based design can play a key role to increase its efficiency. Microcontroller based intelligent control allows the device to be more adaptive to different situations and is capable of responding to automation. Moreover, the device can be extended to work in a high power environment by simply replacing the SCR pair with a couple of high power SCRs. Filtering techniques could be applied to improve the design to reduce the harmonic content. However the presence of lower order harmonics makes the filtering difficult. Alternatively an adaptive range selector could be implemented that forces the firing angle to be less than 900 by reducing the input voltage by selecting from multiple transformers when necessary.

Power Spectrum for 90 degree firing angle 1

0

50

Fig. 14 Power spectrum for 150˚ firing angle

100

Fig. 10 Output power vs. duty cycle

0

400

450

Fig. 12 Power spectrum for 90˚ firing angle

500

[6] [7]

B. Paul, ”Industrial Electronics And Control”, PHI Learning Pvt. Ltd., Second Edition, 2009, pp.277-279. M. H. Rashid, "Power Electronics – Circuits, Devices, and Applications," Prenctice Hall Englewood Cliffs, Second Edition, 1993, pp.317-387. Nang, K.H. and L.O. Lwin, “Microcontroller based single phase automatic voltage regulator”, 3rd IEEE International Conference on Computer Science and Information Technology (ICCSIT), Myanmar, 2010. MOC3021 Optoisolators, Texus Instruements, datasheet available at: http://www.ti.com/product/moc3021 “Atmega32 Microcontroller data sheet”. Available: http://www.atmel.com/images/doc2503.pdf Guillermo Rico, “Tech Tip: Effective or RMS Voltage of a Sinusoid,” the Technology Interface, Spring 2006. “Atmega8 Microcontroller data sheet”. Available: http://www.atmel.com/devices/ATMEGA8.aspx

Suggest Documents