Monday, May 28, 2012

Creating Arbs Today is Easy!

In this blog post we will look at how easy it is to create arbitrary waveforms on a modern function / arbitrary waveform generator (AWG). I am always running into engineers, young and old alike, that try at all costs to avoid creating an arbitrary waveform (arb) for a test. When they hear the word arb they picture the tedious process of learning how to use some type of waveform software or, worst yet, having to write a program to generate your waveform and then remotely connecting to your AWG to upload the arb. With modern AWGs arb creation no longer has to be looked upon with doom and gloom.

Let's look at two easy examples for creating an arb and transfering it to an AWG. In the first example we will look how we can create an arb from scratch and transfer it to an AWG. In the second example we will capture a waveform from a scope and then transfer and recreate it with an AWG. In both examples two common elements will be used, a USB memory stick and the Comma Separated Value (CSV) file format.

Using Excel to Build Arbs
To build an arb from scratch most engineers turn to either an engineering programming environment, like Matlab, LabVIEW, or VEE, or a custom arb waveform software package that may or may not be free. These are great arb creation solutions, but they can be costly and time consuming if you do not use them on a regular basis. Another option that most engineers do not consider is Excel. Excel is a great tool for building custom arbs since it provides advanced mathematical functions built-in, it can handle large amounts of data (waveform points), and it is already on just about everybody's computer. The next question then is how do you get the waveform from Excel to the AWG? Excel and modern AWGs have something in common; the CSV file format. Excel can read CSV files and Excel spreadsheets can be saved as CSV files. Modern AWGs can read and create arbs from CSV files. To transfer the CSV to the AWG a USB memory stick with the CSV file can be plug into the AWG's front panel and then uploaded into waveform memory.

Let's look at an example. Using Excel an arb waveform was created that consisted of a sine wave summed with third harmonic noise and random noise. A screen shot of the Excel spreadsheet can be seen below. Notice the resulting arb is plotted and the built-in Excel functions used to create the waveform are circled in red.


The Excel spreadsheet was then saved as a CSV file. Using a USB memory stick it was then uploaded to Agilent's 33522A function / arbitrary waveform generator. The resulting arb was captured in the below scope screen shot.


As you can see Excel provides an easy no cost way to create an arb and the CSV file format provides a means to easily transfer the arb to an AWG. If you prefer to use a software environment to generate your arb or your arb needs are more advanced then what Excel can do, you can still skip the remote connection / instrument programming part. Most programming environments, like Matlab and LabView, have APIs for writing / reading CSV files. Simply have your program write the arb to a CSV file and "sneaker network" it to the AWG.

For the second example we will capture a digitized signal from a scope then transfer it to an AWG and turn it into an arb. In the past this was typically done using some type of arb waveform software package that would remotely connect to first the scope to grab the digitized signal and then to the AWG to create the arb. With today's scopes and AWGs the process has been streamlined. For our example an Agilent MSO-X 3054A scope was used to capture a Data Word from a Mil-Std-1553 signal. The captured waveform is shown in the below figure.


Shown below the Mil-Std-1553 signal in blue is 5F67, which is the hexadecimal decoded value of the Data Word. The AWG used in this example was again the 33522A function / arbitrary waveform generator. Here is how it works:
  1. Plug the USB memory stick into the front panel of the scope.
  2. Save the digitized waveform to the USB memory stick as a CSV file.
  3. "Sneaker network" the USB memory from the scope to the front panel of the AWG.
  4. Import the CSV to the AWG's memory. 
It is really that easy! To make this example a little more exciting the Mil-Std-1553 arb on the 33522A was modulated with a lower frequency pulse to simulate coupled transient noise into the signal channel. The modulated arb was captured in the screen shot below.



You can see the simulated transient noise in the figure at the beginning and middle of our arb. Notice at the bottom of the scope in red and blue that because of the transient noise the scope was unable to decode the Data word.

In this post we looked at how easy it is today with modern AWGs to create an arbitrary waveform. We looked at two cases, creating an arb from scratch with Excel and capturing a waveform with a scope. Both methods used the USB memory stick and the CSV file format to transfer the waveform to the AWG with no remote connections or programming. If you have any questions feel free to email me and if you have any personal incites to add use the "Comments" section below.

