Accelerating the pace of engineering and science

# Spectrum Analyzer

Display frequency spectrum of time-domain signals

Sinks

dspsnks4

## Description

The Spectrum Analyzer block, hereafter referred to as the scope, displays frequency spectra of signals. The Spectrum Analyzer block accepts input signals with the following characteristics:

• Discrete sample time

• Real- or complex-valued

• Fixed number of channels of variable length

• Floating- or fixed-point data type

You can use the Spectrum Analyzer block in models running in Normal or Accelerator simulation modes. You can also use the Spectrum Analyzer block in models running in Rapid Accelerator or External simulation modes, with some limitations. See the Supported Simulation Modes section for more information.

You can use the Spectrum Analyzer block inside of all subsystems and conditional subsystems. Conditional subsystems include enabled subsystems, triggered subsystems, enabled and triggered subsystems, and function-call subsystems. See Conditional Subsystems in the Simulink® documentation for more information.

For an example that uses the Spectrum Analyzer, see the Display Frequency-Domain Data in Spectrum Analyzer example in the DSP System Toolbox™ documentation.

 Note:   For information about the Spectrum Analyzer System object, see dsp.SpectrumAnalyzer.

## Signal Display

The Spectrum Analyzer indicates the spectrum computation settings that are represented in the current display. Check the Resolution Bandwidth, Time Resolution, and Offset indicators on the status bar in the scope window for this information. These indicators relate to the Minimum Frequency-Axis limit and Maximum Frequency-Axis limit values on the frequency-axis of the scope window. The values specified by these indicators may be changed by modifying parameters in the Spectrum Settings panel. You can also view the object state and the amount of time data that correspond to the current display. Check the Simulation Status and Simulation time indicators on the status bar in the scope window for this information. The following figure highlights these aspects of the Spectrum Analyzer window.

 Note:   To prevent the scope from opening when you run your model, right-click on the scope icon and select Comment Out. If the scope is already open, you can still comment it out in the model. When you do so, the scope displays a message, "No data can be shown because this scope is commented out." Select Uncomment to turn the scope back on.
• Frequency Span — The range of values shown on the frequency-axis on the Spectrum Analyzer window.

• Resolution Bandwidth — The smallest positive frequency or frequency interval that can be resolved.

• Time Resolution — The time resolution for a spectrogram line.

• Offset — The constant frequency offset to apply to the entire spectrum.

• Simulation Status — Provides the current status of the model simulation.

• Display time — The amount of time that has progressed since the last update to the Spectrum Analyzer display.

### Reduce Plot Rate to Improve Performance

By default, Spectrum Analyzer updates the display at fixed intervals of time at a rate not exceeding 20 hertz. If you want Spectrum Analyzer to plot a spectrum on every simulation time step, you can disable the Reduce Plot Rate to Improve Performance option. In the Spectrum Analyzer menu, select Simulation > Reduce Plot Rate to Improve Performance to clear the check box. Tunable.

 Note:   When this check box is selected, Spectrum Analyzer may display a misleading spectrum in some situations. For example, if the input signal is wide-band with non-stationary behavior, such as a chirp signal, Spectrum Analyzer might display a stationary spectrum. The reason for this behavior is that Spectrum Analyzer buffers the input signal data and only updates the display periodically at approximately 20 times per second. Therefore, Spectrum Analyzer does not render changes to the spectrum that occur and elapse between updates, which gives the impression of an incorrect spectrum. To ensure that spectral estimates are as accurate as possible, clear the Reduce Plot Rate to Improve Performance check box. When you clear this box, Spectrum Analyzer calculates spectra whenever there is enough data, rendering results correctly.

## Toolbar

The Spectrum Analyzer toolbar contains the following buttons.

### Print, Settings, and Properties Buttons

File > PrintCtrl+P

Print the current Spectrum Analyzer window. To enable printing, run the release method.

To print the current scope window to a figure rather than sending it to your printer, select File > Print to figure.

View > Spectrum Settings

N/A

Open or close the Spectrum Settings panel. You can modify the settings in this panel to control the manner in which the spectrum is calculated.

View > Properties

N/A

Open the Visuals — Spectrum Options dialog box.

### Axes Control Buttons

 Tools > Zoom In N/A When this tool is active, you can zoom in on the scope window. To do so, click in the center of your area of interest, or click and drag your cursor to draw a rectangular area of interest inside the scope window. Tools > Zoom X N/A When this tool is active, you can zoom in on the x-axis. To do so, click inside the scope window, or click and drag your cursor along the x-axis over your area of interest. Tools > Zoom Y N/A When this tool is active, you can zoom in on the y-axis. To do so, click inside the scope window, or click and drag your cursor along the y-axis over your area of interest. Tools > Scaling Properties Ctrl+A Click this button to scale the axes in the active scope window.Alternatively, you can enable automatic axes scaling by selecting one of the following options from the Tools menu:Automatically Scale Limits — When you select this option, the scope scales the axes as needed during simulation.Scale Limits after 10 Updates — When you select this option, the scope scales the axes after 10 updates. The scope does not scale the axes again during the simulation. Scale Limits at Stop — When you select this option, the scope scales the axes each time the simulation is stopped.

 Note:   The axes control (zoom) buttons do not change the settings related to frequency span for Spectrum Analyzer. These buttons are purely graphical. Spectrum computations are not affected when you zoom.

### Measurements Buttons

 Tools > Measurements > Cursor Measurements N/A Open or close the Cursor Measurements panel. This panel controls the display of vertical and horizontal cursors on the spectrum display.See the Cursor Measurements Panel section for more information. Tools > Measurements > Peak Finder N/A Open or close the Peak Finder panel. This panel displays maxima and the frequencies at which they occur, allowing the settings for peak threshold, maximum number of peaks, and peak excursion to be modified. See the Peak Finder Panel section for more information. Tools > Measurements > Channel Measurements N/A Open or close the Channel Measurements panel. This panel displays occupied bandwidth and ACPR channel measurements. See the Channel Measurements Panel section for more information. Tools > Measurements > Distortion Measurements N/A Open or close the Distortion Measurements panel. This panel displays harmonic and intermodulation distortion measurements. See the Distortion Measurements Panel section for more information. Tools > Measurements > CCDF Measurements N/A Open or close the CCDF Measurements panel. This panel displays complimentary cumulative distribution function measurements. See the CCDF Measurements Panel section for more information.

You can control whether this toolbar appears in the Spectrum Analyzer window. From the Spectrum Analyzer menu, select View > Toolbar.

## Simulation Toolbar

The Simulation Toolbar contains the following buttons.

Simulation >
Simulation Stepping Options

N/A

