ELCT 562_CA5
docx
keyboard_arrow_up
School
Clemson University *
*We aren’t endorsed by this school
Course
562
Subject
Electrical Engineering
Date
Apr 3, 2024
Type
docx
Pages
4
Uploaded by MateMonkey7318
ELCT 562
Wireless Communications
Computer Assignment #5
Task 1 (Receiver, 60 pts): 1) Develop a function that converts received IQ data to the data symbols by filling in the function below. You can add more input arguments
if necessary.
function [symbolsRX] = myReceiver(IQdata, prx) %%%%%%% fill here end In Appendix***
Task 2 (BER analysis, 40 pts): By using your receiver: 1) Simulate the BER for antipodal signaling by using your transmitter & receiver for
𝐸𝐸𝑠𝑠
𝑁𝑁
0 ∈
[0, 10] [dB]. 2) Show that the curve that you obtain matches with the corresponding theoretical curve. The y-axis should be given in logscale while x-axis is in dB scale (i.e., semilogy(x,y), not plot(x,y)).
The following program was generated to create a receiver that takes the received IQ
data and processes it, converting it to data symbols. This information is than used to simulate the Bit Error Rate for antipodal signaling by referencing the transmitter and receiver. The key concepts of this program was to generate random bits using the randi function. These bits are then mapped to BPSK (Binary Phase-shift Keying) symbols and used a RRC filter to shape the bits. The AWGN channel is simulated and the receiver applied a matching filter and down sample to recover the symbols. The number of bit errors is calculated and the BER is produced for each energy per symbol.
To compare the theoretical BER for BPSK the following function is used to calculate the probability of error:
Q
(
√
2
∗
E
s
N
0
)
This function is used to calculate the tail probably of the Gaussian distribution used in AWGN which plays a large role in SNR and decision thresholds and error probabilities. Overall, when comparing the theoretical Bit Error Rate and Simulated BER for the AWGN channel you can see little to no differences between the two, therefore creating a successful simulation.
Appendix:
MATLAB Code:
clear all
close all
clc
%% Design and simulation parameters for millimeter wave communications:
rho = 0.2;
fsample = 2e9; % 2 GHz
Tsample = 1/fsample;
Tspacing = 2e-9; % 2 ns
EsN0dBlist = [0:10]; % SNR in dB
N = 100000; Nover = Tspacing/Tsample;
%% This is an example of generating IQdatatx from 10 random bits
if
(1) N = 10; % number of bits
bitsTX = randi([0 1],N,1); % random bits
symbolsTX = 2*bitsTX-1; % (i.e., the alphabet is {1,-1})
[IQdataTX pTX] = myWaveform(rho, symbolsTX, Tsample, Tspacing);
figure(1); plot(real(IQdataTX), 'displayname'
, 'In-phase' ); hold on
title(
'Signal in time (in-phase)'
)
figure(2); stem((pTX), 'displayname'
, 'p_{tx}[n]' )
title(
'Transmit filter (or pulse shape)'
)
end
%%%%%%%%%%%%%%%%%%%%%%%%%HOMEWORK%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% BER analysis for various Es/N0 points
if
(1)
numberOfErrorsList = zeros(size(EsN0dBlist));
for indEsN0dB = 1:numel(EsN0dBlist)
bitsTX = randi([0, 1], N, 1);
symbolsTX = 2*bitsTX - 1; [IQdataTX, pTX] = myWaveform(rho, symbolsTX, Tsample, Tspacing);
EsN0 = 10^(EsN0dBlist(indEsN0dB)/10); N0 = 1/EsN0; noiseVariance = N0/2;
noise = sqrt(noiseVariance) * (randn(size(IQdataTX)) + 1i * randn(size(IQdataTX)));
IQdataRX = IQdataTX + noise;
symbolsRX = myReceiver(IQdataRX, pTX, Nover, N);
errors = sum(bitsTX ~= symbolsRX);
numberOfErrorsList(indEsN0dB) = errors;
end
%% Calculate and Plot BER
BERlist = numberOfErrorsList / N; % BER calculation
BERlistTheory = qfunc(sqrt(2 * 10.^(EsN0dBlist / 10))); % Theoretical BER
% Plotting BER Performance
figure;
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
semilogy(EsN0dBlist, BERlist, 'b-o'
, 'DisplayName'
, 'Simulated BER'
);
hold on
;
semilogy(EsN0dBlist, BERlistTheory, 'r--'
, 'DisplayName'
, 'Theoretical BER'
);
xlabel(
'E_s/N_0 (dB)'
);
ylabel(
'BER'
);
title(
'BER Performance of BPSK in AWGN'
);
legend(
'Location'
, 'best'
);
grid on
;
figure(2);
plot(real(IQdataTX), 'DisplayName'
, 'In-phase Component'
);
title(
'Signal in Time (In-phase Component)'
);
xlabel(
'Sample Index'
);
ylabel(
'Amplitude'
);
legend show
;
grid on
;
figure(3);
stem(pTX, 'DisplayName'
, 'Transmit Pulse Shape'
);
title(
'Transmit Filter (or Pulse Shape)'
);
xlabel(
'Sample Index'
);
ylabel(
'Amplitude'
);
legend show
;
grid on
;
end
function [symbolsRX] = myReceiver(IQdata, prx, Nover, symbolsLength)
rxFiltered = conv(IQdata, conj(fliplr(prx)), 'same'
);
filterDelay = (length(prx) - 1) / 2;
startIndex = 1 + filterDelay; symbolsRX = rxFiltered(startIndex:Nover:startIndex+Nover*(symbolsLength-1));
symbolsRX = real(symbolsRX) > 0; end
%%%%%%%%%%%%%%%%%%%%%%%%%HOMEWORK%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [IQdata ptx] = myWaveform(rho, symbols, Tsample, Tspacing)
Nover = Tspacing/Tsample;
n = [-10:1/Nover:10];
h = rrc(rho,n); h = h/sqrt(sum(abs(h).^2));
symbolsUp = upsample(symbols,Nover);
IQdata = conv(h,symbolsUp);
ptx = h;
end
function h = rrc(beta,t)
h = (sin((1-beta)*pi*t)+4*beta*t.*cos((1+beta)*pi*t))./ (pi*t.*(1-
(4*beta*t).^2));
h(t==0) = 1 - beta*(1 - (4/pi));
h(t == 1/4/beta | t == -1/4/beta) = beta/sqrt(2)*((1+2/pi) * sin(pi/(4*beta)) + (1-2/pi) * cos(pi/(4*beta)));
end
Related Questions
answer the following with as much detail possible
Use the following link to access the practice pdf to view the information needed to answer the questions.
labpractice00001.tiiny.site
The questions are in the following image
Do proper Hand drawings.
Show hand drawn 2-to-1 multiplexer in which the inputs and outputs consist of single bits. and schematic diagram for the mux designed
arrow_forward
Fill in the Blanks:
Q: If an input signal is bounded, then the output signal must also be bounded, if the system is _____________________ system.
arrow_forward
Please assist with question 1 with details on how to do it. Thank you
arrow_forward
5. Write an assembly program that calculates the mean of the following array. (5)
*Please write code comments*
AREA myData, DATA, READWRITE
array DCD 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
arrow_forward
The subject is: Smart Grid
Please send the answer by typing ONLY. I don't want any handwritten.
Q1-Explain what an encoder and Decoder circuit is?
arrow_forward
Question 32
Motorola processors
1/0 ops.
Do not have separate instructions for
Have separate instructions for
Interrupt
Do not perform
arrow_forward
During the execution of an OUT instruction, the IO/M* signal will ________.
A) Go high.
B) Go low.
C) Not be used.
D) Tristate
arrow_forward
I. Multiple Choice. Shade the box that corresponds to your answer.1. The TEST instruction performs the __________________ operation.a. AND b. OR c. NOT d. XOR2. An instruction that inverts all bits of a byte or word.a. XOR b. NEG c. NOT d. BTC3. The following operations (instruction) function with signed numbers except one.a. SHL b. IDIV c. SAR d. IMUL4. How many places the instruction SHL AX, 10H logically shifted right the value of AX?a. 16 b. 10 c. 1 d. NOTC5. The CMP instruction performs the _________________ operation.a. TEST b. BTC c. SUB d. CMPXCHG6. The task of clearing a bit in a binary number is called __________.a. masking b. ORing c. jumping d. NOTC7. Select an instruction form the following that tests bit position 2 of register CH.a. TEST CH, 2 b. BT CH, 2 c. a and b d. NOTC8. After the execution of instruction NEG AX, what will be the value of AX with initial value of 01101101?a. 10010010 b. 10010000 c. 10010011 d. 100101009. The initial value of AX is 01011100, what will…
arrow_forward
the following blanks with a word or phrase:
wires in a measurement circuit and a nearby mains-carrying conductor.
w interferenc
us source
also known as electrostatic coupling, can occur between the signal
s and
wires in a measurement circuit and a nearby mains-carrying conductor.
rom
2A type of optical sensors that can detect the presence of objects within its
vicinity without any actual physical contact is called
3. A Sensa-is a device that measures a physical quantity and converts it into a
signal which can be read by an observer er by an instrument.
4. The photons hitting the photovoltaic cell pass through the and are
absorbed by electrons in the
Hin p-doped
upper
layer
S. The ability of an op amp to suppress common-mode signals is expressed in
terms of its
6. The --- noise arises from fluctuations in the number of charge carriers.
7. The
information in much the same way as the mind.
- instrument are computing, manipulating, and processing
8. In variable capacitance transducer used…
arrow_forward
The PLC-5, SLC 500, and MicroLogix use a(n) ____________________ instruction for moving data from one word to another.
arrow_forward
what is the minimum size of multiplexers necessary to implement a boolean function of 5 variables?
Answer = _____ to 1 line mux
arrow_forward
QUESTION 11
Match the signal state with its description.
READY=1
A. The MPU has put valid data on the bus
B. There is a valid address on the bus
C. It's an 1/0 operation
WR*=0
y ALE=1
D. The device is ready for th MPU to continue
1O/M*=1
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you

