sites.psu.edu web viewpulse width modulation / single power switch. i. introduction. ... and the...

17
EMET 325 Lab 2 Updated Spring 2014 Pulse Width Modulation / Single Power Switch I. Introduction In this laboratory exercise, you will build a pulse width modulation (PWM) signal generation circuit from an op-amp and interface this circuit to a power switch suitable for driving higher power devices, such as electric motors. The PWM generation circuit consists of a triangle wave generator (V tri ), a comparator, and a command input signal (V c,a ). Objectives of this Lab: Fully understand the generation of pulse width modulated signals. Comprehend the mechanism that enables PWM control to deliver high power to a load such as an electric motor. Have a basic understanding of interfacing digital PWM signals to switches, such as MOSFETS or IGBTs. Be capable of designing basic circuitry to provide high power to an electric motor or relay. 2. PWM Circuit In this section, the PWM generation circuit is described. As discussed in lecture and described in the Mohan Textbook, one way to generate a PWM signal (q a ) of some duty ratio (d a ) is to compare the amplitude of a signal level input (V c,a ) to the amplitude of a constant frequency triangle wave (V tri ). With this arrangement, as shown in block diagram form in Fig. 1, the duty ratio (d a ) is varied from 0 to 1 as the input signal (V c,a ) changes from the negative peak value to the positive peak value of the triangle wave. Fig. 1. Basic block diagram of PWM signal generator. + - V c,a V tri q a

Upload: ngonhan

Post on 30-Jan-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

EMET 325 Lab 2 Updated Spring 2014

Pulse Width Modulation / Single Power Switch

I. Introduction

In this laboratory exercise, you will build a pulse width modulation (PWM) signal generation circuit from an op-amp and interface this circuit to a power switch suitable for driving higher power devices, such as electric motors. The PWM generation circuit consists of a triangle wave generator (Vtri), a comparator, and a command input signal (Vc,a). Objectives of this Lab:

Fully understand the generation of pulse width modulated signals.

Comprehend the mechanism that enables PWM control to deliver high power to a load such as an electric motor.

Have a basic understanding of interfacing digital PWM signals to switches, such as MOSFETS or IGBTs.

Be capable of designing basic circuitry to provide high power to an electric motor or relay.

2. PWM Circuit

In this section, the PWM generation circuit is described. As discussed in lecture and described in the Mohan Textbook, one way to generate a PWM signal (qa) of some duty ratio (da) is to compare the amplitude of a signal level input (Vc,a) to the amplitude of a constant frequency triangle wave (Vtri). With this arrangement, as shown in block diagram form in Fig. 1, the duty ratio (da) is varied from 0 to 1 as the input signal (Vc,a) changes from the negative peak value to the positive peak value of the triangle wave.

Fig. 1. Basic block diagram of PWM signal generator.

Operation of the PWM signal generator shown in Fig. 1 is quite simple to understand: A triangle wave input is applied to the inverting input of a comparator. If the control signal (Vc,a) is larger in amplitude the value of a triangle wave input (Vtri), then the output signal (qa) goes into the “high” or “on” state. Otherwise, the output goes “low” or “off”.

qaVtri

Vc,a +-

Page 2: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

EMET 325 Lab 2 Updated Spring 2014

Implementing the PWM signal generator is often done in one of several ways. Many microcontrollers (PIC, for example) contain digital circuitry to implement the PWM signal generator. In the digital implementation, an up/down counter is used as the triangle wave “signal”, and the command input is a digital word. A digital comparator generates the output PWM signal. Another method for implementing the PWM signal generator is by using analog circuitry, such as op-amps. In this case, a triangle wave generator is constructed, followed by an op amp configured as a comparator. In this lab exercise, we will take advantage of the laboratory function generators to produce our triangle wave forms. We will use op-amp circuitry to implement the remainder of the PWM generation circuit.

2.1 Triangle Wave Generator Circuit:

Although we will use the function generators to produce our triangle wave forms, it is quite feasible to use op-amps to generate an analog wave form. An example of the circuitry is described below for your own study beyond this lab. It is also important to note that the triangle wave generated with the below circuitry will bias at the zero reference. This signal is unlike the triangle waves discussed in class, which are offset such that the minimum valley rests at 0 V.

A triangle wave generation circuit is shown in Fig. 2 below. In this circuit, the PWM frequency is selected by the components Rt and Ct according to