Open the Simulation Stepping Options dialog box. This button appears only when you have previous stepping disabled.

Simulation >
Step Back

N/A

Advance the model simulation backward by one time step. This button appears only when you have previous stepping enabled and the model simulation is paused.

Simulation >
Run

Ctrl+T, p, Space

Start the model simulation. This button appears only when the model simulation is stopped.

Simulation >
Continue

p, Space

Continue the model simulation. This button appears only when the model simulation is paused.

Simulation >
Pause

p, Space

Pause the model simulation. This button appears only when the model simulation is running.

Simulation >
Step Forward

Right arrow, Page Down

Advance the model simulation forward by one time step. This button starts the model simulation, allows it to run for one time step, and then pauses it again. The scope window then updates with the latest data.

Simulation >
Stop

Ctrl+T, s

Stop the model simulation. This button appears only when the model simulation is running or paused.

Simulation >

N/A

Take a snapshot of the current scope display. This button temporarily freezes the scope display, while allowing simulation to continue running. To unfreeze the scope display and view the current simulation data, toggle this button to turn off snapshot mode.

View >

Ctrl+L

Bring the model window forward, and highlight the scope block whose display you are currently viewing. The scope block that corresponds to the active scope window flashes three times in the model.

You can control whether this toolbar appears in the scope window. From the scope menu, select View > Simulation Toolbar.

To see a full listing of the shortcut keys for these simulation controls, from the scope menu, select Help > Keyboard Command Help.

## Spectrum Settings

The Spectrum Settings panel appears at the right side of the Spectrum Analyzer figure. This panel enables you to modify settings to control the manner in which the spectrum is calculated. You can choose to hide or display the Spectrum Settings panel. In the Spectrum Analyzer menu, select View > Spectrum Settings. Alternatively, in the Spectrum Analyzer toolbar, select the Spectrum Settings button.

The Spectrum Settings panel is separated into three panes, labeled Main Options, Window Options, and Trace Options. You can expand each pane to see the available options.

### Main Options Pane

The Main Options pane enables you to modify the main options.

• Type — The type of spectrum to display. Available options are Power, Power density, and Spectrogram. When you set this parameter to Power, the Spectrum Analyzer shows the power spectrum. When you set this parameter to Power density, the Spectrum Analyzer shows the power spectral density. The power spectral density is the magnitude of the spectrum normalized to a bandwidth of 1 hertz. When you set this parameter to Spectrogram, the Spectrum Analyzer shows the spectrogram, which displays frequency content over time. The most recent spectrogram update is at the bottom of the display and time scrolls from the bottom to the top of the display.Tunable

• Channel — Select the signal channel for which the spectrogram settings apply. This option displays only when the Type is Spectrogram and only if there is more than one signal channel input.

Sample rate (Hz) — The sample rate, in hertz, of the input signals.

 Note:   The Spectrum Analyzer block always sets this parameter to Inherited. The sample rate is always the same as the input signal, and cannot be modified directly.
• Full frequency span — Enable this check box to have Spectrum Analyzer compute and plot the spectrum over the entire Nyquist frequency interval. By default, when the Two-sided spectrum check box is also enabled, the Nyquist interval is $\left[-\frac{SampleRate}{2},\frac{SampleRate}{2}\right]+FrequencyOffset$ hertz. If you clear the Two-sided spectrum check box, the Nyquist interval is$\left[0,\frac{SampleRate}{2}\right]+FrequencyOffset$ hertz. Tunable.

• Span (Hz) and CF (Hz), or FStart (Hz) and FStop (Hz) — When Span (Hz) is showing in the Main Options pane, you define the range of values shown on the frequency-axis on the Spectrum Analyzer window using frequency span and center frequency. From the drop-down list, select FStart (Hz) to define the range of frequency-axis values using start frequency and stop frequency instead.

• Span (Hz) — The frequency span, in hertz. This parameter defines the range of values shown on the frequency-axis on the Spectrum Analyzer window. Tunable.

• CF (Hz) — The center frequency, in hertz. This parameter defines the value shown at the middle point of the frequency-axis on the Spectrum Analyzer window. Tunable.

• FStart (Hz) — The start frequency, in hertz. This parameter defines the value shown at the leftmost side of the frequency-axis on the Spectrum Analyzer window. Tunable.

• FStop (Hz) — The stop frequency, in hertz. The parameter defines the value shown at the rightmost side of the frequency-axis on the Spectrum Analyzer window. Tunable.

• RBW (Hz) / Window length — The frequency resolution method.

If set to RBW (Hz), the resolution bandwidth, in hertz. This property defines the smallest positive frequency that can be resolved. By default, this property is set to Auto. In this case, the Spectrum Analyzer determines the appropriate value to ensure that there are 1024 RBW intervals over the specified Frequency Span.

If you set this property to a numeric value, then you must specify a value that ensures there are at least two RBW intervals over the specified frequency span. In other words, the ratio of the overall frequency span to RBW must be at least two: $\frac{span}{RBW}>2$. Tunable.

If set to Window length, the length of the window, in samples, used to control the frequency resolution and compute the spectral estimates. The window length must be an integer scalar greater than 2.

. Tunable.

The time resolution value is determined based on frequency resolution method, the RBW setting, and the time resolution setting.

Frequency Resolution RBW SettingTime Resolution SettingTime Resolution
'RBW''Auto''Auto'1/RBW s
'RBW''Auto'Manually enteredTime Resolution s
'RBW'Manually entered'Auto'1/RBW s
'RBW'Manually enteredManually enteredMust be equal to or greater than the minimum attainable time resolution, 1/RBW s. Several spectral estimates are combined into one spectrogram line to obtain the desired time resolution. Interpolation is used to obtain time resolution values that are not integer multiples of 1/RBW s.
'Window Length''Auto'1/RBW s

RBW = (NENBW*Fs)/Window Length, where NENBW is the normalized effective noise bandwidth of the specified window.
'Window Length'Manually enteredMust be equal to or greater than the minimum attainable time resolution, (NENBW*Fs)/Window Length. Several spectral estimates are combined into one spectrogram line to obtain the desired time resolution. Interpolation is used to obtain time resolution values that are not integer multiples of 1/RBW s.

• NFFT — The number of Fast Fourier Transform (FFT) points. You can set the NFFT only when in Window length mode. This property defines the length of the FFT that Spectrum Analyzer uses to compute spectral estimates. Acceptable options are Auto or a positive, scalar integer. The NFFT value must be greater than or equal to the Window length. By default, when NFFT is set to Auto, Spectrum Analyzer sets the number of FFT points to the window length. When in RBW mode, an FFT length is used that equals the window length required to achieve the specified RBW value.