Click here to learn more about the 33500A series of function / arbitrary waveform generators

Monday, May 21, 2012

Overview of the M9703A AXIe Multi-Channel High-Speed Digitizer


The below video provides an overview of Agilent's M9703A mult-channel 12-bit high-speed digitizer based on the AXIe standard. The M9703A is a wideband digitizer, providing 4 or 8 synchronous channels with 12-bit resolution, each running at up to 3.2 GS/s, and offering up to 1 GHz analog bandwidth. The Agilent M9703A also provides very long acquisition capability by implementing up to 4 GBytes internal memory. In addition, to ensure high data throughput, the module also provides a PCIe backplane connection. Overall this is a pretty awesome instrument!

Monday, May 14, 2012

Jitter Measurements with a Counter

In this post we will look at using a counter's high timing measurement resolution for making Jitter measurements on a clock signal. Jitter is defined as the deviation of a signal edge transition from its ideal time. The most common instrument used for measuring Jitter is a high performance scope, so that begs the question why use a counter? High performance scopes are very expensive, ranging from tens of thousands of dollars to hundreds of thousands of dollars. The counter offers a much lower cost alternative with measurement resolution specs that match or come close to those found on a high performance scope. There are various ways to quantify Jitter, the three most common are: Period Jitter, Cycle to Cycle Period Jitter, and Time Interval Error (TIE). A high performance scope can quantify all three types. A counter typically can only quantify Period Jitter. For more on Jitter fundamentals and Jitter types click here.

Period Jitter is an RMS calculation of the difference of each period from a waveform average. It can be calculated by making a large amount of period measurements on a signal and calculating the standard deviation of the period measurements. To measure period Jitter on a counter we cannot simple use the "Period" or "Frequency" measurement function, because these are integration measurements that average multiple period or frequency measurements together. We need a single shot period measurements for calculating Period Jitter. To do this we would use the "Time Interval" measurement menu and in the Time Interval menu you will find a measurement called a "Single Period" measurement that is ideal for calculating Period Jitter.

When measuring Period Jitter with a counter the main counter spec that you need to be aware of is its maximum resolution. Resolution can be spec'd in digits or as a time value, which is often referred to as the time interval resolution. The time value resolution is the spec we are interested in for calculating the counter's Jitter measurement floor. This time represents the standard deviation of the random measurement error associated with a time interval measurement. Since the standard deviation in an edge to edge timing measurement is the same thing as RMS Period Jitter, a counter's time interval resolution spec is its jitter measurement floor. Another way to look at it is the counter's time interval resolution is its internal RMS jitter error in its measurement. For example Agilent's 53230A counter has a time interval resolution spec of 20 ps so its Period Jitter measurement floor is 20 ps.

Let's look at a Period Jitter measurement example using the 53230A counter. The 53230A is setup to make single period measurements on a 10 MHz digital clock. Using the statistics function the counter computes the  standard deviation after each successive measurement. As mentioned early the standard deviation calculation of the period measurements is the RMS Jitter of the signal. The below screen shot circled in red shows the measured RMS Jitter of the digital clock. From the statistics we can also see the peak to peak Jitter and we can see the mean value of the period is right around 10 MHz.


Modern counters like the 53230A also provide some basic plotting features, which can be a helpful tool for analyzing Jitter. The below screen shot shows a histogram plot of the measurements made on the digital clock signal. In the histogram plot we can see two separate Gaussian distributions, which means that besides random Jitter we also have deterministic Jitter in the signal. The deterministic Jitter jumps between 10.01 MHz and 9.99 MHz. Even though our mean came out to be about 10 MHz we can see from the histogram that the signal is typically 10 KHz off of the ideal frequency of 10 MHz. 


As a comparison, the same signal was measured with a high performance scope. A screen shot of the measurement using the scope can be seen below. The scope screen shot is zoomed in on the signal's rising edge and the scope's persistence setting is on. To measure the Period Jitter of the signal the histogram feature of the scope is on (histogram shown at bottom of screen shot in light blue). Notice that the scope's measured RMS Jitter value (circled in red) matches that of the counter. Also notice that the histograms match as well.


