Modulation of Sinusoids in Matlab (Frequency Domain Problems)

In summary: Additionally, you need to adjust your x-axis to match the frequency range of your signals, as currently it is only showing a small portion of the spectrum. Remember to also take into account the Nyquist frequency when plotting the one-sided spectrum. You should see spikes at 2, 8, 12, and 18 for your modulated signal. In summary, to obtain the correct Fourier Transform of the modulated signal, you need to multiply the FFTs of the individual signals and adjust your x-axis to show the full spectrum.
  • #1
halcyon626
2
0
The Problem
Hi, I am trying to modulate two sinusoids in Matlab. I have some
x = sin(2*pi*fx*t)
and some
y = cos(2*pi*fc*t)
, where fx and fc are different frequencies. I then modulate them together, using dot multiplication,
z = x.*y
. I then plot each in the time domain using
plot(t,x)
and I obtained the correct solution. The problem comes with plotting the Fourier Transform of the resulting signal.

My Attempt
I have let some xf , yf, and zf be each of the signals in the magnitude domain. I let
xf = 2*abs(fft(xf))/N
(getting the one-sided magnitude spectrum of x). N is the length of my time vector. The same is done for y and z.

I know I have to compute my "x-axis", and not just plot xf/yf/zf, but even when plotting them I know I *should* get two spikes each in x and y, and four spikes in the resulting modulated signal. The problem is my modulated signal only has two spikes.

I don't want to post an exact homework question here, but rather understand what I am doing wrong in Matlab to get this incorrect answer. If I let fx = 10 and fc = 2, the modulated signal (one-sided) should show spikes at -2, 2, 8,12 (we won't see the -2 in the one-sided).

Thank you for the help, and please let me know if I need to post more information, or be clearer on the question.
 
Last edited:
Physics news on Phys.org
  • #2
SolutionYou need to multiply the FFTs rather than the time-domain functions. That is, instead of z = x.*y, you should do zf = xf.*yf. This will give you the correct four-spike result.
 

Related to Modulation of Sinusoids in Matlab (Frequency Domain Problems)

1. What is modulation in the frequency domain?

Modulation in the frequency domain refers to the process of changing the characteristics of a sinusoidal signal, such as its amplitude, phase, or frequency, to transmit information or achieve a desired effect.

2. How can I modulate a sinusoidal signal in Matlab?

To modulate a sinusoidal signal in Matlab, you can use the built-in functions such as 'modulate' or 'fmmod', which allow you to specify the modulation parameters and the signal to be modulated.

3. What are some common frequency domain problems in modulation?

Some common frequency domain problems in modulation include aliasing, intermodulation distortion, and frequency drift. These can cause unwanted changes in the signal and affect the accuracy of the modulation.

4. How can I troubleshoot frequency domain problems in Matlab?

To troubleshoot frequency domain problems in Matlab, you can use tools such as the spectrum analyzer to visualize the frequency spectrum of the signal and identify any issues. You can also try adjusting the modulation parameters or using filtering techniques to improve the signal quality.

5. Is there a difference between modulation in the time domain and in the frequency domain?

Yes, there is a difference between modulation in the time domain and in the frequency domain. Modulation in the time domain involves manipulating the amplitude, phase, or frequency of a signal over time, while modulation in the frequency domain involves modifying the frequency spectrum of a signal to achieve the desired effect.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
279
  • Engineering and Comp Sci Homework Help
Replies
1
Views
995
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
926
  • Engineering and Comp Sci Homework Help
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
810
Replies
36
Views
1K
Back
Top