When this property is set to a positive integer, this property is equivalent to the n parameter that you can set when you run the MATLAB® fft function. Tunable.

• Time res. (s) — The time resolution, in seconds. Time resolution is the amount of data, in seconds, used to compute a spectrogram line. The minimum attainable resolution is the amount of data time it takes to compute a single spectral estimate. The tooltip displays the minimum attainable resolution given the current settings. This property applies only to spectrograms. Tunable

• Time span (s) — The time span over which the Spectrum Analyzer displays the spectrogram, in seconds. The time span is the product of the desired number of spectral lines and the time resolution. The tooltip displays the minimum allowable time span, given the current settings. If the time span is set to Auto, 100 spectral lines are used. This property applies only to spectrograms.Tunable

• Samples/update — The number of input samples required to compute one spectral update. You cannot modify this property; it is shown here for display purposes only. This property is directly related to RBW by the following equation: ${N}_{samples}=\frac{\left(1-\frac{{O}_{p}}{100}\right)×NENBW×{F}_{s}}{RBW}$ or to the window length by this equation: . NENBW is the normalized effective noise bandwidth, a factor of the windowing method used, which is shown in the Window Options pane. Fs is the sample rate. If the number of samples provided in the input are not sufficient to achieve the resolution bandwidth that you specify, Spectrum Analyzer produces a message on the display as shown in the following figure.

### Window Options Pane

The Window Options pane enables you to modify the window options.

• Overlap (%) — The segment overlap percentage. This parameter defines the amount of overlap between the previous and current buffered data segments. The overlap creates a window segment that is used to compute a spectral estimate. The value must be greater than or equal to zero and less than 100. Tunable.

• Window — The windowing method to apply to the spectrum. Windowing is used to control the effect of sidelobes in spectral estimation. The window you specify affects the window length required to achieve a resolution bandwidth and the required number of samples per update. For more information about windowing, see Windows in the Signal Processing Toolbox™ documentation. Tunable.

• Attenuation (dB) — The sidelobe attenuation, in decibels (dB). This property applies only when you set the Window parameter to Chebyshev or Kaiser. You must specify a value greater than or equal to 45. Tunable.

• NENBW — Normalized Effective Noise Bandwidth of the window. You cannot modify this parameter; it is a readout shown here for display purposes only. This parameter is a measure of the noise performance of the window. It is the width of a rectangular filter that accumulates the same noise power with the same peak power gain. NENBW can be calculated from the windowing function using the following equation: . The rectangular window has the smallest NENBW, with a value of 1. All other windows have a larger NENBW value. For example, the Hann window has an NENBW value of approximately 1.5.

### Trace Options Pane

The Trace Options pane enables you to modify the trace options.

• Units — The units of the spectrum. Available options are dBm, dBW, and Watts. Tunable.

• Averages — Specify as a positive, scalar integer the number of spectral averages. This property applies only when the Spectrum Type is Power or Power density. Spectrum Analyzer computes the current power spectrum estimate by computing a running average of the last N power spectrum estimates. This property defines the number of spectral averages, N. Tunable.

• Reference load — The reference load, in ohms, used to scale the spectrum. Specify as a real, positive scalar the load, in ohms, that the Spectrum Analyzer uses as a reference to compute power values. Tunable.

• Scale — Linear or logarithmic scale. This property applies only when the Spectrum Type is Power or Power density. When the frequency span contains negative frequency values, Spectrum Analyzer disables the logarithmic option. Tunable.

• Offset — The constant frequency offset to apply to the entire spectrum. This constant offset parameter is simply added to the values on the frequency-axis in the Spectrum Analyzer window. It is not used in any spectral computations. You must take this parameter into consideration when you set the Span (Hz) and CF (Hz) parameters to ensure that the frequency span is within Nyquist limits. The Nyquist interval is $\left[-\frac{SampleRate}{2},\frac{SampleRate}{2}\right]+FrequencyOffset$ hertz if Two-sided spectrum is selected, and $\left[0,\frac{SampleRate}{2}\right]+FrequencyOffset$ hertz otherwise.

• Normal trace — Normal trace view. This property applies only when the Spectrum Type is Power or Power density. By default, when this check box is enabled, Spectrum Analyzer calculates and plots the power spectrum or power spectrum density. Spectrum Analyzer performs a smoothing operation by averaging a number of spectral estimates. To clear this check box, you must first select either the Max hold trace or the Min hold trace check box. Tunable.

• Max hold trace — Maximum hold trace view. This property applies only when the Spectrum Type is Power or Power density. Select this check box to enable Spectrum Analyzer to plot the maximum spectral values of all the estimates obtained. Tunable.

• Min hold trace — Minimum hold trace view. This property applies only when the Spectrum Type is Power or Power density. Select this check box to enable Spectrum Analyzer to plot the minimum spectral values of all the estimates obtained. Tunable.

• Two-sided spectrum — Select this check box to enable two-sided spectrum view. In this view, both negative and positive frequencies are shown. If you clear this check box, Spectrum Analyzer shows a one-sided spectrum with only positive frequencies. Spectrum Analyzer requires that this parameter is selected when the input signal is complex-valued.

## Measurements Panels

The Measurements panels are the other four panels that appear to the right side of the Spectrum Analyzer figure. These panels are labeled Trace selection, Cursor Measurements, Peak Finder, Channel Measurements, Distortion Measurements, and CCDF Measurements.

### Measurements Panel Buttons

Each of the Measurements panels contains the following buttons that enable you to modify the appearance of the current panel.

ButtonDescription

Move the current panel to the top. When you are displaying more than one panel, this action moves the current panel above all the other panels.

Collapse the current panel. When you first enable a panel, by default, it displays one or more of its panes. Click this button to hide all of its panes to conserve space. After you click this button, it becomes the expand button .

Expand the current panel. This button appears after you click the collapse button to hide the panes in the current panel. Click this button to display the panes in the current panel and show measurements again. After you click this button, it becomes the collapse button again.

Undock the current panel. This button lets you move the current panel into a separate window that can be relocated anywhere on your screen. After you click this button, it becomes the dock button in the new window.

Dock the current panel. This button appears only after you click the undock button. Click this button to put the current panel back into the right side of the Scope window. After you click this button, it becomes the undock button again.

Close the current panel. This button lets you remove the current panel from the right side of the Scope window.

Some panels have their measurements separated by category into a number of panes. Click the pane expand button to show each pane that is hidden in the current panel. Click the pane collapse button to hide each pane that is shown in the current panel.

### Trace Selection Panel

When you use the scope to view multiple signals, the Trace Selection panel appears if you have more than one signal displayed and you click on any of the other Measurements panels. The Measurements panels display information about only the signal chosen in this panel. Choose the signal name for which you would like to display time domain measurements. See the following figure.

