Experiment 3 (Properties of Signals)
Experiment 3 (Properties of Signals)
Experiment No. 3
Properties of Signals
Aim:
• Investigate and analyze discrete-time signals to determine their periodicity and, if they
are periodic, to identify their fundamental periods.
• Perform mathematical operations on signals (addition, subtraction, multiplication, and
division) and observe their effects.
Theory:
In discrete-time signal analysis, determining the periodicity of a signal and identifying its
fundamental period are essential tasks. A discrete-time signal 𝑥 [n ] is defined as periodic if
there exists a positive integer 𝑁 such that:
𝑥 [n +N]= 𝑥[ n] ∀n.
The smallest positive value of N for the signal is referred to as the fundamental period of
the signal. If no such N exists, the signal is considered non-periodic.
2𝜋𝑀
Specifically, 𝑤𝑜 = , where M and 𝑁 are integers with no common factors other than
𝑁
1.
1
Signals and Systems LAB (SGSY257) 2nd year,2nd semester
Properties of Signals Prepared by Dr. Yasmine M. Tabra
Dr. Mohammed H. Ali
2𝜋𝑀
Normalized frequency 𝑤𝑜 =
𝑁
2𝜋𝑘 2𝜋𝑀
𝑤𝑜 𝑁𝑜 =2πk , 𝑁𝑜 = , substituting 𝑤𝑜 =
𝑤𝑜 𝑁
2𝜋𝑘 𝑁𝑘
𝑁𝑜 = 2𝜋𝑀 = ,
𝑀
𝑁
𝑁
Since 𝑁𝑜 must be the smallest positive integer, so set k =1. If 𝑁𝑜 = is an integer, it
𝑀
represents the fundamental period. If not, the signal is non- periodic.
2
Signals and Systems LAB (SGSY257) 2nd year,2nd semester
Properties of Signals Prepared by Dr. Yasmine M. Tabra
Dr. Mohammed H. Ali
• Assume N = 6 for each signal. Determine whether each signal periodic. If a signal is
periodic, plot the signal for two periods, starting at n = 0.
• Plot the signal for 0 ≤ n ≤ 7N and explain why it is periodic or not.
• Remember to use stem and to appropriately label your axes.
We take the Least Common Multiple (LCM) of the denominators 3 and 2, which is 6.
𝑥2 [𝑛] is periodic with fundamental period 6.
3
Signals and Systems LAB (SGSY257) 2nd year,2nd semester
Properties of Signals Prepared by Dr. Yasmine M. Tabra
Dr. Mohammed H. Ali
Tasks:
- Repeat x1 with M=12,20. If periodic find the fundamental period.
- Repeat x1 with N=6 for M=4,5. If periodic find the fundamental period
- Repeat
3𝑛 5𝑛
𝑥2[𝑛] = 2 cos ( ) + cos ( )
𝑁 𝑁
- Repeat x3 for N=4;
Operations on Signals
1. Addition & Subtraction
Signals can be added and subtracted on condition which is that they be of the same length
when defined in MATLAB in order to add or subtract the adjacent elements or values of the
signals.
In MATLAB, when you add or subtract signals (which are typically represented as vectors or
arrays), they must be the same length. MATLAB performs these operations element-wise,
meaning that the first element of one signal is added to the first element of the other, the
second element to the second, and so on. If the signals have different lengths, MATLAB will
return an error because it cannot match elements properly.
Example: For the following two signals
𝑋1 (𝑛) = (0.5)𝑛 − 10 ≤ 𝑛 ≤ 10
𝑋2 (𝑛) = (0.8)𝑛 − 10 ≤ 𝑛 ≤ 10
Using subplot to stem 𝑋1 , 𝑋2 , 𝑋1 + 𝑋2 , 𝑋1 − 𝑋2 .
Procedure:
1. Defined variable n from -10 to 10.
2. signal Definitions:
X1 = (0.5). ^n; calculates ( 0.5 )^n for each element in n.
X2 = (0.8). ^n;; calculates ( 0.8 )^n similarly.
Subplots:
The first subplot shows 𝑋1 (𝑛)
The second subplot shows 𝑋2 (𝑛)
The third subplot shows the element-wise sum 𝑋1 (𝑛) + 𝑋2 (𝑛)
The fourth subplot shows the element-wise difference 𝑋1 (𝑛) − 𝑋2 (𝑛)
4
Signals and Systems LAB (SGSY257) 2nd year,2nd semester
Properties of Signals Prepared by Dr. Yasmine M. Tabra
Dr. Mohammed H. Ali
You can determine the minimum and maximum values of any signal using the min and
max functions in MATLAB.
Example: For the following signal
𝑛
𝑋5 (𝑛) = 𝑐𝑜𝑠 (𝑝𝑖 ∗ ) − 20 ≤ 𝑛 ≤ 20
4
a) Find the maximum value and minimum values in X5 (n).
b) Use ‘find’ command to locate all indexes of the max and min values.
c) First stem X5 (n) then stem max and min according to their indexes.
Procedure:
1. Define the range of n from -20 to 20.
𝑛
2. Compute the signal 𝑋5 (𝑛) = 𝑐𝑜𝑠 (𝑝𝑖 ∗ )
4
3. Find the maximum and minimum values using max() and min().
4. Find their indices using the find() command.
5. Plot the signal using stem(), and:
• Highlight the max values in red.
• Highlight the min values in green.
6
Signals and Systems LAB (SGSY257) 2nd year,2nd semester
Properties of Signals Prepared by Dr. Yasmine M. Tabra
Dr. Mohammed H. Ali
Task1:
Consider the two signals:
𝑋1 (𝑛) = 𝑒 0.2𝑛 − 10 ≤ 𝑛 ≤ 10
𝜋𝑛
𝑋2 (𝑛) = sin ( ) − 10 ≤ 𝑛 ≤ 10
4
Plot 𝑥1 (n) and 𝑥2 (n)
Compute and plot 𝑥1 (n) + 𝑥2 (n)
Compute and plot 𝑥1 (n) * 𝑥2 (n)
Use subplot to display all four plots in one figure.
Task2:
Given the signal 𝑋3 (𝑛) = 0.7𝑛 0 ≤ 𝑛 ≤ 10
Plot 𝑥3 (n)
Compute and plot the time-reversed signal 𝑥3 (-n)
Compute and plot 𝑥3 (n) + 𝑥3 (-n)
Use subplot to display all four plots in one figure.