EC-451 D C Lab

Published on March 2017 | Categories: Documents | Downloads: 19 | Comments: 0 | Views: 214
of 30
Download PDF   Embed   Report

Comments

Content

BAPATLA ENGINEERING COLLEGE DIGITAL COMMUNICATIONS LAB EC-451

PREPARED BY S. Pallaviram, Lecturer

Department of Electronics and Communications Engineering Bapatla Engineering College (Affiliated to Acharya Nagarjuna University) Bapatla-522101 2009-2010

List of Experiments Experiments based on hardware: 1. 2. 3. 4. 5. 6. 7. Generation and Detection of PCM Generation and Detection of FSK Generation and Detection of PSK Generation and Detection of TDM Generation and Detection of FDM Delta Modulation and Demodulation Generation and detection of DPSK

Experiments based on MATLAB: 8. Simulation of AM 9. Simulation of FM 10. Simulation of DFT and IDFT 11. (a) Simulation of LPF (b) Simulation of HPF 12. Simulation of M-ary PSK

1. Generation and Detection of PCM
Aim: To study the Pulse Code Modulation and Demodulation using PCM trainer kit Apparatus: PCM kit, CRO and connecting probes Theory: Pulse code modulation is a process of converting a analog signal into digital. The voice or any data input is first sampled using a sampler (which is a simple switch) and then quantized. Quantization is the process of converting a given signal amplitude to an equivalent binary number with fixed number of bits. This quantization can be either midtread or mid-raise and it can be uniform or non-uniform based on the requirements. For example in speech signals, the higher amplitudes will be less frequent than the low amplitudes. So higher amplitudes are given less step size than the lower amplitudes and thus quantization is performed non-uniformly. After quantization the signal is digital and the bits are passed through a parallel to serial converter and then launched into the channel serially. At the demodulator the received bits are first converted into parallel frames and each frame is de-quantized to an equivalent analog value. This analog value is thus equivalent to a sampler output. This is the demodulated signal. In the kit this is implemented differently. The analog signal is passed trough a ADC (Analog to Digital Converter) and then the digital codeword is passed through a parallel to serial converter block. This is modulated PCM. This is taken by the Serial to Parallel converter and then through a DAC to get the demodulated signal. The clock is given to all these blocks for synchronization. The input signal can be either DC or AC according to the kit. The waveforms can be observed on a CRO for DC without problem. AC also can be observed but with poor resolution. Procedure: The kit is self-explanatory. Identify the blocks according to the theory mentioned and generate a PCM modulated signal and demodulate to check if the same signal is obtained or not. The steps are also given below in a detailed fashion: 1. Power on the Future Tech PCM kit. 2. Measure the frequency of sampling clock. 3. Apply the DC voltage as modulating signal. 4. Connect the DC input to the ADC and measure the voltage. 5. Connect the clock to the timing and control circuit. 6. Note the binary work from LED display. The serial data through the channel can be observed in the CRO. 7. Also observe the binary word at the receiver end. 8. Now apply the AC modulating signal at the input. 9. Observe the waveform at the output of DAC. 10. Note the amplitude of the input voltage and the codeword. Also note the value of the output voltage. Show the codeword graphically for a DC input.

Kit diagram:

Fig 2: Block diagram of PCM

Model waveforms:

