Total Marks: / LAB 4 GENERATION OF ASK MODULATION SIGNAL Student Name:... Metrics Num:... Date:... Instructor Name:... Faculty of Engineering Technology (BTECH), Universiti Malaysia Perlis SUBMITTED Signature & Date (Student) Signature & Date (Instructor/lecturer) 1
EXPERIMENT 4 GENERATION OF ASK MODULATION SIGNAL 1.0 OBJECTIVES: 1.1 To perform the amplitude shift keying (ASK) simulation using MATLAB. 1.2 To generate and demodulate the amplitude shift keying (ASK) signal using MATLAB. 1.3 To plot the amplitude shift keying (ASK) modulation and demodulation signal using MATLAB. 2.0 EQUIPMENT / APPARATUS MATLAB Software 3.0 INTRODUCTION Amplitude shift keying (ASK) is a very popular modulation used in control applications. This is due to its simplicity and low implementation costs. ASK modulation has the advantage of allowing the transmitter to idle during the transmission of a bit zero. Therefore this reduces the power consumption. This disadvantage of ASK modulation arises in the presence of an undesired signal. In amplitude shift keying (ASK), as the name specifies the amplitude of the carrier signal is varied between two levels if the ASK scheme is Binary ASK. Sometimes it is more than two levels if the ASK scheme is M-array. All this is done according to the data bit to be transmitted over the noisy channel. The information is assumed to be unipolar binary data. In binary ASK bit 1 is transmitted with the carrier of specified amplitude. The bit zero is transmitted with the no carrier during the bit interval. During all the bit intervals amplitude will be changed but frequency will be kept constant. In M-array ASK, the amplitude levels of the carrier will change between M numbers of values. The main advantage of the ASK is power saving and simplicity in implementation. The ASK wave form can be represented mathematically as v ask A ( t) = [1+ v ( t)] 2cos( ωt) m c 2
Where, v ask (t) = amplitude shift keying wave v m (t) = digital information signal (volt) A/2 = unmodulated carrier amplitude (volt) ω c = analog carrier radian frequency (rad/s) Amplitude shift keying (ASK) is a simple and elementary form of digital modulation in which the amplitude of a carrier sinusoid is modified in a discrete manner depending on the value of a modulating symbol. This is a narrowband modulation scheme and we assume that a large number of carrier cycles are sent within a symbol interval. Obviously show that the information is embedded only in the peak amplitude of the modulated signal. This is described as a one type of digital amplitude modulation technique. BASK has only one basis function so this can be described as a one dimensional modulation scheme. This technique is used for telegraph services. On-off keying is not a spectrally not efficient scheme because as the amplitude of the carrier changes abruptly when the data bit changes. For this reason this technique is used for transmission of data at low or moderate data rates. The binary message to be transmitted is taken and it should be represented in a waveform so we can implement ASK. Then generate the carrier it may be either sin or cos. After generating carrier multiply the carrier with the message point by point. In demodulation the code checks for the value and if the value matched during the all the bit interval then the value will be returned. MATLAB commands: K=Length(x) It finds the length of the array x and returns its length as an integer. T=[0.01:0.01:k] This specifies the time interval over which the carrier time period will be decided. Z=m.*c This is matlab Command for point by point multiplication. Sometimes it generates errors if the m and c are not of same dimensions. M((i-1)*100+1:i*100)=a(i) This applies the value of the message bit i during the specified interval. p = randperm(n) Returns a random permutation of the integers 1:n. 3
mod(1,randperm(n)) this command generates the n number of integers and all these having only two values. For example mod (1, randperm (5)) ans =[0 1 1 1 1] gtext('string') This command places a specified string on the figure 4.0 EXAMPLES The examples below show how to use MATLAB Software to produce amplitude shift keying (ASK) modulation and demodulation. Study the source code given and simulate to see the plotting signal. EXAMPLE 1: clear all; clc; close all; a=mod(1,randperm(5)) k=length(a) t=[0.01:0.01:k] c=sin(2*pi*5*t) for i=1:1:k m((i-1)*100+1:i*100)=a(i) end subplot(311) plot(m) xlabel('time') ylabel('amplitude') title('message signal') subplot(312) plot(c) xlabel('time') ylabel('amplitude') title('carrier signal') z=c.*m subplot(313) plot(z) xlabel('time') ylabel('amplitude') title('amplitude shift keying') 4
EXAMPLE 2: x=input('binary message signal');%binary message signal [1 1 0 1 0] l=length(x);%length of message t=[0.01:0.01:l];%time scaling c=cos(2*pi*t);%carrier signal for i=1:1:l m((i-1)*100+1:i*100)=x(i);%loop to convert inputed sequence to pulsewave end a=c.*m; subplot(311) plot(m) title('massage signal') subplot(312) plot(a) title('ask Signal') % ASK Demodulation envelope detection without noise for i=1:1:(i*100) if a(i)==0 r(i)=0; else r(i)=1; end end subplot(313) plot(r) title('recovered signal') 5
5.0 EXERCISES 1. What is the carrier frequency used in Example 1? 2. Generate ASK modulated signal that has a carrier signal with f c =10 and message signal has a binary sequence on-off form = 5. Plot and label the graph of message signal, carrier signal and ASK modulated signal. 6
ANSWERS: Example 1: Example 2: 7
Exercise 1: Exercise 2: Program: 8
9
DISCUSSIONS: CONCLUSIONS: 10
LABORATORY REPORT MARKING RUBRIC TEMPLATE: DISCUSSION 0-3 4-7 8-10 Very few relevant discussion on every results obtained in the experiment. Only some relevant discussion on every results obtained in the experiment. Adequate and relevant discussion on every results obtained in the experiment. CONCLUSION 0-1 2-3 4-5 Conclusion slightly mentioned the achievement of experiment objectives and summary from the results. Conclusion not mentioned the achievement of experiment objectives. Conclusion clearly mentioned the achievement of experiment objectives and summary from the results. 11