f pwm=R1

R2 (1

4 Rt C t ) (1)

To understand the basic operation of the triangle wave generation circuit, you must recognize that the first op-amp (to the left in the figure) is a comparator, and the 2nd op-amp in the figure is an integrator. The 2nd (inverting) op-amp integrates its input signal Vsq according to

Vtri 1

RtC tVsqdt

. (2)

Note that eq. (2) can be used to drive (1) by recognizing the integral is V̂ sq t .The Vsq signal is the output of a comparator, which compares the weighted sum of the triangle wave input (weighted by R2) and the square wave output (weighted by R1).

Vsq

Page 3: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

-+

12

3

-+

76

510 K

15K

20K

+10

4

11

-10

Rt

Rt

Ct

Sensor in (DAC 1)

LM348LM348

TriangleWave Out

Command In (DAC 2)

y

VTRI10K

EMET 325 Lab 2 Updated Spring 2014

Fig. 2. Implementation of Triangle Wave Generator.

As an example of the triangle wave generator operation, consider the case where the comparator output has just switched high, so Vsq is at its maximum value (some value less than the supply voltage of 10 V, or about 7 V if the zeners are used). According to eq. (2), the output of the integrator Vtri will begin decreasing at a rate proportional to the amplitude of the input and inversely proportional to RtCt. Since the signal Vtri is fed back to the comparator’s non-inverting input, the decrease in Vtri will continue until it becomes low enough to trip the comparator output Vsq to go low. As soon as the comparator output goes low, the input to the integrator is also low, and the integrator begins increasing. This increase, of course, continues until the comparator again goes high. This sequence continues indefinitely to produce the triangle wave at the output of the integrator, and a squarewave signal at the comparator output. You should recognize that the integral of the square wave signal is a triangle wave.

Note: The zener diodes shown in Fig. 2 are optional, but will improve the symmetry of the triangle wave that is generated. If the comparator output is not symmetrical about zero volts (that is, the output when high is not exactly the same at the low output), then the integrator will ramp at different rates when rising or falling.

2.2 Pulse Width Modulation Circuit:In conjunction with the triangle wave circuit, a simple comparator may be used to generate a PWM signal whose duty ratio da varies with the amplitude of a control input signal Vc,a. A diagram of the comparator circuit is shown in Fig. 3.

R1

R2 NTE5018 9.1 V

Page 4: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

EMET 325 Lab 2 Updated Spring 2014

Fig. 3. Implementation of comparator circuit for PWM generation.

The implementation shown in Fig. 3 can be built using the same op-amp package used in the triangle wave circuit of Fig. 2. Also, a potentiometer is used here to provide an adjustable control voltage Vc,a. As discussed in lecture (and in the Mohan text), the duty ratio of the comparator output qa is given by:

da=V c , a

V̂ tri (3)

where

ˆ V tri is the peak value of the triangle wave generator signal.

2.3 Power Converter (Power Pole):The PWM signal generated by the circuit shown in Fig. 3 can be used to control power delivered to a high-power load (such as a motor). In order to use the low-level (low-power) signal to control power flow, a power transistor arrangement is required. A very simple (limited to one quadrant) power converter arrangement consisting of a single transistor is shown in Fig. 4.

Fig. 4. Implementation of a single quadrant power converter using MOSFET.

+

-Vtri

8

9

10

LM348

Vca 100 Kpotentiometer

+10V

GND

qa

qa

Vd

Load IN4001

IRF640

Van

+Vload

-

+10V

4

11

-10V

Page 5: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

EMET 325 Lab 2 Updated Spring 2014

Note that this configuration is different from the lecture. The pole voltage (voltage across the switch) in this configuration is not the same as the voltage across the load. In the circuit of Figure 4, the input DC bus voltage Vd is converted to a pole voltage Van. When the signal qa is high, it will turn ON the MOSFET transistor, and Van will be zero volts (ideally there is no voltage drop across the switch). When qa is low, the transistor is OFF (non-conducting), and the output voltage Van is equal to the input voltage Vd (I.e. no current flowing through load). Expressed in terms of the duty ratio of qa :

V an (1 da )Vd (4)

However, the voltage across the load (Vload) is of more interest, and can be expressed by

Vload Vd Van Vd 1 da Vd Vd da (5)This is the equation, although expressed as Vload, that we use in lecture (and in the Mohan text).

