How can I mix two signals in MATLAB?

I have two signals stored in vectors, one of them is a 4-QAM baseband signal(m), and the other is a simple Local Oscillator sinusoid signal(Lo). Then I've simulated the mixing like this:
Rfsignal=m.*Lo;
and then i filtered out the low frequency component of Rsignal, but after that, the radio signal doesn't look like the baseband, and I couldn't get back the digital data after demodulation. I know there are mixer objects in Simulink, but i want to use matlab coding, because it's much more practical. So I'm looking for a coding solution to properly mixing the baseband and the Lo signals in such a way that the Rf signal looks similar to the baseband.
Thanks a lot.

Respuestas (1)

Star Strider
Star Strider el 25 de Nov. de 2020

0 votos

Ther esult would appear to be a single-sideband suppresed-carrier signal (with only the upper sideband). See if the demod function will do what you want.

6 comentarios

Balint Csejtei
Balint Csejtei el 25 de Nov. de 2020
Yes, it'll be an ssb signal, but the demodulation method should work after mixing. The real problem is that the upconvertered and bandpass-filtered signal just dosn't even look like the baseband signal. Its frequeny should be the sum of the two inputs, and it's supposed to be similar to the baseband. But mine just doesn't.
Star Strider
Star Strider el 25 de Nov. de 2020
The only approach I can suggest to debugging this is to see if the modulate function produces the same result as your code, and then see if demod correctly returns the modulating signal from the signal that modulate creates.
Also, compare your result with the result modulate produces to see if there are any significant differences. Do that in both the time-domain and frequency-domain.
Balint Csejtei
Balint Csejtei el 27 de Nov. de 2020
Thanks for the answer, but i have randomly generated digital bits, stored in a vector, and i've used them to multiply a sine and a cosine wave(after converting to QAM complex symbols), then I added these two, thereby creating the baseband QAM signal .Later I have to demodulate the signal, hence regaining the information.
I think the modulate() function is primarly useful for "analog" qam modulation ( as the example shows it in the functions description article). The function's first and last inputs determines the input signals, which used to multiply the sine and the cosine wave, as described in the linked article.
So, do you think it's possible to convert the [-1 1 1 -1...1] bit stream to an "analoge" signal, and use this as the input of the modulate() function?
Star Strider
Star Strider el 27 de Nov. de 2020
I have no idea. I have only done analogue modulation.
Balint Csejtei
Balint Csejtei el 27 de Nov. de 2020
I've tried the modulate function to make the modulated baseband signal, then I Multiplied it with an LO signal. But still, after bandpass filtering,the RF signal just didn't look like the baseband, its amplitude was not constant and it looked completely different at the phase shifts. I've tried the same upconverting-bandpass filtering method with AM and FM signals, and the results were good. Is it possible that this doens't work well with digital modulated signals?
Star Strider
Star Strider el 27 de Nov. de 2020
Quite possibly. I have never tried to do something like that.
I suggest you look throiugh the Communications Toolbox documentation to see if something like what you want to do exists there, or perhaps gives some idea of how to do what you want to do. (I do not have the Communications Toolbox, and so have no experience with it.)

Iniciar sesión para comentar.

Categorías

Más información sobre Communications Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 25 de Nov. de 2020

Comentada:

el 27 de Nov. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by