Basic Operations On Signals PDF
Basic Operations On Signals PDF
3.THEORY:
TIME SHIFTING: Time shifting is, the shifting of a signal in time. This
is done by adding or subtracting a quantity of the shift to the time
variable in the function.
TIME REVERSAL: The time reversal of a signal is folding of the signal
about the time origin (or t = 0). The time reversal or folding of a
signal is also called as the reflection of the signal about the time
origin (or t = 0). Time reversal of a signal is a useful operation on
signals in convolution.
AMPLITUDE SCALING: The amplitude of the signal is either
amplified or attenuated, is known as amplitude scaling.
TIME SCALING: The process of multiplying a constant to the time
axis of a signal is known as time scaling of the signal. The time
scaling of signal may be time compression or time expansion
depending upon the value of the constant or scaling factor.
5.SOURCE CODE:
import numpy as np
# Define a signal
t = np.linspace(-5, 5, 100)
x = np.sin(t)
plt.figure(figsize=(12, 8))
plt.subplot(2, 3, 1)
plt.plot(t, x)
plt.title('Original Signal')
# Time shifting
t_shift = t - 2
x_shift = np.sin(t_shift)
plt.figure(figsize=(12, 8))
plt.subplot(2, 3, 2)
plt.plot(t_shift, x_shift)
# Time reversal
t_reverse = -t
x_reverse = np.sin(t_reverse)
# Plot the original and transformed signals
plt.figure(figsize=(12, 8))
plt.subplot(2, 3, 3)
plt.plot(t_reverse, x_reverse)
# Amplitude scaling
x_scale = 2 * np.sin(t)
plt.figure(figsize=(12, 8))
plt.subplot(2, 3, 4)
plt.plot(t, x_scale)
# Time scaling
t_scale = 2 * t
x_time_scale = np.sin(t_scale)
plt.figure(figsize=(12, 8))
plt.subplot(2, 3, 5)
plt.plot(t_scale, x_time_scale)
plt.show()
6.ANALYSIS:
Hence analysed the multiple operations of signals like time
scaling, time reversal, amplitude scaling, time scaling.
7.OUTPUT:
8.RESULT:
Observed the different types of operations of signals.
ADDITIONAL OPERATIONS:
1.Signal addition:
import numpy as np
signal1 = np.sin(t)
signal2 = np.cos(2*t)
plt.legend()
plt.show()
2.Signal multiplication:
import numpy as np
signal1 = np.sin(t)
signal2 = np.cos(2*t)
plt.legend()
plt.show()