Ketu WC-1
Ketu WC-1
Ketu WC-1
Wireless Communication
(3171608)
Certificate
Preface
Wireless communication has revolutionized the way we communicate with each other, enabling
us to stay connected at all times and from any location. With the rapid advancement in wireless
technology, it has become essential for students of communication engineering to have a
practical understanding of the concepts, techniques, and tools used in wireless communication.
This lab manual is designed to provide a hands-on learning experience to students in wireless
communication. It covers various topics related to wireless communication, such as wireless
channel characterization, modulation, demodulation, error detection, and correction. The
experiments in this manual are intended to reinforce the theoretical concepts taught in the
classroom and to provide practical experience in using wireless communication tools.
The experiments in this lab manual are carefully designed to provide a step-by-step guide to
performing each experiment. The manual includes a detailed explanation of the experiment, the
equipment required, the experimental setup, the procedure, and the expected outcomes. Each
experiment is followed by a set of questions to reinforce the student's understanding of the
concepts learned in the experiment.
This lab manual is a valuable resource for students of Computer engineering, Electrical
Engineering, and Information Technology. It is also useful for professionals working in the
field of wireless communication. We hope that this manual will serve as a valuable tool for
students to gain practical knowledge and understanding of wireless communication.
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Sr.
Objective(s) of Experiment CO1 CO2 CO3 CO4 CO5
No.
Analyze the network performance using MATLAB to
1. observe the effect of network topology and √
communication protocols on the network.
Generate a binary sequence and simulate its
2. √
transmission over an AWGN channel using MATLAB.
The following industry relevant competency are expected to be developed in the student by
undertaking the practical work of this laboratory.
1. Select the electronic component of proper value as per the requirement.
2. Interpret waveforms of different digital communication.
3. Select the proper communication system as per the requirement.
4. Compare the observed output with the expected output.
5. Use relevant EDA tool for simulating Wireless and Mobile Network.
Index
Date:
Relevant CO: Understand the basics of wireless communication and propagation of radio signals.
Objectives:
1. To gain a fundamental understanding of wireless networking principles: This includes
knowledge of network topology, communication protocols, and wireless channel models.
2. To understand the importance of network performance metrics: This includes knowledge
of metrics such as throughput, latency, packet delivery ratio, and energy consumption.
3. To learn how to use MATLAB to simulate wireless network scenarios: This includes
knowledge of how to generate random network topologies and simulate the transmission
of data packets over the network.
4. To learn how to analyze network performance metrics using MATLAB: This includes
knowledge of how to calculate the network performance metrics of interest from the
simulation results.
Equipment/Instruments: MATLAB
Theory: The following are some key concepts and theories involved in analyzing network
performance using MATLAB:
1. Network topology: Network topology refers to the physical or logical arrangement of
nodes in a network. Different topologies, such as star, mesh, and tree, can affect network
performance metrics such as throughput and latency.
2. Communication protocols: Communication protocols are a set of rules that govern how
data is transmitted between nodes in a network. Different protocols, such as TCP and
UDP, can affect network performance metrics such as packet delivery ratio and energy
consumption.
3. Wireless channel models: Wireless channel models describe how radio signals propagate
through the environment. Different models, such as path loss and shadowing models, can
affect network performance metrics such as signal strength and interference.
4. Network performance metrics: Network performance metrics are measurements of the
network's performance, such as throughput, latency, packet delivery ratio, and energy
consumption. These metrics can be used to evaluate the effectiveness of different network
topologies and communication protocols in achieving specific performance goals.
5. Simulation using MATLAB: MATLAB is a powerful programming language for
mathematical computing and data analysis. It can be used to simulate wireless network
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
scenarios, generate random network topologies, and calculate network performance
metrics. Simulation allows us to observe the effect of different network topologies and
communication protocols on the network's performance and optimize these choices to
achieve specific performance goals.
6. Optimization: Optimization involves selecting the best network topology and
communication protocol choices to achieve specific performance goals. This can involve a
trade-off between different metrics, such as throughput and latency, and the use of
optimization algorithms to find the best solution.
Overall, analyzing network performance using MATLAB involves a deep understanding of
wireless networking principles, data analysis and interpretation skills, problem-solving skills, and
communication skills.
This code uses the randomGraph function to generate a random graph with N nodes and P
probability of edge creation. It then defines the communication protocol as TCP and sets the
network parameters T, lambda, mu, and c. Finally, it simulates the network using the
simulateNetwork function and plots the results.
Output:
Observations:
The network topology directly impacts performance metrics such as latency and
throughput.
Using TCP protocol generally results in better packet delivery ratios but may introduce
higher latency due to its connection-oriented nature compared to UDP.
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Calculation:
Throughput (in packets per second) can be calculated based on the number of packets
delivered over time.
Latency can be observed by analyzing the time taken for packets to traverse the network.
Result:
The simulation provides insights into the queue length over time, indicating network
congestion and performance under the defined topology and protocol.
Sample output might show that TCP provides a queue length that stabilizes at lower values
compared to UDP under similar conditions.
Conclusion:
The experiment successfully demonstrated the effect of network topology and
communication protocols on network performance metrics. The findings underscore the
importance of selecting appropriate network configurations for optimizing performance in
real-world scenarios.
Students gained practical experience using MATLAB for simulations and a deeper
understanding of the principles of wireless networking.
Quiz:
Rubrics 1 2 3 4 5 Total
Marks
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Experiment No: 2
Generate a binary sequence and simulate its transmission over an AWGN
channel using MATLAB.
Date:
Relevant CO: Understand the basic concepts of cellular system and design requirements.
Objectives:
1. To understand the basics of digital communication systems and their components.
2. To learn about the effects of noise on signal quality and the need for error correction
techniques.
3. To become familiar with different modulation schemes and their performance in noisy
channels.
4. To gain proficiency in using MATLAB for signal processing and communication system
simulations.
5. To analyze the performance of a communication system in terms of bit error rate (BER)
and signal-to-noise ratio (SNR).
6. To optimize the communication system parameters for improved performance and
reliability.
Equipment/Instruments: MATLAB
Theory: Generating a binary sequence and simulating its transmission over an Additive White Gaussian
Noise (AWGN) channel is a fundamental exercise in digital communication systems. The basic idea is to
generate a stream of digital bits that represent information and then apply modulation techniques to map
these bits onto a carrier signal that can be transmitted over a communication channel. In this case, the
communication channel is modeled as an AWGN channel, which is a common model for many wireless
communication scenarios.
The binary sequence is typically generated using a random number generator or by encoding a
message using a channel code such as a block code or convolutional code. The modulated signal
is then transmitted over the AWGN channel, which adds noise to the signal. The amount of noise
depends on the signal-to-noise ratio (SNR) of the channel, which is defined as the ratio of the
signal power to the noise power.
The performance of the communication system can be analyzed in terms of the bit error rate
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
(BER), which is the probability of an error in the received bits due to noise. The BER can be
calculated by comparing the received bits to the transmitted bits and counting the number of
errors.
In MATLAB, the process of generating a binary sequence and simulating its transmission over an
AWGN channel involves several steps, including generating the binary sequence, applying
modulation, simulating the AWGN channel, and calculating the BER. The performance of the
communication system can be analyzed by varying the SNR and observing the effect on the BER.
Procedure:
In this code, we first generate a binary sequence of length numBits using the randi(R,N)
function. We then modulate the binary sequence with ASK using a carrier frequency of
carrierFreq, a symbol rate of symbolRate, and a modulation index of modulationIndex. Next,
we simulate the transmission over an AWGN channel using the snr parameter to determine the
amount of noise to add to the signal. We demodulate the received signal by dividing by the carrier
signal and then thresholding at zero to recover the binary sequence. Finally, we calculate the BER
by comparing the transmitted binary sequence to the demodulated binary sequence using the xor
function.
Observations:
Bit Error Rate (BER): The calculated BER indicates the quality of the signal transmission.
A lower BER means better performance in the presence of noise.
Result:
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Calculation:
Signal Power: signalPower = var(modulatedSignal)
Noise Power: noisePower = signalPower / (10^(snr/10))
Number of Errors: numErrors = sum(xor(binaryData, demodulatedData))
BER Calculation: ber = numErrors / numBits
Conclusion:
The experiment demonstrated how noise impacts the transmission of a binary sequence
over an AWGN channel. The performance of the communication system can be evaluated
using the BER, which provides insights into the effectiveness of the modulation scheme
under noisy conditions.
Quiz:
1. What does the code simulate?
The code simulates the transmission of a binary sequence over an Additive White
Gaussian Noise (AWGN) channel.
9. Can you suggest any other modulation scheme that can be used instead of ASK?
Other modulation schemes include Frequency Shift Keying (FSK), Phase Shift Keying
(PSK), and Quadrature Amplitude Modulation (QAM).
10. What is the purpose of using the randi() function in the code?
The randi() function generates a random binary sequence, simulating the digital data to be
transmitted.
Rubrics 1 2 3 4 5 Total
Marks
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Experiment No: 3
Simulate the line coding techniques using MATLAB.
Date:
Objectives:
The objectives of simulating the line coding techniques using MATLAB are:
1. To understand the basics of digital transmission and line coding techniques.
2. To familiarize with the different types of line coding techniques and their advantages and
disadvantages.
3. To learn the implementation of different line coding techniques using MATLAB.
4. To visualize the waveform and power spectrum of the coded signal.
5. To simulate the effects of channel impairments, such as noise and distortion, on the coded
signal.
6. To evaluate the performance of different line coding techniques in terms of their error
detection and correction capabilities.
Equipment/Instruments: MATLAB
Theory: Line coding is a process of converting a sequence of digital bits into a digital signal
suitable for transmission over a communication channel. In other words, line coding transforms a
sequence of binary data into a waveform that can be transmitted over a physical medium such as
copper wires, fiber-optic cables, or wireless channels.
There are several types of line coding techniques, each with its advantages and disadvantages.
Some of the commonly used line coding techniques include:
1. Non-return-to-zero (NRZ) coding
2. Manchester coding
3. Differential Manchester coding
4. Bipolar encoding
5. Alternate mark inversion (AMI) coding
Each line coding technique has its own unique properties and is suitable for different types of
applications. For example, NRZ coding is simple and efficient but can suffer from DC bias, while
Manchester coding has a balanced DC component but requires a higher bandwidth.
In order to simulate the line coding techniques using MATLAB, we need to generate a sequence
of digital bits and then apply the desired line coding algorithm to it. We can then visualize the
waveform and power spectrum of the coded signal and measure its various parameters such as the
DC component and bandwidth. We can also simulate the effects of channel impairments such as
noise and distortion on the coded signal and evaluate the performance of different line coding
techniques in terms of their error detection and correction capabilities.
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Procedure:
% Line Coding Techniques Simulation
% Plotting
figure;
subplot(4, 1, 1);
stem(bits, 'LineWidth', 2);
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
title('Original Bits');
xlabel('Bit Index');
ylabel('Bit Value');
ylim([-0.5, 1.5]);
subplot(4, 1, 2);
plot(nrzSignal, 'LineWidth', 2);
title('NRZ Coded Signal');
xlabel('Time Index');
ylabel('Signal Amplitude');
ylim([-1.5, 1.5]);
subplot(4, 1, 3);
plot(manchesterSignal, 'LineWidth', 2);
title('Manchester Coded Signal');
xlabel('Time Index');
ylabel('Signal Amplitude');
ylim([-1.5, 1.5]);
subplot(4, 1, 4);
plot(diffManchesterSignal, 'LineWidth', 2);
title('Differential Manchester Coded Signal');
xlabel('Time Index');
ylabel('Signal Amplitude');
ylim([-1.5, 1.5]);
figure;
plot(amiSignal, 'LineWidth', 2);
title('AMI Coded Signal');
xlabel('Time Index');
ylabel('Signal Amplitude');
ylim([-1.5, 1.5]);
This code first generates a random binary sequence of length 100 using the randi function. It then
performs NRZ line coding by mapping each binary bit 0 to -1 and each binary bit 1 to 1.
The coded signal is then plotted using the plot function, and the original binary sequence and the
coded signal are displayed side-by-side using the subplot function.
You can modify this code to simulate other line coding techniques such as Manchester coding or
AMI coding by replacing the line coding algorithm with the desired one
Observations:
1. Original Bits:
A random sequence of binary bits is generated, consisting of 0s and 1s.
Example: [1, 0, 1, 1, 0, 0, 1, 0]
Calculation:
1. DC Component Calculation:
The DC component can be calculated as the mean of the coded signal.
For example, for the NRZ signal, if the bits are [1, 0, 1], the NRZ coded signal is [1, -1, 1],
and the DC component can be calculated as:
DCNRZ= (1+(-1) +1)/3 = 1/3 = 0.33
2. Bandwidth Calculation:
The required bandwidth for each line code can be estimated:
o NRZ: 1/T
o Manchester: 2/T
o Differential Manchester: 2/T
o AMI: Similar to NRZ, 1/T
3. Power Spectra:
The power spectrum of each line-coded signal can be computed using the Fourier
Transform. This can reveal the frequency components present in each signal.
Result:
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Conclusion:
The simulation of line coding techniques using MATLAB successfully demonstrated the
differences between various coding schemes.
NRZ is simple but can lead to DC bias, while Manchester and Differential Manchester
coding offer better synchronization and balance but require more bandwidth.
The AMI coding technique effectively mitigates DC bias by alternating the signal levels,
making it suitable for applications where power efficiency is critical.
Overall, understanding these techniques is crucial for designing efficient digital
communication systems, and MATLAB proves to be an effective tool for visualizing and
analysing these coding methods.
Quiz:
2. What are the different types of line coding techniques used in digital communication
systems?
NRZ, Manchester, Differential Manchester, Bipolar (AMI), etc.
3. What is the difference between polar NRZ and polar RZ line coding techniques?
NRZ uses two levels without returning to zero for 0 bits, while RZ returns to zero during
each bit interval.
4. What are the advantages and disadvantages of using bipolar line coding techniques?
Advantages include DC balance and error detection; disadvantages include increased
bandwidth requirements.
5. How can you simulate line coding techniques using MATLAB, and what are the different
parameters that you can analyze?
By generating a binary sequence and applying coding techniques, we can analyze the
waveform, power spectrum, and effects of noise and distortion.
Rubrics 1 2 3 4 5 Total
Marks
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Experiment No: 4
Simulate the Binary amplitude shift keying using MATLAB and simulink.
Date:
Objectives:
1. To learn about the principles of BASK modulation and demodulation
2. To simulate a BASK communication system using MATLAB and Simulink
3. To analyze the system's performance in terms of bit error rate (BER) and signal-to-noise
ratio (SNR)
Equipment/Instruments: MATLAB,SIMULINK
Theory: Binary amplitude shift keying (BASK), also known as on-off keying (OOK), is a simple
digital modulation technique where the amplitude of the carrier wave is switched between two
levels, depending on the input binary data. In BASK, a binary '1' is represented by the presence of
the carrier wave, while a binary '0' is represented by the absence of the carrier wave.
The BASK modulator can be represented by the following equation:
s(t) = A * d(t) * cos(2 * pi * f_c * t)
where:
s(t) is the modulated signal
A is the amplitude of the carrier wave
d(t) is the binary data input (either 0 or 1)
f_c is the carrier frequency
t is time
The BASK demodulator uses an envelope detector or a synchronous detector followed by a
decision-making circuit, which compares the received signal with a threshold value to determine
the transmitted binary data.
In this lab, you will simulate a BASK communication system using MATLAB and Simulink, and
analyze its performance in terms of bit error rate (BER) and signal-to-noise ratio (SNR).
1. Launch MATLAB and open Simulink: 1.1. Start MATLAB and type "simulink" in the
Command Window, then press Enter to open the Simulink Library Browser.
2. Create a new Simulink model: 2.1. In the Simulink Library Browser, click "New" in the
toolbar or go to File > New > Model to create a new Simulink model.
3. Add necessary blocks to the model:
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
3.1. In the Simulink Library Browser, navigate to Simulink > Sources and add the
following blocks to your model: - "Random Integer Generator" (to generate
binary data) - "Repeating Sequence Stair" (to create a clock signal)
3.2. Navigate to Simulink > Sinks and add the following blocks: - "Scope" (to visualize
signals) - "Error Rate Calculation" (to calculate the bit error rate)
3.3. Navigate to Communications Toolbox > Modulation > General Modulation
Techniques and add the following blocks: - "Rectangular Pulse" (to create a
baseband rectangular pulse) - "Amplitude Modulator Baseband" (to perform
BASK modulation) 3.4. Navigate to Communications Toolbox >
Synchronization and add the following block: - "Buffer" (to buffer the
demodulated signal)
3.5. Navigate to Communications Toolbox > Modulation > General Demodulation
Techniques and add the following block: - "Envelope Detector" (to perform
BASK demodulation)
4. Configure the blocks:
4.1. Double-click the "Random Integer Generator" block and set the following
parameters: - M-ary number: 2 - Sample time: 1
4.2. Double-click the "Repeating Sequence Stair" block and set the following
parameters: - Vector of output values: [0 1] - Vector of time steps: [0 1]
4.3. Double-click the "Rectangular Pulse" block and set the Pulse width to 1.
4.4. Double-click the "Amplitude Modulator Baseband" block and set the following
parameters: - Modulation index: 1 - Carrier amplitude: 1
4.5. Double-click the "Buffer" block and set the following parameters: - Buffer size: 1
- Buffer overlap: 0
4.6. Double-click the "Envelope Detector" block and set the following parameters: -
Sample time: 1 - Time constant: 0.1
5. Connect the blocks:
5.1. Connect the output of the "Random Integer Generator" block to the input of the
"Rectangular Pulse" block.
5.2. Connect the output of the "Rectangular Pulse" block to the input of the
"Amplitude Modulator Baseband" block.
5.3. Connect the output of the "Amplitude Modulator Baseband" block to the input of
the "Envelope Detector" block.
5.4. Connect the output of the "Envelope Detector" block to the input of the "Buffer"
block.
5.5. Connect the output of the "Random Integer Generator" block to the "Original"
input of the "Error Rate Calculation" block.
5.6. Connect the output of the "Buffer" block to the "Received" input of the "Error
Rate
Result:
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Observations:
Simulated Data: Generate random binary data and measure the performance in terms of
BER and SNR.
Conclusion:
The BASK modulation technique demonstrates its capability to represent binary data
effectively.
The performance analysis indicates that as the SNR increases, the BER decreases,
confirming that BASK is suitable for scenarios with adequate signal strength.
While BASK is simple, it is susceptible to noise, and thus careful consideration is needed
when deploying it in noisy environments.
Quiz:
1. What does BASK stand for, and what is another name for this modulation technique?
Binary Amplitude Shift Keying; another name is On-Off Keying (OOK).
2. What is the primary characteristic of a BASK modulated signal with respect to the input
binary data?
A binary '1' is represented by the presence of the carrier wave, while a binary '0' is
represented by the absence of the carrier wave.
3. How does the envelope detector work in the demodulation process of BASK?
The envelope detector extracts the amplitude of the received signal and compares it with a
threshold to determine the transmitted binary data.
5. How does the addition of noise (using an AWGN Channel block) affect the performance
of a BASK communication system in terms of bit error rate (BER) and signal-to-noise
ratio (SNR)?
Adding noise increases the BER, leading to a lower SNR, which indicates poorer
performance of the communication system.
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
6. What are the advantages and disadvantages of using BASK as a modulation technique in
digital communication systems?
Rubrics 1 2 3 4 5 Total
Marks
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Experiment No: 5
Simulate the Binary phase shift keying using MATLAB and simulink.
Date:
Objectives:
1. To learn about the principles of BPSK modulation and demodulation
2. To simulate a BPSK communication system using MATLAB and Simulink
3. To analyze the system's performance in terms of bit error rate (BER) and signal-to-noise
ratio (SNR)
Equipment/Instruments: MATLAB,SIMULINK
Theory: Binary Phase Shift Keying (BPSK) is a digital modulation technique where the phase of
the carrier wave is switched between two values, depending on the input binary data. In BPSK, a
binary '1' is represented by one phase value of the carrier wave, while a binary '0' is represented
by another phase value (usually shifted by 180 degrees).
The BPSK modulator can be represented by the following equation:
s(t) = A * cos(2 * pi * f_c * t + (2 * d(t) - 1) * pi)
where:
s(t) is the modulated signal
A is the amplitude of the carrier wave
d(t) is the binary data input (either 0 or 1)
f_c is the carrier frequency
t is time
The BPSK demodulator uses a coherent detector, which multiplies the received signal by a local
replica of the carrier, followed by low-pass filtering and decision-making circuitry to determine
the transmitted binary data.
In this lab, you will simulate a BPSK communication system using MATLAB and Simulink and
analyze its performance in terms of bit error rate (BER) and signal-to-noise ratio (SNR).
Observations:
input Binary Data: The binary data generated by the "Random Integer Generator" appears
as a series of 0s and 1s.
Modulated Signal: The output of the "PSK Modulator Baseband" block shows the phase-
shifted signal corresponding to the input binary data. For each bit, the phase of the carrier
shifts by 180 degrees.
Demodulated Signal: The output of the "PSK Demodulator Baseband" block recovers the
original binary data.
Bit Error Rate (BER): The "Error Rate Calculation" block calculates the number of bit
errors by comparing the original and received signals. If no noise is introduced, BER
should be 0.
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Result:
Conclusion:
The BPSK modulation and demodulation system was successfully simulated using
MATLAB and Simulink.
Without noise, BPSK modulation offers a very low bit error rate, with the demodulator
correctly recovering the binary data.
The system’s performance degrades with the introduction of noise, as observed through
increased bit error rates (BER) at lower SNR levels.
This experiment demonstrates the principles of BPSK and the effects of noise on digital
communication systems.
Quiz:
1. What does BPSK stand for, and what are the key characteristics of a BPSK modulated
signal?
BPSK stands for Binary Phase Shift Keying. Key characteristics of a BPSK modulated
signal include:
It modulates binary data by shifting the phase of a carrier signal.
A binary '1' is represented by one phase, and a binary '0' by a phase shift of 180
degrees.
It is robust to noise but has a lower data rate compared to higher-order modulation
schemes.
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
2. What is the primary difference between BPSK and BASK modulation techniques in terms
of their representation of binary data?
BPSK represents binary data by shifting the phase of the carrier signal.
BASK (Binary Amplitude Shift Keying) represents binary data by changing the amplitude
of the carrier signal.
3. How does the coherent detector in the BPSK demodulation process work?
A coherent detector in BPSK demodulation multiplies the received signal with a
synchronized version of the carrier signal. It then uses a low-pass filter to recover the
original binary data by detecting phase differences in the received signal.
5. How does the addition of noise (using an AWGN Channel block) affect the performance
of a BPSK communication system in terms of bit error rate (BER) and signal-to-noise ratio
(SNR)?
The addition of noise using an AWGN channel increases the BER, as noise introduces
errors in the received signal. As the SNR decreases (i.e., the signal power becomes
comparable to or less than the noise power), the BER increases, indicating a degradation in
the system's performance.
Rubrics 1 2 3 4 5 Total
Marks
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Experiment No: 6
Simulate the Delta Modulation using MATLAB and simulink.
Date:
Objectives:
1. To learn about the principles of delta modulation and demodulation
2. To simulate a delta modulation communication system using MATLAB and Simulink
3. To analyze the system's performance in terms of signal reconstruction and quantization
noise
Equipment/Instruments: MATLAB,SIMULINK
Theory: Delta modulation (DM) is a simple form of differential pulse-code modulation (DPCM)
used in digital communication systems. It encodes an analog input signal into a binary output by
comparing the current input sample with the previous input sample. If the current sample is
greater than the previous sample, a binary '1' is generated; otherwise, a binary '0' is produced.
The DM modulator can be represented by the following equations:
Δx[n] = x[n] - x[n-1] y[n] = 1, if Δx[n] ≥ 0 y[n] = 0, if Δx[n] < 0
where:
x[n] is the input signal
Δx[n] is the difference between consecutive input samples
y[n] is the binary output
The DM demodulator reconstructs the original signal using the binary output and a step size. It
accumulates the step size for each binary '1' and subtracts the step size for each binary '0':
x'[n] = x'[n-1] + step_size, if y[n] = 1 x'[n] = x'[n-1] - step_size, if y[n] = 0
where:
x'[n] is the reconstructed signal
In this lab, you will simulate a delta modulation communication system using MATLAB and
Simulink and analyze its performance in terms of signal reconstruction and quantization noise.
Observations:
During the simulation, the original sine wave signal and the reconstructed signal after
demodulation were visualized using the "Scope" block.
The reconstructed signal closely followed the original input signal when the step size was
appropriately chosen.
As the step size increased, quantization noise became more noticeable, affecting the
quality of signal reconstruction.
When the step size was too small, the reconstructed signal lagged behind the input signal,
leading to tracking errors.
With a moderate step size, the system provided a good balance between signal tracking
and noise suppression.
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Result:
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Conclusion:
Delta modulation is a useful technique for encoding analog signals into binary data,
especially in applications requiring low bandwidth and low complexity.
The performance of delta modulation is highly dependent on the step size, which must be
chosen carefully to minimize signal distortion and quantization noise.
Simulating delta modulation using MATLAB and Simulink provides a practical way to
understand the trade-offs between signal fidelity and noise in digital communication
systems.
Quiz:
2. How do the delta modulation and demodulation processes work, and what are the key
equations that describe these processes?
In delta modulation, the difference between consecutive input samples
Δx[n]=x[n]−x[n−1]\Delta x[n] = x[n] - x[n-1]Δx[n]=x[n]−x[n−1] is calculated. A binary '1'
is generated if the current sample is greater than the previous sample, otherwise, a binary
'0' is generated. During demodulation, the reconstructed signal x′[n]x'[n]x′[n] is updated by
adding or subtracting a step size, depending on the binary data received.
3. What is the role of the step size in delta modulation, and how does it affect the signal
reconstruction and quantization noise?
The step size controls how closely the modulator and demodulator follow the input signal.
A larger step size allows the system to track faster changes in the signal but increases
quantization noise. A smaller step size reduces quantization noise but may result in the
system being unable to keep up with rapid changes in the signal, leading to tracking errors.
4. How can you adjust the step size in the Simulink model to achieve better signal
reconstruction and minimize quantization noise?
You can adjust the step size by experimenting with different values in the "Delta
Modulator" and "Delta Demodulator" blocks. A moderate step size that matches the rate of
change of the input signal generally provides the best trade-off between accurate signal
tracking and minimal quantization noise. It can be increased or decreased depending on the
frequency and amplitude of the input signal.
5. In the simulation, what types of input signals can be used to test the performance of the
delta modulation system?
Sine waves to observe how well the system tracks smooth, periodic changes.
Square waves to see how the system handles sharp transitions.
Triangular waves for testing how it performs with linear changes.
Random noise to test the system’s performance in the presence of unpredictable inputs.
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
6. What are the advantages and disadvantages of using delta modulation in digital
communication systems compared to other modulation techniques?
Advantages:
Simple implementation compared to more complex techniques like PCM (Pulse Code
Modulation).
Requires lower bandwidth since it transmits fewer bits compared to PCM.
Disadvantages:
Prone to slope overload distortion if the signal changes faster than the modulator can track.
Quantization noise can be higher, especially with small step sizes.
Limited to slowly varying signals, making it less suitable for high-frequency components.
Rubrics 1 2 3 4 5 Total
Marks
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Experiment No: 7
Simulate the Direct sequence spread spectrum using MATLAB and simulink.
Date:
Objectives:
1. To learn about the principles of direct sequence spread spectrum (DSSS) modulation and
demodulation
2. To simulate a DSSS communication system using MATLAB and Simulink
3. To analyze the system's performance in terms of signal processing gain, interference
rejection, and multiple access capability
Equipment/Instruments: MATLAB,SIMULINK
Theory: Direct Sequence Spread Spectrum (DSSS) is a digital modulation technique that spreads
a narrowband signal across a wide frequency band using a pseudorandom noise (PN) sequence.
This technique provides various benefits, such as signal processing gain, interference rejection,
and multiple access capability.
In DSSS modulation, the input data bits are multiplied by the PN sequence, effectively spreading
the signal's bandwidth. The modulated signal can then be transmitted using traditional modulation
techniques, such as BPSK, QPSK, or others.
The DSSS demodulation process requires the same PN sequence as used in the modulation. The
received signal is multiplied by the PN sequence to despread the signal, and then the original data
bits are extracted using a correlator or matched filter.
In this lab, you will simulate a DSSS communication system using MATLAB and Simulink and
analyze its performance in terms of signal processing gain, interference rejection, and multiple
access capability.
Observations:
1. Bit Error Rate (BER):
o Observed BER values after simulating various SNR conditions, indicating the
number of errors in the received signal relative to the total number of transmitted
bits.
o Example: At SNR = 10 dB, BER = 0.02 (2% error rate).
2. Signal-to-Noise Ratio (SNR):
o The calculated SNR values for the transmitted signal under different noise
conditions.
o Example: For an average power of the signal of 1, and noise power of 0.1, the SNR
= 10 dB.
3. Signal-to-Interference Ratio (SIR):
o Measured SIR values which show the effectiveness of the DSSS system in
rejecting interference.
o Example: SIR observed at various points, such as 15 dB indicating a good
performance against interference.
Result:
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Conclusion:
The simulation of the DSSS system using MATLAB and Simulink successfully
demonstrated the principles of spreading and despreading in digital communication
systems.
Key findings:
Increased SNR leads to reduced BER, confirming the effectiveness of DSSS in
combating noise.
The system exhibited good interference rejection capabilities, as indicated by
satisfactory SIR values.
DSSS shows potential for multiple access communications due to its ability to
operate with different PN sequences for various users.
Future work may include further optimizations and real-world simulations to
analyze the practical implications of DSSS in various communication
environments.
Quiz:
1. What is Direct Sequence Spread Spectrum (DSSS), and how does it work?
Direct Sequence Spread Spectrum (DSSS) is a modulation technique used in digital
communication systems that spreads a narrowband signal over a wide frequency band. It
works by multiplying the data signal with a pseudorandom noise (PN) sequence, which
increases the bandwidth of the transmitted signal. The use of a PN sequence helps in
reducing the effects of interference and improves the system's capability to reject
jamming.
6. What is the role of the "Random Integer Generator" block in the Simulink model, and how
is it configured?
The "Random Integer Generator" block in the Simulink model is used to generate a
sequence of random integers that represent binary data (0s and 1s). This block can be
configured by setting parameters such as the minimum and maximum values (for binary
data, this would be 0 and 1) and the sample time, which defines the rate at which the
random data is generated. This generated data is then fed into the spreading process in the
DSSS system.
Rubrics 1 2 3 4 5 Total
Marks
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Experiment No: 8
Simulate WSN node to determine position on node and blink LED using cupcarbon
simulator and senscript.
Date:
Objectives:
The objective of this experiment is to simulate a Wireless Sensor Network (WSN) node using
CupCarbon simulator and Senscript language. The WSN node will be used to determine its
position and blink LED.
Equipment/Instruments: MATLAB,SIMULINK
Theory: Wireless Sensor Networks (WSNs) are one of the fastest growing control and monitoring
technologies in recent years. According to Kumbhar et al., WSNs are destined to be one of the 10
technologies that will change the world and the foreseen future is impregnated by WSNs powered
by batteries that will monitor our environment and even us. WSNs are composed by a set of
spatially distributed sensors that are capable of collecting, storing and processing environmental
information. Although in their beginnings they were connected by wires, nowadays, WSNs are
wirelessly connected with other nodes for communicating and transmitting the collected data. In
this sense, the application field of this technology is very broad and can be applied in different
areas.
Observations:
Position(X,Y): As the simulation runs, note the position coordinates printed on the console.
Result:
Conclusion:
In this practical experiment, we successfully simulated a Wireless Sensor Network (WSN) node
using the CupCarbon simulator and the Senscript programming language. By following the
outlined procedures, we created a WSN project, added sensor nodes, and implemented scripts to
determine node positions and control an LED's blinking behavior.
The experiment highlighted the importance of Wireless Sensor Networks in various applications,
including environmental monitoring and smart city solutions. It demonstrated how CupCarbon
serves as an effective tool for modeling and simulating WSNs, providing a user-friendly interface
for designing network topologies and visualizing node interactions.
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
Quiz:
1. What is a Wireless Sensor Network (WSN), and what are its applications?
A Wireless Sensor Network (WSN) is a network of spatially distributed sensor nodes that
collect, process, and transmit environmental data wirelessly. Applications of WSNs
include environmental monitoring (like temperature, humidity, and pollution), agriculture
(crop monitoring and precision farming), healthcare (patient monitoring), smart cities
(traffic management), and military surveillance.
4. What are the steps involved in setting up a simulation environment using CupCarbon
simulator?
Create a new project.
Add sensor nodes to the project.
Create communication scripts using Senscript.
Assign scripts to the respective sensor nodes.
Configure device parameters as needed.
Start the simulation to observe the behavior of the network.
5. How do you create a WSN node and its network topology using CupCarbon simulator?
To create a WSN node in CupCarbon, you add a sensor node from the Nodes menu. You
can define the node’s position and attributes. For network topology, you can arrange
multiple nodes within the project workspace, ensuring they are appropriately positioned
relative to one another to reflect the desired network layout (e.g., star, mesh).
6. What are some functions provided by Senscript for controlling the behavior of WSN
nodes?
getpos: Retrieves the node’s position.
println: Prints messages or data to the console.
mark: Controls the state of physical components like LEDs (turning them on or off).
delay: Pauses the script execution for a specified time.
loop: Repeats the enclosed script block indefinitely.
7. How do you program a WSN node using Senscript to determine its position and blink an
LED?
Use the getpos function to obtain the node’s position and the println function to output
it.
For blinking the LED, use the mark function to toggle the LED state (1 for ON, 0 for OFF)
with delay commands to control the timing. The scripts would look like:
Wireless Communication (3171608) Enrollment No:210160116005(IT-A1)
loop
getpos x
println $x
delay 500
and
Copy code
loop
mark 1
delay 1000
mark 0
delay 1000
Rubrics 1 2 3 4 5 Total
Marks