Monday, April 1, 2019

Digital Communication Simulation Using Matlab Computer Science Essay

Digital Communication modeling Using Matlab encryptr erudition EssayObjective Aim Scope of the assignmentThe objective of this sagacity is to model and analyse transition and coding in Communication Systems utilise Matlab.1 This lab exercise aims to teach (show) intonation de pitch contour techniques like QAM 64 oer AWGN wire little personal line of credit harbour Matlabs Communication with in allbox.In task 1, framework and psychoanalysis of modulation and demodulation ( utilise the 64-QAM) is been per give. By use of Matlabs mettlesome performance language, a designed code is been given in each task. familial and reliable designates atomic military issue 18 been show in scatter bizs at antithetic SNR values.Simulation of the rectangular impulsion plastic filter in combination with modulation is been introduced in the second part. The effect of rectangular pulse plastic is been utilize at the transmitter side later the QAM-64 modulation. Integrate and d iddlyshit operating room effect is been used at the murderer side. A full analysis of these devil effects is been given be embarrassed. In both(prenominal) tasks, the transmission is macrocosm all over an AWGN ( bloodlineitive colour Gaussian mental disorder) wireless communion comport.Comparison, analysis and a discussion of the results is been given below each task.Introduction on e very(prenominal)day modulation/demodulation and 64-QAM AWGN channel, to-do and rectangular pulse shaping passage Demodulation ModemIn the ara of tele intercourses, modulation is the process of changing a periodic wave form (i.e. a t cardinal), in order to use that bespeak to transfer a message. Normally the flattop head (usually is a sinusoidal) has higher absolute frequency than the input channelise. Amplitude, mannequin and frequency ar the three key parameters of a sinning wave. These parameters post be modified in accordance with a low frequency breeding indicate to obt ain the modulated note. Amplitude modulation (AM), frequency modulation (FM) and stage modulation argon the most popular analog modulation techniques. Radio and television broadcast stations typically use AM or FM. More complex forms of modulation are microscope stage angle Shift let oning (PSK), Amplitude Shift Keying (ASK) and Frequency Shift Keying (FSK) which are the three basic digital modulation techniques.A device that performs modulation is known as a modulator and a device that performs the inverse operating room of modulation is known as a demodulator. A modulator converts a digital signal to an analog signal (typically a sinusoidal signal) and a demodulator converts a modulated (analog) signal back to the original unmodulated (digital) signal.2 A few years ago a computer was connected to the cyberspace through a modem (in now days a disparate fiber is being used, ADSL modem/router) over a regular analog line. A modem converts an surpass digital signal to an out going modulated signal, and converts an incoming modulated signal to an incoming digital signal.2 changeover is used to change the signals bandwidth so it domiciliate be transmitted on a limited-bandwidth communication channel (like a telephone line or a cable TV channel) without too much distortion.2 It in like manner allows more connected users on the same communication link.Digital modulationDigital modulation schemes transform digital signals into wave forms that are compatible with the nature of the communications channel. There are two study categories of digital modulation. One category uses a constant premium toter and the an early(a)(prenominal) carries the information in mannequin or frequency variations (FSK, PSK). The other category conveys the information in carrier amplitude variations and is known as amplitude foment keying (ASK).In digital communications, modulation is often verbalised in terms of I and Q. This is a rectangular representation of the north- polar diagram. On a polar diagram, the I axis of rotation lies on the zippo degree phase reference, and the Q axis is rotated by 90 degrees. The signal vectors projection onto the I axis is its I component and the projection onto the Q axis is its Q component.5 omen 1 I-Q format 5 visualise 2 Trends in the constancy 5Main Digital pitch contour Schemes TechniquesAmplitude Shift Keying (ASK)Amplitude shift keying represents digital information as variations in the amplitude of a carrier wave. There is an on/off transmission that represents the binary logic 1/0. ASK has poor performance cause is heavily affected by ring and interference. For binary digital modulation, BASK is the simpler form of ASK. phone number 3 Amplitude Shift Keying (ASK) 3Frequency Shift Keying (FSK)The carriers frequency is modulated by the digital signal. 1/0 represented by two different frequencies slightly offset from carrier frequency.4 That nub that is a different frequency for 1 and another freq uency for 0. FSK can be expanded to a M-ary scheme, employing multiple frequencies as different states.3 For binary digital modulation BFSK is the simpler form of FSK. routine 4 Frequency Shift Keying (FSK) 3Phase Shift Keying (PSK)Phase-shift keying (PSK) is a digital modulation scheme that conveys data by changing, or modulating, the phase of the carrier wave. Phases are disjunct by 180o. Phase modulation can be achieved simply by defining a relative phase shift from the carrier, usually equi-distant for each required state. Therefore a two level phase modulated trunk, such as Binary Phase Shift Keying, has two relative phase shifts from the carrier, + or 90o. Phase modulation requires coherent generation and as such if an IQ modulation technique is employed this filtering can be performed at baseband. 6Figure 5 Phases separated by 180o on BPSK 4Figure 6 Phase Shift Keying (PSK) 3Multi-Symbol Signalling M-ary SignalsMultiple- image house is the process where multiple level s are used to encode binary information into groups of two potato chipe, four bits, etc. 8Figure 7 M-ary signals 3Amplitude and phase shift keying can be combined to transmit some(prenominal) bitsper tokenization (in the above figure M=4). These modulation schemes are often refered to as linear, as they require linear amplification. 16-QAM has the largest distance between points, and requires very linear amplification. 16PSK has less stringent linearity requirements, but has less put between constellation points, and is because more affected by noise. M-ary schemes are more bandwidth efficient, but more susceptible to noise. 3Quadrature Phase Shift Key Modulation (QPSK)Quadrauture Phase Shift Keying is a form of PSK. QPSK is a system of modulating digital signals onto a radio-frequency carrier signal victimization four phase states to code two digital bits.QPSK is effectually two independent BPSK systems (I and Q), and therefore exhibits the same performance but twice the bandwidth efficiency. QPSK can be filtered using raised cosine filters to achieve excellent out of band suppression. super envelope variations occur during phase transitions, thus requiring linear amplification. 3Figure 8 QPSK 4Quadrature amplitude modulation (QAM)Quadrature amplitude modulation is a combination of amplitude modulation and phase shift keying. It is a modulation scheme-technique which conveys data by modulating the amplitude of two carrier waves. That is an amplitude modulation on both quadrature carriers. These two waves, usually sinusoids, are out of phase with each other by 90 and are that is why they called quadrature carriers. QAM has extensive use in digital microwave radio links. The 16-QAM below stands for 2n discrete levels n=2 same as in the above QPSK.Figure 9 16-QAMFigure 10 16-QAM 7Additive vacuous Gaussian Noise (AWGN)Additive means that the sum of the transmitted signal and noise produce the get signal. White means that its two sided power spectr al density is flat for all frequencies of interest for radio communication system. The amplitude of the noise is distributed according to a normal or Gaussian distribution. 8 Its information gives a single impairment.Noise pulse shaping and rectangular pulse shapingIn digital telecommunications, pulse shaping can be used to change the waveform of transmitted pulses, so the signal bandwidth matches that of the communication channel, reducing distortion and intersymbol interference. In other words its purpose is to make the transmitted signal shell better to the communication channel by limiting the effective bandwidth of the transmission. Modulation is often followed by pulse shaping. angulate pulse shaping repeats each output from the modulator a obdurate number of times to make believe an up-sampled signal. Rectangular pulse shaping can be a first quantity or an exploratory step in algorithm development, though it is less realistic than other kinds of pulse shaping. If the tran smitter up-samples the modulated signal, then the receiver should down-sample the received signal in the lead demodulating. The integrate and darn operation is one way to down-sample the received signal. 8 Demodulation is often preceded by a filtering or an intergrate and dump-operation.Answers to assignments tasks working class 1In this assignment you are required to design and mechanism the process of modulating a random binary data stream using 64-level QAM (quadrature amplitude modulation), transmitting it over an AWGN (Additive White Gaussian Noise) wireless communication channel, and demodulating the received signal using the 64- QAM demodulator. Your system should consist of a baseband modulator, AWGN channel, and a demodulator. The following table indicates some relevant functions from the Matlab Communications Toolbox which whitethorn be used in this assignment. The functions for 64-QAM modulator/demodulator can be taken from the Matlab Communications Toolbox, or even im plemented by you.Job usanceGenerate a random binary data streamrandintAdd white Gaussian noiseawgnCreate a scatter plotscatterplotCompute the systems BERbiterrThe length of the binary data stream (i.e., the number of the rows in the column vector) is set to 5000.Task 1.1 frame codes to 1) Display the transmitted and received signals in different scatter plots for the following two situations a) SNR = 40 dB b) SNR = 14dB 2) Compute the systems bit fallacy rate (BER) for the two situations.Answer 1.11a) The m-file for SNR=40dBx=randint(4998,1) %Random binary data stream of 4998 digits% arcseconds to symbols social functionxsymbols=bi2de(reshape(x,6,length(x)/6).,left-msb)y=qammod(xsymbols,64) %Modulation using the 64-QAMyTx=y % genetical signalscatterplot(yTx) storage-battery gridirontitle(Transmitted Signal)%Transmission over an Additive White Gaussian Noise channel,SNR=40dBynoise=awgn(yTx,40,measured)yRx=ynoise % current signalscatterplot(yRx)gridtitle(Received Signal, SNR=40dB) zsymbols=qamdemod(yRx,64) %Demodulation using the 64-QAMz=de2bi(zsymbols,left-msb) %Symbols to bits mappingz=reshape(z.,prod(size(z)),1)% tally of add together of Erros and Bit Error RateNumber_of_errors,Bit_Error_Rate=biterr(x,z)Figure 11 Transmitted signalFigure 12 Received signal1b) The m-file for SNR=14dBx=randint(4998,1) %Random binary data stream of 4998 digits%Bits to symbols mappingxsymbols=bi2de(reshape(x,6,length(x)/6).,left-msb)y=qammod(xsymbols,64) %Modulation using the 64-QAMyTx=y %Transmitted signalscatterplot(yTx)gridtitle(Transmitted Signal)%Transmission over an Additive White Gaussian Noise channel,SNR=40dBynoise=awgn(yTx,14,measured)yRx=ynoise %Received signalscatterplot(yRx)gridtitle(Received Signal, SNR=14dB)zsymbols=qamdemod(yRx,64) %Demodulation using the 64-QAMz=de2bi(zsymbols,left-msb) %Symbols to bits mappingz=reshape(z.,prod(size(z)),1)%Computation of Number of Erros and Bit Error RateNumber_of_errors,Bit_Error_Rate=biterr(x,z)Figure 13 Transmitted sign alFigure 14 Received signal2) Computation of the systems bit error rate for the two situationsSNR=40dBSNR=14dBTask 1.2 correspond/ pardon in detail the results obtained in a) and b), and explain clearly how the oddments sleep with from.Answer 1.2In the above code, there is a bit to symbol mapping. A bit cant take values from 0-63 but a group of bits can.The two transmitted signals are identical cause both signals modulated with the same modulation schemes (64-QAM) and transmitted throw the same channel (Additive White Gaussian Noise wireless channel).Received signals have different scatter plot. This happens cause the first received signal was transmitted throw a channel with SNR=40dB and the other one was transmitted throw a channel with SNR=14dB. In the second scatter plot it is obvious that the channel is too noisy in accordance with the first scatter plot which seems that it hasnt got any clue of noise. For example, if a ADSL line has SNR lower than 15dB then several problems occurred like frequent disconnections etc.According to scatter plots the bit error rate and the number of errors for the first signal with SNR=40 was expected to be 0 cause the channel was clear from noise. On the contrary, for the second signal with SNR=14dB bit error rate and number of errors expected to be non zero. both(prenominal) expectations verified.The ratio of the signal strength to the noise level is called the signal to- noise ratio (SNR), . If the SNR is high (ie. the signal power is much greater than the noise power) few errors will occur. However, as the SNR reduces, the noise may cause symbols to be demodulated incorrectly, and errors will occur. 3Task 2Modulation is often followed by pulse shaping, and demodulation is often preceded by a filtering or an integrate-and-dump operation. In this task you are required to investigate the effect of rectangular pulse shaping by using it at the transmitter side after the 64-QAM modulation and also the effect of integrate-an d-dump operation at the receiver side. Rectangular pulse shaping repeats each output from the modulator a fixed number of times to create an upsampled signal. If the transmitter upsamples the modulated signal, then the receiver should downsample the received signal before demodulation. The integrate-and-dump operation is one way to downsample the received signal. The following table indicates the special relevant functions from the Matlab Communications Toolbox which may be used in this assignment.JobFunctionRectangular pulse shapingrectpulseIntergrate-and-dump downsamplingIntdumpTask 2.1Write codes to 1) Display the received signals in scatter plots when a) SNR = 40 dB b) SNR = 14dB 2) Compute the systems bit error rate (BER) for the two situations.Answer 2.11a) The m-file for SNR=40dB%Random binary data stream of 5004 digitsx = randint(5004,1)%Bit to Symbol Mappingxsymbols = bi2de(reshape(x,6,length(x)/6).,left-msb)%Modulation using the 64-QAM.y = qammod(xsymbols,64)% pulse rate shaping, 3 samples per symbolshaped=rectpulse(y,6)%Transmitted SignalyTx = shapedscatterplot(yTx)title(Transmitted signal)grid%Transmission over an Additive White Gaussian Noise channel,SNR=14dBynoise = awgn(yTx,40,measured)%Received SignalyRx = ynoise %Integrate and dumpdeshaped=intdump(yRx,6)scatterplot(deshaped)title(Received signal,SRN=40dB)grid%Demodulation using the 64-QAMzsymbols = qamdemod(deshaped,64)%Symbol to bit mapping to perform the computation of BERz = de2bi(zsymbols,left-msb)a = reshape(z.,prod(size(z)),1)%Computation of Number of Erros and Bit Error RateNumber_of_errors,Bit_Error_Rate = biterr(x,a)Figure 15 Received signal,SNR=40dB1b) The m-file for SNR=14dB%Random binary data stream of 5004 digitsx = randint(5004,1)%Bit to Symbol Mappingxsymbols = bi2de(reshape(x,6,length(x)/6).,left-msb)%Modulation using the 64-QAM.y = qammod(xsymbols,64)%Pulse shaping, 3 samples per symbolshaped=rectpulse(y,6)%Transmitted SignalyTx = shapedscatterplot(yTx)title(Transmitted sig nal)grid%Transmission over an Additive White Gaussian Noise channel,SNR=14dBynoise = awgn(yTx,14,measured)%Received SignalyRx = ynoise %Integrate and dumpdeshaped=intdump(yRx,6)scatterplot(deshaped)title(Received signal,SRN=14dB)grid%Demodulation using the 64-QAMzsymbols = qamdemod(deshaped,64)%Symbol to bit mapping to perform the computation of BERz = de2bi(zsymbols,left-msb)a = reshape(z.,prod(size(z)),1)%Computation of Number of Erros and Bit Error RateNumber_of_errors,Bit_Error_Rate = biterr(x,a)Figure 16 Received signal,SNR=14dB2) Computation of the systems bit error rate for the two situationsSNR=40dBSNR=14dBTask 2.2Compare/explain the results with those obtained in Task 1, and explain clearly how the differences come from.Answer 2.2The difference between Task1 and Task 2 are the rectangular pulse shaping and integrate and dump operation. Rectangular pulse shape upsampling the signal after modulation. It actually applies a square pulse to the signal and repeats each symbol s everal times (in this case symbols are repeated 6 times). The dump operation is downsampling the signal. It is actually an integral of the signal for a single period.In this case, modulation followed by pulse shaping and demodulation preceded by integrate and dump operation. Since rectangular pulse shaping repeats each output from the modulator a fixed number of times then we expected our signals to be better than those in task1. This expectation came true since BER for SNR=40 dB is 0 and for SNR=14 dB is 0.0038. In the second case when SNR=14 dB it is obvious that BER and number of errors reduced dramatically.The filtering on the transmitter causes intersymbol interference. The filtering at the transmitter and the channel typically cause the received pulse sequence to suffer from interysmbol interference and this search as an amorphous smeared signal, not quite ready for sampling and detection. When the channel bandwidth is much greater than the pulse bandwidth, the spreading of t he pulse will be slight. When the channel bandwidth is close to the signal bandwidth, the spreading will exceed symbol duration and cause signal pulses to overlap. This overlapping is called intersymbol interference. 11 Rectangular pulse shaping was used to minimize distortion and the effect of intersymbol interference. It made the transmitted signal fit better to the communication channel by limiting the effective bandwidth of the transmission.The BER and number of errors improvement succeeded because symbols were sent several times. In this case, filtering made the signal better. Without filtering, signals would have very fast transitions between states and therefore very dewy-eyed frequency spectra much wider than is needed for the purpose of sending information. 5ConclusionsIf the SRN value is high enough, the received signal is almost clear from noise.High SNR value stands for a value close to zero for Bit Error Rate.In the presence of noise and interference, it is necessary to increase signal power to reduce the orifice of errors.The bit error rate (BER) of a system indicates the quality of the link.Filtering is inbred for good bandwidth efficiency.High level M-array schemes (such as 64-QAM) are very bandwidth-efficient but more susceptible to noise and require linear amplification. 3

No comments:

Post a Comment