Chapter - 1

Key Words: continuousdiscretesampling

Continuous and Discrete Signals

🎯 Learning Objectives:

In this topic we will define a signal scientifically, explore different type of signals with examples and we will discuss the properties of the signals.


If we are working on a computer, or using a computer to manipulate our data, we are almost certainly working with digital signals. All manipulations of the data are examples of digital signal processing (for our purpose processing of discrete-time signals as instances of digital signal processing).

Examples of the use of digital signal are:

  1. Filtering: Eliminating noise from signals, such as speech signals and other audio data, astronomical data, seismic data, images.
  2. Synthesis and manipulation: For example, speech synthesis, music synthesis and graphics.
  3. Analysis: Such as seismic data, atmospheric data and stock market analysis.
  4. Voice communication: For example, processing, encoding and decoding for store and forward, and voice, audio and image coding for compression.
  5. Active noise cancellation: In the headphones, mufflers in the cars, in image processing such as computer vision and computer graphics.
  6. Industrial applications: Including vibration analysis, chemical analysis etc.

But what is a signal?


Defining Signals

A signal is a way of conveying information such as, gestures, semaphores, images, sound, all can be signals, However, technically speaking:
Signal is a function of time, space, or another observation variable that conveys information

We can distinguish three forms of signals:

  1. Continuous-Time/Analog Signal
  2. Discrete-Time Signal
  3. Digital Signal

Let us discuss these three types in more detail.

Continuous-time (CT): Analog Signal

A finite, real-valued, smooth function s(t)s(t) of a variable tt, which usually represents time. Both ss and tt in are continuous state. Figure below show a continuous sine wave of single frequency in time domain with an amplitude of 0.50.5.

Signal domain illustration
Figure 1. Sine wave of single frequency in time domain

But the question is why real-valued and finite?

Because, usually the real-world phenomena are real-valued functions. Real-world signals will generally be bounded in energy, simply because there is no infinite source of energy available to us. Alternately, particularly when they characterize long-term phenomena (e.g. radiation from the sun), they will be bounded in power. Real-world signals will also be bounded in amplitude, at no point will their values be infinite.

To claim that a signal is finite, we need some characterization of its size, which means that the size of the signal is bounded (i.e. it never goes to infinity). Below are a few characterizations of the size of a signal. When we say that signals are finite, we imply that the size.

Here are some important signal Characteristics:

  1. The β€œenergy” of a signal characterizes its β€œsize”
E=βˆ«βˆ’βˆžβˆžs2(t)dtE= \int_{- \infty }^{ \infty}{s^2(t) dt}
  1. The "power" of a signal = energy/unit time
P=limTβ†’βˆž12Tβˆ«βˆ’βˆžβˆžbs2(t)dtP=lim_{T \rightarrow \infty } \frac{1}{2T} \int_{- \infty }^{ \infty b}{s^2(t) dt}
  1. Instantaneous power
Pi=limΞ”tβ†’01Ξ”t∫tt+Ξ”tβ‹…s2(Ο„)dΟ„P_i=lim_{ \Delta t \rightarrow 0 } \frac{1}{\Delta t} \int_{t}^{}{t+\Delta t \cdot s^2( \tau) d \tau }
  1. Amplitude
max∣s(t)∣max|s(t)|

Real world signals never change abruptly or instantaneously. To be more technical, they have finite bandwidth. That is why we assume the signal are smooth.

Here note that although we have made assumptions about signals (finiteness, real, smooth), in the actual analysis and development of signal processing techniques, these considerations are generally ignored.

πŸ§ͺ Interactive Python Example

πŸ“ˆ Continuous-Time (Analog) Sine Wave
Press Run Code: Output will appear here.

Discrete-time (DT) Signal