In this post we looked at measuring and analyzing Jitter with a frequency counter. Because of their high resolution and statistical features, counter's make a good low cost tool for measuring Period Jitter compared compared to a high performance scope. Modern counter's offer basic plotting features, like trend charts and histograms, which allow you to identify Jitter patterns and deterministic Jitter for deeper analysis. If you have any questions on this post feel free to email me. If you have any personal experience or incite to add to this post please use the comments section below.

For more on the 53230A counter click here

Monday, May 7, 2012

Understanding an Oscilloscope's Update Rate

In this blog post we will look at the waveform update rate specification of an oscilloscope. Although an often overlooked specification, waveform update rates can be extremely important — sometimes just as important as the traditional banner specifications including bandwidth, sample rate, and memory depth. Even though a scope’s waveform update rate may appear fast when viewing repetitively captured waveforms on your scope’s display, “fast” is relative. For example, a few hundred waveforms per second will certainly appear fast to the human eye, but statistically speaking this can be very slow if you are attempting to capture a random and infrequent event that may happen just once in a million occurrences of a signal.

When you debug new designs, waveform update and serial bus decode rates can be critical — especially when you are attempting to find and debug infrequent or intermittent problems. These are the toughest kinds of problems to solve. Faster waveform and decode update rates improve the scope’s probability of capturing illusive events and serial bus communication errors.

All oscilloscopes have an inherent characteristic called “dead-time” or “blind time”. This is the time between each repetitive acquisition of the scope when it is processing the previously acquired waveform. Unfortunately, oscilloscope dead-times can sometimes be orders of magnitude longer than acquisition times. During the oscilloscope’s dead-time, any signal activity that may be occurring will be missed as shown in the figure below.


Because of oscilloscope dead-time, capturing random and infrequent events with a scope becomes a gamble — much like rolling dice. The more times you roll the dice, the higher the probability of obtaining a specific combination of numbers. Likewise, the more often a scope updates waveforms for a given amount of observation time, the higher the probability of capturing and viewing an elusive event — one that you may not even know exists.

The following equation can be used to calculate a scope's dead time percentage:

% DT = Scope’s dead-time percentage = 100 x [(1/U) – W]/(1/U) = 100 x (1 – UW)
where
U = Scope’s spec'd update rate
and
W = Display acquisition window =
Timebase setting x 10

What most users do not realize is a scope's dead time is much much larger than its acquisition time. For instance Agilent's 3000 X-Series family of scopes has an update rate of 1,000,000 time per second at 10 ns/div timebase setting, which is best in its class. Even with such a high update the 3000 X-Series has a dead time percentage:

%DT = 100 x (1 - (1e6 * 1e-7)) = 90%

Lets look at an example where we are analyzing a signal that has a glitch in it that occurs 5 times per second. Using a scope that has an update rate 1e6 per second and a timebase setting of 10ns/div what is the probability that it will capture the glitch in 5 seconds. 

Pt = 100 x (1-[1-RW]^(U x t))
where
Pt = Probability of capturing
anomaly in “t” seconds
t = Observation time
U = Scope’s measured waveform
update rate
R = Anomalous event occurrence
rate
W = Display acquisition window =
Timebase setting x 10

P(5s) = 100 x (1 – [1 – (5/s x 100 ns)]^(1,000,000/s x 5s)) = 91.8%


From the above calculation we can see that there is a 92% chance that the scope would capture the glitch in 5 seconds. The below figure is from the 3000 X-Series measuring a signal with a glitch that occurs 5 times a second. The glitch was captured in 2 seconds. 


If we were using a scope that had an update rate of 3,000 updates per second or less (which is common in low to mid range priced scopes) the probability of seeing the 5 times per second glitch in 5 seconds would be less than 1%. 

In this post we looked at a scope's update rate and its importance to debugging and finding that rare glitch. If you have anything to add to this blog post use the comments section below.