Sunday, November 28, 2010

Tips for Making True RMS AC Measurements with a DMM

True RMS responding DMMs measure the "heating" potential of an applied voltage. Power dissipated in a resistor is proportional to the square of an applied voltage, independent of the waveshape of the signal. Todays general purpose DMMs can accurately measures true RMS voltage or current, as long as the wave shape contains negligible energy above the meter’s effective bandwidth (more on this in a bit). Most DMM's ACV and ACI functions measure the AC–coupled true rms value (DC is rejected). For symmetrical waveforms like sinewaves, triangle waves, and square waves, the ac–coupled and ac+dc values are equal, since these waveforms do not contain a dc offset. However, for non–symmetrical waveforms (such as pulse trains) there is a dc voltage content, which is rejected by ac–coupled true RMS measurements. DC rejection is desirable in certain applications such as when you want to measure the ac ripple present on DC power supplies. For situations where you want to know the AC+DC true rms value, you can determine it by combining results from dc and ac measurements, as shown below:

A common misconception is that "since an ac multimeter is true rms, its sine wave accuracy specifications apply to all waveforms." Actually, the shape of the input signal can dramatically affect measurement accuracy for any multimeter, especially when that input signal contains high–frequency components which exceed the instrument’s bandwidth. As an example, consider a pulse train, one of the most challenging waveforms for a multimeter. The pulse–width of that waveform largely determines its high–frequency content. The frequency spectrum of an individual pulse is determined by its Fourier Integral. The frequency spectrum of the pulse train is the Fourier Series that samples along the Fourier Integral at multiples of the input pulse repetition frequency (PRF).

The below figure shows the Fourier Integral of two different pulses: one of broad width (200 μs); the other narrow (6.7 μs). Agilent's 34410A/11A series of DMMs have an effective AC measurement bandwidth of 300 KHz.  If we used one of these DMMs to measure the RMS ACV value of both pulses in the figure the measured value of the broader pulse will be more accurate than the measured value of the narrow pulse since its frequency components outside of the DMM's bandwidth are larger in amplitude.
When making true RMS measurements on non-symmetrical waveforms, accuracy drops as the crest factor and/or the frequency of the waveform increases (for more info on crest factor click here). Here is a list of other tips when making true RMS AC measurements:
1. For maximum accuracy, measure as close to full scale as you can. You might need to override auto scaling in some cases. Be careful with high-crest-factor signals not to overload and saturate the meter’s input circuitry.
2. Be sure to select your DMMs appropriate low-frequency filter to allow for the fundamental to be captured. The lower the filter the longer the measurement will take.
3. You may not want to use the first measured value because many DMMs have a large-value DC-blocking capacitor in the input path. You need to allow this capacitor to charge, especially when you are measuring low-frequency signals or when you are switching between measurement points that have a large DC offset.
4. When you measure AC voltages less than 100 mV, be aware that these measurements are especially susceptible to errors introduced by extraneous noise sources. An exposed test lead will serve as an antenna and the DMM will measure these unwanted signals as well. Reduce the area of the “antenna,” use
good shielding techniques, and make sure the AC source and the DMM are connected to the same electrical outlet to minimize ground loops.
5. AC loading errors: The input impedance of a DMM is often in the region of 10 MΩ in parallel with 100 pF. The cabling you use to connect signals to the multimeter adds additional capacitance and loading. As frequency increases, loading will change. For example, at 1 kHz, the input resistance will now be closer to 850 kΩ, and at 100 kHz it will be closer to 16 kΩ.

Friday, November 19, 2010

Power Supply Performance when using Remote Sense

In test systems the cabling path impedance between power supply and DUT can be significant. Meters of cabling combined with switch relays can equate to large voltage drop during times of high current consumption by the DUT. Its probably no secret to you that the method to compensate for this is to use the power supply's remote sensing capabilities. But what you may not know is the effect that remote sense has on the output performance of a supply. For most test applications this degradation to performance can be ignored. When it  becomes a factor is when a DUT makes large and fast load changes during operation. An example of this would be communication equipment when it goes into a transmit state.
When in remote sense mode the power supply is a feedback control system designed to control a voltage at the DUT. The figure below represents the voltage control system in block diagram form.