Thus, for this simple single quadrant converter, the voltage applied to the load is directly proportional to the duty ratio and the magnitude of the converter input voltage Vd.

Also of note is the presence of a diode across the load. This diode is necessary only if the load is inductive (such as a motor). Without the diode, when the transistor is switched off any current flowing in the load inductor will develop large voltages that could damage the MOSFET. The diode provides a path for the current to keep flowing so that large voltage spikes will not destroy the transistor MOSFET. This diode is often called a “kickback” diode since it suppresses inductive kickback that occurs when current in an inductor is interrupted suddenly.

Page 6: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

EMET 325 Lab 2 Updated Spring 2014

3. Lab Procedure

3.1 Triangle Wave Generation:

We will use the lab station function generators to product our triangle waves. For the output, it may be helpful to use a BNC cable connected to the (+/-) IC to BNC adapters.

Set the function generator to a frequency of 1k Hz, and make sure the output is set for a high impedance load. The output setting may be chosen by hitting the "utility" softkey, selecting "output setup," selecting "High Z," and pressing "done."

Set the wave form to "ramp," and choose a Vpp of 10 V with a 5 V DC offset. The symmetry of the waveform should be set to 50%, ensuring equal rise and decay times. These settings will replicate the familiar waveforms used in our lectures.

Use the Oscilloscope to check that the function generator is producing the proper waveform. Remember that we have a DC offset, so the Oscilloscope must be set to DC coupling (AC coupling blocks DC signals).

If the O-Scope does not display a waveform, be sure that the green "output" button is glowing on the function generator. If the O-Scope is not showing the proper waveform, this is a great chance to troubleshoot.

3.2 PWM Generation:After successfully testing the triangle wave output, construct the comparator circuit shown in Fig. 3. Use a LM348N op-amp integrated circuit. Connect the output of the triangle wave circuit to the non-inverting input of the comparator, and connect the potentiometer wiper (usually the center pin of the pot) to the inverting input. You can use the potentiometer to vary the control signal input Vc,a from 0V to the maximum Vc,a, which should correspond with

ˆ V tri. Be sure to connect the +10 V and -10 V to op-amp pins 4 and 11, respectively. Connect +10 volts to one side of the pot (the other going to ground/common)

Using a second channel, connect the Oscilloscope to the PWM, and connect a hand-held meter to the command input. Note: For a "cleaner" signal display of the TRI-wave and PWM, do not use the Oscilloscope probe GND connection on triangle wave signal, as this will ground out the "rest" of the circuit. Using the "Com" terminal of the DC power supply should work as a ground connection for the

Page 7: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

EMET 325 Lab 2 Updated Spring 2014

Oscilloscope probes. Adjust the command Vc,a (by turning the pot) and observe the change in the PWM signal.

Does the PWM frequency change as the command signal is varied?

Does the PWM duty ratio change as the command signal is varied?

The PWM high and low do not necessarily correspond to 1 and 0, respectively, as they did in the lecture portion of the class. This is O.K. (and actually preferred in the case without an IC Gate Driver). What matters is the ratio of "high" or "on" time to the switching period (i.e. the duty ratio, da).

Now, adjust the command voltage to each of the values shown in the first column of the Table 1. For each command voltage setting, record your observed duty ratio of the PWM signal. In addition, use your measured values of V̂ tri along with eq. (3) to predict what the duty ratio should be.

Comment on how well (or poorly) your observed PWM duty ratio matches the value predicted by eq. 3.

A handy feature of the Oscilloscopes in our lab is a measurement function for duty ratio.

Table 1. Duty Ratio vs. Command InputVca Observed PWM duty

Ratio da

Predicted PWM duty Ratio da

10 volts7.5 volts5 volts

2.5 volts0 volts

3.3 Power Pole:Construct the power pole circuit shown in Fig. 4. Connect the PWM output signal qa (from Fig. 3) to the gate of the MOSFET (of Fig. 4) to control the MOSFET on/off state. For a pin description of the IRF640 MOSFET, refer to the data sheet for that device included in the Appendix. Note also in the data sheet that the IRF640 will be turned ON when the gate voltage is approximately 3 volts higher than the drain voltage. This is why we prefer, in this case, that our PWM signal does not simply vary between 0 and 1.

Page 8: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

EMET 325 Lab 2 Updated Spring 2014

