Unit 2.1: Signals and Classification of Signals#

This section is based on Section 1.2 of [Hsu, 2020].

Follow along at cpjobling.github.io/eg-150-textbook/signals_and_systems/signals

QR Code

A signal is a function representing a physical quatity or variable, and typically it contains information about the behaviour or nature of the phenomenon.

For instance, in an RC circuit the signal may represent the voltage across the capacitor or the current flowing in the resistor.

  • Mathematically, a signal is represented as a function of an independent variable, \(t\).

  • Usually \(t\) represents time.

  • Thus a signal is denoted by \(x(t)\).

Subjects to be covered#

Continuous-Time Signals#

A signal \(x(t)\) is a continuous-time (CT) signal if \(t\) is a continuous variable. For an example of a continuous-time signal, please see Fig. 11.

Graphical representation of a continuous-time signal.

Fig. 11 Graphical representation of a continuous-time signal#

Discrete-Time Signals#

If \(t\) is a discrete variable—that is, \(x(t)\) is defined at discrete times—then \(x(t)\) is a discrete-time (DT) signal. For an example of a discrete-time signal, please see Fig. 12.

Graphical representation of a discrete-time signal.

Fig. 12 Graphical representation of a discrete-time signal#

Since a discrete-time signal is defined at discrete times, a discrete-time signal is often defined as a sequence of numbers, donated by \(x[n]\), where \(n\) is an integer (mathematically: \(n \in \mathbb{Z}\)).

Because discrete-time signals are defined as sequences, it is easy to define and plot a sequence in MATLAB. For example, to redraw Graphical representation of a discrete-time signal, execute the following code.

n = -5:6;
xn = [0,0,1,2,2,1,0,1,0,2,0,0];
stem(n,xn),title('Graphical representation of a discrete-time signal'),xlabel('n'),ylabel('x[n]')
../../_images/c8d1270beac1ba95e92e4e4a80064f1bd0522c7d06281f07b6fa6ec227c252c6.png

More on discrete-time signals#

A discrete-time signal \(x[n]\) may represent a phenomenon for which the independent variable is inherently discrete: e.g. daily stock market average prices.

E.g. FTSE 100 (Fig. 13)

An example of discrete data from the FTSE 100.

Fig. 13 An example of discrete data—the FTSE 100. Year from Dec. 2021 to November 2022. (c) London Stock Exchange.#

Sampled data#

In electronic engineering, we mostly use discrete-time signals to represent the sampling of continuous-time signals.

For example, a discrete-time signal \(x[n]\) may be obtained by sampling a continuous-time signal \(x(t)\) such as

\[x(t_0), x(t_1), x(t_2),\ldots,x(t_n),\ldots\]

or in a shorter form as

\[x[0], x[1], x[2],\ldots,x[n],\ldots\]
\[x_0,x_1, x_2,\ldots,x_n,\ldots\]

where

\[x_n = x[n] = x(t_n)\]

The \(x_n\)’s are called samples and the time interval between them is called the sampling interval.

ADCs and sampling

In the EG-151 Microcontroller’s course the analogue to digital converter (ADC) that you used in one of the experiments sampled the votage on the wiper of the potentiometer to a binary number in the range 0-1023.

Uniform sampling#

When the sampling intervals are equal (uniform sampling), then

\[x_n = x[n] = x(nT_s)\]

where the constant \(T_s\) is the sampling interval.

There is much more about discrete-time signals in Chapter 1 of [Hsu, 2020] but we will leave it here for now.

We will return to the study of discrete-time signals and discrete-time systems in EG-247 Digital Signal Processing next year.

Analogue 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 \(-\infty\) and \(b\) may be \(+\infty\), then the continuous-time signal \(x(t)\) is called an analogue 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.

In modern electronics, most physical phenomena which we wish to deal are represented by analogue signals. But more often than not these days, we will process such data by sampling the signals and converting them into digital signals.

Digital signals

The output of an ADC is not a continuous signal. Instead there will be \(2^N-1\) integer values (where \(N\) is the number of bits used for the ADC). If the range maximum voltage supplied to an ADC is 5V, what is the quantization level, in volts, of each step?

Real and Complex Signals#

A signal \(x(t)\) is a real signal if its value if a real number, and a signal \(x(t)\) is a complex signal if its value is a complex number.

A general complex signal is a signal \(x(t)\) is a function of the form

\[x(t) = x_1(t) + jx_2(t)\]

where \(x_1(t)\) and \(x_2(t)\) are real signals and \(j=\sqrt{-1}\).

Note that \(t\) could represent either a comtinuous or a discrete variable.

We won’t see any examples of complex signals in this course.

Deterministic and Random Signals#

Deterministic and Random Signals#

Deterministic signals are those signals whose values are completely specified for any given time. Thus a deterministic signal can be modelled by a known function of time \(t\).

For example consider \(x(t) = 5 \sin(10 t + \pi/4)\)

t = linspace(0,2*pi*20,100);
xt = 5*sin(10*t + pi/4);
plot(t,xt),grid,xlabel('t'),ylabel('x(t)')
../../_images/f7bf2d00f30e86d512cd571e2220509d52b3c46998c0f01027b671ca68a0d002.png

Random signals#

