0% found this document useful (0 votes)
32 views16 pages

Chapter 1 Signal and Systems

Uploaded by

222503016
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views16 pages

Chapter 1 Signal and Systems

Uploaded by

222503016
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Signal and Systems

Chapter 1
Chapter 1: Introduction to Signals and Systems

• Signal: A function representing physical quantities or information.


• Examples: Electrical signals, sound signals, etc.

• System: A process that transforms an input signal into an output signal.

• Types of Signals:
• Continuous-time vs Discrete-time (An example of a continuous-time signal is a sinusoidal waveform, a real-world example of a continuous-time
signal is human voice or sound waves in the air.) (discrete-time: Digital Audio, Image Data. Financial Data: Stock prices are often recorded at discrete time intervals (e.g., daily closing prices))
• Periodic vs Aperiodic (Periodic signal example: AC voltage (repeats every cycle) or TV broadcast signals)-(Human speech or a single clap (irregular, no
repetitive pattern).)
• Even vs Odd (An even signal is symmetric with respect to the vertical axis, meaning it looks the same when time is reversed.). (An odd signal is anti-symmetric)

• Basic Signal Operations:


• Time Shifting, Time Scaling, Time Reversing
Analog and Digital Signals:

• If a continuous-time signal x(t) can take on any value in the continuous


interval (a, b), where a may be -∞ and b may be + ∞, then the
continuous-time signal x(t) is called an analog signal. If a discrete-time
signal x[n] can take on only a finite number of distinct values, then we call
this signal a digital signal (Ethernet (Network Data Transmission)).
Real and Complex Signals:
• A signal x(t) is a real signal if its value is a real number, and a signal
x(t) is a complex signal if its value is a complex number. A general
complex signal x(t) is a function of the form
Deterministic and Random
Signals:
• Deterministic signals are those signals whose values are completely
specified for any given time. Thus, a deterministic signal can be
modeled by a known function of time t. Random signals are those
signals that take random values at any given time and must be
characterized statistically.
Periodic and Nonperiodic
Signals:

Other examples of periodic signals:


Nonperiodic (Aperiodic) Signals:
• A nonperiodic signal, on the other hand, does not repeat itself at
regular intervals. These signals can extend indefinitely without
following a repetitive pattern.

Examples of nonperiodic signals:


• Impulse signal (Dirac delta function): A signal that occurs at a single instant.
• Speech signals: Often aperiodic due to the non-repetitive nature of human
speech patterns.
• Noise signals: Random and do not follow a regular repetition.
Mathematical Formulas:
• Signal 𝑥(𝑡) for continuous-time

• Signal 𝑥[𝑛] for discrete-time

• Time shift: 𝑦(𝑡)=𝑥(𝑡−𝑡0)

• Time reversal: 𝑦(𝑡)=𝑥(−𝑡)


import numpy as np
import matplotlib.pyplot as plt

t = np.linspace(-10, 10, 400)


x_t = np.sin(t)

plt.plot(t, x_t)
plt.title("Continuous-time Signal")
plt.xlabel("t")
plt.ylabel("x(t)")
plt.grid(True)
plt.show()
time-reversed signal is defined as y(t)=x(−t)
# Define the time range
t1 = np.linspace(-10, 10, 400)

# Original signal: sine wave


x_t1 = np.sin(t1)

# Time-reversed signal
x_t_reversed = np.sin(-t1)

# Create the plot


plt.figure(figsize=(10, 6))
plt.plot(t1, x_t1, label='Original Signal: $x(t) = \sin(t)$', color='blue')
plt.plot(t1, x_t_reversed, label='Time-Reversed Signal: $y(t) = \sin(-t)$', color='red', linestyle='--')
plt.title("Time Reversal of a Continuous-time Signal")
plt.xlabel("t")
plt.ylabel("Amplitude")
plt.axhline(0, color='black', linewidth=0.5, linestyle='--')
plt.axvline(0, color='black', linewidth=0.5, linestyle='--')
plt.grid(True)
plt.legend()
plt.show()
Time Shifting a Sine Wave:
import numpy as np
import matplotlib.pyplot as plt

# Define the time range


t1 = np.linspace(-10, 10, 400)

# Original signal: sine wave


x_t1 = np.sin(t1)

# Right-shifted signal (shift by t0 = 2)


t0 = 2
x_t_shifted = np.sin(t1 - t0)

# Create the plot


plt.figure(figsize=(10, 6))
plt.plot(t1, x_t1, label='Original Signal: $x(t) = \sin(t)$', color='blue')
plt.plot(t1, x_t_shifted, label='Right Shifted Signal: $y(t) = \sin(t - 2)$', color='red', linestyle='--')
plt.title("Time Shifting of a Continuous-time Signal")
plt.xlabel("t")
plt.ylabel("Amplitude")
plt.axhline(0, color='black', linewidth=0.5, linestyle='--')
plt.axvline(0, color='black', linewidth=0.5, linestyle='--')
plt.grid(True)
plt.legend()
plt.show()
Time Scaling:
import numpy as np
import matplotlib.pyplot as plt

# Define the time range


t1 = np.linspace(-10, 10, 400)

# Original signal: sine wave


x_t1 = np.sin(t1)

# Compressed signal (factor of 2)


compressed_signal = np.sin(2 * t1)

# Expanded signal (factor of 0.5)


expanded_signal = np.sin(0.5 * t1)
# Create the plot
plt.figure(figsize=(12, 6))
plt.plot(t1, x_t1, label='Original Signal: $x(t) = \sin(t)$', color='blue')
plt.plot(t1, compressed_signal, label='Compressed Signal: $y(t) = \sin(2t)$', color='red', linestyle='--')
plt.plot(t1, expanded_signal, label='Expanded Signal: $z(t) = \sin(0.5t)$', color='green', linestyle=':')

plt.title("Time Scaling of a Continuous-time Signal")


plt.xlabel("t")
plt.ylabel("Amplitude")
plt.axhline(0, color='black', linewidth=0.5, linestyle='--')
plt.axvline(0, color='black', linewidth=0.5, linestyle='--')
plt.grid(True)
plt.legend()
plt.show()
Homework:

• Describe and sketch 3 different types of signals (e.g., continuous-time,


discrete-time, periodic, aperiodic).

• Implement the time-shifting and time-scaling of a sine wave using Python.

You might also like