Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part l Observe the sample Matlab script message passing.m. This script generates a character string, converts the string to ASCII values, converts the ASCil values
Part l Observe the sample Matlab script message passing.m. This script generates a character string, converts the string to ASCII values, converts the ASCil values into an array of bits, turns the bits back into ASCII values, and finally converts the ASCIl values back into a message string. In part I of the project, create two functions based on the existing code: one to encode the message and one to decode the bits. Modify the message_passing script so that it uses these functions. function [ bits-tx ] = my-encode( my-message ) function [ message-rx ] = my, decode( bits-rx ) Part ll In part Il, add a noise component to the signal before determining the received bits. Use the Matlab randn() function to add random noise with Gaussian distribution and parameters 2 and representing the variance and mean, respectively. Start with values = 0.1 and = 0, Explore what happens to your message when you change the values of and . Question 1: As you change and , what happens to your message? why? Question 2: Consider the noise parameters = 0.1 and 0.5. How can you change the parameter DECISION LEVEL to improve the performance of this message passing system? In Part III, you will analyze the bit errors caused by the noise. In this case, you can randomly generate an array of bits rather than using a message. First, setup the code to generate bits t, add noise, and determine bitsrx. Next, determine the number of errors by comparing the values of bits tx and bits rx. Finally, determine the percentage of bits that are received in error(i.e., the bit error rate or BER) Question 3: Using your knowledge of the Gaussian distribution, determine the theoretical probability of getting a bit error (i.e., probability that you transmit a 0 and receive a 1 or transmit a 1 and receive a 0). Question 4: How does the theoretical BER from question 3 compare with what you see in simulation? Extra Credit Add code to determine (a) the percentage of transmitted 1s decoded as 0 and (b) the percentage of transmitted 0s decoded as 1. Compare your results with the theoretical probability of these events. This is the message passing script Encode Message asciivalsdec2bin (my message) bits tx reshape (asci ivals, [size (ascii-vals, 1)+7,1)); = % Simulated Signal Transmission 91 bits rx -bin2dec (bits-tx) + 0; % Add Noise Array Here num2str (sig > DECISION-LEVEL)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started