You can choose to hide or display the Trace Selection panel. In the Scope menu, select Tools > Measurements > Trace Selection.

### Cursor Measurements Panel

The Cursor Measurements panel displays screen cursors. You can choose to hide or display the Cursor Measurements panel. In the Scope menu, select Tools > Measurements > Cursor Measurements. Alternatively, in the Scope toolbar, click the Cursor Measurements button.

The Cursor Measurements panel appears as follows for power and power density spectra.

The Cursor Measurements panel appears as follows for spectrograms.

 Note:   You must pause the spectrogram display before you can use cursors.

The Cursor Measurements panel is separated into two panes, labeled Settings and Measurements. You can expand each pane to see the available options.

You can use the mouse or the left and right arrow keys to move vertical or waveform cursors and the up and down arrow keys for horizontal cursors.

### Peak Finder Panel

The Peak Finder panel displays the maxima, showing the x-axis values at which they occur. This panel allows you to modify the settings for peak threshold, maximum number of peaks, and peak excursion. You can choose to hide or display the Peak Finder panel. In the scope menu, select Tools > Measurements > Peak Finder. Alternatively, in the scope toolbar, select the Peak Finder button.

The Peak finder panel is separated into two panes, labeled Settings and Peaks. You can expand each pane to see the available options.

The Peak Finder displays the peak values in the Peaks pane. By default, the Peak Finder panel displays the largest calculated peak values in the Peaks pane in decreasing order of peak height. Use the sort descending button ( ) to rearrange the category and order by which Peak Finder displays peak values. Click this button again to sort the peaks in ascending order instead. When you do so, the arrow changes direction to become the sort ascending button ( ). A filled sort button indicates that the peak values are currently sorted in the direction of the button arrow. If the sort button is not filled ( ), then the peak values are sorted in the opposite direction of the button arrow. The Max Num of Peaks parameter still controls the number of peaks listed.

Use the check boxes to control which peak values are shown on the display. By default, all check boxes are cleared and the Peak Finder panel hides all the peak values. To show all the peak values on the display, select the check box in the top-left corner of the Peaks pane. To hide all the peak values on the display, clear this check box. To show an individual peak, select the check box directly to the left of its Value listing. To hide an individual peak, clear the check box directly to the left of its Value listing.

The Peaks are valid for any units of the input signal. The letter after the value associated with each measurement indicates the abbreviation for the appropriate International System of Units (SI) prefix, such as m for milli-. For example, if the input signal is measured in volts, an m next to a measurement value indicates that this value is in units of millivolts.

AbbreviationNameMultiplier
aatto10^–18
ffemto10^–15
ppico10^–12
nnano10^–9
umicro10^–6
mmilli10^–3
10^0
kkilo10^3
Mmega10^6
Ggiga10^9
Ttera10^12
Ppeta10^15
Eexa10^18

### Channel Measurements Panel

The Channel Measurements panel displays occupied bandwidth or adjacent channel power ratio (ACPR) measurements. You can choose to hide or display this pane in the Scope menu by selecting Tools > Measurements > Channel Measurements. Alternatively, in the Scope toolbar, click the Cursor Measurements button.

In addition to the measurements, the Channel Measurements panel has an expandable Channel Settings pane.

• Measurement — The type of measurement data to display. Available options are Occupied BW or ACPR. See Algorithms for information on how Occupied BW is calculated. ACPR is the adjacent channel power ratio, which is the ratio of the main channel power to the adjacent channel power.

When you select Occupied BW as the Measurement, the following fields appear.

• Channel Settings — Enables you to modify the parameters for calculating the channel measurements.

• Channel Power — The total power in the channel.

• Occupied BW — The bandwidth containing the specified Occupied BW (%) of the total power of the spectrum. This setting is available only if you select Occupied BW as the Measurement type.

• Frequency Error — The difference between the center of the occupied band and the center frequency (CF) of the channel. This setting is available only if you select Occupied BW as the Measurement type.

When you select ACPR as the Measurement, the following fields appear.

• Channel Settings — Enables you to modify the parameters for calculating the channel measurements.

• Channel Power — The total power in the channel.

• Offset (Hz) — The center frequency of the adjacent channel with respect to the center frequency of the main channel. This setting is available only if you select ACPR as the Measurement type.

• Lower (dBc) — The power ratio of the lower sideband to the main channel. This setting is available only if you select ACPR as the Measurement type.

• Upper (dBc) — The power ratio of the upper sideband to the main channel. This setting is available only if you select ACPR as the Measurement type.

### Distortion Measurements Panel

The Distortion Measurements panel displays harmonic distortion and intermodulation distortion measurements. You can choose to hide or display this panel in the Scope menu by selecting Tools > Measurements > Distortion Measurements. Alternatively, in the Scope toolbar, click the Distortion Measurements button.

The Distortion Measurements panel has an expandable Harmonics pane, which shows measurement results for the specified number of harmonics.

 Note:   For an accurate measurement, ensure that the fundamental signal (for harmonics) or primary tones (for intermodulation) is larger than any spurious or harmonic content. To do so, you may need to adjust the resolution bandwidth (RBW) of the spectrum analyzer. Make sure that the bandwidth is low enough to isolate the signal and harmonics from spurious and noise content. In general, you should set the RBW so that there is at least a 10dB separation between the peaks of the sinusoids and the noise floor. You may also need to select a different spectral window to obtain a valid measurement.
• Distortion — The type of distortion measurements to display. Available options are Harmonic or Intermodulation. Select Harmonic if your system input is a single sinusoid. Select Intermodulation if your system input is two equal amplitude sinusoids. Intermodulation can help you determine distortion when only a small portion of the available bandwidth will be used.

See Algorithms for information on how distortion measurements are calculated.

When you select Harmonic as the Distortion, the following fields appear.

The harmonic distortion measurement automatically locates the largest sinusoidal component (fundamental signal frequency). It then computes the harmonic frequencies and power in each harmonic in your signal. Any DC component is ignored. Any harmonics that are outside the spectrum analyzer's frequency span are not included in the measurements. Adjust your frequency span so that it includes all the desired harmonics.

 Note:   To best view the harmonics, make sure that your fundamental frequency is set high enough to resolve the harmonics. However, this frequency should not be so high that aliasing occurs. For the best display of harmonic distortion, your plot should not show skirts, which indicate frequency leakage. Additionally, the noise floor should be visible. Using a Kaiser window with a large sidelobe attenuation may help to reduce the skirts.
• Num. Harmonics — Number of harmonics to display, including the fundamental frequency. Valid values of Num. Harmonics are from 2 to 10. The default value is 6.

