Practical Guide To Instrumentation
Practical Guide To Instrumentation
INTRODUCTION
If youre like most of us, when you get a new piece of equipment, you play around with the knobs for a while, try it out on some unsuspecting circuitry, and then turn your attention to something more pressing. For items such as fancy oscilloscopes with lots of menus, you may occasionally have to look in the manual to find out where something is. Generally, though, well-designed equipment should be usable intuitively without any special training. Even so, a number of considerations in the use of equipment and in measuring technique wont be in a manual, simply because they relate not so much to the design of the instrument as to how and when one particular instrument should be used rather than another. These instrumental considerations range from the general issues that apply to all instruments, such as the question of accuracy versus precision, to the specific, such as under what circumstances to distrust your AC power meter: This chapter offers practical guidance on general questions; it doesnt try to tell you how to use your voltmeter.
60
Chap. 4 W Practical Guide to Instrumentation that when it says the voltage is 15.426V you know that it is (for sure) somewhere between 15.4255V and 15.4265V. Should you write down l5.426V? Or 15.4V? Or maybe just 15V? The answer depends on the purpose of recording the data. If youre checking that an op amp has the proper supply voltage, and youre using that op amp for general purpose only and dont care whether it has 14Vor 16Vas long as it works, then just writing down 15V is perfectly adequate-if indeed you bother to write it down at all. But the more common case is this: youre measuring both voltage and current, because you want to know power. Lets suppose youre using a handheld meter for the current, and it has only three digits, reading 2.02A. This means that you know the current only to three significant places-its somewhere between 2.0 1SA and 2.025A. Since in this case your knowledge of the current (three decimal places) is less than your knowledge of the voltage (five decimal places), the current controls your accuracy. This means that yourfinal answer, power, can be known only to the same three decimal places that your least accurate measurement is known to. The correct thing to do (in this example) is to write down the voltage measurement to one more decimal place than the current, multiply, and then round off the answer to the three decimal places: V = 15.43\! I = 2.02A, so P = 15.43V x 2.02A = 31.1686W, and the answer recorded should be 3 I .2W. Pay real close attention here!
The final result of the calculation CANT have more digits than the LEAST accurate measurement!
This is because the uncertainty is greatest in the least accurate measurement, and this in turn controls the accuracy with which you can know the answer.
Do I Care?
The question of uncertainty is not just one of those dull things you forgot in high school and have thereafter ignored with impunity. To rub in the point, consider how far off the calculation could be. If the voltage and current were both at the low end, even though the meters were reading correctly, P = 15.4255V x 2.015A = 31.08W; and if both were at the high end, P = 15.4265V x 2.025A = 3 1.24W, a difference of 160mW, entirely due to the limited number o digits on the meters. This doesnt seem like a big deal until you f realize that you might be trying to measure the efficiency of an efficient converter. If the input power was 33.3W, then the efficiency is somewhere between q = 31.08W/33.3W = this doesnt even include the inaccuracies 93.3% and = 31.24W133.3W = 93.8Y-and in the input measurement! The difference between being able to report 94% efficiency rather than 93% efficiency can make or break a project. The correct thing to record is q = 31.17W/33.3W = 93.6%, halfway between the minimum and maximum (note that the extra digit was again held over until the final calculation).
61
given above: to calculate efficiency, two numbers that are very nearly equal are being divided, and so small inaccuracies in either one make the answer quite inaccuratebecause you are presumably quite interested in whether the efficiency is 94% rather than 93%.
Averaging
It might be tempting to t y to get a more accurate measurement in the case of a meter r whose last (or several last) digit(s) are flickering by writing down the number several times and then averaging, as in Table 4.1. This idea is fine if you know for sure that the reason that the digits are flickering is due to white noise (random noisepalthough in this case a better plan is to suppress the noise with a filter (see below). But if the noise is rather due to a periodic signal, such as an oscillation in the circuit at lkHz, your meter may be reading the signal at the same point in each cycle, causing a systematic bias in the measurement, as in Figure 4.1. This is exactly the same thing as aliasing in an oscilloscope. In this case, you have an added inaccuracy, and filtering is essential; your human averaging is actually degrading the information.
TABLE 4.1
Trial I Trial 2 Trial 3 Trial 4
Average:
62
Figure 4.1 If your DVM samples at a frequency related to an AC component of your waveform, you may get false readings.
You may want to build up a few of these little circuits on perf boards with a pair of banana jacks on both ends, for easy availability when needed in the lab.
DVM
Figure 4.2
63
Finally, it is worth observing that many types of meter have their internal circuitry somehow upset by high frequency noise, such as that generated by a switching power supply. (Isnt that convenient?) Almost all measurements on a converter are going to require filtering and careful attention to meter limitations.
The idea here is that since the power leads are carrying current, they have a voltage drop that increases, the further along the wire you go. So when youre doing a precision measurement (like efficiency, again), bring out separate wires from the output for the measurement, as shown in Figure 4.3. The same should of course be done for the inputs; often on converters, attention to this matter alone can be responsible for increasing the efficiency measured by 1 or 2% (the larger number is the correct one).
64
/
Power supply under test Load bank
Figure 4.3 Use separate connections for carrying current and measuring voltage.
The same reasoning should be extended to the case of a small connector to which you must attach both the power connection and the meter, either input or output. Since there will be a voltage drop along the pin due to the current, the correct way to measure the efficiency is to attach the probes closest to the power supply under test, and then attach the power connections further away.
Power leads
IDVMI
Resistance being measured
Figure 4.4 You can measure small resistances with a current source and a DVM.
Electronic Loads
65
through the shunt, and measure the voltage, calculating the resistance of the shunt, which amounts to the scale factor in this case. Just be sure to keep the shunt and DVM together as a pair thereafter. Otherwise you will lose the calibration.
ELECTRONIC LOADS
Why I My Stable Converter Oscillating? s
Electronic loads are convenient. You dont have to find that unusual resistor value in a high power package, and you dont need to find a fan to cool it either. But its wise to recognize that these instruments have some significant limitations. Otherwise you may waste a lot of time looking in circuitry for problems that really lie in the instrumentation. An electronic load is basically a bunch of power transistors in parallel, controlled by a feedback loop or loops, and operated in the linear region so that they are dissipative. The kind of control loop determines whether they appear as a resistive load, as a current sink, or as a constant voltage. Regardless of mode of operation, electronic loads are always being controlled in a feedback loop, and of course this feedback loop has finite bandwidth: in typical units this bandwidth is somewhere in the vicinity of 1-SkHz. If your converter has more bandwidth than your electronic load, the load will not be able to make its transistors look resistive; as a result, your converter sees some unusual type of load impedance and may well start to oscillate. If your stable converter is oscillating, think about the load!
66
Practical Note During converter development, try to use resistive loads if possible; reserve the use of electronic loads for the production line, after the bugs have been worked out. If its necessary to use an electronic load, at least try to hang the anticipated load capacitance on the loads inputs, to reduce the loads impedance at the high frequency end.
OSCILLOSCOPES Aliasing
If you dont know or arent sure what aliasing means, try this little experiment. Set the output from a function generator producing a I OOkHz sine wave and put it into your digital oscilloscope with the scope set on 10ps/div. You see IO cycles of the sine wave. Now start increasing the sweep time, to IOOps/div, then Ims/div. When you get to lOms/div. you may suddenly see a nice sine wave again. (If not, try a few more turns of the sweep speed knob.) This effect occurs because the oscilloscope can display only a finite number of points, and if it displays for a long enough period, it may end up looking like something it isnt. (A textbook will explain the mathematical details.) Aliasing happens when your oscilloscope either cant take enough samples per second to catch everything your signal is doing or, more likely for power supplies, doesnt have enough memory to store the entire waveform occurring in a sweep period. For example, if the scope has 1000 points per channel, and youre set at IOms/div, with 10 divisions displayed, the sweep time is IOms/div x 10 divisions = looms, and since it only has 1000 points, it can only display intervals of 100ms/l000 points = loops; anything happening in less than this time can be abased. That is, you may miss the event entirely, or it may appear to be at a lower frequency than it really is. The practical point here is that just because your digital oscilloscope says your signal is doing something, this isnt necessarily happening. If you dont know what to expect, you can be seriously fooled. This is particularly likely to happen when you have 60Hz pickup and youre triggered in such a way and at such a time base that you dont see anything at that low frequency; you try to figure out why the waveform is different when you check it twice! The best plan when looking at a brand new signal is to sweep over a very broad range of time bases to ensure that there isnt something unexpected happening. Or, be an old fuddy-duddy: try using an analog oscilloscope for the early stages of investigating a new signal; it wont alias.
Network Analyzer
67
NETWORK ANALYZER
A network analyzer is an instrument for measuring the response of a system to a sine wave; that is, it measures the transfer function by producing a sine wave whose frequency varies slowly with time, then measuring the magnitude and phase response of the system to this signal. Network analysis can be as simple as measuring the impedance of a capacitor as a function of frequency, or as complex as measuring the closed loop response of a converter. A network analyzer is a must-have for the loop measurements were going to be doing in the chapter on stability, Chapter 6. Since they are complex instruments, and not nearly as familiar as oscilloscopes, were going to give detailed instructions for operating the HP3562A, a typical instrument in the medium price range. The HP3562A is not particularly convenient for measuring impedances, but it works fine for measuring loops, which is what the instructions will be targeted for. Other popular models (such as those of Veiiable Instruments) are quite similar in concept. Thus, although the detailed instructions regarding which buttons to push will differ, the general procedure will be the same.
Step-by-step Instructions
In the 10-step instruction set that follows, the hardware, or hard, buttons labeled on them on the front panel are indicated by the capitalized word BUTTON, whereas the soft (Le., software-generated) buttons that appear on the display screen in response to pressing a BUTTON are designated by the capitalized word SELECT.
1. The analyzer takes about a minute to warm up and perform its self-checks. The
very first thing to do with the HP3562A is to push the BUTTON Cal, and SELECT Auto Off. This particular machine, unlike others, will otherwise calibrate itself without warning, often splat in the middle of your measurement. This can cause your supply being tested to explode, since calibration is accompanied by the generation of signals. 2. The next step is to select the measurement mode. To measure the loop response of a converter, you want the analyzer to produce a time-varying sine wave. Push the BUTTON Meas Mode, and SELECT Swept Sine. Other models may require you to select network analyzer mode, or gain-phase mode. 3. Next we set the fiequency range over which the transfer function is going to be measured. A typical sort of range for a moderate bandwidth converter might be from lOHz to lOkHz, three decades. We also have to set how quickly the sweep is going to be made. On this machine, a reasonable compromise between signalto-noise ratio and operator patience might be 30 seconds per decade, for a sweep time of I .5 minutes. You can also select how much averaging is to be done (how many times the same band is averaged before going on to the next frequency), but well not use this in this example. On fancier machines, you may be able to select directly the windowing bandwidth, which is accomplished in this machine with the sweep speed. Thus, press the BUTTON Freq and SELECT Start Freq. On the keypad, press the BUTTONS for IO, and then SELECT Hz. Next, SELECT Stop Freq, press the BUTTONS for 10, and SELECT kHz. Finally,
68
Chap. 4 W Practical Guide to Instrumentation SELECT Sweep Rate, and use the BUTTONS Up/Down to get to about 30s/Dc. If the plots look scraggly, which happens usually at the lower end of the frequency spectrum, you can sweep more slowly, and/or average; but of course either ploy increases the time needed for the measurement. Next we set up the display. Were trying to get a Bode plot, so we need two traces: one for magnitude, the other for phase. Other machines may do this automatically in gain-phase mode. Start by selecting BUTTON A, for the A trace. Then push BUTTON Coord, and SELECT Mag(dB). Then push BUTTON Meas Disp, and SELECT Freq Resp, since we are sweeping frequency. Now we can do the same for the second trace: select BUTTON B, push BUTTON Coord, and SELECT Phase. Then push BUTTON Meas Disp and SELECT Freq Resp. To turn both traces on simultaneously, push BUTTON Active Trace A/B; this produces the magnitude trace on the upper half of the screen and the phase trace on the lower half, the usual display style for a Bode plot. Other machines produce a single screen with both gain and phase on a single plot, with two axis scales. For convenience, it is helpful to let the machine control the vertical axes scales (gain and phase), rather than worrying about it yourself. Push BUTTON Scale and SELECT Y Auto Scale. If you have special display requirements (e.g., not showing what happens below 0 phase, as we do in the stability chapter, Chapter 6), you can turn off this autoscaling on either trace independently by pushing BUTTON A or BUTTON B, and then SELECTING Y Fixed Scale, and pushing BUTTONS on the keypad for the minimum and maximum display range; the analyzer clips any measurement outside the selected range. Now we set up the characteristics of the signal output thats going to be used to drive the system. For a closed loop measurement, a level of about lOOmVAC is suggested as a starting point. Push the BUTTON Source, and SELECT Source Level, then press the keypad BUTTONS for 100 and SELECT mV; or you can use the BUTTONS Up/Down, or use the dial to accomplish the same thing. This machine powers up with the DC Offset = 0, but for the open loop measurement, this can be changed if desired. The most common cause for scraggly looking plots at moderate frequencies is insufficient source drive level; try increasing it until you get a nice smooth plot. However, you need to observe the cautions below. Finally, to turn on a cursor (useful not only for your measurement, but also for displaying information in a presentation), push the BUTTON X. Some machines (although not the HP3562A) require you to set the input impedance and the input attenuation for each input channel. Input attenuation can be set to any value (usually either OdB or 20dB) as long as the same one is used for both channels. An input overload warning that appears while the sweep is being run indicates that the input attenuation should be increased. The input impedance should be set to 1MR for both channels. Occasionally you will come across an instrument that has only a 50R input; this type CANT BE
4.
5.
6.
7.
8.
9. IO.
Network Analyzer
69
USED for loop measurements, because the 50R load disturbs the loop components too much.
The network analyzer itself is now ready to go. But there are a few more things to know before you begin operation. The most important is to avoid thinking that the loop can be temporarily closed without injecting a signal by turning off or disconnecting the Source. Dont do it! With the mixer method (see the chapter on stability, Chapter 6) disconnecting the Source causes the output voltage of the mixer to double, causing the output of your supply to double! The correct way of removing the AC signal is to set it to OV with the BUTTON Source. This caveat is irrelevant if you are using the transformer method. Another step youll certainly want to take is to monitor the gate drive signal with an oscilloscope while the analyzer is sweeping. Although the output of the analyzer is a constant amplitude, the response of the converter to this signal is not a constant; it happens not infrequently that what seemed a reasonable drive level at low frequencies causes the duty cycle to fluctuate wildly, and to go to zero at frequencies near the converters bandwidth. You have to avoid this, because if the duty cycle ever goes to zero, the converter isnt operating, and youre no longer measuring the transfer function. This is the reason for watching the gates duty cycle while sweeping, to ensure that the duty cycle is OK. A symptom of duty cycle collapse (if youre looking at someone elses measurement) is a sudden, discontinuous jump in the Bode plot.
Practical Note A good starting point for signal amplitude (source level) is to set the oscilloscope time base so that youre looking at a single cycle of the duty cycle (and trigger on the rising edge, as shown in Figures 4.5 and 4.6) and then increase the source level until you can just make out a little movement on the following edge. The figures show good and bad levels of drive. Figure 4.5 shows the gate drive of a converter being driven properly: the dither on the falling edge is caused by the modulation of the loop. Figure 4.6 shows the gate drive being overdriven: not only is the dither enormous, but the duty cycle goes down to 0% during a portion of the low frequency cycle.
With all of this set up, you can now turn the system on, in this order: mixer power supply, converter input power, and then analyzer sweep, by pushing the BUTTON Start. If you stop the sweep (by pushing the BUTTON Pause), reverse the order, by first turning off the converter input power and then the mixers supply. Rigidly following this order prevents the converter from operating in open loop mode, where it might very well selfdestruct, since the mixer is in the feedback loop, and it is of course an open when unpowered.
Nyquist Plots
The HP3562A can also be used to generate a Nyquist plot from the data. For this function, you need only press the BUTTON Coords, and SELECT Nyqust (sic). Since it is a single graph, its best to turn on just A. Otherwise you will have two half-sized plots of the same thing. Not all analyzers have the ability to display Nyquist plots.
70
Chap. 4
Figure 4.5 Gate waveform, showing proper network analyzer drive level
Figure 4.6 Gate drive waveform, showing too high a drive level