当前位置:  > 科技
2024 05/11 09:04:36

EEEE2057代做、Matlab语言编程代写


EEEE2057 Coursework 2
Digital Modulation
The aim of the coursework is to evaluate BER for a range of popular digital modulation techniques.
The coursework has a total of four tasks:
- Task 1 is familiarisation with the Matlab Simulink programme and the parameters of the
simulation. For this part a manual on how to build a simple communication channel is added
in this document.
- Task 2 is evaluation of the BER for QPSK, 8PSK, 16PSK, 64PSK, 4QAM, 8QAM, 16QAM and
64QAM modulation techniques in the presence of the additive white Gaussian noise.
For a given modulation scheme, the BER analysis is done by changing the signal to noise ratio
(parameter Eb/No) in the communication block that has additive white noise (AWGN block).
Please note that the simulation parameters will need to be adjusted for each modulation
technique. The corruption in data can also be demonstrated by sending a small text file (eg.
Poem) across the link to note corruption in the transmission.
- Task 3 will consider a practical transmission system where additive white noise, time delay
and frequency offset are added as a consequence of a more realistic communication system.
The effect of the low pass filter on signal spectrum is also included. In this task you will plot
BER for QPSK and compare that results from the one obtained in Task 2 and comment on the
results.
- Task 4 is a report outlining the simulation build together with simulation results and
conclusions.
Guidance on how to build a communication link in Simulink is given in the Appendix.
A report of results should be in the provided document and should not be longer than 4 pages. The
penalty for exceeding the length is 5% per page.
The marking scheme is given in Table 1.
Table 1. Rubric marking scheme
Appendix: BUILDING A QPSK COMMUNICATION CHANNEL IN SIMULINK
This manual will help you define a very simple communication channel with additive white noise.
The only parameters that you will need to change is to use different modulation and
demodulation boxes and obtain BER analysis for each type of modulation. Parameters in boxes
need to be defined accordingly.
Open the Matlab programme.
Click on Simulink on the top bar:
Click on Blank Model:
Click on Library Browser. This Library has all the components that can be used to build a
communication system.
This is the circuit you want to build:
Start:
Use the Library Browser or Toolboxes to find the required Simulink Blocks. Start by building the
central communication channel, which includes the AWGN (Additive White Gaussian Noise) element.
Drag your building blocks from the Library to your Simulink worksheet or workspace as follows:
Click on Communication Toolbox->Modulation->Utility Blocks and drag Integer to Bit Converter
into the workspace.
Click on Communication Toolbox->Modulation->Digital Baseband.
Double click on Digital Baseband -> PM and drag into the workspace QPSK modulator and QPSK
demodulator block.
Click on Communication Toolbox->Channels->AWGN channel and drag the AWGN channel block
into the workspace. AWGN block adds Gaussian white noise to the signal.
Click on Communication Toolbox->Comm Sinks and drag Error Rate Calculation into the workspace
In Error rate Calculation set the Output data to Port:
Click on Simulink->Sinks and drag the Display box into the workspace. Display box will show the
reading for the BER.
Use the arrows at the input/output ports of each block to connect them as shown below. Use the Tx
arrow of the Error Calculation block to connect it to transmitter. The completed system now looks
like:
For the left hand section, develop the following:
Here we have a text input for the poem or limerick that we want to transmit across our data link.
Use a “String Constant” block as the source of your data. Use the Library Browser to find blocks that
you need to build your simulation model.
Modify the “String Constant” block so that it contains to be transmitted across the data link. The
“Output data type” is selected as a “string” type. The block has been renamed “POEM”. Carriage
return and line feed characters have been added here, but these are optional.
We will clock the data through our communication link. A “Digital Clock” block, found in the Library
Browser will be used to clock the data.
A time period of 2 milliseconds is used to clock the data. If we have a data sequence of around 500
bytes then we can transfer this in 1 Second.
A counter is employed as an index variable into the string of characters that are to be transmitted.
Employ the Counter Block from the DSP System Toolbox. Select the parameters as follows:
The “Maximum count” is set to 512. This is enough to span the length of the poem. The “Initial
count” is set to 1. The “Count data type” is set to double. The “Reset input” check box is selected
Use the “Select Columns” block, found from the Library Browser to index and sequence through the
data to be transmitted across our communications link.
Here, the “Number of input signals” is one. It is the complete string that is to be transmitted. The
input from the counter is an index into the string, so that each character is selected in turn.
More detail on the output section is shown here.
Use the “Signum” block from the Simulink Library Browser to route the received signal to the Bit to
Integer Converter. Within the sign block, select the “Enable zero-crossing detection” check box.
.
Drag a “Bit to Integer Converter” block from the Simulink Library Browser for inclusion in our
model. Set the Number of bits per integer to 8. Select MSB first to ensure consistency with our
transmitter. The rest of the parameters are set as follows:
Include an ASCII to string block, source from the Simulink Library Browser. The output section is
completed through “To Workspace” blocks to save the received data.
The middle section includes the QPSK modulator, Additive White Gaussian Noise and QPSK
demodulator blocks.
Add a “Callback Buttion” to post-process the simulation data. This post-processing calculates the
percentage of corrupted characters that occurred during the transmission. The Matlab script to
calculate this is:
Check that you have set all the parameters correctly for the QPSK modulation.
For QPSK modulator: input type is integer; phase offset is pi/4; For different type of M-ary
modulation the phase offset will be different.
AWGN block: Mode: Signal to noise ratio; Number of bits per symbol = 2; Input signal power =1 W;
samples per symbol =1; Different modulation will have different number of bits per symbol but
the samples per symbol is kept fixed 1.
For QPSK demodulator: input type is integer; phase offset is pi/4; For different type of M-ary
modulations the phase offset will be different.
For longer simulation runs that evaluate Eb/N, longer data sequences may be obtained through the
inclusion of a random data generator as shown below:
Now click on Run and observe E Eb/N=5dB and observe and record error rate calculation in the display
box.
Change Eb/N in the AWGN block and repeat to get a waterfall plot for QPSK.
Please note the parameter “Stop time” is set to 1000 sec. You should investigate the impact of this
parameter as part of the coursework in the Task 1. In order to obtain accurate results you need to
consider a signal of adequate duration and the duration of the signal is controlled by the parameter
“Stop time”.
Please note for M-QAM modulations select Rectangular QAM Modulator (and Demodulator) and
select “Average Power” for normalisation method. Below are parameters for 4QAM:
Save your model!
The objective in this task is to assess the BER (Bit Error Rate) for different modulation schemes and
to note the level of corruption that can occur when transferring our text file across the
communication link.
Manual for Task 3 only:
Open Matlab and click on Simulink. Click on Examples -> Communication Toolbox and then open
QPSK Transmitter and Receiver.

请加QQ:99515681  邮箱:99515681@qq.com   WX:codinghelp