A discrete-time (DT) signal is a bounded, continuous-valued sequence s[n]s[n]. It may be viewed as a continuous-valued function of a discrete index nn. We often refer to the index n as time, since discrete-time signals are frequently obtained by taking snapshots of a continuous-time signal as shown below. More correctly, though, nn is merely an index that represents sequential of the numbers in s[n]s[n].

Signal domain illustration
Figure 1. Sine wave of single frequency in time domain

If the discrete time signals are snapshots of real-world signals, the realness and finiteness apply the following characteristics.

  • Energy
E=βˆ‘ns2[n]E= \sum_n {s^2[n]}
  • Power
P=limNβ†’βˆž12N+1βˆ‘βˆ’NNs2[n]P=lim_{N \rightarrow \infty }\frac{1}{2N+1} \sum_{-N}^N s^2[n]
  • Amplitude
max∣s[n]∣max|s[n]|

Smoothness is not applicable to the discrete time signals.

πŸ§ͺ Interactive Python Example

Discrete-Time Sine Wave
Press Run Code: Output will appear here.

Digital Signal

In the signal processing in digital domain, we will work with digital signals but develop theory mainly around discrete-time signals. Digital computers deal with digital signals, rather than discrete-time signals.

A digital signal is a sequence s[n]s[n], where index the values s[n]s[n] are not only finite, but can only take a finite set of values. For instance, in a digital signal, where the individual numbers s[n]s[n] are stored using 16 bits integers, s[n]s[n] can take one of only 216 values. In the digital valued series s[n]s[n], the values ss can only take a fixed set of values. Digital signals are discrete-time signals obtained after digitization. Digital signals are usually obtained by taking measurements from real-world phenomena. However, unlike the accepted norm for analog signals, digital signals may take complex values.

As we discussed above, there are some criteria for real-world signals, such as real-valued, finite and smooth signals, however, when we are playing with theoretical signals, they are not constrained to the above mentioned characteristics such as;

  • Realness: This is often violated in the theory and we work with complex numbers as well.
  • Signals that have infinite temporal extent, i.e. which extend from βˆ’βˆž to +∞, can have infinite energy, which means the power is almost never be bounded, nearly for all the signals we will encounter.
  • Smoothness: This is often violated by many of the continuous time signals that we we will consider during signal analysis.

Standard Signals

Let us discuss some basic and frequently used signal types. We list some basic signal types that are frequently encountered in DSP. We also list both their continuous-time and discrete-time versions. Note that the analog continuous-time versions of several of these signals are artificial constructs, means they violate some of the conditions we stated above for real-world signals and cannot actually be realized.

1-The DC Signal:

The β€œDC” or constant signal simply takes a constant value. In continuous time it would be represented as

s(t)=1s(t)=1

In discrete time domain it is represented by

s[n]=1s[n]=1

Here the number 1 may be replaced by any constant such aβŠ‚N. The DC signal typically represents any constant offset from 0 in real-world signals. The analog DC signal has bounded amplitude and power and is smooth as shown in the Figure below

Signal domain illustration
Figure 1. Sine wave of single frequency in time domain

In the discrete form the DC signal looks like as shown in the Figure below

Signal domain illustration
Figure 1. Sine wave of single frequency in time domain

πŸ§ͺ Interactive Python Example

DC Signal (Constant Sequence)
Press Run Code: Output will appear here.

2-The Unit Step:

The unit step, also often referred to as a Heaviside function, is literally a step. It has 00 value until time 00, at which point, it abruptly switches to 1.01.0. The unit step represents events that change state, e.g. the switching on of a system, or of another signal. It is usually represented as u(t)u(t) in continuous time and u[n]u[n] in discrete time.

Continuous time representation of Step Signal (Function)

u(t)={0,t<01,tβ‰₯0}u(t)={0, t<0 \brace 1, tβ‰₯0}

Discrete time representation of Step Signal (Function)

u[n]={0,n<01,nβ‰₯0}u[n]={0, n<0 \brace 1, nβ‰₯0}

