|
5
Analyzing Signals with SigCalc
Introduction
The Signal Calculator has several signal analysis capabilities, including FFT, Histogram, Eye Diagram, Scatter Plot, X versus Y plot, and correlation analyses. The following exercises demonstrate these capabilities.
FFT Analysis
The Fast Fourier Transform (FFT) is an analysis tool that shows the frequency components of a signal.
Generate the Signal
- If you have not already done so, open the Signal Calculator signal page.
- If there are any signals in the signal page, delete them.
- Click on the Gen-Square icon.
- Verify that the Generate Square Wave options are set as follows:
- Click on the OK button.
SigCalc generates the square wave, creating signal S1 in the signal display area.
Generate the Analysis Plot
- Select the square wave signal, S1.
- Click on the FFT icon.
This displays the FFT Analysis dialog box. For this exercise, leave the dialog box options at their default settings:
- FFT Length:1024
- Window Type: Rectangular
- Plot Type: dB
Note: The Resource File option lets you save and restore your analysis plot customization, such as the colors and plot line styles. For more information, see Chapter 9, "Analyzing Signals," of the Signal Calculator User's Guide.
- In the dialog box, click on the OK button.
SigCalc performs an FFT analysis and displays the results in an FFT analysis window. The window contains two plots. The top plot shows the magnitude in decibels and the bottom plot shows the phase in radians. The peaks in the magnitude plot represent the various frequency components of the square wave.
- Click on the magnitude plot.
A cross-hair cursor appears in the magnitude plot and snaps to the nearest data point. The footer box provides information on the data point marked by the cursor.
- Hold down the Shift key and click on the plot again.
A cross-hair cursor appears in both the magnitude and phase plots, as shown in Figure 5-1. Holding down the Shift key forces the two cursors to be aligned vertically.
Figure 5-1 FFT Analysis Results
Use the Analysis Plot
- Press the right cursor arrow key several times.
With each key press, the cross-hair cursor moves to the right by one data point and the data fields at the bottom of the plot are updated accordingly.
- Hold down the Shift key and press the right cursor arrow key a few more times.
Holding down the Shift key keeps the two cursors aligned vertically.
- In the FFT Plot window, execute the following command:
Edit-Magnitude-AxesThis displays the Edit Magnitude Axes dialog box, which lets you control the characteristics of the x and y axes of the magnitude plot. There are two tabbed pages: one for controlling the x axis and the other for controlling the y axis.
- In the X Axis page, change the Max setting from 0.5 to 0.1, then click on the OK button.
The plot is redrawn using the new scale.
- If you would like to explore the other available graph options, try any or all of the commands in the Edit-Magnitude pulldown menu. Each such command displays a dialog box that lets you control the FFT magnitude plot. If you need help on using a dialog box, click on the Help button in the dialog box.
- Close the FFT Plot window using the following command:
Editing Complex Signals
The Signal Calculator lets you display, edit, and analyze complex signals. In the following exercise, you generate two Gaussian noise signals, combine them to make a complex signal, and practice selecting parts of the complex signal.
The "random" noise generated by the Signal Calculator is actually a very long pseudorandom sequence. The equation used to generate the sequence starts with a value called the noise seed. If the noise seed is changed, the pseudorandom sequence it starts changes as well.
Generate Gaussian Noise Signals
- Select and cut the square wave signal, S1.
- Set the window size to 1000 points if it is not already set to 1000 in the Win Size field.
- Click on the WGN icon.
This displays the Generate White Gaussian Noise dialog box.
- Toggle on the Variance option.
- Fill in the dialog box as follows:
- Click on the Apply button.
The Signal Calculator generates a white noise signal having a Gaussian distribution.
The Seed value is automatically updated to a new value in the dialog box. This happens every time you generate a random-noise signal.
- Click on the Apply button again.
The Signal Calculator generates another white Gaussian noise signal. Because a new noise seed was used to generate the signal, the two random-data signals are not correlated to each other.
- Click on the Cancel button to remove the dialog box.
Create the Complex Signal
- Select S1.
- Hold down the Control key and select S2, so that both S1 and S2 are selected.
- Execute the following command:
Edit-Convert Type-Complex DoubleThe Signal Calculator combines the two selected signals to create a new complex signal, displayed as S1. These noise signals are shown in Figure 5-2.
Figure 5-2 Complex Signal Made from Two Signals
Selecting the Complex Signal
You can edit each component of a complex signal separately, or you can edit both components together, depending on how you select the signal or range of points. Try the following selection techniques:
- To select both components of the whole complex signal, click on the S1 button.
- To select all of the real component only, double-click on the real (top) component waveform.
- To select all of the imaginary component only, double-click on the imaginary (bottom) component waveform.
- To select a range of points in the real component only, press, drag, and release within that component as you would for an ordinary signal.
- To select a matching range of points in both components, press at the starting point in the real component, drag down into the imaginary component and over to the ending point, and release.
Magnitude/Phase Display Mode
The default display mode for complex signals is the Real/Imaginary mode. You can also display signals in the Magnitude/Phase mode.
- Click on the S1 button to select the whole complex signal.
- Execute the following command:
Edit-PropertiesThis displays the Edit-Properties dialog box, shown in Figure 5-3.
Figure 5-3 Edit-Properties Dialog Box
- Using the Signal Display Format option button, change the display mode from Real/Imag to Mag/Phase-Radians and click on the OK button to make the change.
Figure 5-4 shows the results.
Figure 5-4 Magnitude/Phase Display Mode
Histogram
A histogram is a bar graph showing the number of data points whose values fall within specific ranges. When you generate a histogram plot, the horizontal scale of the selected signal is divided up into equal-sized ranges called "bins." The numbers of points that fall within each bin are plotted as a function of the bin number.
In the following exercise, you generate a histogram for one of the two white Gaussian noise signals and then for the magnitude component of the complex signal.
Generate a Histogram
- Select S2, the white Gaussian noise signal.
- Click on the Histo icon in the command palette.
This displays the Histogram Analysis dialog box.
- Fill in the dialog box as follows:
- Click on the Apply button.
The Signal Calculator generates a histogram and displays it in a Histogram Plot window. The histogram follows the bell-shaped curve of the Gaussian distribution. The center value of each bin is marked on the x axis. The bin intervals are determined by the total number of bins (20) and the minimum and maximum values occurring in the signal.
Modify the Histogram Plot
- In the Histogram Plot window, execute the command:
Graph-BothThe Histogram Plot window shows both a probability distribution plot (vertical bars) and a cumulative distribution plot (triangles joined by lines), as shown in Figure 5-5.
Figure 5-5 Histogram of Gaussian Noise Signal
The probability distribution plot shows the probability that a data point taken at random from the selected signal will fall into any particular bin. The sum of the probabilities for all 20 bins is 1.0.
The cumulative distribution plot shows the cumulative percentage of all data points that fall in a particular bin and all lower bins. This plot starts at a small value for the first bin and increases to 100 percent for the last bin.
- In the Histogram Plot window, execute the following command:
- Click on a data point in the plot.
The cross-hair cursor jumps to the nearest data point in the foreground plot, which is the cumulative distribution plot.
Note: In an analysis plot containing bars such as the current one, only the horizontal cross hair is displayed.
- Execute the following command:
- In the Region dialog box, toggle on and set the two options as follows:
- Click on the OK button.
SigCalc generates a new histogram using a set of 20 uniform bins ranging from -3.0 to 3.0.
Generate Another Histogram
- In the signal page, double-click on the magnitude (top) component waveform of S1 to select all of that component.
- With the Histogram Analysis dialog box options still set the same as before, click on the OK button.
The Signal Calculator generates and displays another histogram using a separate Histogram Plot window.
This time, the histogram follows the Rayleigh distribution, as shown in Figure 5-6.
Figure 5-6 Histogram of Magnitude Component
Eye Diagram
An eye diagram is a superimposed plot of consecutive sections of a signal, plotted on a normalized time scale. By superimposing sections of a communications signal having a particular time length, you can examine the effects of timing jitter, phase jitter, and interference.
For this exercise, you create a type of communications signal, a band-limited QPSK (Quadrature Phase-Shifted Keying) signal with a small amount of noise added. You display an eye diagram of the signal and view the noise effects.
Create the QPSK Signal
A QPSK signal is a complex signal whose real and imaginary components each vary between two different levels, -1 and +1. The signal levels remain constant for a period of time called the "symbol" period and can change at the end of each such period. Each "symbol" represents one of four possible values because each of the two components can have either of two values.
To generate a QPSK signal with a random data stream, follow these steps:
- In the signal page, execute the following command:
- Fill in the dialog box as follows:
- Click on the Apply button
The Signal Calculator generates a signal having a random data stream that alternates between 0.0 and 1.0. The signal always remains constant for 16 data points (a period of 1 second). After each period of 16 data points, the signal either changes or does not change to the opposite value.
- In the Generate Random Bits dialog box, click on the OK button.
The Signal Calculator generates another Random Bits signal, not correlated to the first one.
- Select S1 and S2, the two new Random Bits signals.
- Execute the following command:
Edit-Convert Type-Complex DoubleThe Signal Calculator combines the two selected signals to create a new complex signal, S1, as shown in Figure 5-7.
Figure 5-7 Complex Signal with Random-Bits Components
- To make each signal component vary between -1 and +1 rather than 0 and +1, multiply the whole signal by 2 and subtract (1+j). Use the following sequence of buttons:
The resulting signal is displayed in the TMP signal window.
- Click on the Store button to store the new signal as S1 in the signal page, as shown in Figure 5-8.
Figure 5-8 Unmodified QPSK Signal (S1)
Filter the QPSK Signal
You now use a lowpass filter to band-limit the QPSK signal.
- Use the option button above the calculator palette to change the palette from Math to Filter.
- Click on the S1 button to select the new QPSK signal.
- Click on the Lowpass Filter button, which is the top-left button in the Filter palette.
- Fill in the Lowpass Filter dialog box as follows:
- Click on the OK button to generate the new signal, which is displayed in the TMP signal window.
- Click on the Store button to store the new signal as S1 in the signal page, as shown in Figure 5-9.
The filter removes the high-frequency components of the input signal, rounding the sharp edges of the waveform. Because the lowpass filter is an FIR filter, there is a signal delay equal to one-half the number of filter taps. As a result, the new signal is offset to the right by 17 data samples with respect to the input signal.
Figure 5-9 Band-Limited QPSK Signal (S1)
Generate a Complex Noise Signal
- Move the target marker to the border between S1 and S2.
- Click on the WGN icon.
- Change the Variance setting to 0.01.
- Click on the Apply button to create a new Gaussian noise signal.
- Click on the OK button to generate another new Gaussian noise signal.
The two new noise signals are S2 and S3.
- If necessary, scroll down to view S2 and S3.
- Select both S2 and S3.
- Execute the following command:
Filter the Complex Noise Signal
- Select S2.
- Click on the Lowpass Filter button.
- In the dialog box, set the Cutoff Frequency to 0.08.
- Click on the OK button.
The result is displayed in the TMP window.
- Click on the Store button to store the new signal as S2 in the signal page.
- If necessary, scroll up to view S1, as shown in Figure 5-10.
Figure 5-10 Filtered Complex Noise Signal (S2)
Add the Signals
- Add S1 and S2 by clicking on the following buttons in sequence:
Button to Select LocationS1
Signal window button
+
Addition button in calculator
S2
Signal window button
=
Execute button in calculator
Store
Store button at bottom of calculator
The sum of the band-limited QPSK signal and the filtered complex noise signal is displayed as S2. Because S2 visually resembles S1, it is a good idea to add a comment line to the signal.
- Click on the S2 comment area, fill in the dialog box with the comment "Band-Limited QPSK Signal with Noise", and press the Return key.
The result is shown in Figure 5-11.
Figure 5-11 Band-Limited QPSK Signal with Noise
Generate the Eye Diagram
- Double-click on the real (top) component of S2 to select all of that component.
- Click on the Eye icon.
This displays the Eye Diagram Analysis dialog box.
- Fill in the dialog box as follows:
- # Samples/Symbol: 16
- # Symbols: 2
- Start Point: 33
The number of samples per symbol is 16 because the QPSK signal level can change every 16 samples. The number of symbols is set to 2, meaning that the width of the plot is 2 symbols (32 data points). The eye diagram should start after the first sample (16 samples) plus the amount of delay due to filtering (17 samples), for a total of 33 samples. Thus, you enter 33 into the Start Point field.
- Click on the OK button.
The Signal Calculator generates an eye diagram and displays it in an Eye Diagram Plot window, shown in Figure 5-12.
Figure 5-12 Eye Diagram
Scatter Plot
A scatter plot, or "I-Q plot", is a plot of individual data points taken from a complex signal at regular intervals, and plotted in the complex plane. The plot shows the loci of the complex signal's In-Phase (real) and Quadrature-Phase (imaginary) components. The data points from a communications signal tend to fall on certain locations in the plot. The characteristic pattern of data points is called a "constellation."
When you generate a scatter plot, you specify the number of data samples per symbol and the starting point number. The Signal Calculator takes one point from each symbol, starting with the specified first data point, and plots them in the complex plane.
The starting point number is important because it establishes the "sampling point" within the symbol. In this case you want to get the sample point at the middle of each symbol. The starting point number should be 25, equal to the filter delay (17 samples) plus one-half the symbol size (one-half of 16 samples).
Generate a Scatter Plot
- Click on the S2 button to select the whole complex signal.
- Click on the Scat icon.
This displays the Scatter Diagram Analysis dialog box.
- Fill in the dialog box as follows:
- Click on the OK button.
The Signal Calculator generates a scatter plot and displays it in a new Scatter Plot window, as shown in Figure 5-13.
Figure 5-13 Scatter Plot
Change the Scatter Plot to a Space Diagram
- In the Scatter Plot window, execute the following command:
- In the Edit Plot Line Style dialog box, change the entry in the Line Pattern field from None to Solid.
- Click on the OK button.
The plot is redrawn using the same data using lines from point to point, as shown in Figure 5-14. This is a space diagram, which shows the transitions from point to point.
Figure 5-14 Space Diagram
X Versus Y Plot
An X versus Y plot is like a scatter plot, except that the plotted values are taken from two real signals (or individual components of complex signals) rather than from one complex signal.
You can use an X versus Y plot to compare the real components of the modified QPSK signals, with and without added noise.
- In the signal page, double-click on the real (top) component of S1 to select all of that component.
- Hold down the Control key and double-click on the real (top) component of S2.
The real components of the two signals should be selected and highlighted, and the Expr field should indicate so with the text (S1.real,S2.real).
- Click on the XvsY icon.
- Without changing the default settings, click on the OK button in the dialog box.
SigCalc generates the plot and displays it in a new XvsY Plot window, as shown in Figure 5-15.
Figure 5-15 X Versus Y Plot
The horizontal axis shows the values of the first selected signal, and the vertical axis shows the values of the second selected signal. Each small cross shows the values of the corresponding data points taken from the two signals. If the two signals were exactly the same, all points would fall exactly on the straight diagonal line representing the equation y=x.
Auto-correlation
An auto-correlation is an analysis that determines the correlation between a signal and itself. A copy of the signal is shifted repeatedly and multiplied by the original signal. You specify the total amount of shift as a number of "lags." The selected signal can be either real or complex.
When you perform an auto-correlation with the Signal Calculator, you specify both the number of lags and the type of display, either single sided or double-sided. A double-sided display shows the full auto-correlation results. A single-sided display shows only the right half of the full result (a mirror image of the left half).
- Click on the S2 button to select the whole complex signal.
- Execute the following command:
Analysis-Auto-CorrelationThis displays the Auto Correlation Analysis dialog box, shown in Figure 5-16.
Figure 5-16 Analysis-Auto-Correlation Dialog Box
- Fill in the dialog box as follows:
- Click on the OK button.
The auto-correlation results are displayed in the TMP signal window in the form of a complex signal, as shown in Figure 5-17.
Figure 5-17 Auto-Correlation Result
The number of points in the result is equal to the number of lags specified in the dialog box. The auto-correlation shows the strongest correlation at the center, where the signal is aligned to itself. Performing an FFT on an auto-correlation yields the power spectrum of the signal.
Cross Correlation
A cross correlation is similar to an auto-correlation, except that it determines the correlation between two different signals rather than a single signal.
- Click on the S1 button to select the whole complex signal.
- Hold down the Control key and click on the S2 button to select the whole complex signal.
Both S1 and S2 should be selected and highlighted.
- Execute the following command:
- In the dialog box, set the number of lags to 65 and click on the OK button.
The cross correlation results are displayed in the TMP signal window. They are almost the same as for the auto-correlation because the two signals are so similar. If you perform a cross correlation of S1 with a random-noise signal, the result is a signal with a very small value and a random pattern.
Signal Properties
You can use the Analysis-Props command to obtain statistical information on a signal.
- Press, drag, and release in a signal waveform to select a range of points.
- Execute the following command:
Analysis-PropsThe Signal Calculator displays the System Message Viewport window, which shows statistical information on the selected signal range. If necessary, use the window manager to enlarge the window so you can see all the text.
The window displays the following information:
- the signal window name and selected point range
- the starting time, point, and point value
- the ending time, point, and point value
- the time and point difference between the starting and ending points
- the minimum, maximum, and mean values in the selected range
- the power of the signal over the selected range
- the variance of the signal over the selected range
The bottom of the message window contains a single line of text showing the memory currently being used by the Signal Calculator.
- In the System Message Viewport, execute the following command:
|
CoWare CoWare's Web Site Phone: 1-888-269-2738 CoWare Customer Support |