AIM: To generate different types of basic discrete time signals Using MATLAB Software.
EQUIPMENTS: PC with windows OS with MATLAB R2024b Software.
THEORY: If the amplitude of the signal is defined at every instant of time then it is called
continuous signal. If the amplitude of the signal is defined at only at some instants of time then,
it is called discrete signal. If the signal repeats itself at regular intervals of time, then it is called
periodic signal. Otherwise, they are called aperiodic signals.
1. Unit Impulse function δ(t):
Impulse signal, also called unit impulse function. The value of delta function can also be
defined in the sense of generalized function
2. Unit Step Function u(t):
b)Unit Step Sequence u(n): )={ 1, n = 0
0, n < 0
3. Square waves:
Like sine waves, square waves are described in terms of period, frequency and amplitude:
Peak amplitude, Vp , and peak-to-peak amplitude, Vpp , are measured as you might expect.
However, the rms amplitude, Vrms , is greater than that of a sine wave. Remember that the rms
amplitude is the DC voltage which will deliver the same power as the signal. If a square wave
supply is connected across a lamp, the current flows first one way and then the other. The
current switches direction but its magnitude remains the same. In other words, the square wave
delivers its maximum power throughout the cycle so that Vrms is equal to Vp .
Although a square wave may change very rapidly from its minimum to maximum voltage, this
change cannot be instantaneous. The rise time of the signal is defined as the time taken for the
voltage to change from 10% to 90% of its maximum value. Rise times are usually very short,
with duration measured in nanoseconds (1 ns = 10^(-9) s), or microseconds (1 µs = 10^(-6)s),
as indicated in the graph
4. Sawtooth Waveform Generation
The sawtooth wave is a non-sinusoidal waveform. It is named a sawtooth based on its
resemblance to the teeth on the blade of a saw. The convention is that a sawtooth wave ramps
upward and then sharply drops. However, there are also sawtooth waves in which the wave
ramps downward and then sharply rises. The latter type of sawtooth wave is called a 'reverse
sawtooth wave' or 'inverse sawtooth wave'. As audio signals, the two orientations of sawtooth
wave sound identical. The piece wise linear function based on the floor function of time t, is
an example of a saw tooth wave with period1.
5. Triangular wave:
A triangle wave is a non-sinusoidal waveform named for its triangular shape. A bandlimited
triangle wave pictured in the time domain (top) and frequency domain (bottom). The
fundamental is at 220 Hz (A2). Like a square wave, the triangle wave contains
only odd harmonics.
6. Sinusoidal Signal:
It is a continuous signal, it will vary the amplitude of the signal w.r.t time.
7. Ramp Signal:
It is defined as x(t)=t for t=0
= 0 elsewhere
MATLAB Codes
1. Unit Impulse
a) Unit Impulse signal
Code: -
Result: -
b) Unit Impulse sequence
Code: -
Result: -
2. Unit step
a) Unit step signal
Code: -
Result: -
b) Unit step sequence
Code: -
Result: -
3. Square Waves
Code: -
Result: -
4. Sawtooth Waveform generation
Code: -
Result: -
5. Triangular Pulse
Code: -
Result: -
6. Rectangular Pulse
Code: -
Result: -
7. Sinusoidal waveform
Code: -
Result: -
8. Ramp signal
Code: -
Result: -
9. Sinc function
Code: -
Result: -