Introduction
Quadrature Amplitude Modulation(QAM): Theory and Matlab
QAM stands for Quadrature Amplitude Modulation. It is a method of combining two amplitude-modulated (AM) signals into a single channel, thereby doubling the effective bandwidth. In telecommunications and signal processing, QAM is a method of mapping an analog signal, such as an audio or video signal, onto a digital signal for transmission.
The digital signal consists of a series of symbols, each of which represents a unique combination of the two amplitude-modulated signals. This allows the transmission of multiple bits of data in each symbol, which increases the data rate compared to simple amplitude modulation. QAM is widely used in digital television and cable television systems, as well as in digital communications systems such as Wi-Fi, Ethernet, and cable modems.
QAM Modulator and Demodulator
In the context of QAM, a modulator is a device that takes an input digital or analog signal and maps it onto a QAM signal for transmission over a communication channel. The modulator performs amplitude modulation on two carriers that are 90 degrees out of phase with each other, resulting in a signal that carries both amplitude and phase information.
A demodulator, on the other hand, is a device that takes the received QAM signal and recovers the original data or message. The demodulator performs the inverse operation of the modulator, converting the QAM signal back into its original digital or analog form. This typically involves separating the two carriers and demodulating them separately, then combining the resulting signals to recover the original data.
The performance of a QAM system depends on the accuracy of the modulator and demodulator, as well as the quality of the communication channel. To minimize errors, the modulator and demodulator must be designed to have good signal-to-noise ratios and to be able to handle any phase or amplitude distortions that may occur in the channel. Additionally, the system may use error correction codes or other techniques to further improve the accuracy of the transmitted data.
QAM Modulator:
Input signal —-> Binary data mapping —-> Amplitude modulation of two carriers —-> QAM signal
QAM Demodulator:
Received QAM signal —-> Multiplication with two carriers —-> Integration —-> Demodulated signal
Software Requirement
Matlab Software or Online Matlab
Matlab Code Version 1
Fd=1;Fs=1;
nsamp=1;
M=32;
k = log2(M);
n = 30000;
x = randi([0 1],n,1);
stem(x(1:40),'filled');
title('Random Bits');
xlabel('Bit Index');
ylabel('Binary Value');
xsym = bi2de(reshape(x,k,length(x)/k).');
figure;
stem(xsym(1:10));
title('Random Symbols');
xlabel('Symbol Index');
ylabel('Integer Value');
y=qammod(xsym,M);
title('modulated');
xlabel('Symbol Index');
ylabel('Integer Value');
ytx = y;
stem(y(1:10));
EbNo=10;
snr = EbNo + 10*log10(k) - 10*log10(nsamp);
pinput=std(ytx);
noise = (randn(1,n/k)+sqrt(-1)*randn(1,n/k))*(1/sqrt(2));
Noisestd = (pinput*10^(-snr/20));
ynoisy = ytx + (Noisestd*noise);
yrx=ynoisy;
figure;
plot(real(yrx(1:5e3)),imag(yrx(1:5e3)),'b*');
hold on;
plot(real(ytx(1:5e3)),imag(ytx(1:5e3)),'y.');
title('Signal Constellation');
legend('Received Signal', 'Transmitted Signal');
axis([-5 5 -5 5]);
hold off;
QAM Code Version 1 Output
Matlab Code Version 2
clc;
clear all;
close all;
M=8;
N=12;
msg = round(rand(N,1));
disp('BInary input at transmitter:');
disp(msg);
Tb=0.000001;
x= msg;
bits=[];
for n=1:1:length(x)
if x(n)== 1 ;
sig=ones(1,100);
else x(n)==0 ;
sig=zeros(1,100);
end
bits = [bits sig];
end
t1 = Tb/100:Tb/100:100*length(x)*(Tb/100);
subplot(3,1,1);
plot(t1,bits,'linewidth',2.5);
grid on;
axis([0 Tb*length(x) -0.5 1.5]);
xlabel('Time(sec)');
ylabel('Amplitude(volts)');
title('Digital input signal');
msg_reshape=reshape(x,log2(M),N/log2(M))';
disp('Information is reshaped to convert into symbol form');
disp(msg_reshape);
fprintf('\n\n');
size(msg_reshape);
for j=1 : 1 : N/log2(M)
for i=1 :1 :log2(M)
a(j,i)=num2str(msg_reshape(j,i));
end
end
as=bin2dec(a);
ast=as';
subplot(3,1,2);
stem(ast,'Linewidth',2.0);
title('Serial synbol for 8-QAM modulation');
xlabel('n(discrete time)');
ylabel('Magnitude');
disp('Symbol form of information for 8-QAM');
disp(ast);
fprintf('\n\n');
%Mapping for 8-QAM modulation
p=qammod(ast,M);
scatterplot(p),grid on;
title('8-QAM constellation diagram');
%QAM Modulation
RR = real(p);
II = imag(p);
sp = Tb*2;
sr=1/sp;
f=sr*2;
t=sp/100:sp/100:sp;
ss=length(t);
m=[];
for k=1:1:length(RR)
yr=RR(k)*cos(2*pi*f*t);
yim=II(k)*sin(2*pi*f*t);
y=yr+yim;
m=[m y];
end
tt = sp/100:sp/100:sp*length(RR);
figure(1);
subplot(3,1,3);
plot(tt,m);
xlabel('Time(Sec)');
ylabel('Amplitude(volts)');
title('8-QAM Modulated signal');
Output Version 2
Explore More Projects on Matlab
- Microwave and Antenna Various Matlab CodesMicrowave and Antenna Various Matlab Codes. Some of the Projects are below. Polar form for a Symmetrical Dipole of Finite… Read more: Microwave and Antenna Various Matlab Codes
- Multiple Input Multiple Output(MIMO) using MatlabIntroduction Multiple Input Multiple Output(MIMO) using Matlab. Multiple Input Multiple Output (MIMO) is a technology used in wireless communication systems… Read more: Multiple Input Multiple Output(MIMO) using Matlab
- Pulse Width Modulation(PWM) working Principal using MatlabIntroduction Pulse Width Modulation(PWM) working Principal using Matlab. PWM stands for Pulse Width Modulation. It is a type of digital… Read more: Pulse Width Modulation(PWM) working Principal using Matlab
- Quadrature Amplitude Modulation(QAM): Theory and MatlabIntroduction Quadrature Amplitude Modulation(QAM): Theory and Matlab QAM stands for Quadrature Amplitude Modulation. It is a method of combining two… Read more: Quadrature Amplitude Modulation(QAM): Theory and Matlab
- Polar form for a Symmetrical Dipole of Finite Length: Matlab ScriptPolar form for a Symmetrical Dipole of Finite Length: Matlab Script. This Experiment include finding of: Introduction The polar form… Read more: Polar form for a Symmetrical Dipole of Finite Length: Matlab Script
- Radiated Power and Maximum Directivity of any Antenna: Theory and Matlab codeRadiated Power and Maximum Directivity of any Antenna: Theory and Matlab code. Introduction The radiated power of an antenna refers… Read more: Radiated Power and Maximum Directivity of any Antenna: Theory and Matlab code
- Polar form for a Loop Antenna with Uniform Current: Theory and Matlab codeIntroduction The polar form for a loop antenna with uniform current can be determined using the far-field approximation and the… Read more: Polar form for a Loop Antenna with Uniform Current: Theory and Matlab code
- Two Dimensional(2-D) Polar and Semi-Polar Patters using Matlab codeIntroduction Two Dimensional(2-D) Polar and Semi-Polar Patters using Matlab code. Two-dimensional (2-D) polar and semi-polar patterns are graphical representations of… Read more: Two Dimensional(2-D) Polar and Semi-Polar Patters using Matlab code
Join us for Regular Updates
Telegram | Join Now |
Join Now | |
Join Now | |
Join Now | |
Join Now | |
Join our Telegram | connectkreations |
About Connect Kreations
We the team Connect Kreations have started a Blog page which is eminently beneficial to all the students those who are seeking jobs and are eager to develop themselves in a related area. As the world is quick on uptake, our website also focuses on latest trends in recent technologies and project learning and solutions. We are continuously putting our efforts to provide you with accurate, best quality, and genuine information. Here we also have complete set of details on how to prepare aptitude, interview and more of such placement/ off campus placement preparation.
Connect Kreations is excited to announce the expansion of our services into the realm of content creation! We are now offering a wide range of creative writing services, including poetry, articles, and stories.
Whether you need a heartfelt poem for a special occasion, a thought-provoking article for your blog or website, or an engaging story to captivate your audience, our team of talented writers is here to help. We have a passion for language and a commitment to creating high-quality content that is both original and engaging.
Our services are perfect for individuals, businesses, and organizations looking to add a touch of creativity and personality to their content. We are confident that our unique perspectives and diverse backgrounds will bring a fresh and exciting voice to your project.
Thank you for choosing Connect Kreations for your content creation needs. We look forward to working with you and helping you to bring your vision to life!
The website is open to all and we want all of you to make the best use of this opportunity and get benefit from it..🤓
- Our Websites: Connect Kreations
- Our Websites: StudentsDev Connect Kreations