"Vprog" represents the desired voltage at the DUT. The summing amplifier compares the desired output voltage with the voltage at the DUT as measured by the sense amplifier. Any difference is amplified and applied as a correction signal to the power control circuit block. This block adjusts the power supply output until the measured output voltage equals the desired output, compensating for any external voltage drop. As shown in the block diagram the load and lead impedance become part of the voltage control system.
This system provides great control of the average DC voltage at the DUT. However, the accuracy to which the instantaneous voltage can be controlled for sharp load changes depends on several factors, namely:
1. The resistance and inductance of the cable connecting the power supply and DUT.
2. The input impedance of the DUT.
3. The amplitude, rise and fall times of the load change or current pulse.
4. The bandwidth of the power supply control loop.
5. The voltage slew rate and transient response capability of the power supply.
The final result is that while the average voltage may be ideal, the instantaneous value may be
less than ideal. If the instantaneous voltage drops too low it can cause your DUT to go into a reset mode which ruins your test. There are three common ways to compensate for this: minimize path impedance, add filtering to the DUT, and use high performance supplies.
To lower path impedance (both R and L) shorten wire lengths when possible, use larger gauge wire, make good connections, use twisted pair, pay attention to contact resistance, and try to avoid hot switching. A second solution is to place a large electrolytic capacitor across the terminals of the DUT right at the test fixture.When the load goes through a sharp change the capacitor will charge or discharge to maintain a constant voltage giving the power supply time to catch up. This method does have drawbacks though such as longer settling times when a voltage change is made and distorted current measurements during sharp load transients due to the charging and discharging of the cap. Finally the best way is to just buy high performance power supplies with high control loop bandwidth and fast transient response (to see a post on the transient response spec click here). Look for transient response specs < 100 us.

Click here for more info on Agilent N6700 series of high performance power supplies

Monday, November 15, 2010

Creating a Chirped RF Pulse with an Analog Signal Generator and 2 Channel Function Generator

Last week I needed to simulate an chirped RF pulse signal for some testing I was doing. Chirped pulse signals are often used in radar and electronic warfare applications as a pulse compression technique. Not having created a signal like this before I sent a quick email to an RF/Microwave AE colleague of mine asking how they did it. They sent me a quick reply back saying I should use Agilent's VSA software and a vector signal generator. The problem is I did not have a license for the VSA software and I did not have a vector signal generator (vector sig gens can easily be double the price of an analog). With limited time to get the test done I had to figure out a way to do it with my N5183A MXG analog signal generator. Now a chirped RF pulse is a pulse modulated RF carrier, but the carrier is swept (for more info check out this Wikipedia page Chirp). My MXG did have pulse modulation and FM (to sweep the carrier) built-in. I used these functions to create a chirped RF pulse signal. The problem with my chirped RF pulse signal was there was no easy way to sync the pulse modulation and FM so from pulse to pulse the sweep was always starting at a different value. To fix that problem I used the 33522A 2-channel function / arbitrary generator that has the ability to sync its outputs, meaning I could control the phase relationship between the channel 1 waveform and the channel 2 waveform. I set the MXG's pulse modulation source and FM source for external. Channel 1 of the 33522A served as the pulse modulation source. I wanted to linearly sweep the carrier so I set channel 2 of the 33522A, my FM source, for a linear ramp waveform. You can see my setup in the image below:

A positive sloped ramp gives you a low to high frequency sweep and a negative sloped ramp gives you high to low frequency sweep. The sweep speed of the chirp is set by the rate of the slope. The frequency range of the sweep is set by the FM deviation setting on the MXG. You can see the function generator outputs on the scope screen in the image. The start of the pulse modulation on the MXG (bottom left) is controlled by the rising edge of the pulse waveform from channel 1 of the 33522A. If you notice in the image, the ramp waveform is already approximately halfway through its ramp up cycle by the time the pulse is triggered. This was done intentionally in fact you can control where the carrier sweep starts and stops inside the pulse by adjust the phase of the ramp in relation to the pulse output. On the bottom right, the N9020A MXA signal analyzer shows the resulting chirped RF pulse in the frequency domain. Below the 33522A in the image, the 53230A universal counter's microwave channel is also being used to measure the pulse characteristics including: pulse width, pulse repetition rate, and carrier frequency.
The analog signal generator and 2-channel function generator method for creating chirped RF pulse signals filled my testing needs and was much lower cost then turning to a vector signal generator.

Wednesday, November 10, 2010

Solar Array Simulation

