Thursday, April 30, 2015

When is a number not a number?

All of our power supplies measure their own output voltage and output current. These measured values are available to you from the front panel and over the bus. They may be displayed as an average value or a digitized waveform. Some products have different measurement ranges you can set that affect the accuracy of the measurement and the noise floor of the measurement. Of course, there is a maximum value that each measurement range is capable of measuring. So what happens to the reading if the actual output voltage or current exceeds the maximum value of the measurement range? What does the front panel show and what value do you get if you read it back over the bus?

Below is an example where I set the current measurement range to the 1 mA range on a Keysight N6781A Source/Measure Unit. I then forced more than 1 mA to flow out of the output. As you can see, the front panel indicates “Overload”. If you perform a current measurement and read the result back to your PC, you will get 9.91E37. This is a value defined in the SCPI (Standard Commands for Programmable Instruments) standard to mean “not a number” (NAN). Since Keysight products follow the SCPI standard, we return this number when a range is overloaded. This numeric value for NAN was chosen so that it can be represented as a 32-bit floating point number and is larger than anything expected to occur while using instrumentation. In addition to an overload condition on an instrument, NAN can also be used as the result when, for example, you divide zero by zero or subtract infinity from infinity.
This predefined number is also used when waveform data exceeds the maximum rating of a particular range. The screenshot below on the left shows data that does not overload the range. But when the range is changed and part of the waveform exceeds the maximum rating of the range, that part of the waveform data shows up on the screen in red and when returned to a PC, the value is the NAN value of 9.91E37.

Two other unique numbers defined by the SCPI standard are used to represent positive infinity and negative infinity. For positive infinity (INF), 9.9E37 is used. For negative infinity (NINF), -9.9E37 is used. These values can be used to mean “maximum” for a setting. For example, our output voltage slew rate setting has a range of values to which it can be set. If you want to ensure the output voltage will change as quickly as possible, you want to set this to the maximum slew rate possible. Instead of looking up the specification for the maximum setting, you can use the appropriate SCPI command to set the slew rate to 9.9E37 and it will go to the maximum possible slew rate.

So when is a number not a number? When it is equal to 9.91E37!

Let's See the Watchdog TImer in Action

Hi everybody!

It is the end of the month and time for my monthly blog post.

Quite some time ago, my buddy Gary mentioned our watchdog timer protection in a post.  Here is what he had to say:

The watchdog timer is a unique feature on some Agilent power supplies, such as the N6700 series. This feature looks for any interface bus activity (LAN, GPIB, or USB) and if no bus activity is detected by the power supply for a time that you set, the power supply output shuts down. This feature was inspired by one of our customers testing new chip designs. The engineer was running long-term reliability testing including heating and cooling of the chips. These tests would run for weeks or even months. A computer program was used to control the N6700 power supplies that were responsible for heating and cooling the chips. If the program hung up, it was possible to burn up the chips. So the engineer expressed an interest in having the power supply shut down its own outputs if no commands were received by the power supply for a length of time indicating that the program has stopped working properly. The watchdog timer allows you to set delay times from 1 to 3600 seconds. 

(For the whole post click here)

Since Gary wrote that post, we have released the N6900 and N7900 APS units that also include this useful feature.  What I wanted to do was show how to set it up, how to use it,and how to clear it so that everything is a bit more clear.   All of my programming examples in this post will be done using my APS with the VISA-COM IO Library in Visual Basic.

The setup is pretty easy:

        APS.WriteString("OUTP:PROT:WDOG:DEL 5")
        APS.WriteString("OUTP:PROT:WDOG ON")

This sets the watchdog delay to 5 seconds and enables it.  This means that if there is no IO activity (ie your computer hangs up) for 5 seconds, then the unit will go into protect and shut the output down.