• Label Harmonics — Select Label Harmonics to add numerical labels to each harmonic in the spectrum display.

• 1 — The fundamental frequency, in hertz, and its power, in decibels of the measured power referenced to one milliwatt (dBm).

• 2, 3, ... — The harmonics frequencies, in hertz, and their power in decibels relative to the carrier (dBc). If the harmonics are at the same level or exceed the fundamental frequency, reduce the input power.

• THD — The total harmonic distortion. This value represents the ratio of the power in the harmonics, D, to the power in the fundamental frequency, S. If the noise power is too high in relation to the harmonics, the THD value is not accurate. In this case, lower the resolution bandwidth or select a different spectral window. THD = 10log10(D/S).

• SNR — Signal-to-noise ratio (SNR). This value represents the ratio of power in the fundamental frequency, S, to the power of all nonharmonic content, N, including spurious signals, in decibels relative to the carrier (dBc). SNR = 10log10(S/N). If you see – – as the reported SNR, your signal's total non-harmonic content is less than 30% of the total signal.

• SINAD — Signal-to-noise-and-distortion. This value represents the ratio of the power in the fundamental frequency, S to all other content (including noise, N, and harmonic distortion, D), in decibels relative to the carrier (dBc). SINAD = 10log10(S/(N+D).

• SFDR — Spurious free dynamic range (SFDR). This value represents the ratio of the power in the fundamental frequency, S, to power of the largest spurious signal, R, regardless of where it falls in the frequency spectrum. The worst spurious signal may or may not be a harmonic of the original signal. SFDR represents the smallest value of a signal that can be distinguished from a large interfering signal. SFDR includes harmonics. SFDR = 10log10(S/R).

When you select Intermodulation as the Distortion, the following fields appear.

The intermodulation distortion measurement automatically locates the fundamental, first-order frequencies (F1 and F2). It then computes the frequencies of the third-order intermodulation products (2*F1-F2 and 2*F2-F1).

• Label frequencies — Select Label frequencies to add numerical labels to the first-order intermodulation product and third-order frequencies in the spectrum analyzer display.

• F1 — Lower fundamental first-order frequency

• F2 — Upper fundamental first-order frequency

• 2F1 - F2 — Lower intermodulation product from third-order harmonics

• 2F2 - F1 — Upper intermodulation product from third-order harmonics

• TOI — Third-order intercept point. If the noise power is too high in relation to the harmonics, the TOI value will not be accurate. In this case, you should lower the resolution bandwidth or select a different spectral window. If the TOI has the same amplitude as the input two-tone signal, reduce the power of that input signal.

### CCDF Measurements Panel

The CCDF Measurements panel displays complimentary cumulative distribution function measurements. CCDF measurements in this scope show the probability of a signal's instantaneous power being a specified level above the signal's average power. These measurements are useful indicators of a signal's dynamic range.

To compute the CCDF measurements, each input sample is quantized to 0.01 dB increments. Using a histogram 100 dB wide (10,000 points at 0.01 dB increments), the largest peak encountered is placed in the last bin of the histogram. If a new peak is encountered, the histogram shifts to make room for that new peak.

You can choose to hide or display this panel in the Scope menu by selecting Tools > Measurements > CCDF Measurements. Alternatively, in the Scope toolbar, click the Distortion Measurements button.

• Plot Gaussian reference — Select Plot Gaussian reference to show the Gaussian white noise reference signal on the plot.

• Probability (%) — The percentage of the signal that contains the power level above the value listed in the dB above average column

• dB above average — The expected minimum power level at the associated Probability (%).

• Average Power — The average power level of the signal since the start of simulation or from the last reset.

Max Power — The maximum power level of the signal since the start of simulation or from the last reset.

• PAPR — The ratio of the peak power to the average power of the signal. PAPR should be less that 100 dB to obtain accurate CCDF measurements. If PAPR is above 100 dB, only the highest 100 dB power levels are plotted in the display and shown in the distribution table.

• Sample Count — The total number of samples used to compute the CCDF.

• Reset — Clear all current CCDF measurements and restart.

## Visuals — Spectrum Properties

The Visuals—Spectrum Properties dialog box controls the visual configuration settings of the Spectrum Analyzer display. From the Spectrum Analyzer menu, select View > Configuration Properties to open this dialog box. Alternatively, in the Spectrum Analyzer toolbar, click the Configuration Properties button.

### Display Pane

When the Spectrum Type is Power or Power density, the Display pane of the Visuals—Spectrum Properties dialog box appears as follows:

When the Spectrum Type is Spectrogram the Display pane of the Visuals—Spectrum Properties dialog box appears as follows:

#### Title

Specify the display title as a string. Enter %<SignalLabel> to use the signal labels in the Simulink Model as the axes titles. This property is Tunable.

By default, the display has no title.

#### Show legend

Select this check box to show the legend in the display. The channel legend displays a name for each channel of each input signal. When the legend appears, you can place it anywhere inside of the scope window. To turn the legend off, clear the Show legend check box. This parameter applies only when the Spectrum Type is Power or Power density. Tunable

You can edit the name of any channel in the legend. To do so, double-click the current name, and enter a new channel name. By default, if the signal has multiple channels, the scope uses an index number to identify each channel of that signal. To change the appearance of any channel of any input signal in the scope window, from the scope menu, select View > Style.

#### Show grid

When you select this check box, a grid appears in the display of the scope figure. To hide the grid, clear this check box. Tunable

#### Y-limits (Minimum)

Specify the minimum value of the y-axis. Tunable

#### Y-limits (Maximum)

Specify the maximum value of the y-axis. Tunable

#### Y-axis label

Specify the text for the scope to display to the left of the y-axis. Regardless of this property, Spectrum Analyzer always displays power units after this text as one of 'dBm', 'dBW', 'Watts', 'dBm/Hz', 'dBW/Hz', or 'Watts/Hz'. Tunable.

#### Color map

Select the color map for the spectrogram, or enter a 3-column matrix expression for the color map. See colormap for information. Tunable.

#### Color-limits (Minimum)

Set the signal power for the minimum color value of the spectrogram. Tunable.

#### Color-limits (Maximum)

Set the signal power for the maximum color value of the spectrogram. Tunable.

## Style Dialog Box

In the Style dialog box, you can customize the style of power and power density displays. This dialog box is not available in spectrogram view. You are able to change the color of the figure, the background and foreground colors of the axes, and properties of the lines. From the Spectrum Analyzer menu, select View > Style to open this dialog box.

### Properties

The Style dialog box allows you to modify the following properties of the Spectrum Analyzer figure:

#### Figure color

Specify the color that you want to apply to the background of the scope figure. By default, the figure color is gray.

#### Axes colors

Specify the color that you want to apply to the background of the axes.

#### Properties for line

Specify the channel for which you want to modify the visibility, line properties, and marker properties.

#### Visible

Specify whether the selected channel should be visible. If you clear this check box, the line disappears.

#### Line

Specify the line style, line width, and line color for the selected channel.

#### Marker

Specify marks for the selected channel to show at its data points. This parameter is similar to the Marker property for the MATLAB Handle Graphics® plot objects. You can choose any of the marker symbols from the following table.

SpecifierMarker Type
noneNo marker (default)
Circle
Square
Cross
Point
Plus sign
Asterisk
Diamond
Downward-pointing triangle
Upward-pointing triangle
Left-pointing triangle
Right-pointing triangle
Five-pointed star (pentagram)
Six-pointed star (hexagram)

## Tools — Axes Scaling Properties

The Tools — Axes Scaling Properties dialog box allows you to automatically zoom in on and zoom out of your data. You can also scale the axes and color of the Spectrum Analyzer. In the Spectrum Analyzer menu, select Tools > Scaling Properties to open this dialog box.

### Properties

The Tools—Axes Scaling Properties dialog box appears as follows for power and power density views.

For spectrogram view, the Tools—Axes Scaling Properties dialog box appears as follows.

#### Axes scaling/Color scaling

Specify when the scope should automatically scale the axes. If the spectrogram is displayed, specify when the scope should automatically scale the color. You can select one of the following options:

• Manual — When you select this option, the scope does not automatically scale the axes or color. You can manually scale the axes or color in any of the following ways:

• Select Tools > Scaling Properties.

• Press one of the Scale Axis Limits toolbar buttons.

• When the scope figure is the active window, press Ctrl and A simultaneously.

• Auto — When you select this option, the scope scales the axes or color as needed, both during and after simulation. Selecting this option shows the Do not allow Y-axis limits to shrink or Do not allow color limits to shrink .

• After N Updates — Selecting this option causes the scope to scale the axes or color after a specified number of updates. Selecting this option shows the Number of updates edit box.

By default, this parameter is set to Auto, and the scope does not shrink the y-axis limits when scaling the axes or color. Tunable.

#### Do not allow Y-axis limits to shrink / Do not allow color limits to shrink

When you select this property, the y-axis are only allowed to grow during axes scaling operations. If the spectrogram is displayed, selecting this property allows the color limits to only grow during axis scaling. If you clear this check box, the y-axis or color limits may shrink during axes scaling operations.

This property appears only when you select Auto for the Axis scaling or Color scaling property. When you set the Axes scaling or Color scaling property to Manual or After N Updates, the y-axis or color limits are allowed to shrink. Tunable.

Specify as a positive integer the number of updates after which to scale the axes. If the spectrogram is displayed, this property specifies the number of updates after which to scale the color. This property appears only when you select After N Updates for the Axes scaling or Color scaling property. Tunable.

#### Scale axes limits at stop/Scale color limits at stop

Select this check box to scale the axes when the simulation stops. If the spectrogram is displayed, select this check box to scale the color when the simulation stops. The y-axis is always scaled. The x-axis limits are only scaled if you also select the Scale X-axis limits check box.

#### Y-axis Data range (%) / Color-limits Data range

Set the percentage of the y-axis that the scope should use to display the data when scaling the axes. If the spectrogram is displayed, set the percentage of the power values range within the color map. Valid values are between 1 and 100. For example, if you set this property to 100, the Scope scales the y-axis limits such that your data uses the entire y-axis range. If you then set this property to 30, the scope increases the y-axis range or color such that your data uses only 30% of the y-axis range or color. Tunable.

#### Y-axis Align / Color-limits Align

Specify where the scope should align your data with respect to the y-axis when it scales the axes. If the spectrogram is displayed, specify where the scope should align your data with respect to the y-axis when it scales the color. You can select Top, Center, or Bottom. Tunable.

#### Autoscale X-axis limits

Check this box to allow the scope to scale the x-axis limits when it scales the axes. If Axes scaling is set to Auto, checking Scale X-axis limits only scales the data currently within the axes, not the entire signal in the data buffer. Tunable.

#### X-axis Data range (%)

Set the percentage of the x-axis that the Scope should use to display the data when scaling the axes. Valid values are between 1 and 100. For example, if you set this property to 100, the Scope scales the x-axis limits such that your data uses the entirex-axis range. If you then set this property to 30, the Scope increases the x-axis range such that your data uses only 30% of the x-axis range. Use the x-axis Align property to specify data placement with respect to the x-axis.

This property appears only when you select the Scale X-axis limits check box. Tunable.

#### X-axis Align

Specify how the Scope should align your data with respect to the x-axis: Left, Center, or Right. This property appears only when you select the Scale X-axis limits check box. Tunable.

## Algorithms

Spectrum Analyzer uses the RBW or the Window Length setting in the Spectrum Settings panel to determine the data window length. The value of the FrequencyResolutionMethod property determines whether RBW or window length is used. Then, it partitions the input signal into a number of windowed data segments. Finally, Spectrum Analyzer uses the modified periodogram method to compute spectral updates, averaging the windowed periodograms for each segment.

Spectral content is estimated by finding peaks in the spectrum. When the algorithm detects a peak, it ignores all adjacent content that decreases monotonically from the peak. After recording the width of the peak, it subsequently clears its content.

1. Spectrum Analyzer requires that a minimum number of samples have been provided before it computes a spectral estimate. This number of input samples required to compute one spectral update is shown as Samples/update in the Main options pane. This value is directly related to resolution bandwidth, RBW, by the following equation or to the window length, by the equation shown in step 1b.

${N}_{samples}=\frac{\left(1-\frac{{O}_{p}}{100}\right)×NENBW×{F}_{s}}{RBW}$

The normalized effective noise bandwidth, NENBW, is a factor that depends on the windowing method. Spectrum Analyzer shows NENBW in the Window Options pane of the Spectrum Settings panel. Overlap percentage, Op, is the value of the Overlap % parameter in the Window Options pane of the Spectrum Settings panel. Fs is the sample rate of the input signal. Spectrum Analyzer shows sample rate in the Main Options pane of the Spectrum Settings panel.

1. When in RBW mode, the window length required to compute one spectral update, Nwindow, is directly related to the resolution bandwidth and normalized effective noise bandwidth by the following equation.

When in WindowLength mode, the window length is used as specified.

2. The number of input samples required to compute one spectral update, Nsamples, is directly related to the window length and the amount of overlap by the following equation.

When you increase the overlap percentage, fewer new input samples are needed to compute a new spectral update. For example, if the window length is 100, then the number of input samples required to compute one spectral update is given as shown in the following table.

OpNsamples
0%100
50%50
80%20

3. The normalized effective noise bandwidth, NENBW, is a window parameter determined by the window length, Nwindow, and the type of window used. If w(n) denotes the vector of Nwindow window coefficients, then NENBW is given by the following equation.

4. When in RBW mode, you can set the resolution bandwidth using the value of the RBW parameter on the Main options pane of the Spectrum Settings panel. You must specify a value to ensure that there are at least two RBW intervals over the specified frequency span. The ratio of the overall span to RBW must be greater than two, as given in the following equation.

$\frac{span}{RBW}>2$

By default, the RBW parameter on the Main options pane is set to Auto. In this case, the Spectrum Analyzer determines the appropriate value to ensure that there are 1024 RBW intervals over the specified frequency span. Thus, when you set RBW to Auto, it is calculated by the following equation.$RB{W}_{auto}=\frac{span}{1024}$

5. When in window length mode, you specify Nwindow and the resulting RBW is

In some cases, the number of samples provided in the input are not sufficient to achieve the resolution bandwidth that you specify. When this situation occurs, Spectrum Analyzer produces a message on the display, as shown in the following figure.

Spectrum Analyzer removes this message and displays a spectral estimate as soon as enough data has been input. Notice that this behavior differs from the Spectrum Scope block in versions R2012b and earlier. If the Buffer input check box was selected, the Spectrum Scope block computed a spectral update using the number of samples given by the Buffer size parameter. Otherwise, the Spectrum Scope block computed a spectral update using the number of samples in each frame.

2. Spectrum Analyzer calculates and plots the power spectrum, power spectrum density, or spectrogram computed by the modified Periodogram estimator. For more information about the Periodogram method, see periodogram in the Signal Processing Toolbox documentation.

Power Spectral Density — The power spectral density (PSD) is given by the following equation.

In this equation, x[n] is the discrete input signal. On every input signal frame, Spectrum Analyzer generates as many overlapping windows as possible, each window denoted as x(p)[n], and computes their periodograms. Spectrum Analyzer displays a running average of the P most current periodograms.

Power Spectrum — The power spectrum is the product of the power spectral density and the resolution bandwidth, as given by the following equation.

Spectrogram — Each line of the spectrogram is one periodogram. The time resolution of each line is 1/RBW, which is the minimum attainable resolution. Achieving the resolution you want may require combining several periodograms may be combined. You then useinterpolation to calculate noninteger values of 1/RBW. In the spectrogram display, time scrolls from bottom to top, so the most recent data is shown at the bottom of the display. The offset shows the time value at which the center of the most current spectrogram line occurred.

 Note:   The number of FFT points (Nfft) is independent of the window length (Nwindow). You can set them to different values provided that Nfft is greater than or equal to Nwindow.

The Occupied BW is calculated as follows.

• Calculate the total power in the measured frequency range.

• Determine the lower frequency value. Starting at the lowest frequency in the range and moving upward, the power distributed in each frequency is summed until this sum is of the total power.

• Determine the upper frequency value. Starting at the highest frequency in the range and moving downward, the power distributed in each frequency is summed until it reaches of the total power.

• The bandwidth between the lower and upper power frequency values is the occupied bandwidth.

• The frequency halfway between the lower and upper frequency values is the center frequency.

The Distortion Measurements are computed as follows.

1. Spectral content is estimated by finding peaks in the spectrum. When the algorithm detects a peak, it ignores all adjacent content that decreases monotonically from the peak. After recording the width of the peak, it subsequently clears its content. Using this method, all spectral content centered at DC (0 Hz) is removed from the spectrum and the amount of bandwidth cleared (W0) is recorded.

2. The fundamental power (P1) is determined from the remaining maximum value of the displayed spectrum. A local estimate (Fe1) of the fundamental frequency is made by computing the central moment of the power in the vicinity of the peak. The bandwidth of the fundamental power content (W1) is recorded. Then, the power associated from the fundamental is removed as in step 1.

3. The power and width of the second, and higher order harmonics (P2, W2, P3, W3, etc.) are determined in succession by examining the frequencies closest to the appropriate multiple of the local estimate (Fe1). Any spectral content that decreases in a monotonically about the harmonic frequency is removed from the spectrum first before proceeding to the next harmonic.

4. Once the DC, fundamental, and harmonic content is removed from the spectrum, the power of the remaining spectrum is examined for its sum (Premaining) peak value (Pmaxspur), and its median value (Pestnoise).

5. The sum of all the removed bandwidth is computed as Wsum = W0+W1+W2+...+Wn.

The sum of powers of the second and higher order harmonics are computed as Pharmonic = P2+P3+P4+...+Pn.

6. The sum of the noise power is then estimated as Pnoise = (Premaining*dF + Pestnoise*Wsum)/RBW, where dF is the absolute difference between frequency bins, and RBW is the resolution bandwidth of the window.

7. The metrics for SNR, THD, SINAD, and SFDR are then computed from the estimates.

• THD = 10*log10(Pharmonic/P1)

• SINAD = 10*log10(P1/(Pharmonic + Pnoise)

• SNR = 10*log10(P1/Pnoise)

• SFDR = 10*log10(P1/max(Pmaxspur, max(P2,P3,...,Pn))

The following considerations apply to Distortion Measurements.

• The harmonic distortion measurements use the spectrum trace shown in the display as the input to the measurements. The default Hann window setting of the Spectrum Analyzer may exhibit leakage that can completely mask the noise floor of the measured signal.

The harmonic measurements attempt to correct for leakage by ignoring all frequency content that decreases monotonically away from the maximum of harmonic peaks. If the window leakage covers more than 70% of the frequency bandwidth in your spectrum, you may see a blank reading (–) reported for SNR and SINAD. Consider using a Kaiser window with a high attenuation (up to 330dB) to minimize spectral leakage if your application can tolerate the increased equivalent noise bandwidth (ENBW) of the Kaiser window.

• The DC component is ignored.

• After windowing, the width of each harmonic component masks the noise power in the neighborhood of the fundamental frequency and harmonics. To estimate the noise power in each region, Spectrum Analyzer computes the median noise level in the nonharmonic areas of the spectrum. It then extrapolates that value into each region.

• Nth order intermodulation products occur at

A*F1 + B*F2

where F1 and F2 are the sinusoid input frequencies and |A| + |B| = N. A and B are integer values.

• For intermodulation measurements, the third-order intercept (TOI) point is computed as follows, where P is power in decibels of the measured power referenced to one milliwatt (dBm).:

• TOIlower = PF1 + (PF2 - P(2F1-F2))/2

• TOIupper = PF2 + (PF1 - P(2F2-F1))/2

• TOI = + (TOIlower + TOIupper)/2

## Differences from Spectrum Scope Block

All Simulink models containing Spectrum Scope blocks load with Spectrum Analyzer blocks in R2013a or later. Several options that were available on the Parameters dialog box of the Spectrum Scope block are no longer available or have changed. The parameters of Spectrum Scope map to Spectrum Analyzer parameters in the following manner.

R2012b Spectrum Scope Block Parameters dialog box Tab nameR2012b Spectrum Scope ParameterR2013a Spectrum Analyzer ChangeR2013a Spectrum Analyzer Equivalent Parameter
Scope PropertiesBuffer input check box R2013a Spectrum Analyzer does not require that input signals are buffered. Spectrum Analyzer determines the number of samples needed using the value of the RBW parameter. Regardless of whether the input is a frame-based or sample-based signal, Spectrum Analyzer calculates the spectrum once it has acquired the requisite number of samples.For Spectrum Scope blocks in R2012b or earlier models, the equivalent R2013a Spectrum Analyzer RBW value is given by the equation:

In the preceding equation, NENBW is the window constant calculated for a window length of 1000, Fs is the sample rate of the block, and Nwindow is the buffer length. If the input signal to the R2012b Spectrum Scope block was frame-based and the Buffer input check box was cleared, then the R2013a Spectrum Analyzer computes the RBW value with Nwindow set to the frame size of the input signal.
Scope PropertiesBuffer size parameterR2013a Spectrum Analyzer uses the RBW parameter to determine the requisite number of samples to calculate the spectrum, instead of using the buffer size or frame length. For Spectrum Scope blocks in R2012b or earlier models, if the input signal was frame-based and the Buffer input check box was selected, then the R2013a Spectrum Analyzer computes the RBW value with Nwindow set to the value of the Buffer size parameter.
Scope PropertiesBuffer Overlap parameterR2013a Spectrum Analyzer has an Overlap % parameter that is directly related to buffer overlap. R2013a Spectrum Analyzer will compute its Overlap % using the equation:

In the preceding equation, Op is Overlap % parameter value, Ol is the R2012b Spectrum Scope Buffer overlap parameter value, and Nwindow is the buffer length.
Scope PropertiesTreat Mx1 and unoriented sample-based signals asR2013a Spectrum Analyzer defaults to treating Mx1 and unoriented sample-based signals as one channel.Spectrum Scope blocks in R2012b or earlier models with Treat Mx1 and unoriented sample-based signals as set to M Channels will have the Spectrum Analyzer property TreatMby1SignalAsOneChannel set to false. This property is available only via the Scope Configuration object.
Scope PropertiesWindow parameterR2013a Spectrum Analyzer does not have the Bartlett, Blackman, Triang, or Hanning settings.Spectrum Scope blocks in R2012b or earlier models with a window parameter set to any of these values will have their Window parameter set to Hann in the R2013a Spectrum Analyzer.
Scope PropertiesWindow Sampling parameterR2013a Spectrum Analyzer does not have a Periodic option. All window sampling is now symmetric in the R2013a Spectrum Analyzer. n/a
Display PropertiesPersistence check box — this setting would execute the equivalent of the MATLAB hold on command, adding another line for each spectrum computation on the display. This option is not available in the R2013a Spectrum Analyzer, which has replaced this feature with the trace options, Normal Trace, Max Hold Trace, and Min Hold Trace. Spectrum Scope blocks in R2012b or earlier models with persistence enabled will have their Max Hold Trace check box selected in the R2013a Spectrum Analyzer.
Display PropertiesCompact Display check boxThere is no equivalent capability in the R2013a Spectrum Analyzer. n/a
Axis PropertiesInherit Sample time from input check boxR2013a Spectrum Analyzer always uses the sample time of the input signal. n/a
Axis PropertiesFrequency display limits parameterR2013a Spectrum Analyzer determines the range of frequencies calculated based on the Full Span, FStart (Hz), and FStop (Hz) parameters. If this parameter was set to:
• Auto — R2013a Spectrum Analyzer selects the Full Span check box on the Spectrum Settings panel, Main options pane.

• User-defined — R2013a Spectrum Analyzer clears the Full Span check box on the Spectrum Settings panel Main options pane.

Axis PropertiesMinimum frequency (Hz) parameterR2013a Spectrum Analyzer determines the range of frequencies calculated based on the Full Span, FStart (Hz), and FStop (Hz) parameters. If the User-defined parameter was chosen, then this parameter maps to the R2013a Spectrum Analyzer FStart (Hz) parameter.
Axis PropertiesMaximum frequency (Hz) parameter R2013a Spectrum Analyzer determines the range of frequencies calculated based on the Full Span, FStart (Hz), and FStop (Hz) parameters. If the User-defined parameter was chosen, then this parameter maps to the R2013a Spectrum Analyzer FStop (Hz) parameter.
Line PropertiesLine visibilities, Line styles, Line markers, and Line colors parametersThere are no equivalent capabilities in the R2013a Spectrum Analyzer. Once the simulation has started, you can modify the line styles, markers, and colors using the Style dialog box.

The R2012b Spectrum Scope allowed you to retain the axes limits over multiple simulations by selecting Axes > Save Axes Settings. There is no equivalent capability in the R2013a Spectrum Analyzer. However, you can automatically scale the axes to a specified range using the Tools — Axes Scaling Properties dialog box.

## Supported Data Types

PortSupported Data Types

Input

• Double-precision floating point

• Single-precision floating point

• Fixed point (signed and unsigned)

## Supported Simulation Modes

You can use the scope block in models running the following supported simulation modes.

ModeSupportedNotes and Limitations

Normal

Yes

Accelerator

Yes

Rapid Accelerator

Yes

You can use Rapid Accelerator mode as a method to increase the execution speed of your Simulink model. Rapid Accelerator mode creates an executable that includes the solver and model methods. This executable resides outside MATLAB and Simulink. Rapid Accelerator mode uses External mode to communicate with Simulink. For more information about Rapid Accelerator mode, see Acceleration in the Simulink documentation.

PIL

No

SIL

No

External

Yes

You can use External mode to tune block parameters in real time and view block outputs in many types of blocks and subsystems. External mode establishes communication between a host system, where the Simulink environment resides, and a target system, where the executable runs after it is generated by the code generation and build process. For more information about External mode, see Host/Target Communication in the Simulink Coder™ documentation.

The scope does not support data archiving. See Set External Mode Data Archiving Parameters in the Real-Time Windows Target™ documentation.