In this 9th tutorial of Modeling digital communication systems using Simulink, we show how to determine the Spectrum & Power Spectrum of a Sinusoidal Wave in Simulink. This tutorial will help you to know how to use simulink tools to analyze modulated/demodulated signal used in digital communication systems.

We can also do it using matlab programming language instead of simulink. See matlab code for qpsk modulation and demodulation for example coding. But simulink is easier in many ways.

Now consider the problem of how to determine the Spectrum & Power Spectrum of a Sinusoidal Wave in Simulink. We start with the signal equation and theoretical power calculation and then how to set up these in simulink.

Consider the sinusoid signal,

It's spectrun or Fourier Transform is given by,

It's power spectral density is given by,

To model the sinusoid signal given above, we have to specify the amplitude and frequency. Let the amplitude be 1 and frequency be 100Hz. Then by theoretical calculation the peak value of the spectrum is 0.5 or -3dB. Also its average power is 0.5 which was shown in earlier tutorial Export data, view waveform and calculate power of Sinusoid in Simulink. The peak of the power spectrum is A2∕4 and is expressed in dBW as 10log(1/4) = −6 dBW.

Now we want to setup the simulink model to calculate and plot the signal above and its power spectrum. The simulink model we will make is the following,

How to create new simulink model and place blocks and set the properties of blocks was explained in the previous tutorial Modeling digital communication systems using Simulink.

As we already said we will use a signal of amplitude 1 and frequency of 100Hz. Then our waveform equation becomes,

x(t) = A cos(2𝜋100t)

Import the blocks and make the simulink model as shown above. Then use the following model properties for the setting.

The following figure displays the output of the scope block labeled sine computed by means of the periodogram method1. In this figure, it can be observed that the magnitude of the spectrum |X(f)| occurs at frequencies at +100 and −100 Hz.

In the figure you can see the labels on the axis and on the graph itself. To learn how to do this, see How to customize Scope in Simulink. Data windowing controls the width of the main spectral lobe and sidelobe leakage. The rectangular window used to produce above figure provides good spectral resolution but increases the sidelobes.

Also using the To Workspace block, it can be observed that the peak value is 0.4680 or -3.298 dB. This peak value is lower than the theoretical -3 dB value.

Next, the figure below shows the spectrum analyzer output where a 2048 length FFT with no overlap is computed using a Hann window. In this figure, the frequencies are located at ±100 Hz with peaks that are approximately -6 dBW with sidelobes that are much lower than those in the figure above.

So in this way you can use the available simulink tools to determine the Spectrum & Power Spectrum of a Sinusoidal Wave in Simulink.

See also matlab books Numerical Methods in Engineering with MATLAB PDF free download and Modern control design with MATLAB and SIMULINK PDF free download.

We can also do it using matlab programming language instead of simulink. See matlab code for qpsk modulation and demodulation for example coding. But simulink is easier in many ways.

Now consider the problem of how to determine the Spectrum & Power Spectrum of a Sinusoidal Wave in Simulink. We start with the signal equation and theoretical power calculation and then how to set up these in simulink.

Consider the sinusoid signal,

It's spectrun or Fourier Transform is given by,

It's power spectral density is given by,

To model the sinusoid signal given above, we have to specify the amplitude and frequency. Let the amplitude be 1 and frequency be 100Hz. Then by theoretical calculation the peak value of the spectrum is 0.5 or -3dB. Also its average power is 0.5 which was shown in earlier tutorial Export data, view waveform and calculate power of Sinusoid in Simulink. The peak of the power spectrum is A2∕4 and is expressed in dBW as 10log(1/4) = −6 dBW.

Now we want to setup the simulink model to calculate and plot the signal above and its power spectrum. The simulink model we will make is the following,

How to create new simulink model and place blocks and set the properties of blocks was explained in the previous tutorial Modeling digital communication systems using Simulink.

As we already said we will use a signal of amplitude 1 and frequency of 100Hz. Then our waveform equation becomes,

x(t) = A cos(2𝜋100t)

Import the blocks and make the simulink model as shown above. Then use the following model properties for the setting.

The following figure displays the output of the scope block labeled sine computed by means of the periodogram method1. In this figure, it can be observed that the magnitude of the spectrum |X(f)| occurs at frequencies at +100 and −100 Hz.

In the figure you can see the labels on the axis and on the graph itself. To learn how to do this, see How to customize Scope in Simulink. Data windowing controls the width of the main spectral lobe and sidelobe leakage. The rectangular window used to produce above figure provides good spectral resolution but increases the sidelobes.

Also using the To Workspace block, it can be observed that the peak value is 0.4680 or -3.298 dB. This peak value is lower than the theoretical -3 dB value.

Next, the figure below shows the spectrum analyzer output where a 2048 length FFT with no overlap is computed using a Hann window. In this figure, the frequencies are located at ±100 Hz with peaks that are approximately -6 dBW with sidelobes that are much lower than those in the figure above.

So in this way you can use the available simulink tools to determine the Spectrum & Power Spectrum of a Sinusoidal Wave in Simulink.

See also matlab books Numerical Methods in Engineering with MATLAB PDF free download and Modern control design with MATLAB and SIMULINK PDF free download.

## No Comment to " How to determine the Spectrum & Power Spectrum of a Sinusoidal Wave in Simulink "