Lets say that I have a program that performs a measurement around every second for a minute.  Here is the program:


        APS.WriteString("OUTP:PROT:WDOG:DEL 2")
        APS.WriteString("OUTP:PROT:WDOG ON")

        For i = 0 To 59
            APS.WriteString("MEAS:VOLT?")
            strResponse = APS.ReadString
            Threading.Thread.Sleep(1000)
        Next

        Threading.Thread.Sleep(3000)

        APS.WriteString("STAT:QUES:COND?")
        strResponse = APS.ReadString

 The watchdog delay is set for 2 second so while I run in the loop taking my measurements everything is working great.  After the 3 second wait at the end though, the 2 second watchdog timer comes into effect and the unit goes into the protect state and disables the output.  The response to the questionsable status query is 2048 which corresponds to bit 11 of the register which is defined as "Output is disabled by a watchdog timer protection".  This is the expected result.

My reccomendation to clear the watchdog timer would be to first disable the watchdog timer and then clear the protect.  You can then re-start the watchdog timer when you are ready.

        APS.WriteString("OUTP:PROT:WDOG OFF")
        APS.WriteString("OUTP:PROT:CLE")

The watchdog timer is a pretty cool feature that can perform a pretty useful task.  I hope that this blog post explains what it is and how to use it a bit more.

Tuesday, April 28, 2015

Optimizing a Power Supply’s Output Response Speed for Applications Demanding Higher Performance

Most basic performance power supplies are intended for just providing DC power and maintain a stable output for a wide range of load conditions. They often have lower output bandwidth to achieve this, with the following consequences:
  • Internally this means the feedback loop gain rolls off to zero at a lower frequency, providing relatively greater phase margin. Greater phase margin allows the power supply to remain stable for a wider range of loads, especially larger capacitive loads, when operating as a voltage source.
  • Externally this means the output moves slower; both when programming the output to a new voltage setting as well as when recovering from a step change in output load current.


While this is reasonably suited for fairly static DC powering requirements, greater dynamic output performance is often desirable for a number of more demanding applications, such as:
  • High throughput testing where the power supply’s output needs to change values quickly
  • Fast-slewing pulsed current loads where the transient voltage drop needs to be minimized
  • Applications where the power supply is used to generate power ARB waveforms


A number of things need to be done to a power supply so that it will have faster, higher performance output response speed. Primarily however, this is done by increasing its bandwidth, which means increasing its loop gain and pushing the loop gain crossover out to a higher frequency. The consequence of this the power supply’s stability can be more influenced by the load, especially larger capacitive loads.

To better accommodate a wide range of different loads many of our higher performance power supplies feature a programmable bandwidth or programmable output compensation controls. This allows the output to be set for higher output response speed for a given load, while maintaining stable operation at the same time. As one example our N7900A series Advanced Power System (APS) has a programmable output bandwidth control that can be set to Low, for maximum stability, or set to High1, for much greater output voltage response speed. This can be seen in the graph in Figure 1, taken from the APS user’s guide.
  


Figure 1: N7900A APS small signal resistive loading output voltage response

Low setting provides maximum stability and so it accommodates a wider range of capacitive loading. High 1 setting in comparison is stable for a smaller range of capacitive loading, but allowing greater response bandwidth. This can be seen in table 1 below, for the recommended capacitive loading for the N7900A APS, again taken from the APS user’s guide.



Table 1: N7900A APS recommended maximum capacitive loading

While a maximum capacitive value is shown for each of the different APS models for each of the two settings, this is not altogether as rigid and fixed as it may appear. What is not so obvious is this is based on the load remaining capacitive over a frequency range roughly comparable to the power supply’s response bandwidth or beyond. Because of this the capacitor’s ESR (equivalent series resistance) is an important factor. Beyond the corner frequency determined by the capacitor’s capacitance and ESR, the capacitor looks resistive. If this frequency is considerably lower than the power supply’s response bandwidth, then it has little to no effect on the power supply’s stability. This is the reason why the power supply is able to charge and discharge a super capacitor, even though its value is far greater than the capacitance limit given, and not run into stability problems, for example.

One last consideration for more demanding applications needing fast dynamic output changes, either when changing values or generating ARBs is the current needed for charging and discharging capacitive loads.  Capacitors increasingly become “short-circuits” to higher AC frequencies, requiring the power supply to be able to drive or sink very large currents in order to remain effective as a dynamic voltage source!

.