Find the symbol and parameter in the data sheet for the IRF640 that specifies the gate-to-source voltage required to turn the MOSFET ON.

What is the gate-to-source voltage that we use to turn the MOSFET ON? To turn it OFF?

Connect a load, as shown in Fig. 4 between the MOSFET Drain (pin 2) and a 6 volt power supply source (this supply is Vd, or the power pole input voltage). Use the 6 Volt DC power supply at the lab station. For a load device, start with a 10 Kohm resistor until your circuit is operational --- After taking measurements below, change to a small DC motor supplied by your instructor. When the DC motor is connected, be sure to include the kickback diode in the circuit, as shown in Fig. 4. Also, as shown in Fig. 4, ground the MOSFET Source (pin 3), and connect the output of the comparator to the MOSFET Gate (pin 1).

Starting with the resistor “load” use the oscilloscope to observe the output voltage of the MOSFET (at the Drain). You should see the voltage at the drain switching at the same frequency as the PWM signal. Now, connect a DC multimeter to the MOSFET drain (referenced to ground) and measure the average DC output voltage for each of the command inputs in the table below. Note that for our circuitry, this "pole" voltage is not the same as the load (output) voltage.

Table II. Average Power Pole Output versus input command using Eq 4 (different from lecture equation for V̄ an).

Vca Meas. Avg. Output Voltage V̄ an

Predicted Avg. Output Voltage V̄ an

10 volts7.5 volts5 volts2.5 volts0 volts

In addition to your measured values for average power pole output voltage, use eq. (5) to predict the average load voltage.

Comment on how well (or poorly) your observed average power pole output voltages agrees with the values predicted by eq. 4.

Does eq. 5 yield expected results for the average load voltage?

Remove the resistive load, and connect a DC motor as the load, and observe the average output voltage V̄ an (using the DC multimeter) as potentiometer is varied.

Page 9: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

EMET 325 Lab 2 Updated Spring 2014

Is the relationship between motor speed and average power pole output voltage V̄ an proportional, or inversely proportional?

Explain the above relationship using Eq. 4 and 5. Also, note that the speed of a DC motor is proportional to the voltage applied across its terminals.

Look at the specification sheet for the IRF640 to determine how much continuous current we could deliver to a high power load with this MOSFET. Assume operation at near room temperature.

4. Deliverables – Due One Week after Completion of this Lab

1 informal (no abstract, introduction, conclusion required) lab report per group. Do not delegate questions to group members; each member should work together on each problem. Word process the report and turn in a hard copy at the beginning of the next lab period.

Briefly describe the one-quadrant, single pole switch mode converter used in this lab compared against the two-quadrant, single-pole switch mode converter described in class. Tip: describe the impacts of connecting a load in series to the MOSFET vs. in parallel.

From Section 3.2, provide the Table I results and corresponding calculations. Also answer each of the following questions:

Does the PWM frequency change as the command signal is varied? Explain.

Does the PWM duty ratio change as the command signal is varied? If so, explain the relation between the two?

Comment on how well (or poorly) your observed PWM duty ratio matches the value predicted by eq. 3.

From Section 3.3, provide the Table II results and corresponding calculations. Also, answer each of the following questions:

Comment on how well (or poorly) your observed average output voltage agrees with the value predicted by eq. 4.

Does eq. 5 yield expected results for the average load voltage?

Does motor speed increase or decrease as duty ratio is increased? Explain.

Why is the average output voltage inversely proportional to duty ratio?

Find the minimum gate-to-source voltage that is guaranteed (by the spec. sheet) to turn the IRF640 ON (i.e. to put it into conduction mode).

Page 10: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

EMET 325 Lab 2 Updated Spring 2014

What is the gate-to-source voltage that we use to turn the MOSFET ON? To turn it OFF?

From the specification sheet, how much continuous current is the IRF640 able to deliver to a load (at room temperature)?

Page 11: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

EMET 325 Lab 2 Updated Spring 2014

Page 12: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

EMET 325 Lab 2 Updated Spring 2014

Page 13: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

EMET 325 Lab 2 Updated Spring 2014

Page 14: sites.psu.edu Web viewPulse Width Modulation / Single Power Switch. I. Introduction. ... and the command input is a digital word. A digital comparator generates the output PWM signal

EMET 325 Lab 2 Updated Spring 2014