Hello and thank you for joining us for today's Teledyne LeCroy webinar with Dr. Eric Bogatin titled Understanding Real-Time Spectral Analysis. Just a few housekeeping items before we begin. A copy of today's slides are available to you in the handouts section of your control panel, which is to the right of the screen. Also in the control panel, you will see a section for questions. Please use this section to submit questions during today's presentation. We will hold questions and answers at the end of the webinar to keep us running on time. This webinar is being recorded. A link to the recording and slides will be sent to you automatically via email within the next 24-48 hours. Finally, as you exit today's webinar, a short survey will pop up. We would appreciate you taking a moment to answer these short questions so that we can continue to provide valuable content to you. Again, thank you for joining Teledyne LeCroy today for our webinar with Dr. Eric Bogatin titled Understanding Real-Time Spectral Analysis. A little bit about us: LeCroy was founded by Walter LeCroy in 1964. Our corporate headquarters are in Chestnut Ridge, New York. We have sales and service offices all over the United States as well as the rest of the world. We started as an oscilloscope manufacturer focusing on physical layer test solutions and have branched out into protocol analysis through several compatible acquisitions. In 2012, we were acquired by Teledyne Technologies and renamed Teledyne LeCroy. Finally, a little bit about our presenter in case you are not familiar with Eric Bogatin. Dr. Bogatin founded Bogatin Enterprises in 1992, which LeCroy acquired in 2011. Eric has produced over 200 hours of training material for the Teledyne LeCroy Signal Integrity Academy and has written over seventeen books. Eric teaches at the University of Colorado in Boulder for the Department of Electrical and Computer Engineering and currently holds the position of Technical Editor for the Signal Integrity Journal. We know that there are a lot of demands on your time and appreciate you joining us today. I'll now turn things over to Eric to begin. Hi, and thanks so much for that intro. In this webinar today, I'm going to introduce you to what I think are the most important principles we need to understand in order to think about signals in the time domain and in the frequency domain. Here's what we're going to cover in today's webinar. I'm going to walk you through first this idea of extracting important figures of merit, a few numbers that characterize the properties of a signal in the time domain. And we'll look at a couple of simple signals that have certain signatures to them. And then we'll see that some signals are really complex. They have a lot of detail in them. And sometimes we can't get a very clean picture of them in the time domain. We can get a better idea in the frequency domain. And there's a different set of figures of merit in the frequency domain. And in order to look at the signals in the frequency domain, especially using a real-time scope, I'm going to show you what goes on under the hood. I think there are three tricks that all scopes perform in order to take a signal in the time domain to the frequency domain. And the reason I think it's important to understand that is because we'll see that there are some features that we can set up in the time domain of the scope that will affect the display in the frequency domain. I'm going to walk you through those. And we'll look at a few simple waveforms. And then after we've got the principles under our hand, I'm going to show you a few of what I think are really important properties of waveforms in the time domain and how that translates into the frequency domain. And once we have this tool in place and we understand how to interpret the results in the frequency domain, we're going to apply it to some really important considerations to worry about when it comes to looking at signals. In this case, we're going to look at the impact of RF pickup and understanding the spectral content of RF pickup as a signature, as a fingerprint of where that pickup is coming from. We'll look at a couple of examples. I'm going to apply it to some power supplies and the RF emissions—unintended emissions of course—from these power supplies. And then I want to show you what I think is a really cool example of one of the dangers of using copper pour on your boards. So, let's get started. For all the examples I'm going to show you today, we're using my WavePro HD. This particular one that I have in my lab, we're going to turn it on here in a minute. I'm going to show you some examples. It's a four-channel, it's 8 GHz, that's important, and it's 12-bit vertical resolution. And we'll look at some of the other features of the scope as we go based on what is important to know. Now, before we actually turn the scope on, I want to introduce you to another one of those best measurement practices that I think should always be taken into consideration. And it's what I call situational analysis. Situational analysis is really about being aware of all of the important features of the scope and the features of the signal so we can understand when the measurement system of the scope and the probes might be affecting the quality of the measurements and introducing artifacts. I think it's important to know where the limits are of the scope and in particular, when we go from the time to the frequency domain, how the scope is set up and some of those features will affect the frequency domain response. These are some of the important parameters associated with the scope that we're going to pay attention to. And as we go through these details, I'm going to show you where on the screen, at least for our scopes, we can find this information. And whatever scope you're using, you want to figure out where you can find this information for your scope. So here's what's on tap for the rest of the presentation. First, let's start out talking about the time and frequency domain and how we do this transform. So I'm going to switch over now to our scope, and we're going to take a look at a couple of signals, looking at them in the time domain and then how we transform them into the frequency domain. Now instead of using, I'm going to bring you into my lab, and I've got a camera setup, but it's kind of awkward to look at the scope with the camera. So instead, our scopes are basically PCs. So I'm running TeamViewer on my scope and on my PC. And I'm going to control my scope from the PC. And so we'll see the scope screen here on my laptop. So I'm going to turn on the scope. And here we go. Here is the scope screen. We're taking data. And I'm using a simple function generator to generate a waveform here. We've got it triggered and we're taking data. There are usually three ways to interact with a scope. There are the analog knobs on the side that we can tweak. There are pull-down menus. And our screen is also pinch and zoom. It's an iPad interface to it. But in order for you to see the settings that I'm using, I'm going to use the mouse on my PC to activate the menu items on the scope. So for example, I want to change the time base. We're going to come over here and I can change the time base and see that signal as it changes. This is a really simple sine wave. Nothing fancy about it. If we wanted to describe it in the time domain, there are a couple of figures of merit. Right now I am taking data. I'm taking 2.5 million samples of measurements in one acquisition window. The sample rate is 5 gigasamples per second. So that means every 200 picoseconds I'm taking another measurement. The vertical resolution is 12-bit resolution. So it's a lot of data we're looking at here. That is 2.5 million data points. That's a huge number of data points. I don't know what to do with 2.5 million data points. I just want a couple of numbers that tell me about this waveform, that characterize the waveform. Well, obviously, one of them is going to be the peak-to-peak or the amplitude. There's a frequency. There's the DC value. And so I can kind of eyeball them off the front screen. Peak-to-peak is about plus or minus 1 V. So it's a 2 V peak-to-peak signal. Let's see what's the period. It's about, let's see. One division is 50 ?s. So it's about two divisions. That's about 100 ?s is the period. 100 ?s, one over that is about 10 kHz. So I have a rough idea of the features of the waveform, but I can get a much more accurate value using built-in measurement features. Because after all, the scope's a PC. If I can define the algorithm to take this measured data and do calculations, I can turn the measured data into pieces of information, which we call figures of merit. And so I'm going to activate our measurement features. I'm going to turn on my measurements. And personally, I like statistics, so we're going to make sure statistics is on. It is. One of the metrics that we'd like to get is, let's see what's the frequency for this signal. So let's see. I'm going to turn on the first measurement. It's going to be channel 2. I'm going to drag it in here and I want to see frequency. So here's the source's channel 2. What I want to measure is frequency. That's a horizontal measurement. So I'm going to scroll down here, and here's frequency. Okay. Now I estimated, eyeballed it as about 10 kHz. And sure enough, here it is. 10.2 kHz. Pretty darn close to what I expected to see. Second figure of merit, peak-to-peak value. I think it's about a 2 V peak-to-peak. So I'm going to create another measurement feature. It's going to be channel 2 as well. And this one, I want this not to be frequency, but I want it to be peak-to-peak value. And that's a vertical measurement. And here it is, peak-to-peak. And then the last term I'd like is what's the offset? What's the average value? So I'll open up another one over here, and we'll select this one. This is P3. We want this to be average or mean. So here we go. And now I can get for this waveform, I can get three different figures of merit. It's about 10.2 kHz. It's about a 2 V peak-to-peak, and it's offset pretty darn close to zero. It's a couple mV. This is how we can characterize this waveform in the time domain. This also, as we'll see, has a pretty simple description in the frequency domain. But sometimes, there are more complicated waveforms that are just hard to characterize in the time domain where we want to look at them in the frequency domain. So let's take a look now at how we take this waveform in the time domain and turn it into a waveform in the frequency domain. So let's go back to the slides. So here's an example of a waveform that is much more complicated in the time domain. There's no easy simple figure of merit necessarily that describes this. This is a case where looking at the frequency domain might get me a little bit more useful information. The question is, how do we do that? Now, of course, the answer is, oh, we use a Fourier transform, but how do we do that? And that's where trick one comes in. What is the practical way of implementing a Fourier transform? Here's the fundamental problem. When we use a discrete Fourier transform, which is the starting place, we can only apply a discrete Fourier transform to a waveform that is periodic. It has to have some repeat time associated with it, one over that of course is the repeat frequency. Here's an example of a waveform. This is not periodic necessarily. I don't know how to take this waveform and convert it into the time using a discrete Fourier transform because this is not a periodic waveform. How do we turn this waveform into something that is periodic so that now we can calculate the discrete Fourier transform features of it. And here is that trick that we're going to do. This is trick one. We take this waveform, which is the data within one acquisition buffer. We take that waveform. And what we're going to do is we're going to repeat it and we're going to say this is the waveform that's contained in this buffer and we're going to repeat it. And so we have the first cycle of it. Here's the second cycle, the third cycle, the fourth cycle. We're going to concatenate sequential buffers of the same data. And so we're going to repeat this data again and again and again. And now we have a repetitive waveform. And the way we take the Fourier transform of a repetitive waveform and the repeat period is one acquisition buffer time. Now we're in a position to calculate the discrete Fourier transform of this repetitive waveform. And here's how we do it. It's a discrete Fourier transform. The discrete Fourier transform only applies to periodic waveforms, and you have to know what that repeat period is. In this case, it's the buffer size. So we're going to take the same data in that buffer, and we're going to repeat that same data over and over and over again with the period being the acquisition time interval, that total time. So in this particular case, this is 2 ?s a division. There are ten divisions horizontally. That means the total acquisition time is 20 ?s. And so we're going to repeat this 20 ?s of data over and over and over again. And you can see that when we do that, the lowest frequency sine wave we can calculate is going to have a period equal to that repeat time. Here's that lowest frequency sine wave that can fit into our acquisition window. That is going to be the lowest frequency we can calculate. And when we apply the discrete Fourier transform, each spectral component that we're going to have is going to be a multiple of this first fundamental frequency, the repeat time. So if our repeat time period is 20 ?s, one over that is 50 kHz. That is going to be the first frequency we can calculate with the discrete Fourier transform. And we're going to be able to calculate multiples of that frequency. So the lowest frequency is 50 kHz and we're going to be able to calculate multiples. So we'll be able to calculate the amplitude at 50 kHz, at 100 kHz, at 150, 200, 300 and on. The highest frequency that we'll be able to calculate is related to how often we're taking data, our sample rate. The highest frequency is going to be half the sample rate. And so it's how these two features and how we set up the scope that are the most important features that influence the display of the frequency domain data. The first frequency is one over the acquisition rate. The spacing between each frequency, that is the frequency bins are one over the acquisition rate. And the highest frequency is going to be half the sample rate. So if we want a higher resolution, if we want to see smaller bin widths of frequency, then that says we have to take a longer acquisition time. And as long as our sample rate stays the same, the highest frequency in the spectrum is going to stay the same. Most important principle when we look at the spectrum of a waveform in the time domain, and we'll see this in the example here. Once we've set that up and we have our repetitive waveform, whatever data is in this buffer is going to repeat infinitely forever in the past, forever in the future. That's the basic assumption when we take a discrete Fourier transform. Once we have that and we know what that repeat time is, now we can just apply the discrete Fourier transform integrals to calculate. We know the voltage versus time over one interval. That's the recorded data. We can calculate each of the harmonic amplitudes based on the DC value, which is basically the average value. And then here are the values of each harmonic component, multiples of that one over the acquisition window, which is the fundamental frequency in our spectrum. So we can get the cosine coefficients, the sine coefficients at each frequency value, n times the fundamental frequency. And then once we have the amplitudes for the cosine and the sines, hey, we'll just take the square root of the sum of squares, and that's going to be the amplitude of that frequency component. This is a very simple, straightforward way to calculate the Fourier transform for a buffer window. There's one problem with this. And the problem is it's going to take too long. Doing all these integrals, you know, think about it. Look, we had 2.5 million data points in our buffer just a little while ago. That means we're going to have to integrate over 2.5 million data points. And that means we're going to have about half, we're going to have one million frequency components. So we're going to have to do two million times one million. So what's that? That's like a trillion different calculations in order to get a spectrum. That's just impractical to do in real time. And so we do another trick. So here comes trick two. Instead of doing a discrete Fourier transform, which is basically doing these integrals, instead of doing that, we're going to simplify that and we're going to use some tricks in matrix math to do a fast Fourier transform. And the fast Fourier transform is going to be far fewer points to calculate. And so we still are going to calculate the Fourier components but we're not going to use a discrete Fourier transform. We're going to do it as a fast Fourier transform. The only downside is, oh gosh, it requires the number of points to use to be in the form of 2 to the nth points. That means that whatever our buffer window is, we have to truncate it a little bit so that we only take, we only use 2 to the nth number of points. So we want to find the largest 2 to the nth number that fits within our dataset. And once we do that, here's our whole dataset. This is our measured data in the buffer. Once we calculate what's the largest 2 to the nth number of points that'll fit in here, here's highlighted between the dotted lines, we're only going to use the data within the dotted lines when we calculate the FFT. The stuff out here, we're going to throw away. We're not even going to use it. And that's going to allow us to do this Fourier transform really, really, really fast. So the first step is we turn that buffer into a repetitive series of data. The second step is now we take only the middle 2 to the nth number of points. And now comes the third step. And let me illustrate the problem for you of why we need a third step. So let's go back to our scope, and I'm going to show you the Fourier transform of this sine wave. So here's our sine wave. Now remember I said, hey, if we want to turn this into an FFT, the acquisition time determines our resolution. We saw it was a 10 kHz frequency. I want a resolution of maybe 100 Hz. I want a good resolution for this waveform. That means I need a long time base. I need a time base that's maybe 10 milliseconds long. So let's change the time base. So we come over here and change the time base. So let's see. So I'm at about 2 milliseconds. And here we're at 10 milliseconds. Let's go up a little bit more. So we have 20 milliseconds as the time window. A little hard to see the waveform itself. So I'm going to zoom in a little bit just so that we can capture a little bit of that waveform and see it. Okay. So we've got the whole waveform, and I'm displaying the zoomed in piece so we can see, yep, that's the waveform. But now, because of our time base of 20 milliseconds, in principle, we could have 50 Hz resolution, one over 20. But because we're going to take only a piece of the data in the middle, it'll give us closer to that 100 Hz resolution. We're sampling at 2 million sample points and we're at 100 MS/s. So in principle, we could go all the way up to 50 MHz as our frequency, but I want to focus on this 10 kHz range. So let's turn on an FFT and that's a math function. So I'm going to come over here. I'm going to set up the math function, and we'll turn on the first one. And here is our math function. You can see immediately as I set it up, we've got 2 million data points altogether, but I want the largest 2 to the nth number of points that'll fit in here. And these dotted lines tell me those values that will fit to give me 2 to the nth points. I don't know what 2 to the nth is of this, whatever it is. This is the number of data points that we're going to take from the 2 million we start with. We're going to end up with a little more than half of those that are 2 to the nth. And it's this time interval that we're going to use as our repeat time interval. And I'm going to change the scale. I'm going to put that 10 kHz in the middle. So I want to center it at 10 kHz. And let's use 2 kHz per division. So here's my spectrum. Here's the problem. And I'm going to illustrate this problem by changing the frequency slightly. So on my function generator, I've got it set up so I can tweak that frequency just a little bit. And remember, we're displaying the frequency right here. So let's look at the instantaneous value of the frequency and watch what happens to the spectrum as I change that frequency. The center, of course, the frequency is changing a little bit. The center frequency is changing a little bit, but look what happens. Here's this setting here. The peak is about the same. The center is about the same. It's changing a little bit. But look what's happening out here in the wings. The wings are changing. Look at that. Even though it's one frequency component, I guarantee you, there is one frequency coming out of this function generator that I'm measuring on my screen here. It's 10.13 something kHz. There's one frequency coming out. Here it is. And yet, look at all the energy I'm getting in these other frequency components. We call this spectral leakage. This is a really important problem whenever we do an FFT. And to understand where that comes from, and if we understand the root cause, how to fix it, I'm going to go back to the slides for a moment and let's look at the problem. Here is what's going on. Remember, we said that when we take a waveform and we want to calculate the FFT of it, what we're really doing is we're grabbing that waveform and then we're replicating it forever in the future and forever in the past. And when we go and replicate that waveform, if the data fits the window so that it ends at exactly the same voltage the waveform began, then it looks continuous. And now we have this continuous waveform. And we're just going to take the FFT of this continuous waveform, and it's going to be a sine wave. And there's one frequency component in a sine wave. And so the spectrum is going to look like a one-frequency component if the window starts at the same value that it ends, so it's a continuous waveform forever in the past and forever in the future. But what if the frequency or the period of that waveform is not an exact integer value related to the acquisition window? So we're not starting at exactly the same value we're finishing. Suppose it's something like this. It's still that perfect sine wave, but it doesn't fit with an integral number of cycles in the window. And that means when I take this buffer of data and I concatenate it forever in the past and forever in the future, I have a discontinuity in that waveform. When I'm calculating the discrete Fourier transform or the FFT, I'm assuming we have a continuous waveform in the time domain. But look. That's not continuous anymore. The DC voltage is not continuous, and the first derivative is not continuous. This discontinuous glitch is going to introduce spectral leakage. Even though it's a pure sine wave that I'm sending out, there's an artifact of how it fits in that window that says, oh, that frequency component that should be here, some of that information is going to leak out. And we saw that leaking out when we did the FFT calculation. The way around this problem is trick three. And trick three is applying a windowing function to make the ends continuous. So I'm going to take that waveform I start with and I'm going to multiply it by a windowing function, sometimes called an envelope function, that is going to push the ends to be close to zero so that by definition it will be continuous. It'll start near zero, it'll finish near zero and it'll be continuous. And when we do that, when we push to be more continuous, we'll dramatically reduce the spectral leakage. Now there are a number of commonly used window functions that have been around for a while. The one that I just showed you was the Hamming window, named after Professor Hamming. And in the original application of it, it did not quite go to zero at the ends. And so we still get a little bit of spectral leakage. But depending on what the shape of that envelope is, we'll reduce the spectral leakage and we'll calculate frequency components that don't spread out into other frequencies. Now, two of these, I think, are really useful. It's labeled here as Hanning window. It's really the von Hann window. And then the Blackman-Harris. And you can see they both end up with zero at the two ends, and that guarantees a continuous waveform when we concatenate that buffer of data over and over and over again. And here is for a sine wave. Again, this is a pure sine wave. Absolutely fixed ideal frequency. And here is what those waveforms look like after applying the different windowing functions or the envelope functions, and here's what the spectrum looks like. And you can see here's the spectral leakage, and here's what the Hamming window looks like, the von Hann window, and the Blackman-Harris. Not a lot of difference between the von Hann and the Blackman-Harris. I kind of like the Blackman-Harris, and that's what I typically will use. Unless you have a really strong compelling reason otherwise, and you know all the details of what you're looking for, balancing the width versus the full amplitude, I'd recommend either the von Hann or the Blackman-Harris as the windowing function. We'll use the Blackman-Harris as the windowing function. Well, let's take a look at what the impact of that is. So now we're going to go back to the scope. We're going to look at our sine wave and now we can understand why we're getting the spectral leakage. I'm going to adjust the frequency a little bit here and I'm going to adjust the frequency so look at that. We get less and less spectral leakage. So in this case here, let's see if I can get it just exactly there. What I'm doing is I'm adjusting the frequency so that I'm getting exactly an integral number of waves in the window in which we're taking data. So we're starting over here, continuing. We're ending over here, and they're pretty darn continuous at the ends. And look, I've really reduced my spectral leakage. If unfortunately, I'm so unlucky as to have some difference between where I start and where I finish because the frequencies don't— I don't have an integral number of cycles in there—look at all that spectral leakage I get when I don't use a windowing function. So here's that pretty bad case of a lot of spectral leakage. This is no windowing function. Now let's start turning them on and see the benefit. And the way we do that in this case here is we're going to set up the truncation process over here. This is the FFT, and here is the windowing function that we can select. Unless you have a strong compelling reason, otherwise, I would recommend the Blackman-Harris. Let's just look at them. So here is the Hamming window, and you can see it's got a funny shape here and it's because of the wave function that's used in the envelope multiplying this waveform. Here is the von Hann. Wow. Much better. Look at how low the spectral leakage is. And then here's the Blackman-Harris. And you can see a little bit more spectral leakage but a narrower waveform. And so let's go back to von Hann. So very low spectral leakage, a little bit wider waveform than the Blackman-Harris, but still pretty darn good. Either of them is perfectly fine in our application. Just remember, look how far down. We're already 60 dB down, 70 dB down. So we're going to use the Blackman-Harris for now. Now we've got a process of going from the time domain to the frequency domain. We've seen the impact of the waveform and the windowing function. And now as I change the frequency, you can see that there's very little impact on what we get, even in the worst case here, very little impact on the peak height or the width. And our spectral leakage is, in this case, very low. Okay. Now we're ready to take a look at some other waveforms. And so the one I want to illustrate initially is a square wave. So I'm going to turn the function generator onto a square wave. So here's our square wave. And I've also got it at 10 kHz. But we're still on our same scale. Here's our 10 kHz center frequency. We're looking at the first harmonic. I want to see all the other harmonics. Now, same thing. I've got a wide window. It's that same, roughly about 100 Hz resolution. I'm sampling at 100 megasamples. So that means I go up to 50 MHz. And if I go up to a higher frequency, the problem is this is a linear frequency scale. And I know the frequency components are going to drop off like 1/f. So I want to see it on a log scale. Now normal FFT functions don't let you plot a log scale. And so we have a built-in function that will let us do that. So I'm going to open up our analysis features. And here is the spectrum analyzer. We're going to turn on the spectrum. Here is the spectrum over here. And we're going to make sure that the input to the spectrum analyzer is channel 2. Yep, there it is. Now, this is the same scale that we had before. I'm going to change the scale and we're going to switch to a log scale. So we'll go home over here, make that a log scale. And now, let's change the frequency range. So in the spectrum analyzer application, we can control the time domain by just setting the frequency domain. So let's see. Let's go up to 100 MHz. So that means we're going to have to sample at 250 MS/s. And so by adjusting the spectrum, we automatically adjusted the time domain. Let's see. We'll start at a kilohertz. And let's adjust the time base, the sampling. So here I'm adjusting the time base. So let's come over here and I'll show you what I'm doing. We're going to zoom out. Watch what happens. So here we are in the time domain. Look at the time window. And look at what happens. Our resolution is changing in the frequency domain. 20 milliseconds full scale. So it's roughly in that 100 Hz resolution. And here you can see the individual frequency components for that ideal square wave. And you notice on a log-log scale, so let's adjust, we'll tweak the amplitude. We'll make this 20 dB. On this scale, the amplitude is on a log scale. The frequency is on a log scale. The frequency components, the amplitude for an ideal square wave drops off like 1/f. And we see that 1/f behavior really, really well. We see it dropping off here a little bit more than 1/f, and that's because of the finite rise time of the square wave coming out of the function generator. In fact, where it starts dropping off more than 3 dB from the ideal square wave, roughly around the 100 MHz point or let's see, 20, 30, 40, 50, about 50, 60 MHz, that's the bandwidth of the signal. That's when the frequency components begin to drop off faster than the 1/f of an ideal square wave. When they drop off by more than -3 dB, that's the -3 dB bandwidth for that signal. You'll notice in this waveform, we have the first harmonic. Here's 10 kHz. Here's 20 kHz. And look, there's hardly anything there. In a symmetrical square wave, there are no even harmonics. We only see 10 kHz, 30 kHz. Here's 50 kHz, 70 kHz, only the odd harmonics. What is it that causes even harmonics? The answer is asymmetry in the waveform. This is a perfectly symmetric waveform. Now the metric of symmetry is the duty cycle. So let's add that as another, in fact, let's just use the mean because I don't really care what the mean is. Let's make this mean instead of the mean value. Let's make it the duty cycle. So that's again a horizontal measurement, and we want the duty cycle. And here we go. So this is pretty darn close to perfectly symmetric. 50 percent duty cycle, no even harmonics. If I change that symmetry, I will introduce even harmonics. So I'm going to adjust the duty cycle very slightly. In fact, here, you can't even see it on the screen, but look, we're measuring it. I'm introducing a 0.1 percent asymmetry. And look, did you see that second harmonic being generated right here? If you blinked, let me do it again. So here is perfectly symmetrical. And now here is just a tenth of a percent asymmetry. And if we increase that asymmetry, look, we're getting more and more even harmonics. So I get this all the time. People ask, well, I see, my clock is 16 MHz. I should only see odd harmonics. I should see 16 and the third harmonic of that and the fifth harmonic of that, but I see the second harmonic. Where did the second harmonic come from? Or why do I have a second harmonic? That's because any asymmetry of any sort in the waveform is going to introduce even harmonics. And so when you look at the spectrum of a signal and you see some of the even harmonics, all that means is, hey, you don't have a perfectly symmetrical square wave. You've got some asymmetry of some sort in there. While we're doing this, we're going to do one other thing. In addition to adjusting the duty cycle, I'm going to cut the duty cycle way down so that we have pulses and watch what happens to the spectrum. So here we are, a perfectly symmetrical waveform, right? No even harmonics. Now I'm going to make the duty cycle really small. That's going to make small pulses come up. Watch what happens to the spectrum. So here I'm making pulses. You can see the waveform I've zoomed in. You can see I'm getting pulses, smaller and smaller pulses. And now watch as I get smaller and smaller. We're at a 4 percent duty cycle and look, the pulses are getting narrower and narrower. And as they get narrower and narrower, look what happens to the spectrum. Instead of the frequency components dropping off like 1/f, they're flat. This is a really important property of signals in the time domain converted into the frequency. If our signal looks like an impulse in the time domain, in the frequency domain, it's going to be wideband. It's going to be flat. And so when you see a spectrum that's wideband, and here we go, we can make it an even narrower pulse. So this is 1 percent. That is only 1 percent of the time. Look how flat the spectrum is. Make it even narrower. Look at that. We're on for a tiny fraction of the time. This is as close to an impulse as we're going to get. And look at that, in the time domain, it's an impulse. In the frequency domain, it's a flat spectrum. Really important connection. The flatter, the wider band the spectrum is in the frequency domain, that says, look for impulses in the time domain. Okay. So now we've got some really important principles. We understand how we go from the time to the frequency domain. We've seen a couple of examples of a sine wave with different windowing functions. We've seen the principles of an ideal square wave giving us that frequency that drops off like one over f for a 50 percent duty cycle. We've seen even harmonics being generated if we have some asymmetry. And now we've seen that signature of a sharp pulse in the time domain, giving us a flat wideband response in the frequency domain. Now we can apply these techniques of measuring signals in the time domain, looking at their response in the frequency domain, we can apply them to a couple of examples. So I'm going to turn on my camera. I'm going to bring you into my lab. So here we are in my lab. Hi, everybody. And, I've got something really simple. We're going to first look at a simple power supply. And we're actually going to look at not voltages that are on the power rail, but instead, we're going to look at pickup from my 10x probe. And so I'm using my 10x probe as a small pickup coil, and it's going to be sensitive to near-field magnetic fields. Okay? So now channel 2 was looking at my spectrum analyzer. So I'm going to turn off channel 2. So I'm going to turn off the zoom. I'm going to turn off channel 2. I don't care about the spectrum analyzer. And instead, I'm going to turn on channel 1. So here is channel 1. And I'm going to see if I can, at the same time, show you what we're looking at. And we'll try to figure out how to get both of these on the screen here. So here is my pickup coil. I've turned everything off here, so I'm just looking at the noise in the environment. Now I need to tell the scope, hey, plot the spectrum of channel 1. So here's the spectrum analyzer application. It's still using channel 2 as the input. So I'm just going to come over here and say, hey, move channel 1 into the input of the spectrum analyzer. And so this lets me get my camera again. This is the signal that we're seeing from the pickup from the probe. And most of this is just, right now it's the combination of the background noise and the scope noise. And so you can see there's hardly any signal at all. So for now, let me zoom in. Let me increase the sensitivity. And here you can begin to see, okay, we're 10 mV per division. You can begin to see, hey, we've got some noise that we're picking up here. And not much to see here, up to 100 MHz. Let's go up to a little bit higher frequency. And let's go up to 200 MHz. And of course, to do that, we need to up our sample rate. And so here's our sample rate of 500 MS/s. And now you can begin to see that, okay, we've got some stuff going on here at 100 MHz. That's just and here, I'll show you my probe. I'm just moving my probe around a little bit. Look what happens over here. Move it far away. Move it up. Move it down. What's all this going on here at around 100 MHz? This is our local FM radio stations. They're at what? 98 to 105 MHz. So we're just looking at RF pickup from radio stations over here. The rest of this is kind of background noise. So just be aware, whenever you look at near-field emissions, we live in an incredibly noisy environment. Now the bandwidth of this probe is only 500 MHz. So I'm not going to see the 2.5 GHz of WiFi and Bluetooth. But when I use a higher bandwidth probe, you also see that a lot. And we see 900 MHz for RF personal radio communication systems and other frequency components. So just be aware that we live in a noisy environment. My lab here is pretty noisy. And so we just have to be careful of misinterpreting the RF in the environment with what's coming from the sources. So I want to show you two examples here. The first one is going to be radiated emissions from these power supplies that I've got. Now, these are just USB supplies. And I've got it set up. So we'll look at this one first. We're going to come out of this 5 V USB supply and I have an electronic load here. I can change the DC load, and that will change the current draw from the power supply. So let's turn it on, and we'll monitor the voltage. So this is the voltage coming out. There's no load right now. And let's look at the noise. And so you can see not a whole lot of noise. Yeah. It affects the antenna, so it affects the RF pickup a little bit. So now let's turn on the load and let's look and see what's happening to the noise. And now we begin to see, oh my gosh, this is where real-time spectral analysis is useful. We got a half an amp coming from the source. You can see all that transient noise and that's giving us this transient behavior with the scope. I'm going to change the trigger. And as we change that waveform, we are looking at the spectral response of that waveform. Oh, wow. Look at that. And where is all the noise happening? We can see here. I like starting out with a log scale that'll show us everything. All the noise coming from the sky is below the 10 MHz range. So let's change the frequency range to 10 MHz. So we're going to come over here and we're going to make this 10 MHz. And that will give us the opportunity also to go to, oh my gosh, a lot of noise. And remember all this noise, it's just RF pickup noise. I'm not touching anything. I'm just looking at the near-field radiated emissions from this DC supply, nominally DC supply. And you can see, oh my gosh, there's a lot of stuff going on here at the, let's see. Here is two, three, four, 4 MHz range. And it's varying. It's aperiodic except for the stuff going on here around 4 MHz. So this is a very noisy power supply. Let's do the same thing to another one here. Same thing. We'll look at the spectrum coming out of this and we'll start turning on. Look at that. A lot cleaner. We have a few frequency components. You know, it would be nice to label those. So I'm going to turn on a marker on our spectrum analyzer, and this is going to just label those peaks for us. And here we can see, wow, there's something here at 670 kHz, and we've got a 1 MHz one over here. And now if I move it close, you can see all the noise. Look at all that noise we're picking up, and it looks like there's some periodicity here. That's around the 20 kHz, 25 kHz range. And you can see there is a lot of periodicity here. And look. Can you see how flat this is? Look at the distribution. Very flat. When you have a flat distribution in the frequency, what does that tell you in the time domain? Moving it far away, moving it close. This is all the near-field pickup from this particular power source. And look, it's pretty flat. That means we're going to have impulses. We're going to have sharp spikes in the time domain. And sure enough, you can see those sharp spikes over here. And so these represent the switching frequency and the harmonics of the switching frequency. We're in the 20 to 23 kHz frequency range and all of the harmonics of it for this particular power supply. And we'll just look at one more. So here's another USB charger. And again, you can see very strong—oh my gosh. Look, we're kind of saturating. I need to decrease the voltage range so that we stay on track. Oh my gosh. Look at that. We're saturating out. Look at all of those frequency components. And look how flat it is. So here it is. And now I bring it close, very wideband. So you can see that by looking at the signal in the time domain and transforming to the frequency domain, we can get an idea of what that spectral fingerprint is of the noise, in this case, the RF pickup noise coming from these power sources. And that's why these power sources are very noisy. Even though we're not touching them, even though we're not looking at the voltage directly, we can still see a lot of that RF radiated emissions. And now, in the little bit of time left, I want to do one last example here for you. I've got three different microcontroller boards. They're all literally identical. They all use the same microcontroller. This is an ATmega328 microcontroller. Slightly different configuration for this one. This is in a DIP package. This is a 32-pin quad flat pack. Same exact microcontroller over here. Exactly the same circuit for this one as this one. The only difference is in the layout. And I'm going to first show you how we can use our little 10x probe here as a very sensitive sniffer of near-field emissions from these boards. Now near-field isn't always the same as far-field. Just because we have a lot of near-field emissions doesn't mean we're going to have far-field radiated emissions, but I think in this case we probably will. Let's take a look at the first one over here. So I'm going to first look at the noise signature when there's no power applied. And so we look at this part, you can see we're up to, let's go up to 100 MHz here. And you notice we fixed the sample rate so that we can see the 100 MHz frequency, and we're increasing the time window, and that means that we're getting a lower first harmonic and we're getting higher resolution. Okay. So here is, so we're getting a half a million samples. And, let's do one more click. So we've got a little more than a million samples that we're taking. We're still at that 250 megasamples so that we can see the 100 MHz over here. Here's the radio. This is the RF pickup. And now here, nothing is on here. And I'll show you where the probe is. So I'm just holding the probe here sitting in space. In this local environment, it's a pretty noisy environment. We're getting some of this pickup here at 677 kHz, and then we've got another peak here at 1 MHz. I'm not sure what these are. Again, it's a noisy environment. Could be communications. Could be from, you know, 670 is probably a switch-mode power supply. If I hold this probe near my laptop, watch what happens. Oh my gosh. Look at all the noise coming from my laptop. This is just the keyboard of my laptop. So we're getting a lot of near-field emissions. Okay? But now, just so we are consistent, here are the emissions from these boards. There's nothing there because they're not on. Right? So this is background that we're seeing. Now let's turn on this first one. All I'm going to do is run really, really simple code. There's nothing special about it. Really simple code. And now I'm going to bring my probe in close proximity. We're looking at the radiated emissions. Look at that. Oh my gosh. Now what do we see? We see a couple of very strong peaks coming up. Here's 16 MHz. The next one is 24, and the next is 32, a large 32. What does that mean? Well, the clock frequency for this guy is 16 MHz. We're getting some intermediate sub-harmonic frequency components because of the code that's running here, the waveforms that are coming out. And we're getting the second harmonic 32 MHz as well. Why do we get 16 MHz? That's the clock frequency. It doesn't mean the clock is radiating because all of the IOs that are switching and all of the operations taking place are synchronous with the clock. It doesn't mean the clock line is radiating. All it means is there are signals that are switching coincident with and synchronous with the clock that are doing the radiating. And look at all of this wideband stuff over here. The wideband, what does that mean? I'm moving it far away, moving it close. Clearly, it's coming from the board, and all this wideband stuff means we're getting sharp impulses in the time domain. Now, this is from the top of the board. Let's look at the bottom of the board. Here's the bottom of the board. I'm going to put the probe underneath. I don't know about you, but I don't see a whole lot of difference. In fact, it may be just as much or more radiated emissions from the near-field emissions from the bottom of the board as from the top of the board. A lot of radiated emissions. So, but you know, okay, it's a DIP package, it's old board design. But I don't know if it's possible to see here, if I hold it up here. On this board, there is copper pour on the bottom. They're nice signal lines. Copper pour and you can see those via holes. Those via holes are supposed to be connecting all the copper pour regions together. So it's like having continuous ground thinking, oh, I'll just throw ground everywhere and then use these little via holes in order to connect them together. And we saw this huge amount of near-field radiated emissions. Let's take a look at another board. So I just disconnected this one. And now let's turn on the second one. And the second one, another commercial board. You can see here from SparkFun. I love the guys at SparkFun. They're down the street from us. They have some great products. I'm powering it on. We'll do the same test. So here's our 10x probe. Keep it far away. We're looking at this background. I live in a noisy environment here. And now I bring it in close proximity. And look, we get some large peaks here. We got 16 MHz. We got 32 MHz. 16 MHz clock. Here's the second harmonic. And notice also we get some broadband stuff going on over here. So I bring it far away, all gone, bring it close. This is clearly near-field emissions. We got some stuff going on here. Near-field emissions coming from this board. And of course, if I look in the bottom, same thing. Gee, I get radiated emissions from the bottom of this board as well because again, it is copper pour on the bottom of the board. But in this case, I don't see very many shorting vias. It looks like there's maybe one via per pour region that's shorting out the pour from the top to the bottom. But the rest of it is just copper pour and a lot of radiated emissions. Now, here's the third board. These are two commercial boards. This is one of the boards that we use in one of my classes. The students design and build this board, but we use the right design principles. And on this board, there is no copper pour. It is a continuous ground plane. There are no signals or if there are signals, a little region here where there are a few signals routed, but they're kept very, very short. And so it's a continuous ground plane on the bottom of the board and we have really good signal routing on the top so we don't cross gaps and we don't have copper pour. There's no copper pour on the surface of this board. Let's look at the near-field radiated emissions from it. So we're going to turn it on and they're all running the same code. It's just basically the boot load code. So here are the near-field emissions. Now, if you look closely, yeah, I can see the 23, 24 MHz over here. Move it far away, move it close. I'm getting the clock frequencies. There was a 16 MHz guy. Let's see. 16 MHz. There's 23 MHz, 16 MHz. Here's 23. A few other high frequency components there, multiples of the clock, but that's about it. Getting the RF pickup from the FM radio stations because my board's a little bit of an antenna, but hardly any radiated emissions from this board. And when I look at the bottom, I don't know about you guys but for the life of me, move it away, move it close. I do not see any near-field emissions from this board. This is an example of how we can design the layout of the board correctly. This is part of the principles that we teach in my class on practical PCB design. If you reduce the signals crossing gaps in the bottom plane, whether they are connected with vias or not, if you reduce the gaps in the plane and don't use copper fill, you can dramatically reduce both the ground bounce noise and near-field radiated emissions. There is just no near-field radiated emissions from this board. Dramatic reduction compared to exactly the same components, exactly the same board, but this one has copper pour everywhere. And so when they routed this board, every place they didn't have signal lines, they put copper pour and then they put one via between the copper island from the top and the bottom in some cases. And we saw the dramatic increase in radiated emissions, and especially the case in this one. All this demonstrates is I hear over and over and over again that, oh, if you want to reduce radiated emissions, use copper flood everywhere on all the layers and use enough vias. I don't know what enough vias are, but there were a lot of vias in here and that didn't seem to have any impact on reducing the emissions. Copper pour is not the panacea to reduce near-field radiated emissions. Good design layout is the way to reduce near-field emissions. And again, just because we have near-field emissions doesn't necessarily mean we're going to see those in the far-field. But in this case, I think we probably would get some far-field emissions. Okay. With that, thank you all very much for joining us. Let's go back to the slides a minute to kind of finish up what we've been talking about. We've talked about the frequency domain as a new window to look at signals. We looked at them in the time and the frequency domain. We adjusted the time base of the scope so we can change the resolution and the bin size of the spectrum. We adjusted the sample rate to control the highest frequency. We used a windowing function like the von Hann or Blackman-Harris in order to match the waveforms at the ends so that we don't have the artifact of that discontinuity. And then we use spectral analysis to look at the signature or what we sometimes refer to as the fingerprint of the source. And we illustrated a couple of examples here of looking at noise from power sources. We didn't even look at the voltage on the power rail itself. This was just the near-field emissions from these power sources. And we applied the spectral analysis to sniff out the noise on those power rails. And, also, we looked at the near-field radiated emissions from a couple of different boards to identify that just because you have copper pour in a layer is no guarantee that you're going to have good low radiated emissions. In fact, it can dramatically enhance the near-field emissions if you're not careful. And so with that, I just wanted to remind you there are a bunch of other webinars that we have on this and related topics. So I invite you to visit our landing page for all the events. You can look at webinars coming up and you can also view all of the previous webinars that have been presented. These are all available on demand and of course everything is free. And then you can also download MAUI Studio and you can perform these same kinds of spectral analysis that I've been showing you here, using MAUI Studio. And with that, I'm going to throw the floor open to questions. Thank you all very much. Thanks, Eric. Thanks everybody for attending. Eric, you want to pull up the questions? Sure. Okay, great. Yeah. So, there are only a couple questions here right now. And they're both related to the windowing function. Let's see, the first question is, what are the design trade-offs considered when choosing a window? And why not always use Blackman-Harris? First, I'm going to tell you I'm not an expert on the trade-offs of the windowing functions. As you can see the different windowing functions balance the combination of the resolution and the spectral leakage. And so generally if you want the higher resolution, then you sacrifice a little bit of the spectral leakage. So it's the shape of that curve. Generally, unless you have a strong compelling reason, you understand the trade-offs, either that von Hann or the Blackman-Harris are the ones I recommend. Okay, so I'm not the expert but we have some experts that are coming. I asked that question and I got an answer that I didn't understand all the details of but it was all about esoteric issues of specific signal processing that you may be interested in. If you are really into the weeds in signal processing, then you probably understand the trade-offs better than I do. So I can't really give you a good answer on that other than von Hann and Blackman-Harris work really well. Let's see, similar kind of question. What's the purpose of the flat top window? I'm not sure that it's there for a specific purpose other than the fact it's free. I mean that gives you an idea of what you're going to get with no windowing. And it's always nice to have an opportunity to turn off a special feature, so you can look at the raw signal without any additional processing. So I think it's there just because it's easy and it's free. Let's see. When you powered the fan, if you increase the current, the supply might have longer switch times and the flat response might start to drop off with frequency. That would be interesting to see. Yeah, so this question is really about the signature of the switching noise that we see due to the current draw. Now I apologize, maybe I didn't explain it very clearly. We were looking at the noise from the power supply. The electronic load I was using was literally a DC load. There was no switching in the load. The purpose of that fan was a very low power fan was just to cool the MOSFET that was drawing the current. So there's no switching at all. All the switching happened in the power supply. And so the presence of the fan was just to cool the DC MOSFET, but the current draw obviously changes. We saw changes in switching frequency, changes the pulse width modulation depending on the nature of the switch-mode power supply, but clearly increased the switching noise amplitude. Let's see. And then another question for FFT when using windowing functions, we also observed a DC component. Oh, that was such a good question and I apologize again. A lot to talk about on this topic. I did not cover the DC component. And so when you take a Fourier transform, the zero frequency component is the DC or the average. And we calculate that as well. I glossed over that. So in addition to the harmonics of the window that we're calculating, we also calculate the DC component and that's displayed at the zero frequency. On the graphs that I showed when we plotted it, I actually pushed the button to suppress the DC value. And so we ignored that in this particular case, but that information is available when you do an FFT. Let's see. So one person, well thank you for the nice compliments. Let's see, I'm just scanning through the questions. Well, okay. So I purposely wanted to show this example at the end of my three different microcontroller boards and the role of copper pour in there because I'm hearing a lot. I've got a student group and one of my colleagues here, Professor Piket-May, we're doing a project on investigating the role of copper pour in crosstalk and EMI. And I hear from a lot of folks about how although they always use copper flood on a layer, it's supposed to suppress EMI. In principle if you do everything right it might, but I rarely see a board where engineers have implemented it correctly. And so I wanted to show this example that if you just arbitrarily use copper pour, you can dramatically increase the near-field emissions. And so here's a question. Let's see. The well-designed PCB had copper pour on the outer layers, correct? If it wasn't broken by traces and the PCB had additional, and again I apologize I glossed over quickly. That is not correct. The well-designed board used a solid continuous return plane on the bottom layer. It's created by drawing a polygon and using copper fill in the polygon, but there are no traces in the bottom layer. It is a solid ground plane and on the top layer, so all of these examples I showed are two-layer boards and on the top layer there are just the signal and power traces. There is no copper flood on the top layer. That's what I mean by a well-designed board. There is no need to add copper pour on the top layer to suppress crosstalk, to suppress EMI. The best example of those three boards was no copper pour or flood on the top layer, just signal and power traces. It's where the other two boards, commercially done boards, you route all the traces on the top and bottom layer and then you flood the top and bottom with copper. Those are the ones that radiate like a banshee as we saw. Let's see, will you be doing any webinars relating to your new book coming out? Well, thank you for this opportunity to plug my new book coming out. So we have a new book coming out, which is a practical guide to PCB design basically, and I go over a lot of these details about how to reduce crosstalk, switching noise, and by the way, if you reduce ground bounce, as you hear from many of the EMI experts out there, you also will dramatically reduce near and far-field radiated emissions. And so I'll probably be showing some future webinars. We'll do a few more examples showing some of the boards that my students designed based on these principles. And I think the book's coming out in the September-October timeframe and we'll definitely plug it at every opportunity. Let's see. Clock is narrowband noise and DC-DC noise is wideband noise. Okay, so the last question here, and then there are a few others that we'll take on offline and we'll do like we've always been doing. We'll take these questions. I'll record the answers. We'll post them on the landing page for this webinar. The last question is, the clock is narrowband noise and DC-DC noise is wideband noise. So the clock is narrowband. It's at a very specific frequency and of course the harmonics. The DC-DC converter and other lower frequency noise when it occurs as an impulse, when it's low frequency, that is in the tens of kHz range, that's typical kind of frequency for switching for a switch-mode power supply. When the noise is an impulse, it's a sharp pulse of noise at the switching frequency, that low switching frequency. As we saw, when you have a repetitive pulse, the frequency response is wideband and flat. And it's at the switching frequency, but that's in the 10-20 kHz range. And so we see 10-20 kHz of repetitive pulses that are peaks in the frequency range that are flat and they go into very high frequency and they spread out and so it looks flat. And so it's still repetitive switching noise frequency components that have a very wide frequency distribution and they spread out eventually from that low frequency in the 10-20 kHz range. Okay, so with that, we've kind of run out of time and Hilary's bringing the hook out for me. So thank you all for joining us here. We will take the questions that have been posted here. We will answer them offline and we'll post all of the answers on the landing page for the presentation. So with that, I'm going to turn it back to Hilary and thanks everybody for joining us today. Thanks Eric, and thanks everyone for joining us. We appreciate you staying after to answer the questions. Stay tuned, many more webinars coming up from Eric and other presenters. If you have a topic that you're interested in and you don't see it, send me an email. So everyone stay safe, stay healthy and have a great afternoon. Thank you.