Cs Lab Manual
Cs Lab Manual
CONTENTS S.NO.
1 2 3
PAGE NO.
3 8 13 16 18 20 24 27 31 35 39 41 44 46 54 56 59
4 5
7 8 9 10 11 12
1.
OBJECTIVE To perform the amplitude modulation and demodulation and to calculate the modulation index HARDWARE REQUIRED AM trainer kit, CRO,patch chords,CRO probes. THEORY- AMPLITUDE MODULATION Modulation is defined as the process by which some characteristics of a carrier signal is varied in accordance with a modulating signal. The base band signal is referred to as the modulating signal and the output of the modulation process is called as the modulation signal. Amplitude modulation is defined as the process in which is the amplitude of the carrier wave is varied about a means values linearly with the base band signal. The envelope of the modulating wave has the same shape as the base band signal provided the following two requirements are satisfied
The carrier frequency fc must be much greater then the highest frequency components fm of the message signal m (t) i.e. fc >> fm The modulation index must be less than unity. if the modulation index is greater than unity, the carrier wave becomes over modulated.
BLOCK DIAGRAM
AMPLITUDE MODULATER
Carrier signal
Amplitude modulator
Message signal
MODEL GRAPH
FORMULA USED Modulation index (m) = Vm=Amplitude of message signal Vc=Amplitude of carrier signal
X 100 =
The process of detection provides a means of recovering the modulating Signal from modulating signal. Demodulation is the reverse process of modulation. The detector circuit is employed to separate the carrier wave and eliminate the side bands. Since the envelope of an AM wave has the same shape as the message, independent of the carrier frequency and phase, demodulation can be accomplished by extracting envelope. An increased time constant RC results in a marginal output follows the modulation envelope. A further increase in time constant the discharge curve become horizontal if the rate of
modulation envelope during negative half cycle of the modulation voltage is faster than the rate of voltage RC combination ,the output fails to follow the modulation resulting distorted output is called as diagonal clipping : this will occur even high modulation index. The depth of modulation at the detector output greater than unity and circuit impedance is less than circuit load (Rl > Zm) results in clipping of negative peaks of modulating signal. It is called negative clipping. BLOCK DIAGRAM
AMPLITUDE DEMODULATION
AM signal
LPF
amplifier
demodulated o/p
MODEL GRAPH
CIRCUIT DIAGRAM
DESIGN PROCEDURE Given VC = 50mV, fc = 500 KHz, fm = 1KHz. Set modulating voltage Vm = 10 V. Emax = 1.6 V, Emin = 0.7 V Modulation index (m) = Emax- Emin Emax+Emin
*100 =39.13%
PROCEDURE The connection is made as per the block diagram. 2. Switch on the trainer kit. 3. The modulating signal is given as a input to amplitude modulator 4. The high frequency carrier signal is also applied to the amplitude modulator 5. The amplitude modulated signal is obtained as an output from the amplitude modulator. 6. Using the Emax and Emin the modulation index is calculated. 7. The readings are noted and the values are tabulated.
1.
TABULATION Waveform Message signal Carrier signal Modulated Signal Demodulated Signal Amplitude (volts) Time division (sec.)
RESULT Thus the amplitude modulation and demodulation were performed and the modulation index for various modulating voltage were calculated.
FREQUENCY MODULATION
Pin no.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Symbol
AMSI STO MO VCC TC1 TC2 TR1 TR2 FSKI BIAS SYNCO GND WAVEA1 WAVEA2 SYMA1 SYMA2
Description
Amplitude Modulating Signal Input. Sine or Triangle Wave Output. Multiplier Output. Positive Power Supply. Timing Capacitor Input. Timing Capacitor Input. Timing Resistor 1 Output. Timing Resistor 2 Output. Frequency Shift Keying Input. Internal Voltage Reference. Sync Output.
Ground pin.
Wave Form Adjust Input 1. Wave Form Adjust Input 2. Wave Symmetry Adjust 1. Wave Symmetry Adjust 2.
CIRCUIT DIAGRAM
FREQUENCY DEMODULATION
10
11
TABULATION: Waveform Message signal Carrier signal Frequency Modulated output Frequency Demodulated output Amplitude (volts) Time division (sec.)
PROCEDURE 1. The circuit connection is made as shown in the circuit diagram. 2. The modulating signal FM is given from an FG (1KHZ) 3. For various values of modulating voltage Vm the values of Fmax and Fmin are noted 4. The values of the modulation index are calculated.
RESULT Thus the frequency modulation and demodulation was performed and the modulation index was found.
12
THEORY
Pulse amplitude modulation is a scheme, which alters the amplitude of regularly spaced rectangular pulses in accordance with the instantaneous values of a continuous message signal. Then amplitude of the modulated pulses represents the amplitude of the intelligence. A train of very short pulses of constant amplitude and fast repetition rate is chosen the amplitude of these pulse is made to vary in accordance with that of a slower modulating signal the result is that of multiplying the train by the modulating signal the envelope of the pulse height corresponds to the modulating wave .the Pam wave contain upper and lower side band frequencies besides the modulating and pulse signals. The demodulated PAM waves, the signal is passed through a low pass filter having a cut off frequencies equal to the highest frequency in the modulating signal. At the output of the filter is available the modulating signal along with the DC component PAM has the same signal to noise ratio as AM and so it is not employed in practical circuits BLOCK DIAGRAM
MODULATOR
continuous modulatingsignal
multiplier
PAM signal
DEMODULATOR
PAM signal
demodulated o/p
13
MODEL GRAPH
MODULATION
DEMODULATION
14
PROCEDURE 1. The connection is made as per the block diagram. 2. Switch on the trainer kit. 3. The modulating signal is given as a input to multiplier 4. The high frequency carrier signal is also applied to the multiplier 5. The pulse amplitude modulated signal is obtained as an output from the multiplier 6. The readings are noted and the values are tabulated.
TABULATION Waveform Baseband signal (sine wave) Carrier signal (square waveform) PAM Output signal Demodulated signal TON TOFF TON TOFF Amplitude (volts) Time division (sec.)
RESULT Thus the pulse amplitude modulation was performed and its corresponding demodulation was also performed.
15
PWM signal
16
MODEL GRAPH
PROCEDURE 1. 2. 3. 4. 5. 6. The connection is made as per the block diagram. Switch on the trainer kit. The modulating signal is given as a input to pulse width modulator The high frequency carrier signal is also applied to the pulse width modulator The modulated signal is obtained as an output from the pulse width modulator. The readings are noted and the values are tabulated.
TABULATION Waveform Input PWM Amplitude (Volts) Time Period (sec) TON TOFF
RESULT Thus the pulse width modulation was performed and its corresponding demodulation was also performed.
17
continuous modulatingsignal
PPM signal
MODEL GRAPH
18
PROCEDURE 1. The connection is made as per the block diagram. 2. Switch on the trainer kit. 3. The modulating signal is given as a input to pulse position modulator 4. The high frequency carrier signal is also applied to the pulse position modulator 5. The modulated signal is obtained as an output from the pulse position modulator. 6. The readings are noted and the values are tabulated. TABULATION Waveform Input PWM Amplitude (Volts) Time Period (sec) TON TOFF
RESULT Thus the pulse position modulation was performed and its corresponding demodulation was also performed.
OBJECTIVE To perform pulse code modulation and demodulation and to plot the waveforms for binary data at different frequencies. HARDWARE REQUIRED PCM trainer kit,CRO,patch chords THEORY In Pulse code modulation (PCM) only certain discrete values are allowed for the modulating signals. The modulating signal is sampled, as in other forms of pulse modulation. But any sample falling within a specified range of values is assigned a discrete value. Each value is assigned a pattern of pulses and the signal transmitted by means of this code. The electronic circuit that produces the coded pulse train from the modulating waveform is termed a coder or encoder. A suitable decoder must be used at the receiver in order to extract the original information from the transmitted pulse train. This PCM system consists of BLOCK DIAGRAM
MODEL GRAPH
20
CIRCUIT DIAGRAM
21
22
PROCEDURE 1. The connection is made as per the block diagram. 2. Switch on the trainer kit. 3. The input signal gets processed from ADC,shift register in the transmitter side and through DAC and shift bregister in receiver side 4. The modulated signal is obtained as an output. 5. The readings are noted and the values are tabulated.
TABULATION Waveform
PCM Modulation PCM Demodulation
Amplitude (Volts)
RESULT Thus the Pulse Code modulation and demodulation were performed and graphs were plotted.
23
24
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.
25
RESULT Thus the Delta modulation and demodulation were performed and graphs were plotted.
OBJECTIVE To perform ASK modulation and demodulation and to plot the waveforms for the given binary data HARDWARE REQUIRED
ASK Trainer Kit, patch chords, CRO and probes.
The input binary symbols are represented in polar form with symbols 1 & 0 represented by constant amplitude levels Eb & -Eb. This binary wave is multiplied by a sinusoidal carrier in a product modulator. The result is a ASK signal.
ASK RECEIVER
27
The received ASK signal is applied to a correlator which is also supplied with a locally generated reference signal 1 (t). The correlated o/p is compared with a threshold of zero volts. If x1> 0, the receiver decides in favour of symbol 1. If x1< 0, it decides in favour of symbol 0 CIRCUIT DIAGRAM
Then, Re = Vre/Ic = 1K Assuming a peak to peak value of 7V,300Hz for m(t), we get, Vrb =( Vmp-p/2) Vbe sat Vre(max) =3.5-0.7-2.5=0.3V Ib = Ic/hfe = 25A
28
Ib(sat) = 1.2Ib = 30A Rb = Vrb/Ib(sat) =10k Detection Given fm = 300Hz fm = 1/2RC let C = 0.1F then R = 5.6K
PROCEDURE 1. The connection is made as per the block diagram. 2. Switch on the trainer kit. 3. The modulating signal is given as a input to product modulator 4. The high frequency carrier signal is also applied to the product modulator 5. The modulated signal is obtained as an output from the product modulator. 6. The readings are noted and the values are tabulated. MODEL GRAPH
29
RESULT Thus the ASK modulation and demodulation were performed and required graphs were plotted.
OBJECTIVE To perform FSK modulation and demodulation and to plot the waveforms for the given binary data. HARDWARE REQUIRED FSK Trainer Kit ,CRO,probes,patch chords THEORY Frequency Shift Keying (FSK) is a modulation Data transmitting technique in which carrier frequency is shifted between two distinct fixed frequencies to represent logic 1 and logic 0. The low carrier frequency represents a digital 0 (space) and higher carrier frequency is a I (mark). FSK system has a wide range of applications in low speed digital data transmission systems. FSK Modulating & Demodulating circuitry can be developed in number of ways, familiar VCO and PLL circuits are used in this trainer. BLOCK DIAGRAM
FSK MODULATOR
Square wave
i/p
FSK o/p
Debounce logic
FSK DEMODULATOR
FSK i/p
Error amplifi er
Phase comparator
o/p
VCO
31
CIRCUIT DIAGRAM
DESIGN PROCEDURE
Generation
Let Ie = Ic = 2.5mA,
hfe=100,
Vre=2.5V
Then, Re = Vre/Ic = 1K Assuming a peak to peak value of 7V,300Hz for m(t), we get, Vrb =( Vmp-p/2) Vbe(sat) Vre(max) =3.5-0.7-2.5=0.3V Ib = Ic/hfe = 25A Ib(sat) = 1.2Ib = 30A Rb = Vrb/Ib(sat) =10k
Detection Given
32
For low pass filter f1= 1/2R1C1 given f1 = 3kHz, assuming C1=0.1F we get, R1=560 given fm = 300Hz fm = 1/2RC let C2= 0.1F then R2 = 5.6K
MODEL GRAPH
PROCEDURE 1. The connection is made as per the block diagram. 2. Switch on the trainer kit. 3. The modulating signal is given as a input to square wavegenerator. 4. The high frequency carrier signal is also applied to the product modulator 5. The modulated signal is obtained as an output from the product modulator. 6. The readings are noted and the values are tabulated.
33
Waveform
Amplitude
Time period
TABULATION
34
RESULT Thus the FSK modulation and demodulation were performed and required graphs were plotted.
BLOCK DIAGRAM
PSK MODULATOR
Clock data
Balanced modulator
PSK o/p
35
Carrier signal
PSK DEMODULATOR
PSK i/p
Balanced demodulator
o/p
Carrier signal
CIRCUIT DIAGRAM
36
PSK DEMODULATOR
37
MODEL GRAPH
PROCEDURE 1. 2. 3. 4. 5. 6. The connection is made as per the block diagram. Switch on the trainer kit. The modulating signal is given as a input to balanced modulator The high frequency carrier signal is also applied to the balanced modulator The modulated signal is obtained as an output from the balanced modulator. The readings are noted and the values are tabulated.
TABULATION
38
Waveform
Time period
Amplitude
RESULT Thus the PSK modulation and demodulation were performed and graphs were plotted.
in-phase component of the carrier,while the odd(or even) bits are used to modulate the quadraturephase component of the carrier.BPSK is used on both carriers and they can be independently demodulated.
BLOCK DIAGRAM
MODEL GRAPH
40
PROCEDURE 1. 2. 3. 4. 5. 6. The connection is made as per the block diagram. Switch on the trainer kit. The modulating signal is given as a input to balanced modulator The high frequency carrier signal is also applied to the balanced modulator The modulated signal is obtained as an output from the balanced modulator. The readings are noted and the values are tabulated.
TABULATION
Waveform
Time period
Amplitude
OBJECTIVE To determine how the characteristics of Pre-emphasis and De-emphasis differ from each other. HARDWARE REQUIRED Transistor, AFO, IC NE566, Resistors, Capacitor, CRO, RPS. THEORY
PRE-EMPHASIS
The circuits are the transmitting side of the frequency modulator. It is used to increase the gain of the higher frequency component as the input signal frequency increased, the impendence of the collector voltage increase. If the signal frequency is lesser then the impendence decrease which increase the collector current and hence decrease the voltage.
DE-EMPHASIS
The circuit is placed at the receiving side. It acts as allow pass filter. The boosting gain for higher frequency signal in the transmitting side is done by the pre-emphasis circuit is filtered to the same value by the low pass filter. The cut off frequency is given by the formula fc = 1/(2p RC) (4-1) Where R = 2 p fc L CIRCUIT DIAGRAM PRE-EMPHASIS
DE-EMPHASIS
42
MODEL GRAPH
R = 2 pfcL; L=
TEST PROCEDURE 1. The circuit connection are made as shown in the circuit diagram for the pre-emphasis and deemphasis circuits 2. A power supply of 10V is given to the circuit 3. For a constant value of input voltage the values of the frequency is varied and the output is noted on the CRO 4. A graph is plotted between gain and frequency 5. The cut frequencies are practical values of the values of cut off frequency are found, compared and verified.
43
TABULATION
Waveform
Time period
Amplitude
RESULTS The characteristics of pre-emphasis and de-emphasis circuits were studied and a graph was drawn between gain (in db) and frequency.
8.LINE CODING
44
OBJECTIVE
To code and Decode the given data using Line coding & Decoding trainer kit.
HARDWARE
Line coding & Decoding Kit, CRO, Patch chords.
THEORY
Line coding is one of the method of Digital to Digital Conversion. It performs coding & Decoding which uses the combinational circuits.
The sent data needs to be somehow coded into an electromagnetic signal to be sent over the wire, and later decoded back. There are many ways of encoding signals, with each scheme having some pros and cons. Primarily, there are three major categories of line coding: Unipolar, Polar, and Bipolar.
UNIPOLAR
The most primitive encoding technique is Unipolar. The signal is basically this: high voltage on a 1 bit, and low (zero) voltage on a 0 bit. There is no synchronization information, and the signal has a DC component.
POLAR
There are three categories of Polar line coding: NRZ, RZ, and Biphase.
NRZ
NRZ is Nonreturn to Zero. This basically means that after each bit is transmitted, the signal doesnt return to zero voltage. There are two major categories of NRZ, the NRZ-L, and NRZ-I. The NRZL is similar to Unipolar, in that the voltage directly depends on the bit it represents. A positive voltage generally represents a 1, and a negative voltage represents a 0 (or vice versa). Unlike the unipolar scheme, NRZ-L alleviates the problem of the DC component. The NRZ-I does a voltage transition (positive to negative, or negative to positive) on a 1 bit, and no change on a 0 bit. It is the change in the voltage that matters, not the actual voltage itself. NRZ-I is better than NRZ-L because the destination can use the voltage change to synchronize its clock with the sender assuming messages dont have long sequences of 0 bits (which dont have a transition).
RZ
A pretty simple scheme. Positive voltage indicates a 1, negative voltage indicates a 0. The voltage goes down to zero in the middle of every tick.
BIPHASE
There are two primary Biphase coding schemes: Manchester (Ethernet LANs), and Differential Manchester (Token Ring LANs). Manchester, like RZ has a transition in the middle of a bit interval. There is a transition for every bit. A low to high transition indicates a 1 bit, and a high to low transition indicates a 0 bit. Differential Manchester is somewhat similar to NRZ-I. In the beginning of a bit interval, there is a voltage change on a 0 bit, and no voltage switch on a 1 bit. There is always a voltage change in the middle of a bit interval.
BIPOLAR
Bipolar scheme is similar to RZ (also has 3 voltage levels). It uses zero voltage to represent a 0 bit, and a 1 bit is represented by either a positive or negative voltage (alternating).
45
PROCEDURE 1. Switch ON the Line Coding & Decoding Trainer Kit. 2. Give an input to Unipolar, Polar, Bipolar & Manchester Respectively. 3. Get the Output for each NRZ & RZ. 4. Give the coding input to the Decoded circuit & get the corresponding Decoded output. 5. Tabulate and plot the values.
TABULATION
Waveform Time period Amplitude
RESULT Thus the given data was coded & Decoded by using Line coding & decoding Process.
46
HARDWARE REQUIRED Sampling trainer kit, CRO, patch chords, probes. THEORY SAMPLING THEOREM Sampling theorem states that a band limited signal having no frequency components above fm hertz can be determined uniquely by values sampled at uniform intervals of Ts1/2fm BLOCK DIAGRAM SAMPLING message signal
sampler
sampling o/p
i/p signal
LPF
amplifier
demodulated o/p
47
Pulse signal
48
PROCEDURE 1. 2. 3. 4. 5. 6. The connection is made as per the block diagram. Switch on the trainer kit. The modulating signal is given as a input to sampler The high frequency carrier signal is also applied to the sampler The modulated signal is obtained as an output from the sampler. The readings are noted and the values are tabulated.
TABULATION
Waveform Time period Amplitude
RESULT Thus the given Message Signal was Sampled and the corresponding graph was plotted.
49
50
BLOCK DIAGRAM
Transmitted end
Receiving end
CH1
Transmission
CH2
medium
CH3
CIRCUIT DIAGRAM
DESIGN PROCEDURE
51
PROCEDURE 1. Take the signals from the function generator and give it to the channels (CH0 ... CH3) present in the transmitter using patch chords. Note down the amplitude and time period of each signal. 2. Measure the amplitude and time period at the transmitter output point. 3. Using a patch chord, connect transmitter output to receiver input. 4. For synchronization purpose, connect the transmitter clock and receiver clock and also transmitter CH0 and receiver CH0. 5. See the output before the filter and after the filter for all the channels connected. MODEL GRAPH
TRANSMITTER SECTION
52
RECEIVER SECTION
53
TABULATION
Waveform
Time period
Amplitude
RESULT Time division multiplexing and de-multiplexing using PAM signals were performed and respective waveforms were plotted.
54
PROCEDURE 1. The circuit connections are made as per the circuit diagram
2.
3. Two input signals of different frequencies are given to the circuit. 4. Now note down the amplitude and time period of the input signals.
55
5. The fdm o/p is observed from the pin no. 6. 6. Now note down the amplitude and time period for the fdm o/p. 7. Plot the graph. MODEL GRAPH
TABULATION
56
RESULT Time division multiplexing and de-multiplexing using PAM signals were performed and respective waveforms were plotted.
Waveform
Time period
Amplitude
57
PROGRAM
clc; clear all; close all; t=0:0.000001.01; disp(digital message signal); vm=input(amplitude:); fm=input(frequency); wm=2*pi*fm; disp(carrier signal); vm=input(amplitude:); fm=input(frequency); wm=2*pi*fc; vm=vm*(square(wm*t)); subplot(5,1,1); plot(t,vm); title(digital message signal); xlabel(time); ylabel(amplitude); vc=vc*sin(wc*t)); subplot(5,1,2); plot(t,vc); title(carrier signal); xlabel(time); ylabel(amplitude);
58
q=vm.*vc+vc; subplot(5,1,3); plot(t,q); title(ask signal); xlabel(time); ylabel(amplitude); r=vm.*vc; subplot(5,1,4); plot(t,r); title(psk signal); xlabel(time); ylabel(amplitude); x=sin(2*pi*(fc+1500*vm).*t); subplot (5,1,5); plot(t,x); title(fsk signal); xlabel(time); ylabel(amplitude);
MODEL GRAPH
59
RESULT Thus the MATLAB program for digital modulation techniques is written and the output is hence verified.
PROGRAM
end; for i=1:6 for j=1:6 if j= =1 c1(:,j)=e; end; end; end; k=6; for i=2:6; for j=2:6; if(k>1) e(k-1)=e(k-1)+e(k); e(k)=0; e=dsort(e); c1(:,j)=e; k=k-1; end; end; x=1; y=5; while x<=6&&y>=1 if c1(x,y)~=0 d(x,y)=0; d(x+1,y)=1; x=x+1; y=y-1; end; end; p=0; q=1; p1=num2str(p); p2=strcat(p1,p1);
62
q1=num2str(q); pq=strcat(p1,q1); qp=strcat(q1,p1); qqp=strcat(q1,q1,p1); qqqp=strcat(q1,q1,q1,p1); qqqq=strcat(q1,q1,q1,q1); disp(sprintf(`code(0.3)=%s,p2)); disp(sprintf(`code(0.25)=%s,pq)); disp(sprintf(`code(0.25)=%s,qp)); disp(sprintf(`code(0.1)=%s,qqp)); disp(sprintf(`code(0.05)=%s,qqqp)); disp(sprintf(`code(0.05)=%s,qqqq)); length=length(p2)*0.3+length(pq)*0.25+length(qP)*0.25+length(qqp)*0.1+length(qqqp)*0.005+le ngth(qqqq)*0.05; entropy=-(0.3*(log(0.3)?log(2))+2*(0.25*(log(0.25)?log(2)))+0.1*(log(0.1)?log(2)) +2*(0.05*(log(0.05)?log(2)))); efficiency+[entropy/length]; redundancy=[1-efficiency]; disp(sprint(`\nlength:%d,length)); disp(sprint(`\nentropy:%d,entropy)); disp(sprint(`\nefficiency:%d,efficiency)); disp(sprint(`\nredundancy:%d,redundancy)); end
OUTPUT: code(0.3)=00
63
code(0.25)=01 code(0.25)=10 code(0.1)=110 code(0.05)=1110 code(0.05)=1111 length:2.300000e+000 entropy:2.285475e+000 efficiency:9.936849e-001 redundancy:6.315088e-003 RESULT Thus the MATLAB program for error control coding (HUFFMAN CODING) is written and the output is hence verified.
64