Random signals are those signals that take random values at any given time and must be characterised statistically.

Random signals are often used to simulate noise on a signal.

%% Plot a Random Signal
plot(0.5 + 0.25 * rand(100,1)),ylim([0,1]),grid,title('Random Signal'),...
xlabel('Time t (s)'),ylabel('Amplitude')
../../_images/2f717bb6354e0cc6d08f9ba250497dd9af59e4c88f9f3afdee10d7940c0e2dfe.png

We will not discuss random signals in this module or the next, but if you are interested, they are covered in detail in Chapters 8 and 9 of [Hsu, 2020].

Even and Odd Signals#

An even signal#

A signal \(x(t)\) is referred to as an even signal if

\[x(t) = x(-t)\]

See Fig. 14 for an example of an even signal.

An example of an even signal

Fig. 14 An example of an even signal#

An odd signal#

A signal \(x(t)\) is referred to as an odd signal if

\[x(-t) = -x(t)\]

See Fig. 15 for an example of an odd signal.

An example of an even signal

Fig. 15 An example of an even signal#

A signal \(x(t)\) is referred to as an even signal if

\[x(t) = x(-t)\]

Decomposing signals into even and odd parts#

Any signal \(x(t)\) can be expressed as the sum of two signals, one of which is even and one of which is odd. That is:

\[x(t) = x_e(t) + x_o(t)\]

Where

\[x_e(t) = \frac{1}{2}\left\{x(t) + x(-t)\right\}\]
\[x_o(t) = \frac{1}{2}\left\{x(t) - x(-t)\right\}\]

Note the product of two even signals or two odd signals is an even signal and that the product of an even signal and an odd signal is an odd signal.

Exercises 1#

Exercise 1.1: Signals#

MATLAB Example

We will solve these examples by hand and then give the solution in the MATLAB lab.

A continuous-time signal \(x(t)\) is shown in Fig. 16.

The signal for example 1

Fig. 16 The signal for Example 1.1#

Sketch and label each of the following signals.

a). \(x(t-2)\);

b). \(x(2t)\);

c). \(x(t/2)\);

d). \(x(-t)\).

For the answer, refer to the lecture recording or see solved problem 1.1 in [Hsu, 2020]

Exercise 1.2: Uniform sampling#

MATLAB Example

We will solve these examples by hand and then give the solution in the MATLAB lab.

1.2). Given the continuous-time signal specified by

\[\begin{split}x\left(t\right)=\left\lbrace \begin{array}{ll} 1-\left|t\right| & -1\le t\le 1\\ 0 & \mathrm{otherwise} \end{array}\right.\end{split}\]

determine the discrete-time sequence obtained by uniform sampling of \(x(t)\) with a sampling interval of

a). 0.25 s

b). 0.5 s, and

c). 1 s.

For the answer, refer to the lecture recording or see solved problem 1.3 in [Hsu, 2020].

Exercise 1.3: Odd and even signals#

MATLAB Example

We will solve these examples by hand and then give the solution in the MATLAB lab.

Sketch and label the even and odd components of the signals shown in Fig. 17.

Signals for Example 3.

Fig. 17 Signals for Example 1.3.#

For the answer, refer to the lecture recording or see solved problem 1.5 in [Hsu, 2020].

Exercise 1.4#

Find the odd and even components of \(x(t) = e^{jt}\).

For the answer, refer to the lecture recording or see solved problem 1.6 in [Hsu, 2020].

Exercise 1.5#

Show that the product of two even signals or of two odd signals is an even signal and that the product of an even signal and an odd signal is an odd signal.

For the answer, refer to the lecture recording or see solved problem 1.7 in [Hsu, 2020].

Exercise 1.6#

Show that

a). If \(x(t)\) is even

\[\int_{-a}^{a} x(t)\, dt = 2 \int_0^a x(t)\, dt.\]

b). If \(x(t)\) is odd

\[x(0) = 0\]
\[\int_{-a}^{a} x(t)\, dt = 0.\]

For the answer, refer to the lecture recording or see solved problem 1.8 in [Hsu, 2020].

Summary#

In this lecture we have started our look at signals and the classification of signals.

In particular we have looked at

Unit 2.1: Take aways#

  • Continuous-time signal: \(x(t)\)

  • Discrete-time signal: \(x[n]\)

  • Sampled data: \(x_n = x[n] = x(t_n)\)

  • Uniform sampling: \(x_n = x[n] = x(nT_s)\) where \(T_s\) is the sampling period.

  • Even signal: \(x(t) = x(-t)\)

  • Odd signal: \(x(-t) = -x(t)\)

  • Decomposing signals into even and odd parts: \(x(t) = x_e(t) + x_o(t)\) where

\[x_e(t) = \frac{1}{2}\left\{x(t) + x(-t)\right\}\;\mathrm{and}\]
\[x_o(t) = \frac{1}{2}\left\{x(t) - x(-t)\right\}.\]

Next Time#

References#

Hsu20(1,2,3,4,5,6,7,8,9)

Hwei P. Hsu. Schaums outlines signals and systems. McGraw-Hill, New York, NY, 2020. ISBN 9780071634724. Available as an eBook. URL: https://www.accessengineeringlibrary.com/content/book/9781260454246.