SMS Lab Manual - Bec657b
SMS Lab Manual - Bec657b
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
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:
PROCEDURE:
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.
AIM: To perform signal processing operations in Simulink and display the output for the
following cases:
SOFTWARE REQUIRED:
PROCEDURE:
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:
AIM:
To solve the second-order differential equation
SOFTWARE REQUIRED:
PROCEDURE:
OUTPUT:
AIM:
To solve the second-order differential equation using Simulink and display the output.
SOFTWARE REQUIRED:
MATHEMATICAL MODELING:
PROCEDURE:
OUTPUT WAVEFORM:
RESULT:
The second-order differential equation was successfully solved using Simulink, and the output
waveform was displayed on the Scope.
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:
DESIGN:
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)
To detect invalid BCD numbers (10-15), the Boolean expression is derived using K-map.
F=Σm(10,11,12,13,14,15)
Y= S3S2 + S3S1
Procedure:
Test Cases:
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.
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:
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:
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.
State Diagram:
1. 0001
2. 0010
3. 0100
4. 1000
5. (Repeats)
DB= QB⊕QC
DC= QC'
PROCEDURE:
UP-COUNTER:
DOWN-COUNTER:
RING-COUNTER:
OUTPUT:
UP-COUNTER:
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.
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:
1:4 Demultiplexer
A 1:4 DEMUX has one input II, two selection lines S1,S0 and four outputs Y0,Y1,Y2,Y3.
PROCEDURE:
4:1 MUX
1:4 DE-MUX
RESULTS: The 4:1 Multiplexer and 1:4 Demultiplexer were successfully designed and
simulated 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.
This function represents a continuous-time system, and its response is obtained using Simulink’s
Transfer Function block.
This function represents a discrete-time system, and its response is obtained using Simulink’s
Discrete Transfer Function block.
PROCEDURE:
OUTPUT:
RESULTS: The step response of the given continuous and discrete transfer functions was
successfully obtained using Simulink.
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.
PROCEDURE:
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.
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.
where:
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.
PROCEDURE:
OUTPUT:
RESULTS: The AM signal was successfully generated, and the original message signal was recovered
using demodulation techniques.
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.
S(t)=Ac.cos(2π.fc.t+ϕ) where:
The demodulation process retrieves the original binary data from the received QPSK signal.
BLOCK DIAGRAM:
PROCEDURE:
OUTPUT:
RESULTS: The QPSK modulation and demodulation process was successfully simulated. The
demodulated signal was observed to closely match the original binary data stream.