Tuesday, April 3, 2012

Communication Lab

Communication Lab


Submitted By :
Rakesh Kumar Bazad





Practical-1

AIM: To Study Amplitude Shift keying.

APPRATUS: Ask trainer kit, C.R.O., Connecting wires, C.R.O. probes.

THEORY:
In order to communicate information over distance, some form of modulated carrier signal must be used. The carrier is often a high frequency alternating signal.

There is several reason why it is often desire to modify a signal for transmissions that, instead of occupying the base band of frequency it is shifted to different frequency band.

Amplitude shift keying (ASK) is the simplest way of shifting the frequency spectrum of a signal from base band to some other band of frequency. It uses an auxiliary signal called a carrier amplitude modulation means altering the amplitude of the carrier signal in accordance with the base band signal. When the signal switches between two distinct level, this is called ‘keying’ thus switching a carrier ON for ‘1’ and OFF for ‘0’ is called amplitude shift keying or ASK.

A sinusoidal carrier signal is said to be ASK modulated when its amplitude is varied in accordance with the instantaneous amplitude of modulating signal. If the carrier is describe by
vc(t) = A cos wct
And the modulating signal be x(t) then the amplitude modulated (ASK) signal s(t) is
s(t) = A [ 1 + k x(t) ] cos wct where K is constant


PROCEDURE:

-To generate ASK signal by modulating with NRZ data signal
• Connect NRZ data signal from data generator to the modulating terminal of balance modulator.
• Vary RF carrier frequency by frequency port and set it to 455 KHz. Vary RF carrier amplitude by amplitude pot and set it to 10v-pp.
• Keep DC bias voltage to 5V DC by 10k pot power supply section. i.e. turn it fully clock wise.
• Observe the ASK modulated output at balance modulator.
• See the effect on ASK modulator output by varying the bits in NRZ data by selector switch.Vary RF carrier oscillator frequency & amplitude and observe its effect on the ASK modulated signal.


-To demodulate ASK using diode detector:
• Connect the modulated output of balance modulator to input of envelope detector
• Observe the demodulated NRZ data signal at diode detector output.
• Vary the RF oscillator frequency & amplitude and also vary the RC time constant in the diode detector by selecting different capacitor C1, C2 by varying pot observe diagonal clipping & negative clipping.
• Very the bits in NRZ data by selector switches and observe raw data.
• Then connect this row data at output of data squarer.
• See the effect of bias variation in data squarer circuit on recovered NRZ output signal.


CONCLUSION:
From the above experiment we can conclude that as per the NRZ data input (in form of ‘1’, ‘0’) there is shift in carrier frequency at the output side that is called ASK ( Amplitude shift keying)
































Practical-2


AIM:- To study Frequency Shift Keying (FSK) Modulation and Demodulation.

APPARATUS: - Kit for FSK modulation/demodulation, CRO and Connecting Codes.

THEORY:-

As frequency shift keying (FSK), the carrier frequency is shifted in steps or levels corresponding to the levels of the digital modulating signal. In the case of a binary signal, two carrier frequencies are used, one corresponding to the binary 0 and the other to as binary 1.
• Input Data Generator section- To generate FSK signal input digital modulating signal is required. This section generates this digital data signal.
• FSK modulator using Timer Astable oscillator
• FSK modulator using VCO – A voltage controlled oscillator (VCO) produces the frequency which is proportional to the voltage applied to it.
• FSK demodulator using Resonant Phase shift detector – The resonant phase shift detector is made by using balanced modulator and tuned coil circuit. The FSK modulate signal is applied to balanced modulator as well as tuned coils. The tuned coil produces the voltages proportional to frequencies. This signal is applied to second input of balanced modulator. Hence the balanced modulator generates original data signal with some high frequency jitter noise. This is raw data recovered and then given to data squarer.
• FSK demodulator using Phase Lock Loop (PLL) – A phase locked loop (PLL) in a feedback system that attempts to track the instantaneous phase (and hence the frequency) of an input signal
• Data Squarer – It is used to convert raw data input pure transient free pure digital data.
• Power supply section – The regulated power supply is used for different supply voltages.

PROCEDURE:

• First connect jumper between two FSK modulator and demodulator.
• Connect 10 to 50Hz squarer wave signal of ±15V level at the input of FSK modulator 1.
• Connect CRO channel 1 at the input of FSK modulator 1.
• Connect CRO channel 2 at the output of PLL FSK demodulator.
• Observe FSK signal and recovered signal.
• Vary frequency of modulating signal from 1Hz to 150 Hz and observe its effect on FSK output as well as on recovered signal.