2. Generation and Detection of FSK Aim: To study the operation of Frequency Shift Keying modulation and demodulation with the help of kit. Apparatus: FSK kit, CRO and connecting probes Theory: Frequency Shift Keying is the process generating a modulated signal from a digital data input. If the incoming bit is 1, a signal with frequency f1 is sent for the duration of the bit. If the bit is 0, a signal with frequency f2 is sent for the duration of this bit. This is the basic principle behind FSK modulation. Basically a 555 timer is used as an Astable multivibrator, which generates a clock pulse of frequency determined by the values of R and C in this circuit. This is divided by 2, 4, 8 and 16 using 74163 IC, and two of these outputs are used in a NAND logic gates circuit, to generate a FSK modulated wave. To this NAND gates’ circuit a binary data sequence is also supplied. The circuit operation causes a frequency f1 for bit 1, and f2 for bit 0. In the demodulator circuit, the FSK modulated signal is applied to a high Q tuned filter. This filter is tuned to the frequency of either 0 or 1. This filter passes the selected frequency and rejects the other. The output is then passed through a FWR (Full Wave Rectifier) circuit and the output is now above zero volts only. It is then passed through a comparator; if the input to the comparator is greater than threshold value, the output is 1, else it is 0. This digital output of the comparator is the demodulated FSK output. Procedure: 1. Power on the kit. Apply one binary sequence as input message to the FSK modulator. This sequence is taken from decade counter outputs. 2. Give the modulated FSK signal to the demodulator input. Observe the output of the demodulator on the CRO along with the original data sequence. Adjust the tuning controls (of filter and comparator) so that input and demodulated outputs are the same. Do not touch the tuning controls after the adjustment is done. 3. Apply another data sequence input from the decade counter as input message and observe the demodulated output message. Both will be identical. Note the FSK modulated and demodulated waveforms. Sketch them with proper indications. Precautions: 1. Keep the connections tight. 2. Do not lift the IC pins. Check if the ICs of the kit are in tact.

Kit diagram:

Model waveforms:

3. Generation and Detection of PSK Aim: To study the operation of Phase Shift Keying modulation and demodulation with the help of kit. Apparatus: PSK kit, CRO and connecting probes Theory: Phase Shift Keying is a digital modulation Technique. A cosinusoidal carrier of a fixed amplitude and frequency is taken. The digital data of 1’s and 0’s is converted to s (t ) = AC cos(2πf c t ) respectively. In the kit, phase shift keying is obtained using an s (t ) = AC cos(2πf c t + π ) OP-AMP circuitry and a switch. If incoming bit is 0, the output is same as the carrier; if it is zero, the output is 900 phase shifted version of the carrier signal. For demodulation a coherent detector is used. It has 3 parts, a multiplier, and integrator and decision device. The operation can be analyzed from the circuit. Procedure: 1. Power on the kit. Apply carrier signal to the input of the modulator. 2. Apply the modulating data signal from one of the decade counter’s outputs. Observe the modulated signal in the CRO. 3. Apply the PSK modulator output to the input of demodulator. Also apply the carrier signal to the demodulator. 4. Observe the demodulator output on the CRO. 5. Compare the two signal amplitudes. Precautions: 1. Keep the connections tight. 2. Do not lift the IC pins. Check if the ICs of the kit are in tact.

Kit diagram:

Model waveforms:

4. Generation and Detection of TDM Aim: To study the operation of Time Division Multiplexing and demultiplexing with the help of kit. Apparatus: TDM kit, CRO and connecting probes Theory: TDM is the multiplexing technique in time domain. If there are more users who wish to communicate with another set of many users, they are provided a single channel over which sequential communication can happen. Each user is provided a time slot and the user sticks to his slot. The data of each user is sampled. In the channel, the first sample of user 1, then user 2.., are sent for a pre-described set of users. Then again the second sample of each user is sent in the same order. At the receiver synchronization of timing circuits allows, each user’s information to be delivered to the correct destination. In the kit four signals are analogous to 4 users. Each signal is given to the input of the multiplexer. The transmission of signal on the channel is controlled using a switch matrix controlled by a decoder circuit. The 2 by 4 decoder selection lines are driven by divide by 5, divide by 10 outputs. The corresponding output is from 0 to 3. The switch of the corresponding channel closes and the signal’s sample is passed on to the channel. This can be seen from the kit diagram. At the receiver, the clock used for selection is synchronous with the transmitter clock. This ensures that the outputs arrive at the correct order. A duty cycle selector is there on the transmitter side of the circuit, which ensures the mode of operation. The synchronization can be achieved either by direct method or by using a PLL. Both are available on the kit. Procedure: 1. Turn on the power to the kit. Check the clock signal from the transmitter timing logic block. (64KHz) 2. Set the duty cycle selector switch to position 5. 3. Give the function generator outputs signals as input to the transmitter block. Adjust their amplitudes to known values using a CRO before giving to transmitter input. 4. Connect the Tx clock and Ch 0 reference of transmitter to the Rx clock and Ch 0 reference of Receiver block. This ensures that Ch 0 at Tx is same as Tx 0 at Rx. 5. Check the outputs of the demultiplxer or receiver and note the amplitudes. Compare the waveforms with those of sent waveforms. Both must be identical. 6. Now change the duty cycle selector from 5 to 11, position. Use the PLL circuit for synchronization. Connect the Tx clock to the PLL input and the Rx clock also to PLL circuit in the specified position. The Rx clock will now be synchronized to Tx clock. Repeat the steps 3 to 5 and collect the output waveforms. 7. Compare the input and output signals in both the synchronization methods.

