Uploaded by نورا هاني شريف

Experiment No 1

advertisement
Data Communication Lab.
Experiment No. 1
Part 1: Signal Generation
Objective
Learn the generation of different signals.
1-introduction
A signal is an electromagnetic or electrical current that carries data from one
system or network to another. In electronics, a signal is often a time varying
voltage that is also an electromagnetic wave carrying information, though it can
take on other forms, such as current. There are two main types of signals used in
electronics: analog and digital signals.
2-Software Tool
-Matlab- Simunlink
- Simulink Library (Source, Sinks, Math operation).
3-Procedure
1. Start the simulation environment by typing Simulink in the MATLAB
command line.
2. From the simulation library browser choose File -> New -> Model and an
empty simulation editor will open.
3. Choose File -> Save as. The save dialog opens.
4. In the file name type File name, type the name of your form. For example
simple model. Then press Save.
5- In the simulation library browser, choose the sources library. The browser
shows you the boxes in the sources library in the right part of the screen.
6- Choose the sin wave box from source, scope from sinks
4-Simulink Model
1-Generate sinusoidal wave with the following parameters:
frequency = 1 rad/s , amplitude = 3 V , phase = 0 and sample time = 0.01 s
choose sine wave from source and scope from sink , double click on sine
wave block to get block parameters , apply change in parameters , then Run the
model.
Data Communication Lab.
Data Communication Lab.
2- Generate Simulink model to produce two waves (sine e ,square) with the
following parameters
For the first wave : frequency =1 rad/s , amplitude = 2 V , phase = π/2 and
sample time = 0.01 s
The second wave : frequency =1 rad/s , amplitude = 4 V
Data Communication Lab.
Data Communication Lab.
Part 2: Noise and AWGN
Objective
1- to
study some of the noise properties encountered in communication system .
2- To generate the white noise and limit the frequency range of the noise.
1- Introduction
Noise is an unwanted signal which interferes with the original message signal
and corrupts the parameters of the message signal. This alteration in the
communication process, leads to the message getting altered. It is most likely to
be entered at the channel or the receiver. Hence, it is understood that noise is
some signal which has no pattern and no constant frequency or amplitude. It is
quite random and unpredictable. Measures are usually taken to reduce it, though
it can’t be completely eliminated. Figure 1 show the noise signal
Data Communication Lab.
There are two main ways in which noise is produced. One is through
some external source while the other is created by an internal source, within
the receiver section. External Source is produced by the external sources which
may occur in the medium or channel of communication, usually. This noise
cannot be completely eliminated. The best way is to avoid the noise from
affecting the signal. Some examples Atmospheric noise, Extra-terrestrial noise
and Industrial noise. internal Source is produced by the receiver components
while functioning. The components in the circuits, due to continuous
functioning, may produce few types of noise. This noise is quantifiable. A
proper receiver design may lower the effect of this internal noise. Some
example Thermal agitation noise, Transit-time noise and Miscellaneous noise (
another type of noise which includes flicker, resistance effect and mixer
generated noise, etc).
AWGN(Additive Whit Guassian Noise) is usually additive in that adds to the
information bearing signal .White refers to the idea that it has uniform power
spectral density across the frequency band for the information system. It is an
analogy to the color white which may be realized by uniform emissions at all
frequencies in the visible spectrum. Guassian refer to assume that noise voltage
amplitudes have a Gaussian or Normal distribution.
Data Communication Lab.
Signal-to-Noise Ratio (SNR) is the ratio of the signal power to the noise power.
The higher the value of SNR, the greater will be the quality of the received
output.
2- Software Tools
- Simulink with communication toolbox
-DSP toolbox
3- Simulink Model
1- Generation noise using random signal adding with sin wave
Take sample time =0.01s for both waves
Amplitude of sin wave =3V, phase =0
Data Communication Lab.
2- Generation from Source Band -Limited White Noise
Take noise power=0.2 , sample time =0.01 , seed =[3 4 5 6]
Data Communication Lab.
3- Quantization Noise
Sine wave and quantizer from DSP tool box.
4- Building a Channel Noise Model
The channel noise model generates a random binary signal, and then switches
the symbols 0 and 1 in the signal, according to a specified error probability, to
Data Communication Lab.
simulate a channel with noise. The model then calculates the error rate and
displays the result
To set block parameters in the channel noise model, do the following:
1. Double-click the Binary Symmetric Channel block and set Error probability
0.01. Clear the box next to Output error vector. This removes the block's
lower output port, which is not needed for this model.
2. Double-click the Error Rate Calculation block and set Output data to Port to
create an output port for the block. Select the box next to Stop simulation (This
causes the simulation to stop after the target number of errors occurs or the
maximum number of symbols is reached).
Discussion
1- what is the signal , enumerate the types of it
)
)
2- let
)
a. Develop a Simulink model for x(t) with an included information
block. Assume a 10 s simulation time.
b. Display x(t) in a scope over the range 0 to 2 𝜋 with labels.
3- Develop a Simulink model to produce two sinusoidal waves with the
following parameters:
frequency = 1 rad/s for both waves
amplitude = 1V for both waves
phase = 0 for one wave and 𝜋/2 for the second wave
sample time = 0.01 s
then Display each wave on a separate trace in the scope and label all axes.
4- Define the Noise, What are the various sources of Noise.
Data Communication Lab.
5- Discuss White noise and its power spectrum. Which frequency component
does it have?
6- Develop Simulink model to generate the noise using Random signal and
sawtooth signal if the sampling time 0.01 s .
7- Build the following communication system model. The model, shown in the
following figure, contains the most basic elements of a communication system:
a source for the signal, a channel with noise, and means of detecting errors
caused by noise.
Set the Error probability for the Binary Symmetric Channel Block 0.01, 0.05,
0.1 and 1.0, and the sampling rate for Bernoulli Binary Generator Block 0.001.
Connect the blocks and display the following information for each value of
Error probabilities:
The bit error rate.
The number of errors.
The total number of bits that are transmitted.
Download