• Vary free running frequency of FSK modulator by 47K preset and observe its effect on FSK output as well as on recovered signal.
• Vary free running frequency of PLL FSK demodulator by 10k pot and observe its effect on FSK output as well as on recovered signal.
• Now connect NRZ data signal to the input of FSK modulator 2.
• 10.Connect CRO channel 1 at the input of FSK modulator 2.
• 11.Connect CRO channel 2 at the output of resonant phase shift detector.
• 12.Connect raw data o/p of phase shift detector to input of data squarer.
• 13.Apply digital any word by pushing push switches in data generator section. e.g. 11010001.
• 14.Observe following signals like NRZ data signal, FSK signal, Raw data o/p signal, recovered data o/p signal.
• 15.Vary frequency of modulating signal by varying carrier clk pot and observe its effect on FSK output and recovered signal.
• 16.Vary free running frequency of FSK modulator by 10K pot and observe its effect on FSK output and recovered signal.
• 17.Vary bias pot (10K pot) in data squarer section and observe its on-recovered signal.
• 18.Apply different digital word by pushing push switches in data generator and observe recovered signal.


CONCLUSION:
After performing the experiment we can conclude that as per given data to FSK modulator, output will be two different frequency with certain amplitude as per binary ‘ 1 ‘ or ‘ 0 ‘.



















Practical-3

AIM: -To study PSK (Phase Shift Keying) Modulation and Demodulation.

APPARATUS: - PSK Trainer Kit, CRO and connecting codes etc.

THEORY: -
In base band digital systems signals are transmitted directly without any shift in the frequencies of the signal. Because base band signals have sizable power at low frequencies, they are suitable for transmission over a pair of wires, coaxial cables, or optical fibers. Much of the modern communication is conducted this way. However, base band signals cannot be transmitted over a radio link or satellites because this would necessitate impracticably large antennas to efficiently radiate the low frequency spectrum of the signal. Hence, for such a purpose, the signal spectrum must be shifted to a high frequency range. A spectrum shift to higher frequencies is also required to transmit several messages simultaneously by sharing the large band width of the transmission medium. The spectrum of the signal can be shifted to a higher frequency be modulating a high- frequency sinusoid carrier by the base band signal. Two basic form of modulation exist: amplitude modulation and angle modulation. In amplitude modulation, the carrier amplitude is varied in proportion to the modulating signal. In case of the angle modulation angle or phase of the carrier is varied according to the modulating signal. In PSK (Phase-Shift Keying) two pulses are Л radians apart in phase. The information resides in the phase of the pulse. For this reason this scheme is known as phase –shift keying (PSK).

PSK MODULATION AND DEMODULATION





Binary Channel Recovered
data Carriers


Carrier
Data o/p






PROCEDURE:

• Check that connection between PSK modulator and demodulator.
• Observe NRZ data atoutput of data generator.
• Apply any digital word by pushing push switches in data generator section. e.g.11001001
• Observe carrier clock signal from data generator to the carrier input terminal of carrier phase splitter section.
• Connect CRO channel 1 at the carrier input of carrier phase splitter section.
• Connect CRO channel 2 at Φ1 and Φ2 signal in PSK modulator section and observe their 90O out of phase relationship.
• Now connect CRO channel 2 at the PSK output of PSK modulator and observe its relationship with carrier phase at channel 1.
• Observe PSK output of PSK modulator with respect to input signal.
• Vary frequency of modulating signal by varying carrier clk pot and vary phase control pot and observe its effect on PSK output as well as on recovered signal one by one.
• Apply different digital word by pushing push switches in data generator and observe recovered signal.


CONCLUSION:

Conclusion is that phase of the carrier will change either 00 or 1800 as per the incoming data stream is zero or one.


















Practical 4
AIM :-To study QPSK (Quadrature Phase Shift Keying) Modulation and Demodulation.
APPARATUS:-QPSK Trainer kit, CRO and connecting probes etc.
THEORY:-
Following sections are used for QPSK Modulation and Demodulation system.
Input data generator section – To generate QPSK signal input digital modulating signal is required this section generates this digital data signal, which consists of many digital ICs. The 1k pot is used to vary the carrier clock (CCK) frequency. This CCK frequency is divided by 16 to produce bit clock (BCK) of 80 KHZ. This bit clock frequency is divided by 8 to generate word clock (WCK) of 10 KHz. Then a word of 8 bit data generated using D-FFS and eight data generating push switches. This data word is called as NRZ data. This NRZ data is splitted into odd and even data bit stream, which are now as in phase (I) and 90¬¬o out of phase (Q) data by IC 4013, 4027 and 4052. Each push switch controls one bit from LSB to MSB viz. D1 to D8.
The I and Q signals are given to QPSK modulator section.
• Carrier Phase Splitter - The function of this section is to produce two 90 ¬¬¬¬¬¬¬o out of phase sine wave signal referred as Φ1 (0˚) and Φ2 (90 ¬¬¬¬¬¬¬o) are required to provide sampling signal from one carrier signal. The carrier signal is applied at the input of this section from data generator section. Its phase is shifted by phase splitter coil. The gain control pot controls the amplitudes of Φ1 and Φ signal.
• QPSK modulator using Balanced Modulator – Two balanced modulators are used to generate QPSK signal. The balanced modulator is multiplication of these two inputs.
First balanced modulator is given two input signals as Φ 1(00) from carrier phase splitter and In-phase signal (I) from sata generator. Second balanced modulator is given two input signals as Φ2 (900) from carrier phase splitter and (900) out of phase signal (Q) from Data generator. The outputs of each balanced modulator are PSK signal. These PSK signals are added to produce QPSK modulated signal.
• QPSK demodulator using balanced modulator-
The two balanced modulators are used to demodulate QPSK signal.
First balanced modulator is given two in put signals as QPSK modulated signal from modulator section and recovered 00 phase carrier signal Φ1 from carrier recovery section.
Second balanced modulator is given two input signals as QPSK modulated signal from modulator section and recovered 900 phase carrier signal Φ2 from carrier recovery section.
The output of both balanced modulator are given to data squarer and summer section.
DATA SQUARER AND SUMMER SECTION –
This section is based on comparator. It accepts raw data from the demodulator section provides pure digital recovered data at its output.

PROCEDURE:-
• First apply any digital word by pushing push switches in data generator section.
• This digital word is NRZ data which can been observed at NRZ DATA output terminal.
• Connect CRO channel 1at the carrier Clock (Ck) socket. And observe it.
• Connect CRO channel 1 at bit (Bk) socket.and observe it.
• Connect CRO channel 1 at Word Clock (wk) socket. And observe it.
• Connect CRO channel 1 at NRZ DATA (NRZ) socket.and observe it.
• Connect CRO channel 1 at RFcarrier socket. And observe it.
• Connect CRO channel 1 and channel 2at Φ 1and Φ2 signal and observe their 900 out of phase relationship.
• Now connect CRO channel 2 at the QPSK output of QPSK modulator. Connect CROChannel 1 and RF carrier . observe the relationship of QPSK signal with RF carrier signal.
• ObserveQPSK output of QPSK modulator with respect to in- phase (I) signal by triggering cannel 1.
• Observed recovered raw data at the output of balanced demodulators.
• Observed recovered Inphase I and 900 out of phase signal Q the output of data squarer circuit.
• Observed recovered NRZ data at the output of data combiner section .
• Vary phase control pot and observe its effect on QPSK modulated output.
• Vary gain control pot and observe its effect on QPAK modulated output.



CONCLUSION:- We have studied the concept of QPSK.





















Practical-5


AIM: - To study Pulse Amplitude Modulation/Demodulation.

APPARATUS: - Trainer Kits for PAM and PCM, CRO and connecting codes.

THEORY: -
As the amplitude, frequency and phase of a sinusoidal carrier can be modulated with an information signal, so the amplitude, frequency or phase of pulses in a pulse train can also be modulated.
PAM:
One of the simplest ways to digitize an analog signal is seen when the sine wave message signal is mixed nonlinearly with a low-duty-cycle square wave. In pulse amplitude modulation (PAM) the amplitudes of the pulses are varied in accordance with the modulation signal. To generate PAM signal the balanced mixer/modulator are frequently used. The output is a series of pulses, the amplitudes of which vary in proportion to the modulating signal.
At the receiving end a simple low pass filter will bypass the pulse rate frequency and fill in the areas between pulses sufficiently to restore the fidelity of the message signal. The only precautions to be observed in the recovery process is to ensure that the low pass filter has a flat frequency response over the entire base band frequency range and provide sufficient attenuation at the pulse rate frequency.

PROCEDURE: -
PAM

• First connect jumper PAM o/p from modulator section to PAM i/p jumper of demodulator section.
• Connect signal input terminal of sample and hold section to sine o/p terminals of audio frequency generator.
• Connect Pulse o/p of sampling pulse generator to sampling pulse i/p of S/H circuit.
• Keep frequency course switch of audio frequency generator to 2KHz position.
• Keep frequency fine pot of audio frequency generator to mid position.
• Connect CRO at sine wave o/p signal of audio frequency generator.

• Adjust amplitude of sine wave to 2Vpp.
• Keep frequency pot of sampling pulse generator in mid position.
• Keep pulse width pot of sampling pulse generator in mid position.
• Connect CRO channel 1 at PAM o/p signal and observe it.
• Connect CRO channel 2 at demodulated o/p of demodulated section. Observe recovered sine wave signal.
• Now vary amplitude and frequency of sine wave modulating signal and observe its effect on PAM o/p, as well as on recover signal one by one.
• Vary Pulse width and pulse frequency of sampling pulse and see the effect.


CONCLUSION: -
Instead of sinusoidal carrier, here carrier are pulse train. Amplitude of the pulse train changed according to the amplitude of the information signal. Modulating signal can be recovered in original form using any demodulation method.






























Practical-6


AIM: - To study Pulse Code Modulation/Demodulation.

APPARATUS: - Trainer Kits for PAM and PCM, CRO and connecting codes.

THEORY: -
As the amplitude, frequency and phase of a sinusoidal carrier can be modulated with an information signal, so the amplitude, frequency or phase of pulses in a pulse train can also be modulated.
PCM is widely used digital modulation technique. Basically PCM is a method of converting analog signal into digital signal. An analog signal is characterized by the fact that its amplitude can take on any value over a continuous range. This means that it can take on an infinite number of values. On the other hand digital signal amplitude can take on only a finite number of values. An analog signal can be converted into a digital signal by means of sampling and quantizing.
The basic elements for the generation of PCM are sampling, quantizing and encoding. The quantizing and encoding operations are usually performed in the same circuit. The encoded output is the PCM signal. The PCM pulses get distorted and corrupted with noise in the transmission. The receiver regenerates these impaired signal pulses, decodes and filters to reproduce the message signal.

ADC


Input



Transmitter Channel
DAC


Output


BLOCK DIAGRAM
PROCEDURE: -
• Transmitter trainer setup
1. Keep mode switch on FAST position.
2. PSEUDO RANDOM SYNC CODE GENERATOR switched off.
3. ERROR CHECK CODE SELECTLTOR switch A & B in B=0 & A=0 position.
4. All switched FAULTS should be on off position.
• Receiving trainer setup
1. Again follow the steps 1 to 4 of Transmitter trainer setup for Receiving trainer.
2. Pulse generator delay adjust control in fully clockwise position.
• Connections

o On Tx Trainer
1. Connect 1KHz signal to CH-0 input and short CH-0 and CH-1
o Between Tx & Rx Trainer
1. Tx. Clock o/p ---- Rx. Clock i/p
2. Tx. To clock ---- Rx Sync i/p
3. PCM o/p ---- PCM Data i/p
• Test point observations
1. Observe 1KHz sinewave i/p at test point 10 (t.p. 10) and same i/p at t.p.12 on transmitter trainer.
2. Observe PCM o/p at t.p.44 on Tx trainer.
3. Check demodulated o/p at t.p.33 i.e. CH-0 o/p and t.p.36 i.e. CH-1 o/p on Rx kit.
4. Vary amplitude of i/p signal and observe the same change in o/p.

CONCLUSION: -
It is the pulse modulation technique in which the analog sampled signal is converted into digital pulse train by means of quantization and coding. (Approximation)

EXPERIMENT-8

OBJECTIVE:-To Study DS-SS Technique.
a. Generate (spreading) DS-SS modulated signal.
b. To demodulate (dispreading) DS-SS modulated signal.
c. Modulation using internal generation of 2047 bit PN sequence as modulator input and un-modulated carrier.

APPARATUS: - Trainer Kit, Connecting Cables & Probes.

THEORY:-

CDMA is a multiplexing scheme that allows users to share the same bandwidth. It was first used by the military in WWII to combat enemy jamming. Qualcomm was the first company to develop CDMA for commercial purposes (IS95). Today, Qualcomm holds most of the patients on the algorithms used to implement CDMA systems.
In Code Division Multiple Access (CDMA) systems, all users transmit in the same bandwidth simultaneously. Communication systems following this concept are ``spread spectrum systems''. In this transmission technique, the frequency spectrum of a data-signal is spread using a code uncorrelated with that signal. As a result the bandwidth occupancy is much higher than required.
CDMA has many advantages over traditional FDMA and TDMA systems. First, CDMA systems have eight to ten times more capacity compared to AMPS analog systems (FDMA). In CDMA systems the call quality is much improved. The reason for the improved call quality is because fading is no longer a problem. In TDMA and FDMA systems fading was a big concern.
Direct Sequence Spread Spectrum (DSSS)
Direct Sequence is the best-known Spread Spectrum Technique. The data signal is multiplied by a Pseudo Random Noise Code (PN code). They are called "Pseudo" because they are not real Gaussian noise.

Block diagram of DSSS system

A PNcode is a sequence of chips valued -1 and 1 (polar) or 0 and 1 (non-polar) and has noise-like properties. This results in low cross-correlation values among the codes and the difficulty to jam or detect a data message. The generation of PNcodes is relatively easy, a number of shift-registers is all that is required. For this reason it is easy to introduce a large processing-gain (Gp) in Direct-Sequence systems.
Processing gain is the SNR improvement that results from spreading of the bandwidth. The processing gain determines the number of users that can be allowed in a system, the amount of multi-path effect reduction, the difficulty to jam or detect a signal etc
Gp=(spread bandwidth)/(information bandwidth)



Direct-sequence spreading

The main problem with applying Direct Sequence spreading is the so-called Near-Far effect. This effect is present when an interfering transmitter is much closer to the receiver than the intended transmitter. Although the cross-correlation between codes A and B is low, the correlation between the received signal from the interfering transmitter and code A can be higher than the correlation between the received signal from the intended transmitter and code A. The result is that proper data detection is not possible.

Near-far effect illustrated

Spread-spectrum radio communications, long a favorite technology of the military because it resists jamming and is hard for an enemy to intercept, is now on the verge of potentially explosive commercial development.
A spectrum is a frequency domain representation of a signal. A spread spectrum signal can be defined as a signal, which uses substantially more bandwidth than it needs.


Spread-spectrum users can share a frequency band with conventional microwave radio users--without one group interfering with the other -- thereby increasing the efficiency with which that band is used.

PROCEDURE:
Detect Com 1012 and COM 1011 modules via rs232c serial port/L an using COM block s/w provided.
1. For spreading user needs data to be spread & PN sequence in modulator .for the generation of pseudorandom codes from DSSS modulator user has to provide with hex values only.
2. For this use registers from REG 0 to REG12.
3. Let the other register from REG 13to REG17=00HEX.
4. Register 18 Setting for Spreading.
REG 18= (bit7, bit6, bit5, bit4, bit3, bit2, bit0).
e.g. internal clock =bit0 =1;
o/p sample format unsigned =bit1=1;
Modulation, BPSK=bit3-2= 00;
Test mode =PRBS11=blilt5 -4=01; internal generation of2047 bit PN sequence Spectrum on=bit7on=1;
REG18= (0010 0010)=(92) HEX
REGISTER 19 SETTING.
REG19= (bit3, bit2, bit1, bit0,
e.g. Bit0=o/p data flow is pushed to the next module (always)=0;
Bit1=1bit serial =0;
Bit2=filter enabled =1
Bit3=spreading enabled=1;
REG 19= (1100) (oc) HEX

COM1012DSSS MODULATOR REGISTERS (HEX):

REG0 66 REG10 00
REG1 66 REG11 00
REG2 6 REG12 00
REG3 7f REG13 00
REG4 00 REG14 00
REG5 00 REG15 00
REG6 02 REG16 00
REG7 41 REG17 00
REG8 00 REG18 00
REG9 00 REG19 00

PROCEDURE
CDMA-DSSS Despreadig (Demodulation)
1. Detect Com 1012 and Com 1011 modules via rs232c serial port /lan using COMbblock s/w provided.
2. Users needs input data to be despread in demodulator. For the generations of pseudorandom codes from DSSS demodulator user has to provide registers with hex values only
3. For this use registers from REG,0toREG12

SUMMARY ;This is fr chip rate of 1MHZ freq;1+x+x^ polynomial with processing gain of 127, maximal length sequence with BPSK modulation for PRBS 2047 bit data as an modulator input .
4.6 apply this setting to com 1012 module
User will get the outpu t signal on test points provided on mimic board
Measure chip clock on TP1 .
Measure bit clock on TP2.
Measure PN cod e on TP3.
Measure PRBS-11 start of periodic sequence on TP6.
Measure data stream I channel on TP8.
Measure data stream bit clock on TP7.
Measure data stream ,Q channel on TP9.
We can change chip rated PN sequence, type of codes, unmodulated carrier, length of sequences etc.
For measuring long PN sequences long spreading signals, logic analyzer is preffered to captutre digital data bits properly.


CONCLUSION: We have studied the CDMA & DS-SS technique.

EXPERIMENT-9

OBJECTIVE:-To Study FH-SS Technique.

APPARATUS: Trainer Kit & Probes.

THEORY:- The wideband frequency spectrum desired is generated in a different manner in a frequency hopping system. It does just what its name implies. That is, it "hops" from frequency to frequency over a wide band. The specific order in which frequencies are occupied is a function of a code sequence, and the rate of hopping from one frequency to another is a function of the information rate. The transmitted spectrum of a frequency-hopping signal is quite different from that of a direct sequence system.
Block diagram of FHSS

On the other hand, Frequency-Hopping is less affected by the Near-Far effect than Direct-Sequence. Frequency-Hopping sequences have only a limited number of ``hits'' with each other. This means that if a near-interferer is present, only a number of ``frequency-hops'' will be blocked instead of the whole signal. From the ``hops'' that are not blocked it should be possible to recover the original data-message.


CONCLUSION: We have studied the concept of FH-SS.

EXPERIMENT NO. 10

OBJECTIVES: - Bit Error Rate (BER) Measurement of known PRBS-11 data bits.

APPARATUS: CDMA_DS-SS_BER Trainer.

THEORY:

MAKING CONNECTIONS & MEASUREMENT FOR BER TEST:

• Now for this experiment, user has to use all the three COM block modules. Provide the power connection to com1012 –com1011-com1005 modules by connector.
• Connect serial cable to com1012 module in order to maintain tree structure as 1012- 1011-1005.Meaning of tree structure is user can save, export & import COM block register settings, and this setting will be saved with respect to tree structure sequence. User can directly import register setting from cd-rom provided for this experiment.
• First check filters for both com1012 & com1011 modules or apply .mcs filter setting to modulator as com1012AN.mcs & to demodulator as com1011A.mcs.

TEST CONFIGURATION:

9.99 Mchip/s, 768 Kbps, Barker code 13, no frequency error, noiseless.
Back to back direct-sequence spread-spectrum modem operations can be verified
digitally at baseband. The DSSS modulator is configured in signal generator test mode
whereby a periodic PRBS-11 (2047-bit) sequence is being transmitted. The end to end
BER is measured using the COM-1005 module. The registers settings are as follows:

COM-1012: 9D EF 3F 0D 00 00 03 00 00 00 00 00 00 00 00 00 FF 00 90 0C
COM-1011: 9D EF 3F 0D 00 00 03 00 00 00 00 00 00 00 00 00 80 00
COM-1005: 0C

Where 9.99Mchip/s is the chip rate of PN code which is 13 bit barker.
768 Kbps is the Data rate i.e chip rate / code length * 1(BPSK) or *2 (QPSK).
In this case, (9.99Mchip/s)/13 *1 =768 Kbps & 1536 Kbps for QPSK.
Noiseless means REG17 of modulator will be 00.Signal gain is maximum i.e. FF.
Use BPSK modulation with serial bit.



Com1005 BER Register Setting

(0C)Hex means (0 1 1 0 0) Hex.

1 bit serial input =0
No. of bits in the window = 110
Reset counter = 0

Apply the above register setting to all three modules, immediately all red LED’s signals will be updated.

Proper operation can be verified as follows:
(a) Using an oscilloscope probe:
COM-1011 TP1 is high, indicating demodulator carrier lock
COM-1011 TP2 is high, indicating demodulator code lock
COM-1012 TP2 shows the transmitted bit clock.
Compare with COM-1011 TP4 (received bit clock). Switch power off/on to force reacquisition. During the short code acquisition, the two clocks move with respect to each other. After code acquisition, the delay between transmit and receive bit clock should settle at the same fixed value.

COM-1005 TP1 is high, indicating synchronization with the 2047-bit periodic test pattern

COM-1005 TP3 is low, showing no bit error pulse.

(b) From the Com Block control center, check the BER (COM-1005 status).

It will show no bit errors (REG 1 through 4) and the synchronization bit (REG5 bit0)
is high. Depending on the demodulated phase ambiguity, the BER can be either 0
(No inverted bit) or 0x0F4240 (all bits inverted).


CONCLUSION: - We have studied BER Measurement.

EXPERIMENT – 11

AIM:- To study various digital modulation techniques using MATLAB.

APPARATUS USED:- PC equipped with MATLAB 7.0, Simulink

THEORY:

MATLAB:

Introduction
MATLAB is a high performance language for technical computing .It integrates computation visualization and programming in an easy to use environment
Mat lab stands for matrix laboratory. It was written originally to provide easy access to matrix software developed by LINPACK (linear system package) and EISPACK (Eigen system package) projects.
MATLAB is therefore built on a foundation of sophisticated matrix software in which the basic element is matrix that does not require pre dimensioning
Typical uses of MATLAB
1. Math and computation
2. Algorithm development
3. Data acquisition
4. Data analysis ,exploration ands visualization
5. Scientific and engineering graphics
The main features of MATLAB
1. Advance algorithm for high performance numerical computation ,especially in the
Field matrix algebra
2. A large collection of predefined mathematical functions and the ability to define one’s own functions.
3. Two-and three dimensional graphics for plotting and displaying data
4. A complete online help system
5. Powerful , matrix or vector oriented high level programming language for individual applications.
6. Toolboxes available for solving advanced problems in several application areas









Features and capabilities of MATLAB










The MATLAB System
The MATLAB system consists of five main parts:

Development Environment.
This is the set of tools and facilities that help you use MATLAB functions and files. Many of these tools are graphical user interfaces. It includes the MATLAB desktop and Command Window, a command history, an editor and debugger, and browsers for viewing help, the workspace, files, and the search path.

The MATLAB Mathematical Function Library.
This is a vast collection of computational algorithms ranging from elementary functions, like sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse, matrix Eigen values, Bessel functions, and fast Fourier transforms.

The MATLAB Language.
This is a high-level matrix/array language with control flow statements, functions, data structures, input/output, and object-oriented programming features. It allows both "programming in the small" to rapidly create quick and dirty throw-away programs, and "programming in the large" to create large and complex application programs.

Graphics.
MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as annotating and printing these graphs. It includes high-level functions for two-dimensional and three-dimensional data visualization, image processing, animation, and presentation graphics. It also includes low-level functions that allow you to fully customize the appearance of graphics as well as to build complete graphical user interfaces on your MATLAB applications.


The MATLAB Application Program Interface (API).
This is a library that allows you to write C and Fortran programs that interact with MATLAB. It includes facilities for calling routines from MATLAB (dynamic linking), calling MATLAB as a computational engine, and for reading and writing MAT-files.


SHIFT KEYING TECHNIQUES:-
ASK:-
Amplitude shift keying (ASK) is the simplest way of shifting the frequency spectrum of a signal from base band to some other band of frequency. It uses an auxiliary signal called a carrier amplitude modulation means altering the amplitude of the carrier signal in accordance with the base band signal. When the signal switches between two distinct level, this is called ‘keying’ thus switching a carrier ON for ‘1’ and OFF for ‘0’ is called amplitude shift keying or ASK.

A sinusoidal carrier signal is said to be ASK modulated when its amplitude is varied in accordance with the instantaneous amplitude of modulating signal. If the carrier is describe by
vc(t) = A cos wct
And the modulating signal be x(t) then the amplitude modulated (ASK) signal s(t) is
s(t) = A [ 1 + k x(t) ] cos wct where K is constant


FSK:-

Frequency shift keying (FSK), the carrier frequency is shifted in steps or levels corresponding to the levels of the digital modulating signal. In the case of a binary signal, two carrier frequencies are used, one corresponding to the binary 0 and the other to as binary 1.

PSK:-

In base band digital systems signals are transmitted directly without any shift in the frequencies of the signal. Because base band signals have sizable power at low frequencies, they are suitable for transmission over a pair of wires, coaxial cables, or optical fibers. Much of the modern communication is conducted this way. However, base band signals cannot be transmitted over a radio link or satellites because this would necessitate impracticably large antennas to efficiently radiate the low frequency spectrum of the signal. Hence, for such a purpose, the signal spectrum must be shifted to a high frequency range. A spectrum shift to higher frequencies is also required to transmit several messages simultaneously by sharing the large band width of the transmission medium. The spectrum of the signal can be shifted to a higher frequency be modulating a high- frequency sinusoid carrier by the base band signal. Two basic form of modulation exist: amplitude modulation and angle modulation. In amplitude modulation, the carrier amplitude is varied in proportion to the modulating signal. In case of the angle modulation angle or phase of the carrier is varied according to the modulating signal. In PSK (Phase-Shift Keying) two pulses are Л radians apart in phase. The information resides in the phase of the pulse. For this reason this scheme is known as phase –shift keying (PSK).
QPSK:-

QPSK modulator section.
• Carrier Phase Splitter - The function of this section is to produce two 90 ¬¬¬¬¬¬¬o out of phase sine wave signal referred as Φ1 (0˚) and Φ2 (90 ¬¬¬¬¬¬¬o) are required to provide sampling signal from one carrier signal. The carrier signal is applied at the input of this section from data generator section. Its phase is shifted by phase splitter coil. The gain control pot controls the amplitudes of Φ1 and Φ signal.
• QPSK modulator using Balanced Modulator – Two balanced modulators are used to generate QPSK signal. The balanced modulator is multiplication of these two inputs.
First balanced modulator is given two input signals as Φ 1(00) from carrier phase splitter and In-phase signal (I) from sata generator. Second balanced modulator is given two input signals as Φ2 (900) from carrier phase splitter and (900) out of phase signal (Q) from Data generator. The outputs of each balanced modulator are PSK signal. These PSK signals are added to produce QPSK modulated signal.

• QPSK demodulator using balanced modulator-

The two balanced modulators are used to demodulate QPSK signal.
First balanced modulator is given two in put signals as QPSK modulated signal from modulator section and recovered 00 phase carrier signal Φ1 from carrier recovery section.
Second balanced modulator is given two input signals as QPSK modulated signal from modulator section and recovered 900 phase carrier signal Φ2 from carrier recovery section.
The output of both balanced modulator are given to data squarer and summer section.

DATA SQUARER AND SUMMER SECTION –
This section is based on comparator. It accepts raw data from the demodulator section provides pure digital recovered data at its output.

MATLAB Programs:-

% Simulation program to realize BPSK transmission system
%

%******************** Preparation part **********************

sr=256000.0; % Symbol rate
ml=1; % Number of modulation levels
br=sr.*ml; % Bit rate (=symbol rate in this case)
nd = 1000; % Number of symbols that simulates in each loop
ebn0=3; % Eb/N0
IPOINT=8; % Number of oversamples

%******************* Filter initialization ********************

irfn=21; % Number of filter taps
alfs=0.5; % Rolloff factor
[xh] = hrollfcoef(irfn,IPOINT,sr,alfs,1); %Transmitter filter coefficients
[xh2] = hrollfcoef(irfn,IPOINT,sr,alfs,0); %Receiver filter coefficients


%******************** START CALCULATION *********************
nloop=100; % Number of simulation loops

noe = 0; % Number of error data
nod = 0; % Number of transmitted data

for iii=1:nloop

%******************** Data generation ********************************

data=rand(1,nd)>0.5; % rand: built in function

%******************** BPSK Modulation ***********************

data1=data.*2-1;
[data2] = oversamp( data1, nd , IPOINT) ;
data3 = conv(data2,xh); % conv: built in function

%****************** Attenuation Calculation *****************

spow=sum(data3.*data3)/nd;
attn=0.5*spow*sr/br*10.^(-ebn0/10);
attn=sqrt(attn);

%********************** Fading channel **********************

% Generated data are fed into a fading simulator
% In the case of BPSK, only Ich data are fed into fading counter
% [ifade,qfade]=sefade(data3,zeros(1,length(data3)),itau,dlvl,th1,n0,itnd1,now1,length(data3),tstp,fd,flat);

% Updata fading counter
%itnd1 = itnd1+ itnd0;

%************ Add White Gaussian Noise (AWGN) ***************

inoise=randn(1,length(data3)).*attn; % randn: built in function
data4=data3+inoise;
data5=conv(data4,xh2); % conv: built in function

sampl=irfn*IPOINT+1;
data6 = data5(sampl:8:8*nd+sampl-1);

%******************** BPSK Demodulation *********************

demodata=data6 > 0;

%******************** Bit Error Rate (BER) ******************

noe2=sum(abs(data-demodata)); % sum: built in function
nod2=length(data); % length: built in function
noe=noe+noe2;
nod=nod+nod2;

fprintf('%d\t%e\n',iii,noe2/nod2);
end % for iii=1:nloop

%********************** Output result ***************************

ber = noe/nod;
fprintf('%d\t%d\t%d\t%e\n',ebn0,noe,nod,noe/nod);
fid = fopen('BERbpsk.dat','a');
fprintf(fid,'%d\t%e\t%f\t%f\t\n',ebn0,noe/nod,noe,nod);
fclose(fid);

%******************** end of file ***************************




len = 10000; % Number of symbols
M = 16; % Size of alphabet
msg = randint(len,1,M); % Original signal

% Modulate using both PSK and PAM,
% to compare the two methods.
txpsk = pskmod(msg,M);
txpam = pammod(msg,M);

% Perturb the phase of the modulated signals.
phasenoise = randn(len,1)*.015;
rxpsk = txpsk.*exp(j*2*pi*phasenoise);
rxpam = txpam.*exp(j*2*pi*phasenoise);

% Create a scatter plot of the received signals.
scatterplot(rxpsk); title('Noisy PSK Scatter Plot')
scatterplot(rxpam); title('Noisy PAM Scatter Plot')

% Demodulate the received signals.
recovpsk = pskdemod(rxpsk,M);
recovpam = pamdemod(rxpam,M);

% Compute number of symbol errors in each case.
numerrs_psk = symerr(msg,recovpsk)
numerrs_pam = symerr(msg,recovpam)The output and scatter plots are below. Your results might vary because the example uses random numbers.numerrs_psk =

374


numerrs_pam = 1


M = 4; % Alphabet size
x = randint(1000,1,M); % Random message
y = dpskmod(x,M); % Modulate.
z = dpskdemod(y,M); % Demodulate.
% Check whether the demodulator recovered the message.
s1 = symerr(x,z) % Expect one symbol error, namely, the first symbol.
s2 = symerr(x(2:end),z(2:end)) % Ignoring 1st symbol, expect no errors.The output is below.

s1 = 1

s2 = 0

% qpsk.m
%
% Simulation program to realize QPSK transmission system
%

%******************** Preparation part *************************************

sr=256000.0; % Symbol rate
ml=2; % ml:Number of modulation levels (BPSK:ml=1, QPSK:ml=2, 16QAM:ml=4)
br=sr .* ml; % Bit rate
nd = 1000; % Number of symbols that simulates in each loop
ebn0=3; % Eb/N0
IPOINT=8; % Number of oversamples

%************************* Filter initialization ***************************

irfn=21; % Number of taps
alfs=0.5; % Rolloff factor
[xh] = hrollfcoef(irfn,IPOINT,sr,alfs,1); %Transmitter filter coefficients
[xh2] = hrollfcoef(irfn,IPOINT,sr,alfs,0); %Receiver filter coefficients

%******************** START CALCULATION *************************************

nloop=100; % Number of simulation loops

noe = 0; % Number of error data
nod = 0; % Number of transmitted data

for iii=1:nloop

%*************************** Data generation ********************************

data1=rand(1,nd*ml)>0.5; % rand: built in function

%*************************** QPSK Modulation ********************************

[ich,qch]=qpskmod(data1,1,nd,ml);
[ich1,qch1]= compoversamp(ich,qch,length(ich),IPOINT);
[ich2,qch2]= compconv(ich1,qch1,xh);

%**************************** Attenuation Calculation ***********************

spow=sum(ich2.*ich2+qch2.*qch2)/nd; % sum: built in function
attn=0.5*spow*sr/br*10.^(-ebn0/10);
attn=sqrt(attn); % sqrt: built in function

%********************** Fading channel **********************

% Generated data are fed into a fading simulator
% [ifade,qfade]=sefade(ich2,qch2,itau,dlvl,th1,n0,itnd1,now1,length(ich2),tstp,fd,flat);

% Updata fading counter
%itnd1 = itnd1+ itnd0;

%********************* Add White Gaussian Noise (AWGN) **********************

[ich3,qch3]= comb(ich2,qch2,attn);% add white gaussian noise
[ich4,qch4]= compconv(ich3,qch3,xh2);

syncpoint=irfn*IPOINT+1;
ich5=ich4(syncpoint:IPOINT:length(ich4));
qch5=qch4(syncpoint:IPOINT:length(qch4));

%**************************** QPSK Demodulation *****************************

[demodata]=qpskdemod(ich5,qch5,1,nd,ml);

%************************** Bit Error Rate (BER) ****************************

noe2=sum(abs(data1-demodata)); % sum: built in function
nod2=length(data1); % length: built in function
noe=noe+noe2;
nod=nod+nod2;

fprintf('%d\t%e\n',iii,noe2/nod2); % fprintf: built in function

end % for iii=1:nloop

%********************** Output result ***************************

ber = noe/nod;
fprintf('%d\t%d\t%d\t%e\n',ebn0,noe,nod,noe/nod); % fprintf: built in function
fid = fopen('BERqpsk.dat','a');
fprintf(fid,'%d\t%e\t%f\t%f\t\n',ebn0,noe/nod,noe,nod); % fprintf: built in function
fclose(fid);

%******************** end of file ***************************

QPSK USING SIMULINK:




TRANSMITTED SIGNAL:


RECEIVED SIGNAL:


CONCLUSION:- We have studied various modulation & Demodulation Techniques.

0 comments:

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Hot Sonakshi Sinha, Car Price in India