Precautions: 1. Keep the connections tight. 2. Do not lift the IC pins. Check if the ICs of the kit are in tact. Kit diagram:

Model waveforms: For Channel selection:

5. Generation and Detection of FDM Aim: To study the operation of Frequency Division Multiplexing and demultiplexing with the help of kit. Apparatus: FDM kit, CRO and connecting probes Theory: The technique of frequency division multiplexing divides the available channel bandwidth into bands and each band is allotted to a single user. All the users can simultaneously transmit in their own frequency band. Using the kit, 2 users can simultaneously communicate using a single channel. Two signals frequencies are initially DSB-SC modulated and then multiplexed to be passed through the same channel. The output is given to a demodulator, which selects the desired frequency band and the detection is done. Voice can be modulated and demodulated using this kit. Procedure: 1. Apply two known signal frequencies to the inputs of the two DSB-SC modulators. Check the output on the CRO. Apply the modulated inputs to the adder circuit. 2. Check the multiplexed signal frequency spectrum in a spectrum analyzer. 3. Apply the multiplexed data signal to the demodulator circuit and also apply the corresponding carrier frequency. The demodulated signal is passed to a Low Pass Filter and the output is seen on the CRO. 4. Connect a microphone to the modulator input and apply the multiplexed signal to the demodulator. Give the output of the low pass filter to a head phone circuit and allow a voice communication to happen. 5. Observe the noise during communication. Connect an audio amplifier to the circuit and perform a voice communication. This would improve the quality. Precautions: 1. Keep the connections tight. 2. Do not lift the IC pins. Check if the ICs of the kit are in tact.

Kit Diagram:

Model

waveforms:

DSB-SC waveform

fc1-fm1

fc1+fm1

fc2-fm2

fc2+fm2

Frequency spectrum of FDM using DSB-SC modulation

6. Generation and Detection of Delta Modulation Aim: To study the operation of delta modulation and demodulation with the help of kit. Apparatus: DM kit, CRO and connecting probes Theory: Delta modulation is the DPCM technique of converting an analog message signal to a digital sequence. The difference signal between two successive samples is encoded into a single bit code. The block and kit diagrams show the circuitry details of the modulation technique. A present sample of the analog signal m(t) is compared with a previous sample and the difference output is level shifted, i.e. a positive level (corresponding to bit 1) is given if difference is positive and negative level (corresponding to bit 0) if it is negative. The comparison of samples is accomplished by converting the digital to analog form and then comparing with the present sample. This is done using an Up counter and DAC as shown in block diagram. The delta modulated signal is given to up counter and then a DAC and the analog input is given to OPAMP and a LPF to obtain the demodulated output. Procedure: 1. Switch on the kit. Connect the clock signal and the modulating input signal to the modulator block. Observe the modulated signal in the CRO. 2. Connect the DM output to the demodulator circuit. Observe the demodulator output on the CRO. 3. Also observe the DAC output on the CRO. 4. Change the amplitude of the modulating signal and observe the DAC output. Notice the slope overload distortion. Keep the tuning knob so that the distortion is gone. Note this value of the amplitude. This is the minimum required value of the amplitude to overcome slope overload distortion. 5. Calculate the sampling frequency required for no slope overload distortion. Compare the calculated and measured values of the sampling frequency. Precautions: 1. Keep the connections tight. 2. Do not lift the IC pins. Check if the ICs of the kit are in tact.