When designing a device with max power point tracking (MPPT) capability such as a solar inverter, micro inverter, or power optimizer you are going to need to simulate the output of a PV panel or panels to test your MPPT design.  This is necessary to verify your design and provide an accurate efficiency spec under a wide variety of weather patterns (I-V curves). Now a lot of engineer new to this type of testing decide to take a standard programmable power supply, connect it remotely to a computer (using GPIB, LAN, USB, etc), and create software with adjustable I-V curve look-up tables with the idea of turning their power supply into a PV panel simulator. This whole concept is shown in the figure (click to enlarge).

You can also find power supply companies out there that sell this exact solution. I am here to save you time, frustration, and money by telling you this method will not work or at least it won't work how you think it will work. With this type PV simulator system the I-V curve 3 dB bandwidth will be < 1 Hz. Most MPPT designs are making load changes and measurements much faster than once per second. Here is a quick breakdown  why the bandwidth to this solution is so poor:
  1. The IO latency between the computer and the power supply.
  2. The supply programming time which consists of the time it takes the supply to process a command and the time for the internal analog circuitry to move the output of the supply to where it should be on the curve.
  3. The most limiting factor is that this is a closed loop system, which leads to oscillations in the output. Now to get rid of oscillations digital filtering will need to be added to the software which leads to multiple iterations of back and forth adjustments between the computer and supply to zero in on that point on the I-V curve where the supply output should be.
Because of the overhead just discussed you cannot achieve output bandwidths better than 1 Hz using this solution to simulate the output of a PV panel. For this reason it is not an acceptable test method to verify your MPPT design or spec the efficiency of your MPPT design. Now does this PV simulation method have a place in the MPPT hardware test cycle? Because of its relative low cost it could be used in long term reliability testing where you are just interested in continually feeding power through your design over a long period of time to make sure it doesn't break down.
So what is out there to simulate the output of a PV panel? There are two main ways to do it: take a power supply and put some custom analog circuitry around it or purchase a solar array simulator (SAS). I have heard of many different approaches using custom analog circuitry, below is a link to a paper that presents one way to do it:

Of course building a solution yourself comes with a high overhead of simulation, layout, testing, and support. If you want a finished solution you could purchase an SAS. An SAS is not a standard power supply. It is more comparable to a high powered current source with a low output capacitance (< 100 nF) to give it a high output bandwidth. Of course with these more advanced capabilities it comes with a higher price tag than a standard power supply. There are not too many companies out there that make SASs. Agilent is one of the few and below is a link to Agilent's E4360A SAS:

Thursday, November 4, 2010

Create an Electronic Message Board with an Arb Generator and a Scope

As a fun project I recently created a Matlab program that allows you to use a 2 channel arb and a scope in XY mode as a electronic message board. Below is a link to download the Matlab files if you would like to try it out. It is a great way to display away messages when you are not at your desk / lab station or to show school pride or to brag about your favorite team’s performance. The included figure (click to enlarge) shows my school pride displayed on a scope using an electronic message created with the XY_Text_Writer program. The program works by inputting a message (up to 26 characters including spaces). It takes the message and generates XY amplitudes corresponding to points in vectors. The vectors are moved around and mathematically manipulated to form each character. Using those amplitude vectors it generates an X and Y waveform. The program uses the LAN connection to download and output the waveforms from the 33522A. With the scope in XY mode the two waveforms coming out of channel 1 and 2 of the 33522A are converted to electronic messages on the scope display. 
In the "XY_Text_Writer" download zip file you will find all the Matlab files that you need plus a user guide that explains how to setup the equipment and run the program in Matlab. Below is the link to download:

Click here to download from Matlab Central File Exchange

Now if you do have a 2 channel arb but it is not the 335220A 2 channel arb you can possibly still use the program with a few modifications. Instead of sending the arb points to the 33522A you would send them to a .csv file that you could upload to your arb generator, here is how:

  1. In the "XY_Text_Writer.m" file comment out the  "vec2arbstring()" functions and the "arbs_2_33522A()" function.
  2. put the 'x' and 'y' vectors into a single 2D matrix like so z=[x;y]
  3. Then use the following function to generate a .csv in your current directory: dlmwrite(csv_name, z', 'coffset', 0, 'roffset', 0). Notice the 'z' matrix is transposed.
  4. From there you just have to load the waveform from the .csv file to your two channel arb. Set the output Z of the arb to match the input Z of the scope. Start the output amplitude at about 5Vpp for each arb channel and adjust as needed. Set the arb to run at a sample rate of 300 to 400 KSamples/s.