The continuous-time step function u(t)u(t) violates the criterion we have stated above of smoothness, since it changes instantaneously from 00 to 11 at t=0t=0. Practical realizations are only be approximations, which change value extremely quickly, but never instantaneously.

πŸ§ͺ Interactive Python Example

Unit Step Signal
Press Run Code: Output will appear here.

3- The Unit Pulse (Rectangular):

The Unit Pulse is a signal that takes the value of 1.01.0 for a brief period of time, and is zero everywhere else. It is often referred to by other names as well, such as the rectangular function, the gate function, the Pi function and the boxcar function.

The mathematical representation of "continuous time" Unit Pulse signal (Function) is

rec(tT)={1,∣tβˆ£β‰€T20,elsewhere}rec(\frac{t}{T})= {1, |t| \leq \frac{T}{2} \brace 0, elsewhere}

and the mathematical representation of "discrete time" Unit Pulse signal (Function) is

rec[nN]={1,∣nβˆ£β‰€N20,elsewhere}rec[\frac{n}{N}]= {1, |n| \leq\frac{N}{2} \brace 0, elsewhere}

The unit pulse violates the condition of smoothness, however it does have finite energy and amplitude. Practical realizations of a pulse will have fast, but not instantaneous rising and falling edges.

πŸ§ͺ Interactive Python Example

Unit Pulse Signal
Press Run Code: Output will appear here.

4-The Pulse Train:

The pulse train. also called a square wave is an infinitely long train of pulses spaced equally apart in time. The pulse train is defined by
Continuous time representation of Pulse Train

p(t)=[1,t<T10,T1<t<T2p(t+T2),general]p(t) = \begin{bmatrix}1, t<T_1\\0, T_1<t<T_2\\p(t+T_2), general\end{bmatrix}

Discrete time representation of Pulse Train is as follows

p[n]=[1,n<N10,Β N1<n<N2p[n+N2],general]p[n] = \begin{bmatrix}1, n<N_1\\0,Β N_1<n<N_2\\p[n+N_2], general\end{bmatrix}

Here, T1T_1 (or N1N_1 for discrete time signals) represents the width of the pulses and T2T_2 (or N2N_2 for discrete time signals) is the spacing between pulses. T1T2\frac{T_1}{T_2} (or N1N2\frac{N_1}{N_2} for discrete time signals) is often called the duty cycle of the square wave. Clock signals that drive computers are ideally square waves, as are various carrier signals employed to carry information via various forms of modulation.

The ideal pulse train violates smoothness constraints, but does have bounded amplitude and power. Practical realizations of pulse trains will have pulses with fast-rising and fast-falling edges, but the transition from 00 to 11 (and 11 to 00) will not be instantaneous.

πŸ§ͺ Interactive Python Example

Pulse Train Signal
Press Run Code: Output will appear here.

5-The Sinusoidal Function:

The sinusoidal function are covered in more details in separate topic "Sine Functions". However, here is brief description.
The sinusoidal are one of the most important signals in signal processing. We will encounter it repeatedly. The continuous-time version of it is a perfectly periodic signal.

The sinusoidal is smooth, and has finite power and violates none of our criteria for real-world signals.

Continuous time representation of sine function:

missingmissing

Discrete time representation of sine function:

missingmissing

πŸ§ͺ Interactive Python Example

Discrete-Time Sinusoidal Signal
Press Run Code: Output will appear here.

πŸ“ Key Takeaways

  • Plane wave theory provides a basis for understanding wave propagation, energy transport, and acoustic measurements in air, water, and solids.

🧠 Quick Quiz

What happens to an analog signal during quantization?

Which signal type represents real-world phenomena?

Increasing the number of quantization levels will generally...

Sampling is the process of...

Which of the following is an example of DSP?

Which of the following best describes a digital signal?

What is the value of a unit step signal for n < 0?

Which signal is periodic in discrete time?

The energy of a discrete-time signal is defined as:

Pulse train signals are mainly characterized by: