0% found this document useful (0 votes)
610 views38 pages

SMS Lab Manual - Bec657b

Uploaded by

revathidhupad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
610 views38 pages

SMS Lab Manual - Bec657b

Uploaded by

revathidhupad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 38

Cambridge Institute of Technology, North Campus,

Kundana, International Airport Road, Bengaluru – 562110

LAB MANUAL
SYSTEM MODELLING USING SIMULINK(BEC657B)
For
VI Semester ECE, CBCS Scheme of VTU
Prepared by
RUDRESH D H
Lab Instructor
Department Of ECE
Cambridge Institute of Technology – North Campus
Table of Contents
Sl. Experiments
No
1 a) Generate the following signals using Simulink and display these signals on a single
scope with separate inputs: i) Sinusoidal signal ii) Square signal iii) Sawtooth signal
iv) Random signal
b) b) Perform the following operations using Simulink and display the output:
i) y(t)=sin2t
ii) y(t)=d(sin2t)dt
iii) y(t)=∫sin2t

2 Solve the second-order differential equations using Simulink and display the output:

3 Design and realize the second-order low pass and high pass RC filters using Simulink.
4 Design a BCD adder and use Simulink to simulate and verify its operation.
5 Design and simulate the following using Simulink and verify their operation: a) 3-bit
Up/Down Counter b) 4-bit Ring Counter
6 Design and simulate the 4x1 Multiplexer and 1x4 Demultiplexer using Simulink.
7

8 Realize the FIR filter given by the impulse response


h(n)={0.08,0.21,0.54,0.86,1,0.86,0.54,0.21,0.08} using Simulink. Obtain the frequency
response characteristics.
9 Simulate the Amplitude Modulation and Demodulation using Simulink. Display the output
signal and its spectrum.
10 Simulate the modulation & demodulation of a random binary data stream using QPSK using
Simulink. Display the output signal and its spectrum.
SYSTEM MODELLING USING SIMULINK BEC657B

EXPERIMENT 1a: Signal Generation and Visualization in Simulink

AIM: To generate and visualize different signals in Simulink, including:

1. Sinusoidal signal
2. Square wave signal
3. Sawtooth wave signal
4. Random signal

These signals will be generated using their respective signal generator blocks and displayed on a
single scope with separate inputs.

SOFTWARE REQUIRED:

 MATLAB with Simulink toolbox

SIMULINK BLOCK DIAGRAM:

PROCEDURE:

1. Open MATLAB and Simulink:


o Launch MATLAB and open Simulink by typing simulink in the
command window.
2. Create a New Simulink Model:
o Click on Blank Model in Simulink to start a new model.
3. Add Signal Sources:
o Drag and drop the following blocks from the Simulink Library Browser:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 1


SYSTEM MODELLING USING SIMULINK BEC657B

Sine Wave (for sinusoidal signal)


Square Wave Generator (for square signal)
Sawtooth Generator (for sawtooth signal)
Random Number Generator (for random signal)
4. Add a Scope to Visualize the Signals:
o From the Simulink Library Browser, add a Scope block.
o Double-click on the Scope block and set the number of input ports to 4 to
accommodate all signals.
5. Connect the Blocks:
o Connect the output of each signal generator to separate input ports of the Scope.
6. Run the Simulation:
o Click on the Run button to start the simulation.
o Open the Scope to observe the generated waveforms.

OUTPUT :

RESULT:

 The generated signals (sinusoidal, square, sawtooth, and random) are displayed on
the Scope with separate inputs.
 The simulation successfully demonstrates signal generation and visualization
in Simulink.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 2


SYSTEM MODELLING USING SIMULINK BEC657B

EXPERIMENT 1b: Signal Processing – Differentiation and Integration in Simulink

AIM: To perform signal processing operations in Simulink and display the output for the
following cases:

SOFTWARE REQUIRED:

 MATLAB with Simulink toolbox

Simulink Block Diagram:

PROCEDURE:

1. Open MATLAB and Simulink:


o Launch MATLAB and open Simulink by typing simulink in the
command window.
2. Create a New Simulink Model:
o Click on Blank Model in Simulink to start a new model.
3. Add Signal Source:
o From the Simulink Library Browser, add a Sine Wave block.
o Set parameters for the Sine Wave block:
 Amplitude: 1
 Frequency: 2 rad/sec
4. Perform Differentiation:
o Drag and drop a Derivative block from the Continuous library.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 3


SYSTEM MODELLING USING SIMULINK BEC657B

o Connect the output of the Sine Wave block to the input of the Derivative block.
5. Perform Integration:
o Drag and drop an Integrator block from the Continuous library.
o Connect the output of the Sine Wave block to the input of the Integrator block.
6. Add a Scope for Visualization:
o Drag a Scope block from the Simulink Library Browser.
o Double-click on the Scope block and set the number of input ports to 3.
o Connect:
 The Sine Wave output to the Scope
 The Derivative block output to the Scope
 The Integrator block output to the Scope
7. Run the Simulation:
o Click on the Run button to start the simulation.
o Open the Scope to observe the generated waveforms.

OUTPUT:

RESULT:

 The simulation successfully generates:


o The original sine wave
o The differentiated signal
o The integrated signal
 The signals are displayed on the Scope in separate plots, demonstrating the
differentiation and integration operations.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 4


SYSTEM MODELLING USING SIMULINK BEC657B

EXPERIMENT 2a: Solving Second-Order Differential Equation Using Simulink

AIM:
To solve the second-order differential equation

using Simulink and display the output.

SOFTWARE REQUIRED:

 MATLAB with Simulink toolbox

SIMULINK BLOCK DIAGRAM:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 5


SYSTEM MODELLING USING SIMULINK BEC657B

PROCEDURE:

1. Open MATLAB and Simulink


o Launch MATLAB and open Simulink by typing simulink in the
command window.
2. Create a New Simulink Model
o Click on Blank Model in Simulink.
3. Add Required Blocks
o Constant Block: Set value to 1.
o Sum Block: Configure to + - - to implement 1−2y2−5y1
o Gain Blocks:
 First Gain Block (set to 2) for 2y2
 Second Gain Block (set to 5) for 5y1.
o Integrator Blocks:
 First Integrator computes y1 from y2.
 Second Integrator computes y2 from the equation.
o Scope Block: To visualize y1(t).
4. Connect the Blocks
o Connect the Constant Block to the Sum Block.
o Connect outputs of the Gain Blocks to the Sum Block.
o Connect the Sum Block output to the Second Integrator.
o Connect the Second Integrator output to the First Integrator.
o Connect the First Integrator output to the Scope Block.
5. Run the Simulation
o Click on Run to execute the model.
6. Observe the Output

OUTPUT:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 6


SYSTEM MODELLING USING SIMULINK BEC657B

EXPERIMENT 2b: Solving Second-Order Differential Equation Using Simulink

AIM:
To solve the second-order differential equation using Simulink and display the output.

SOFTWARE REQUIRED:

 MATLAB with Simulink toolbox

MATHEMATICAL MODELING:

SIMULINK BLOCK DIAGRAM:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 7


SYSTEM MODELLING USING SIMULINK BEC657B

PROCEDURE:

1. Open MATLAB and Simulink


o Launch MATLAB and open Simulink by typing simulink in the
command window.
2. Create a New Simulink Model
o Click on Blank Model in Simulink.
3. Add Required Blocks
o Sine Wave Block: Set function to 5cos(2t) (adjust frequency to 2 rad/s
and amplitude to 5).
o Sum Block: Configure to + - - to implement 5cos(2t)−3y2−4y1.
o Gain Blocks:
 First Gain Block (set to 3) for 3y2.
 Second Gain Block (set to 4) for 4y1.
o Integrator Blocks:
 First Integrator computes y1 from y2.
 Second Integrator computes y2 from the equation.
o Scope Block: To visualize y1(t).
4. Connect the Blocks
o Connect the Sine Wave Block to the Sum Block.
o Connect outputs of the Gain Blocks to the Sum Block.
o Connect the Sum Block output to the Second Integrator.
o Connect the Second Integrator output to the First Integrator.
o Connect the First Integrator output to the Scope Block.
5. Run the Simulation
o Click on Run to execute the model.
6. Observe the Output
o Open the Scope to view the graph of y1(t).

OUTPUT WAVEFORM:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 8


SYSTEM MODELLING USING SIMULINK BEC657B

RESULT:
The second-order differential equation was successfully solved using Simulink, and the output
waveform was displayed on the Scope.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 9


SYSTEM MODELLING USING SIMULINK BEC657B

Experiment 4: Design and Simulate a BCD Adder Using Simulink

Aim: To design and simulate a Binary-Coded Decimal (BCD) Adder using Simulink and verify
its operation.

Software Required:

 MATLAB Simulink
 Logic Design Toolbox (Simulink Library)

Theory:

A Binary-Coded Decimal (BCD) Adder is a combinational circuit that adds two BCD numbers
and produces the sum in BCD format. It follows these steps:

1. Add two 4-bit BCD numbers using a binary adder.


2. If the sum is greater than 9 (1001 in binary) or if a carry is generated, add 6 (0110
in binary) to correct the sum.
3. The final result is a valid BCD representation of the sum.

DESIGN:

The correction logic is implemented based on detecting invalid BCD numbers.

Sum (Binary) Sum (Decimal) Valid/Invalid Add 6 (0110)? Corrected BCD Output
0000 0 Valid No 0000
0001 1 Valid No 0001
0010 2 Valid No 0010
0011 3 Valid No 0011
0100 4 Valid No 0100
0101 5 Valid No 0101
0110 6 Valid No 0110
0111 7 Valid No 0111
1000 8 Valid No 1000
1001 9 Valid No 1001
1010 10 Invalid Yes 0000 (carry = 1)
1011 11 Invalid Yes 0001 (carry = 1)
1100 12 Invalid Yes 0010 (carry = 1)
1101 13 Invalid Yes 0011 (carry = 1)

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 10


SYSTEM MODELLING USING SIMULINK BEC657B

1110 14 Invalid Yes 0100 (carry = 1)


1111 15 Invalid Yes 0101 (carry = 1)

K-Map Simplification for Correction Logic

To detect invalid BCD numbers (10-15), the Boolean expression is derived using K-map.

Minterms for Invalid BCD Numbers:

F=Σm(10,11,12,13,14,15)

Using K-map simplification

Y= S3S2 + S3S1

SIMULINK MODEL DIAGRAM:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 11


SYSTEM MODELLING USING SIMULINK BEC657B

FULL ADDER SUB-SYSTEM

Procedure:

1. Open MATLAB and launch Simulink.


2. Create a new model and drag required blocks from the Simulink Library:
o Binary Adder (Full Adder Blocks)
o Make the subsystem for full adder.
o Logic Gates (AND, OR, XOR)
o Constant Blocks for Inputs
o Display Blocks for Output
3. Connect the components to implement a BCD adder:
o Use a 4-bit binary adder to add two BCD numbers.
o Implement logic to check if the sum exceeds 9 or a carry is generated.
o Add a correction factor (0110) using another binary adder if needed.
4. Run the simulation and observe the output.
5. Verify the correctness of the sum.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 12


SYSTEM MODELLING USING SIMULINK BEC657B

Test Cases:

Input A Input B Binary Sum Correction Added? Final BCD Output


0110 (6) 0011 (3) 1001 (9) No 1001 (9)
0110 (6) 0110 (6) 1100 (12) Yes (Add 6) 0010 (carry 1)
1001 (9) 1001 (9) 10010 (18) Yes (Add 6) 0010 1000

Results:

The BCD Adder was successfully designed and simulated using Simulink. The circuit correctly
performs BCD addition, applies correction logic when needed, and properly handles carry
propagation. The simulation results verify the expected BCD output.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 13


SYSTEM MODELLING USING SIMULINK BEC657B

Experiment 5: Design and Simulate the following using Simulink and verify its operation.
(a) 3-bit Up/Down Counter
(b) 4-bit Ring Counter

AIM: To design and simulate a 3-bit Up/Down Counter and a 4-bit Ring Counter using
Simulink and verify their operation.

SOFTWARE REQUIRED:

 MATLAB Simulink

THEORY:

3- bit Up/Down Counter

A 3-bit Up/Down Counter is a sequential circuit that counts up or down based on a control
signal. It consists of three flip-flops, with each flip-flop representing one bit. The counter follows
the sequence:

 Up Counting: 000 → 001 → 010 → 011 → 100 → 101 → 110 → 111 → (repeats)
 Down Counting: 111 → 110 → 101 → 100 → 011 → 010 → 001 → 000 → (repeats)

Working Principle:

 The counter is driven by a clock signal.


 A mode control signal (UP/DOWN) determines whether the counter increments
or decrements.
 Flip-flops are interconnected such that the output toggles accordingly.

4- bit Ring Counter

A 4-bit Ring Counter is a type of counter where a single 1 moves through the register in
a circular fashion. It is designed using D flip-flops.

Working Principle:

 Initially, one flip-flop is set (1), and all others are reset (0).
 On each clock pulse, the 1 shifts from one flip-flop to the next.
 The cycle repeats after four clock pulses.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 14


SYSTEM MODELLING USING SIMULINK BEC657B

State Diagram:

1. 0001
2. 0010
3. 0100
4. 1000
5. (Repeats)

3-bit Up Counter Design

Number of Flip-Flops (FF) = 3


Range of Counting: 0 to 2^3 - 1 (0 to 7)

State Table for 3-bit Counter:

Present State Next State DA DB


DC
000 001 0 01
001 010 0 10
010 011 0 11
011 100 1 00
100 101 1 01
101 110 1 10
110 111 1 11
111 000 0 00

K-Maps for DA, DB, and DC:

 K-Map for DA → DA=Σ(3,4,5,6)

DA= QAQC' + QAQB' + QA'QBQC

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 15


SYSTEM MODELLING USING SIMULINK BEC657B

 K-Map for DB → DB=Σ(1,2,5,6)

DB= QBQC' + QB'QC

DB= QB⊕QC

 K-Map for DC → DC=Σ(0,2,4,6)

DC= QC'

PROCEDURE:

3- bit Up/Down Counter

1. Open MATLAB and launch Simulink.


2. Create a new Simulink model.
3. Use D flip-flops or JK flip-flops to build a 3-bit counter.
4. Connect the clock source.
5. Add a toggle switch to control UP/DOWN counting.
6. Connect logical AND, OR, XOR gates as required.
7. Display output using a Scope or Display block.

4- bit Ring Counter

1. Create a new Simulink model.


2. Use D flip-flops to form a shift register.
3. Set the initial state with one flip-flop high (1) and others low (0).
4. Use a Clock Source to drive the shift.
5. Connect feedback for continuous looping.
6. Observe the output using a Scope.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 16


SYSTEM MODELLING USING SIMULINK BEC657B

SIMULINK MODEL DIAGRAM:

UP-COUNTER:

DOWN-COUNTER:

RING-COUNTER:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 17


SYSTEM MODELLING USING SIMULINK BEC657B

FOR RING COUNTER:

OUTPUT:

UP-COUNTER:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 18


SYSTEM MODELLING USING SIMULINK BEC657B

DOWN-COUNTER:

RING-COUNTER:

RESULT:

The 3-bit Up/Down Counter and 4-bit Ring Counter were successfully designed and simulated
using Simulink. The outputs were verified and matched the expected behavior.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 19


SYSTEM MODELLING USING SIMULINK BEC657B

EXPERIMENT 6: Implementation of 4:1 Multiplexer and Demultiplexer Using Simulink

AIM: To design and implement a 4:1 Multiplexer and a 1:4 Demultiplexer using Simulink and
analyze their functionality.

SOFTWARE REQUIRED:

 MATLAB Simulink

THEORY: A Multiplexer (MUX) is a combinational circuit that selects one input from
multiple inputs and forwards it to a single output based on the selection lines. A Demultiplexer
(DEMUX) is a combinational circuit that takes a single input and distributes it to multiple
outputs based on the selection lines.

4:1 Multiplexer

A 4:1 MUX has four input data lines D0,D1,D2,D3 two selection lines S1,S0 and one output.
The output equation is:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 20


SYSTEM MODELLING USING SIMULINK BEC657B

1:4 Demultiplexer

A 1:4 DEMUX has one input II, two selection lines S1,S0 and four outputs Y0,Y1,Y2,Y3.

The output equations are:

PROCEDURE:

For 4:1 MUX:

1. Open MATLAB and launch Simulink.


2. Create a new Simulink model.
3. Add the following blocks:
o Constant Blocks (to represent input values)
o Manual Switches (for selection lines S1,S0)
o Logical AND, OR, NOT Blocks (to implement the logic equation)
o Scope Block (to observe the output)
4. Implement the logic equation of the 4:1 MUX.
5. Connect all blocks appropriately.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 21


SYSTEM MODELLING USING SIMULINK BEC657B

6. Run the simulation and observe the output on the Scope.

For 1:4 DEMUX:

1. Open MATLAB and launch Simulink.


2. Create a new Simulink model.
3. Add the following blocks:
o Constant Blocks (to represent input values)
o Manual Switches (for selection lines S1,S0)
o Logical AND, NOT Blocks (to implement the logic equations)
o Scope Blocks (to observe the outputs)
4. Implement the logic equations of the 1:4 DEMUX.
5. Connect all blocks appropriately.
6. Run the simulation and observe the outputs on the Scope.

SIMULINK MODEL DIAGRAM:

4:1 MUX

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 22


SYSTEM MODELLING USING SIMULINK BEC657B

1:4 DE-MUX

RESULTS: The 4:1 Multiplexer and 1:4 Demultiplexer were successfully designed and
simulated using Simulink.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 23


SYSTEM MODELLING USING SIMULINK BEC657B

EXPERIMENT 7: Step Response Analysis of Continuous and Discrete Systems Using


Simulink

AIM: To analyze and obtain the step response of the given continuous and discrete transfer
functions using MATLAB Simulink.

SOFTWARE REQUIRED:

 MATLAB Simulink
 Signal Processing Toolbox

THEORY: Step response is a fundamental analysis method in control systems that helps in
understanding system stability and performance. A step input allows the study of transient
and steady-state behavior.

Continuous Transfer Function:

This function represents a continuous-time system, and its response is obtained using Simulink’s
Transfer Function block.

Discrete Transfer Function:

This function represents a discrete-time system, and its response is obtained using Simulink’s
Discrete Transfer Function block.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 24


SYSTEM MODELLING USING SIMULINK BEC657B

PROCEDURE:

For Continuous Transfer Function:

1. Open MATLAB and launch Simulink.


2. Create a new Simulink model.
3. Add the following blocks:
o Step Input (from Sources library)
o Transfer Function (from Continuous library)
o Scope (from Sinks library)
4. Set the transfer function as

5. Connect all blocks appropriately.


6. Run the simulation and observe the output on the Scope.

For Discrete Transfer Function:

1. Open MATLAB and launch Simulink.


2. Create a new Simulink model.
3. Add the following blocks:
o Step Input (from Sources library)
o Discrete Transfer Function (from Discrete library)
o Scope (from Sinks library)
4. Set the discrete transfer function as

5. Connect all blocks appropriately.


6. Run the simulation and observe the output on the Scope.

SIMULINK MODEL DIAGRAM:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 25


SYSTEM MODELLING USING SIMULINK BEC657B

OUTPUT:

Continuous Transfer Function

Discrete Transfer Function:

RESULTS: The step response of the given continuous and discrete transfer functions was
successfully obtained using Simulink.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 26


SYSTEM MODELLING USING SIMULINK BEC657B

EXPERIMENT 8: Realization of an FIR Filter using Simulink and Obtaining Frequency


Response Characteristics

AIM: To design and implement a Finite Impulse Response (FIR) filter given by the impulse
response h(n) = {0.08, 0.21, 0.54, 0.86, 1, 0.86, 0.54, 0.21, 0.08} using Simulink and analyze its
frequency response.

SOFTWARE REQUIRED:

 MATLAB Simulink
 Signal Processing Toolbox

THEORY: A Finite Impulse Response (FIR) filter is a type of digital filter that has a finite
duration impulse response. The output of an FIR filter is obtained by convolving the input signal
with the impulse response coefficients. FIR filters are inherently stable and exhibit linear-phase
characteristics.

The given FIR filter has nine coefficients, meaning it is an 8th-order FIR filter. It is implemented
using delay blocks, multipliers (gain blocks), and summation blocks in Simulink.

SIMULINK MODEL DIAGRAM:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 27


SYSTEM MODELLING USING SIMULINK BEC657B

PROCEDURE:

1. Open MATLAB and launch Simulink.


2. Create a new Simulink model and drag the following blocks from the Simulink Library:
o Two Sine Wave blocks (to generate input signals)
o Add block (to combine two input signals)
o Unit Delay blocks (for implementing delay elements)
o Gain blocks (to multiply the impulse response coefficients)
o Add blocks (to sum the scaled signals)
o Scope (to observe the output waveform)
o Spectrum Analyzer (to observe the frequency response)
3. Connect the blocks as shown in the Simulink diagram.
4. Set the Gain values according to the given impulse response coefficients.
5. Run the simulation and observe the output waveform on the Scope.
6. Analyze the frequency response using the Spectrum Analyzer.
7. Compare the obtained response with theoretical expectations.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 28


SYSTEM MODELLING USING SIMULINK BEC657B

OUTPUT:

RESULTS: The FIR filter was successfully implemented using Simulink, and the frequency
response characteristics were analyzed. The filter exhibited the expected behavior based on its
impulse response.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 29


SYSTEM MODELLING USING SIMULINK BEC657B

EXPERIMENT 9: Simulation of Amplitude Modulation and Demodulation using Simulink

AIM: To simulate amplitude modulation (AM) and demodulation using MATLAB Simulink and
analyze the transmitted and received signals.

SOFTWARE REQUIRED:

 MATLAB Simulink
 Signal Processing Toolbox

THEORY: Amplitude Modulation (AM) is a technique in which the amplitude of a carrier wave
is varied in proportion to the message signal. It is widely used in radio broadcasting and
communication systems.

The AM wave equation is given by: s(t)=[1+m(t)]cos(ωct)

where:

 m(t) is the message signal,


 ωc is the carrier frequency.

Demodulation is the process of recovering the message signal from the modulated wave. In this
experiment, an envelope detector is used for demodulation, implemented using low-pass filters.

SIMULINK MODEL DIAGRAM:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 30


SYSTEM MODELLING USING SIMULINK BEC657B

PROCEDURE:

1. Open MATLAB and launch Simulink.


2. Create a new Simulink model and add the following blocks:
o Sine Wave (for message signal)
o Sine Wave (for carrier signal)
o Constant Block (for noise simulation)
o Add Block (to introduce noise to the message signal)
o Multipliers (for modulation and demodulation)
o Transfer Function Blocks (to act as low-pass filters for demodulation)
o Spectrum Analyzer (for analyzing the frequency spectrum of the modulated
and demodulated signals)
o Scope (to observe input and output signals)
3. Set the carrier frequency significantly higher than the message signal frequency.
4. Connect the blocks as per the provided Simulink diagram.
5. Run the simulation and observe the modulated and demodulated signals using the Scope.
6. Verify that the demodulated signal resembles the original message signal.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 31


SYSTEM MODELLING USING SIMULINK BEC657B

OUTPUT:

RESULTS: The AM signal was successfully generated, and the original message signal was recovered
using demodulation techniques.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 32


SYSTEM MODELLING USING SIMULINK BEC657B

EXPERIMENT 10: Simulation of Modulation and Demodulation of a Random Binary Data


Stream using QPSK in Simulink.

AIM: To simulate Quadrature Phase Shift Keying (QPSK) modulation and demodulation for a
random binary data stream using MATLAB Simulink and analyze the output waveforms.

SOFTWARE REQUIRED:

 MATLAB Simulink
 Communication Toolbox

THEORY: Quadrature Phase Shift Keying (QPSK) is a digital modulation scheme where two
bits are represented by a single symbol, using four different phase shifts (0°, 90°, 180°, and
270°). QPSK provides better bandwidth efficiency and noise immunity compared to BPSK.

The transmitted QPSK signal can be represented as:

S(t)=Ac.cos(2π.fc.t+ϕ) where:

 Ac is the carrier amplitude,


 fc is the carrier frequency,
 ϕ is the phase shift based on the input bits.

The demodulation process retrieves the original binary data from the received QPSK signal.

BLOCK DIAGRAM:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 33


SYSTEM MODELLING USING SIMULINK BEC657B

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 34


SYSTEM MODELLING USING SIMULINK BEC657B

PROCEDURE:

1. Open MATLAB and launch Simulink.


2. Create a new Simulink model and add the following blocks:
o Random Integer Generator (to generate binary data)
o QPSK Modulator Baseband (to modulate the input signal)
o AWGN Channel (to introduce noise into the signal)
o QPSK Demodulator Baseband (to recover the original signal)
o Complex to Real-Imag Block (to separate the in-phase and quadrature
components)
o Sine Wave Generators (for carrier signal generation)
o Multipliers and Adders (for coherent detection)
o Scope (to visualize input and output signals)
o Spectrum Analyzer (for analyzing the frequency spectrum of the modulated
and demodulated signals)
3. Connect the blocks as per the provided Simulink diagram.
4. Configure the simulation parameters, ensuring that the sampling time is appropriate
for the signal frequencies.
5. Run the simulation and observe the QPSK modulated and demodulated signals on
the Scope and Spectrum Analyzer.
6. Analyze the effect of noise on the demodulated signal.

OUTPUT:

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 35


SYSTEM MODELLING USING SIMULINK BEC657B

RESULTS: The QPSK modulation and demodulation process was successfully simulated. The
demodulated signal was observed to closely match the original binary data stream.

RUDRESH D H, Dept of ECE, CITNC Bengaluru Page 36

You might also like