Kit diagram:

Block Diagram

Model Waveforms:

7. Generation and Detection of DPSK Aim: To study the various steps involved in generating the differential binary signal and differential phase shift keyed signal at the modulator and recovering the binary signal from the received DPSK signal. Apparatus: Cathode ray oscilloscope, Probes, Patch chords Theory: Digital communication become important with the expansion of the use of computers and data processing ,and have continued to develop into a major industry providing the interconnection of the computer peripherals and transmission of data between distant sites. Phase shift keying is a relatively new system, in which the carrier may be phase shifted by =90 degrees for mark, and by -90 degrees for space. PSK has a number of similarities to FSK in many aspects; frequency of the carrier is shifted in accordance with the modulating square wave. Fig-1 shows the circuit diagram of differential phase shift key modulation and de modulation .In this IC 8038 is a basic wave form generator which generates sine, square, triangle waveforms. The sine wave generated by 8038 IC is used as a carrier signal to the system. The square wave generated by 8038IC is +/_ 12V level. so this is converted into a +5V signal with the help of a transistor and diodes as shown in fig 1.this square wave is used as a clock input to a decade counter which generates the modulating data outputs. The differential signal to the modulating signal is generated using an ExclusiveOR gate and a 1-bit delay circuit. CD 4051 is an analog multiplexer to which carrier is applied with and with out 180 degrees phase shift(created by using an operational amplifier connected in inverting mode)to the two inputs of the IC 741.Differential signal generated by Ex-OR gate (IC 7486)is given to the multiplexers control signal input. depending upon the level of the control signal, carrier signal applied with or with out phase shift is steered to the output.1-bit delay generation of differential signal to the input is created by using a D-flip flop(IC7474).During the demodulation ,the DPSK signal is converted into a +5V square wave using a transistor and is applied to one input of the ExOR gate. To the second input of the gate ,carrier signal is applied after conversion into a +5V signal. So the Ex-OR gate output is equivalent to the differential signal of the modulating data. This differential data is applied to the one input of the Ex-OR gate and to the second input, after 1-bit delta the same signal is given. So the output of this Ex-OR gate is modulating signal. Procedure: 1. Switch on the experimental board. 2. Check the carrier signal and the data generator signals initially. 3. Apply the carrier signal to the carrier input of the DPSK modulator and give the data generator to the data input of DPSK modulator and bit clock output to the input of DPSK modulator and bit clock o/p to bit clock input of modulator. 4. Observe the DPSK modulating output with respect to the input data generated signal of dual trace oscilloscope, and observe the DPSK signal with respect to differential data also.

5. Give the output of the DPSK modulator signal to the input of the demodulator, give the bit clock output to the bit clock input to the demodulator and also give the carrier output to the carrier input of demodulator. 6. Observe the demodulator output with respect to data generator signal. Kit Diagram:

Model Waveforms:

8. Simulation of AM Aim: To simulate amplitude modulation and demodulation. Program:
AM=input('enter message signal amplitude'); Ac=input('enter carrier signal amplitude'); fm=input('enter message signal frequency'); fc=input('enter carrier signal frequency'); n=input('enter no of cycles'); T=1/fm; t=0:T/100:n*T; m=AM*cos(2*pi*fm*t); c=Ac*cos(2*pi*fc*t); subplot(311); plot(m); xlabel('time'); ylabel('amplitude'); title('message signal'); subplot(312); plot(c); xlabel('time'); ylabel('amplitude'); title('carrier signal'); ka=AM/Ac; s=c+c.*(1+ka*m); subplot(313); plot(s); xlabel('time'); ylabel('amplitude'); title('amplitude modulated signal');

Output:

9. Simulation of frequency modulation Aim: To simulate frequency modulation and demodulation. Program:
AM=input('enter message signal amplitude'); Ac=input('enter carrier signal amplitude'); fm=input('enter message signal frequency'); fc=input('enter carrier signal frequency'); kf=input('enter frequency sensitivity'); T=1/fm; t=0:T/200:2*T; m=AM*sin(2*pi*fm*t); c=Ac*cos(2*pi*fc*t); subplot(311); plot(m); xlabel('time'); ylabel('amplitude'); title('message signal'); subplot(312); plot(c); fi=kf*AM; b=fi/fm; s=Ac*cos(2*pi*fc*t-(b*cos(2*pi*fm*t))); subplot(313); plot(s); xlabel('time'); ylabel('amplitude'); title('frequencymodulated signal');

Output:

10. Simulation of DFT and IDFT Aim: To simulate DFT and IDFT. Program:
x=input('enter sequence'); N=length(x); s=zeros(1,N); for k=1:N for n=1:N s(k)=s(k)+x(n)*exp(-j*2*pi*(k-1)*(n-1)/N); end end disp(s); % INVERSE DISCRETE FOURIER TRANSFORM. m=input('enter sequence'); %m=s; N=length(m); G=zeros(1,N); for n=1:N for k=1:N G(n)=G(n)+m(k)*exp(j*2*pi*(k-1)*(n-1)/N); end; end; disp(G/N);

Output: To be observed at command prompt:
% enter sequence[1 2 3 4 5] % Columns 1 through 4 % % 15.0000 -2.5000 + 3.4410i 0.8123i % % Column 5 % % -2.5000 - 3.4410i % % enter sequence s % Columns 1 through 4 % % 1.0000 - 0.0000i 2.0000 - 0.0000i 0.0000i % % Column 5 % % 5.0000 + 0.0000i

-2.5000 + 0.8123i

-2.5000 -

3.0000

4.0000 +

11 (a). Simulation of Lowpass filter Aim: To simulate frequency response of Lowpass filter Program:
function []=LPF (AP,AS,wp,ws) b=(10^(0.1*AS)-1)/(10^(0.1*AP)-1); c=log10(b^0.5); d=log10(ws/wp); n=(c/d); t=ceil(n); w=0:0.5:800; m=(10^(0.1*AP)-1)^(1/(2*t)); wc=wp/m; s=j*w/wc; switch t case 1 h=1./(s+1); case 2 h=1./((s.^2)+1.414*s+1); case 3 h=1./((s+1).*(s.^2+s+1)); case 4 h=1./(((s.^2)+0.76537*s+1).*((s.^2)+1.8477*s+1)); otherwise disp('order exceeded'); end; plot(w,abs(h)); xlabel('frequency') ylabel('Amplitude') grid on

Output:

11 (b). Simulation of highpass filter Aim: To simulate frequency response of high pass filter. Program:
function []=HPF (AP,AS,wp,ws) b=(10^(0.1*AS)-1)/(10^(0.1*AP)-1); c=log10(b^0.5); d=log10(wp/ws); n=(c/d); t=ceil(n); w=40:0.4:800; m=(10^(0.1*AP)-1)^(1/(2*t)); wc=wp/m; s=-j*w/wc; switch t case 1 h=1./(s+1); case 2 h=1./((s.^2)+1.414*s+1); case 3 h=1./((s+1).*(s.^2+s+1)); case 4 h=1./(((s.^2)+0.76537*s+1).*((s.^2)+1.8477*s+1)); otherwise disp('order exceeded'); end; plot(w,abs(h)); xlabel('frequency') ylabel('Amplitude') grid on Output:

12. Simulation of M- ARY PHASE SHIFT KEYING Aim: To simulate M-ary PSK. Program: N=input('enter the no of combinations'); fc=input('enter frequency of the carrier'); ac=input('enter amplitude value'); T=1/fc; t=0:T/100:2*T; for n=0:N-1 s=cos(2*pi*fc*t+2*pi*n/N); plot(t,s); hold all; end xlabel('time'); ylabel('Amplitude');

Output:

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close