Discrete Block in Simulink
Discrete Block in Simulink
Nam
• Bismillah
e
Batool
• Roll no. 23-24-
Roll
no.
07
• December
Date
2,2024
A
S • Abdus Salam School of Mathematical
S
M Sciences , Lahore
S
1
CONTENTS
Introduction
Types of discretes
blocks
Why to use discrete
blocks?
working
Examples
conclusion
2
INTRODUCTION
Discrete Blocks in Simulink
Discrete blocks in Simulink represent elements
that operate at discrete time intervals. These
blocks are used in discrete-time systems,
where signals and computations are sampled
and processed at fixed time steps. Unlike
continuous blocks, which compute values
continuously over time, discrete blocks work
Applications
only of Discrete
at specified sample times.
Blocks
Digital Signal Processing (DSP):
1. Design of digital filters (FIR, IIR).
2. Signal modulation and demodulation.
3. Etc.
3
DELAY
Example: Sine Wave Signal with Delay
Objective:
To demonstrate the effect of a Discrete Delay block by delaying a sine
wave signal and visualizing the original and delayed signals on a graph.
5
ENABLED DELAY
Example: Enabled Delay with a Pulse Enable Signal
Objective:
Demonstrate the use of the Enabled Delay block by delaying a sine wave signal
when an enabling pulse signal is active. The output will show delayed signals only
during enabled periods.
6
ENABLED DELAY
Example: Enabled Delay with a Pulse
Enable Signal
7
RESETTABLE DELAY
A resettable delay in Simulink is used to introduce a
delay in a signal while allowing the delay to be reset to a
specific value based on a reset condition. This is typically
achieved using the Delay block along with an external
reset signal.
8
Here is the graph showing a resettable delay simulation:
1.Input Signal (Sine Wave): A continuous sinusoidal
wave.
2.Reset Signal (Pulse): A square wave that triggers
the reset condition at regular intervals.
3.Delayed Signal (With Reset):
1. Initially tracks the sine wave with a delay.
2. Resets to the initial condition (0) whenever the
reset signal pulses.
9
TAPPED DELAY
A Tapped Delay refers to a delay line with
multiple outputs, where each output corresponds to
a delayed version of the input signal. This is often
used in signal processing, control systems, and FIR
filter design.
10
Here is the graph for the tapped delay simulation:
1.Input Signal (Sine Wave): The original sine
wave.
2.Tapped Outputs:
1. Tapped Output 1: No delay (original signal).
2. Tapped Output 2: Delayed by 0.5 seconds.
3. Tapped Output 3: Delayed by 1.0 second.
4. Tapped Output 4: Delayed by 1.5 seconds.
11
UNIT DELAY
A Unit Delay block in Simulink delays its
input by one simulation time step. It is
commonly used in digital signal processing
and control systems to implement discrete-
time systems.
The block
updates its
value after
each 0.1 sec.
12
Here is the graph for the Unit Delay
simulation:
1.Input Signal (Sine Wave): The original sine
wave.
2.Unit Delay Output: The sine wave shifted
by one time step (0.1 seconds in this case),
evident as a small phase lag. 13
VARIABLE INTEGRATOR DELAY
A Variable Integrator Delay is a delay in the integration
process where the delay duration varies based on a signal
input. This is useful in dynamic systems where the delay is
not constant and depends on time-varying conditions.
14
15
DIFFERENCE
Calculate change in signal over one time step
The Difference block outputs the current input value minus the previous input
value
16
DISCRETE
DERIVATIVE
Compute discrete-time
derivative
•u(tn) and y(tn) are the block's input and output at the current time step,
respectively.
•u(tn−1) is the block's input at the previous time step.
•K is a scaling factor.
•Ts is the simulation's discrete step size, which must be fixed.
17
DISCRETE FILTER
The Discrete Filter block independently filters each channel of the input signal
with the specified digital IIR filter. You can specify the filter structure as one of
| Direct form I | Direct form I transposed | Direct form II | Direct form II
transposed. The block implements static filters with fixed coefficients. You can
tune the coefficients of these static filters.
18
PID CONTROLER,DISCRETE PID
CONTROLLER
Simulate continuous- or discrete-time PID controllers
19
PID CONTROLLER (2 DOF), DISCRETE PID CONTROLLER (2 DOF)
20
DISCRETE STATE-SPACE
21
DISCRETE TRANSFER FCN
22
DISCRETE ZERO-POLE
23
DISCRETE-TIME INTEGRATOR
24
FIRST-ORDER HOLD
25
MEMORY
26
TAPPED DELAY
27
TRANSFER FCN FIRST ORDER
28
TRANSFER FCN LEAD OR LAG
29
TRANSFER FCN REAL ZERO
Implement discrete-time transfer function
that has real zero and no pole
30
UNIT DELAY
31
ZERO-ORDER HOLD
32
THANK YOU