How to Create 40 bits long random data sequence of ‘0’s and ‘1’s and plot sqare wave from the obtained random binary data

2 vues (au cours des 30 derniers jours)
Use random integer generation function to create random sequence of ‘0’ s and ‘1’s which is 40 bits long. Write a Matlab code to apply 16 QAM modulation to the sequence of bits and obtain a plot demonstrating how the resultant modulated carrier wave looks like.
Group generated data stream into groups of 8 bits and research which symbols does the data stream represent in ANSI code system (ASCII table can be used if the first bit in each symbol group is ‘0’). Find binary, decimal, octal and hexadecimal representation of each symbol and summarise this in a table.
Follow the steps to help you write Matlab code and complete the task:
  1. Create 40 bits long random data sequence of ‘0’s and ‘1’s.
  1. Plot data as a square wave.
  1. Modulate the data using 16 QAM modulation method. Research and use “qammod” command. Use Matlab’s default Gray bit mapping for constellation diagram which is shown in Fig. 1. You can use this figure to verify correctness of your results.
Before applying “qammod” command you need to regroup data bits appropriately according to the required number of bits per constellation point (Hint: use “reshape” command) and convert each data group to decimal form.
Fig. 1. 16-QAM constellation diagram.
  1. Plot constellation points representing your data based on the outcome from “qammod” (Hint: use “scatterplot” command). Check correctness by comparing to Figure 1.
  2. Write code and export the figure into a .jpg file. (Alternatively use save button in Matlab).
  3. Create In-phase (cos (x) ) and Quadrature (-sin(x) ) carrier wave components with correct amplitudes for each required constellation point.
  4. Include a table in the report that shows “qammod” outcome for each constellation point representing your data and how to add In-phase and Quadrature components for each point.
  5. Demonstrate In-phase and Quadrature components addition for each ANSI symbol.
  6. Write a Matlab code to construct and plot the carrier wave for each ANSI symbol (5 plots in total). Include titles and labels on each plot.
  7. Adjust X axis to fit 5 periods of the sinusoid for each constellation point for clear visibility on the graph. Comment on the initial phase of the resultant wave after addition.
Write code and export each figure into a .jpg file. (Alternatively use save button in Matlab).
  1. Demonstrate the final result for a carrier wave modulated with the generated data by joining all resultant waves corresponding to each required constellation point.
  2. Write a Matlab code to plot the modulated carrier wave corresponding to your data sequence. Make sure your X axis is long enough to fully display all the states on the plot.
  3. Export image into a .jpg file.

Réponses (0)

Catégories

En savoir plus sur Test and Measurement dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by