EBK ELECTRICAL WIRING RESIDENTIAL
Electrical Engineering
ISBN:9781337516549
Author:Simmons
Publisher:CENGAGE LEARNING - CONSIGNMENT
Related Questions
- answer the following with as much detail possible Use the following link to access the practice pdf to view the information needed to answer the questions. labpractice00001.tiiny.site The questions are in the following image Do proper Hand drawings. Show hand drawn 2-to-1 multiplexer in which the inputs and outputs consist of single bits. and schematic diagram for the mux designedarrow_forwardFill in the Blanks: Q: If an input signal is bounded, then the output signal must also be bounded, if the system is _____________________ system.arrow_forwardPlease assist with question 1 with details on how to do it. Thank youarrow_forward
- 5. Write an assembly program that calculates the mean of the following array. (5) *Please write code comments* AREA myData, DATA, READWRITE array DCD 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,arrow_forwardThe subject is: Smart Grid Please send the answer by typing ONLY. I don't want any handwritten. Q1-Explain what an encoder and Decoder circuit is?arrow_forwardQuestion 32 Motorola processors 1/0 ops. Do not have separate instructions for Have separate instructions for Interrupt Do not performarrow_forward
- During the execution of an OUT instruction, the IO/M* signal will ________. A) Go high. B) Go low. C) Not be used. D) Tristatearrow_forwardI. Multiple Choice. Shade the box that corresponds to your answer.1. The TEST instruction performs the __________________ operation.a. AND b. OR c. NOT d. XOR2. An instruction that inverts all bits of a byte or word.a. XOR b. NEG c. NOT d. BTC3. The following operations (instruction) function with signed numbers except one.a. SHL b. IDIV c. SAR d. IMUL4. How many places the instruction SHL AX, 10H logically shifted right the value of AX?a. 16 b. 10 c. 1 d. NOTC5. The CMP instruction performs the _________________ operation.a. TEST b. BTC c. SUB d. CMPXCHG6. The task of clearing a bit in a binary number is called __________.a. masking b. ORing c. jumping d. NOTC7. Select an instruction form the following that tests bit position 2 of register CH.a. TEST CH, 2 b. BT CH, 2 c. a and b d. NOTC8. After the execution of instruction NEG AX, what will be the value of AX with initial value of 01101101?a. 10010010 b. 10010000 c. 10010011 d. 100101009. The initial value of AX is 01011100, what will…arrow_forwardthe following blanks with a word or phrase: wires in a measurement circuit and a nearby mains-carrying conductor. w interferenc us source also known as electrostatic coupling, can occur between the signal s and wires in a measurement circuit and a nearby mains-carrying conductor. rom 2A type of optical sensors that can detect the presence of objects within its vicinity without any actual physical contact is called 3. A Sensa-is a device that measures a physical quantity and converts it into a signal which can be read by an observer er by an instrument. 4. The photons hitting the photovoltaic cell pass through the and are absorbed by electrons in the Hin p-doped upper layer S. The ability of an op amp to suppress common-mode signals is expressed in terms of its 6. The --- noise arises from fluctuations in the number of charge carriers. 7. The information in much the same way as the mind. - instrument are computing, manipulating, and processing 8. In variable capacitance transducer used…arrow_forward
- The PLC-5, SLC 500, and MicroLogix use a(n) ____________________ instruction for moving data from one word to another.arrow_forwardwhat is the minimum size of multiplexers necessary to implement a boolean function of 5 variables? Answer = _____ to 1 line muxarrow_forwardQUESTION 11 Match the signal state with its description. READY=1 A. The MPU has put valid data on the bus B. There is a valid address on the bus C. It's an 1/0 operation WR*=0 y ALE=1 D. The device is ready for th MPU to continue 1O/M*=1arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- EBK ELECTRICAL WIRING RESIDENTIALElectrical EngineeringISBN:9781337516549Author:SimmonsPublisher:CENGAGE LEARNING - CONSIGNMENT

EBK ELECTRICAL WIRING RESIDENTIAL
Electrical Engineering
ISBN:9781337516549
Author:Simmons
Publisher:CENGAGE LEARNING - CONSIGNMENT