Professional Documents
Culture Documents
GROUP MEMBERS
Đinh Hồ Phúc Thiện - 21207102
Cao Nguyễn Hải Đăng - 21207012
Nguyễn Hoàng Bảo - 21207121
Trương Hoàng Bách Hợp - 21207034
Lưu Hoàng Đông Anh - 21207007
BY GROUP 6
PROJECT 1: A-LAW
AND MU-LAW
COMPANDING
2/20
CODE
3/20
CODE
%--------compression-------------
% 9. Calculate the average quantization noise power,...
% 5. Compress the sample signal ‘mSpeech’
% the average power of the analog signal and SNR
mu = 255; % or A = ???; use the standard value
e_com = mSpeech(1:length(t)) - s_e_7;
y_max = V_p;
pow_noise_com = sum(e_com.^2)/length(t);
x_max = V_p;
SNR_a_com = pow_sig/pow_noise_com ;
% Replace the compress equation for u-law and A-law
function quan_sig = quan_uni(sig,q)
% with x is the 'mSpeech' signal
for i = 1:length(sig)
s_c_5 = sign(mSpeech(1:length(t))).*(log(1 +
quan_sig(i) = quant(sig(i),q);
mu*abs(mSpeech(1:length(t)))/y_max) / log(1 + mu)) * x_max;
d = sig(i) - quan_sig(i);
% Plot the compress signal;
if d == 0
plot(t,s_c_5);
quan_sig(i) = quan_sig(i) + q/2;
% 6. Quantize the compress signal and plot the quantized signal
elseif (d > 0) && (abs(d) < q/2)
s_q_6 = quan_uni(s_c_5,q);
quan_sig(i) = quan_sig(i) + q/2;
plot(t,s_q_6,'b^','MarkerSize',6,'MarkerEdgeColor','b','MarkerFace
elseif (d > 0) && (abs(d) >= q/2)
Color','b');
quan_sig(i) = quan_sig(i) - q/2;
% 7. Expand the quantized signal
elseif (d < 0) && (abs(d) < q/2)
s_e_7 = sign(s_q_6).*(y_max/mu).*( (1 + mu).^abs(s_q_6/x_max)
quan_sig(i) = quan_sig(i) - q/2;
- 1);
elseif (d < 0) && (abs(d) >= q/2)
plot(t,s_e_7,'g*','MarkerSize',6,'MarkerEdgeColor','g','MarkerFace
quan_sig(i) = quan_sig(i) + q/2;
Color','g');
end
legend('Sample signal','Uniform quantized values','Compress
end
signal','Compress quantized values','Nouniform quantized values');
end
4/20
RESULT
5/20
RESULT
5/20
PROJECT 2: CHAPTER 3
2/20
CODE QUESTION 1
3/20
CODE QUESTION 1
3/20
RESULT QUESTION 1
3/20
CODE QUESTION 2
3/20
CODE QUESTION 2
3/20
RESULT QUESTION 2
3/20
PROJECT 3: CHAPTER 4
2/20
CODE
3/20
CODE
% ================= Signal recovery d1 = (r1 - s11)^2 + (r2 - s12)^2; % The squared distance from r to s1
phi1 = s1; d2 = (r1 - s21)^2 + (r2 - s22)^2; % The squared distance from r to s2
d3 = (r1 - s31)^2 + (r2 - s32)^2; % The squared distance from r to s3
phi2 = s2;
d4 = (r1 - s41)^2 + (r2 - s42)^2; % The squared distance from r to s4
phi3 = s3; % --------- Comparator for decision
phi4 = s4; if d1 < d2 && d1 < d3 && d1 < d4
h1 = fliplr(phi1); Bit_rec = [Bit_rec 0 0];
h2 = fliplr(phi2); elseif d2 < d1 && d2 < d3 && d2 < d4
h3 = fliplr(phi3); Bit_rec = [Bit_rec 0 1];
elseif d3 < d1 && d3 < d2 && d3 < d4
h4 = fliplr(phi4); Bit_rec = [Bit_rec 1 0];
s11 = sqrt(Es); s12 = 0; else
s21 = 0; s22 = sqrt(Es); Bit_rec = [Bit_rec 1 1];
s31 = -sqrt(Es); s32 = 0; end
s41 = 0; s42 = -sqrt(Es); end
Bit_rec;
Bit_rec = []; % ================== The bit error probability
for i = 1:Ntry/2 % ------------- Simulation
Frame = r((i - 1) * L + 1:i * L); % Construct 1 Frame with L samples [Num, rate] = biterr(Bit, Bit_rec);
of 1 symbol P_error_simul(j) = rate;
y1 = conv(Frame, h1) * ts; % r(t) passes through the matched filter 1 % ------------- Theory
P_error_theo(j) = qfunc(sqrt(2 * Eb(j) / N0));
r1 = y1(L); end
y2 = conv(Frame, h2) * ts; % r(t) passes through the matched filter 2 P_error_simul;
r2 = y2(L); P_error_theo;
y3 = conv(Frame, h3) * ts; % r(t) passes through the matched filter 3 figure(1)
r3 = y3(L); semilogy(EbN0_dB, P_error_theo, 'r-', 'linewidth', 1.8); hold on;
semilogy(EbN0_dB, P_error_simul, 'k*', 'markersize', 8);
y4 = conv(Frame, h4) * ts; % r(t) passes through the matched filter 4 xlabel('Eb/N0 (dB)'); ylabel('The error probability');
r4 = y4(L); legend('Theory QPSK', 'Simulation') 3/20
RESULT
3/20
PROJECT 4: LDPC
2/20
1. Vẽ giản đồ Tanner của mã hóa trên?
3/20
1. Cho chuỗi bit ở phía phát là: , giả sử bit đầu tiên bị sai. Sử dụng thuật toán lật bit để tìm lại .
3/20
OVERVIEW
THE OPEN AIR STANDARD THE ETS300 328 STANDARD THE HIPERLAN STANDARD
• The Open Air Standard, established • The 2.4 GHz frequency band, utilized by • HiperLAN encompasses European standards
by the Wireless LAN International various equipment such as microwave for high-speed wireless LANs operating in
Forum, serves as an interoperable ovens, can cause interference and the 5 GHz and 17 GHz frequency bands
standard within the 2.4 GHz degrade performancethe ETS 300 328 • HiperLAN allows direct data exchange
frequency band standard recommends employing the between stations or relay through a third
• Utilizing Frequency Hopping Spread Direct Sequence Spread Spectrum station if direct contact is not possible. It
Spectrum technology, it ensures both (DSSS) technique. offers a high throughput with a raw bit rate
• DSSS utilizes multiple frequencies to of approximately 24 Mbit/s in the MAC
high security and immunity to
spread communication signals, making protocol, supporting multimedia
interference.
eavesdropping virtually impossible communication.
7/20
OVERVIEW
• The National Information Infrastructure/Shared • The IEEE 802.11 specification, developed by the
Unlicensed Personal Radio Network (NII/SUPERNet) Institute of Electrical and Electronic Engineering
facilitates wireless transmission of digital data and (IEEE), establishes a wireless LAN standard for
multimedia between computers and information communication between wireless clients, base
appliances, both within Local Area Networks (LANs) stations, and access points
and across point-to-point sites • . It consists of two main layers: the Physical (PHY)
• Regulated by the FCC, this standard aims to spur the layer, which defines signal characteristics and
development of new devices and drive growth in measures RF energy, and the Media Access Control
WLAN industries. It defines a low-power SUPERNet (MAC) layer, responsible for managing access to the
service, operating within the 5.15GHz - 5.35GHz wireless medium
frequency bands, with a range of up to 200 meters
and power levels not exceeding -10 dBW
8/16
OVERVIEW
9/20
OVERVIEW
10/20
CARRIER SENSE MULTIPLE
ACCESS/COLLISION
AVOIDANCE (CSMA/CA)
11/20
CSMA/CA
In Wireless LANs, the core concept of communicating wirelessly revolves around CSMA/CA. In any shared medium, accessing the channel without
collisions is vital
CSMA is widely regarded as one of the most practical MAC protocols in wireless networks, such as being a fundamental medium access
algorithm in IEEE 802.11.
CSMA maintains a network rule where only one point can transmit data; otherwise, there may be data/frame loss
12/20
FLOW CHART OF CMSA/CA
13/20
DIFFERENCE BETWEN CSMA/CD AND CSMA/CA
14/20
BASIC OPERATION OF CSMA/CA
• First, the stations monitor the transmission • If the network is free, the station initiates
medium. When it comes to WLAN, this means D C F. F i r s t , t h e c h a n n e l i s c h e c k e d m o r e
that carrier sense monitors the radio channel thoroughly for the duration of DIFS. If it
and checks whether other network participants – remains free for this time, a random backoff
as long as they are visible to the respective s t a r t s a n d o n l y t h e n d o e s t h e RT S / C T S e x c h a n g e
device – are currently transmitting. begin – if this additional mechanism is used
• If it turns out that the transmission medium is • If the request to send has successfully arrived
currently occupied, a random backoff is at the receiver and no collision has occurred,
initiated: the station waits a random amount of t h e s e n d er re ce i ve s p e r m i s s i o n fro m t h e CTS
time until a new check starts. frame to occupy the transmission medium.
16/20
COLLISION OF CSMA/CA
17/20
HOW TO AVOID COLLISION IN CSMA/CA
CSMA/CA sensed the transmission channel before transmitting a frame and it tried to
avoid collisions by carefully tuning the timers used by CSMA/CA devices. In this way, the
CSMA/CA introduced a small delay, named Short Inter Frame Spacing (SIFS)
To send a frame, a device must first wait until the channel has been idle for at least the DIFS
if the previous frame was received correctly. However, if the previously received frame was
corrupted, this indicated that there were collisions and the device must sense if the channel
was idle for at least the EIFS, with SIFS < DIFS < EIFS.
18/20
HOW TO AVOID COLLISION IN CSMA/CA
The CSMA/CA employed an immediate positive acknowledgment scheme to make sure successful reception of packets
If the medium is sensed to be free for a DIFS interval, the transmission may proceed
On the other hand, if the medium is busy, the station must defer its transmission until the end of the current
Then, it will wait for an additional DIFS interval and generate a random backoff delay to initialize the backoff timer before
transmission
The backoff timer is decreased as long as the medium is sensed as idle, and frozen when a transmission is detected on
the channel, and resumed when the medium is sensed as idle again for more than a DIFS interval.
Only when the backoff timer reaches zero, the station transmits its packet.
20/20
THANK YOU