Some Pre-layout Power Spectrum Analysis Tips in Altium Designer
Take advantage of your simulation tools before test and measurement.
Here I want to expand a bit on the power spectrum analysis features in Altium Designer®. In a previous post, we looked at working with simulations involving a frequency modulated signal fed into a nonlinear component (an NPN transistor). In this simulation, we ended with the Fourier spectrum at the load resistor for various values of base voltage/current. In the time-domain, various levels of clipping could be seen, depending on the exact base current.
If you want to get a better idea of how your circuits affect complex analog signals, you can take advantage of some tools in Altium Designer to help you examine how nonlinearities lead to signal distortion. If you don’t feel like working with these built-in features, you can export your data to a .CSV file and import it into your favorite graphing and analysis program. I’ll show you some tips and tricks for working with the frequency analysis tools in Altium Designer so that you can better understand the behavior of your circuits.
Getting Started With Power Spectrum Analysis
Going back to an NPN transistor circuit simulation, if you run a transient analysis with a frequency modulated source, you’ll see the behavior of the circuit in the time domain. The time domain simulation results will reveal the presence of any clipping in your analog signals, and you can examine how clipping sets in as different parameters are swept in the simulation. This nicely shows how the signal can get distorted in the time domain, but it doesn’t show how the signal is affected in the frequency domain.
The first step in taking your time-domain results and examining them in the frequency domain is to look at a fast Fourier transform (FFT). If you take a look at the FFT results in the image below, it may seem like there are a number of peaks being generated by the NPN transistor as saturation is reached. It is important to note that these bars are just placeholders for data points in the Fourier spectrum. To get a better idea of the real power spectrum, you’ll need to use an estimation algorithm (such as Welch’s method) or interpolation. Interpolation is a quick and dirty way to get some useful results from your FFT results and propose some possible design changes to improve signal integrity.
If you follow the steps in the previous article, you’ve probably gotten up to the point where you have some transient analysis results, which show signal behavior in the time domain. To create an FFT chart for your time domain data, just open the Chart menu and click “Create FFT Chart”. You’ll see a set of bar graphs that show your signal behavior in the frequency domain.
Fourier spectrum for the load resistor current and power in an NPN transistor circuit
If you want to bring this data into an external utility, such as Excel, MATLAB, Origin, or any other graphing/analysis tool, you can easily export this data into a CSV or other delimited file. With the FFT results selected in your simulation window, go to File -> Export -> Chart. You’ll see some options to select which sets of data to export, as well as some options for delimiting in your data file.
Example: Power Spectrum Comparison
Just to keep things accessible to a broad audience, I’ve brought my data into Excel as I want to compare the various signals in my circuit. Each spectrum was generated at a different base voltage; for the range of input values for the FM source (0.25 V offset plus 0.25 V amplitude) and component values, the NPN circuit I’m working with just begins saturating when the base bias voltage is 7 V. Below this value, there is severe saturation and clipping in the time domain, although the modulating behavior is unchanged in the time domain.
To generate a graph for comparison, I first normalized each power spectrum against its maximum power value above DC on a linear scale (i.e., above 10 kHz in the linear power spectrum). I then converted the normalized values to dB and plotted them on a graph for comparison. The graph below shows my results.
Power spectrum for the load resistor power
As a reminder, my carrier frequency for my input signal was 1 MHz, and the modulation index was 5 with a 100 kHz modulating signal. Here, we can see the saturated waveforms (V_BE = 1 V and 3 V) display ~5 to 10 dB higher harmonic content above the 3rd order harmonics compared to the lower base voltage values (V_BE = 5 V and 7 V). The two waveforms with the larger V_BE values have similar power spectra, which is consistent with their time domain waveforms. The time-domain waveform for V_BE = 5 V only slightly saturates, indicating we could run this particular circuit ta V_BE = 5 V instead of V_BE = 7 V. You could reach some of the same conclusions if you work with a linear power spectrum, although placing the data on a logarithmic scale makes any differences more obvious.
Other Analyses You Can Use
The same process for exporting your Fourier data can be used to export your time domain data to an external tool for further analysis. With more complicated simulated signals, there are some analyses you can use in the time domain before working in the frequency domain. Some examples include autocorrelation or windowing prior to applying an FFT. Regarding autocorrelation, you can use the autocorrelation to determine the power spectrum, which can then be used to extract the impulse response function for a linear circuit (note that transfer functions and impulse response functions are not defined for nonlinear circuits). This then tells you exactly how an input signal is transformed to an output in the time domain or frequency domain.
The case presented here is just one example that involves a single parameter sweep, but you could also perform multiple parameter sweeps for different components in your signal chain. You can link changes in component values directly to signal distortion in the time domain and in a power spectrum analysis. This is particularly important with more complicated circuits and signal chains with nonlinear elements, where the sensitivity of your signals to changes in different component values is not always obvious.
Thanks to the simulation tools in Altium Designer, you can take your schematic data and quickly perform a number of analyses in the time and frequency domains, including power spectrum analysis. The graph editor tools include a number of standard functions you can use to examine signal behavior, or you can easily export your data for use in other analytical and graphing tools.