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
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.
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.
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]')
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.
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
or in a shorter form as
where
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
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
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)')
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')
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
See Fig. 14 for an example of an even signal.
An odd signal#
A signal \(x(t)\) is referred to as an odd signal if
See Fig. 15 for an example of an odd signal.
A signal \(x(t)\) is referred to as an even signal if
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:
Where
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.
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
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.
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
b). If \(x(t)\) is odd
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
Continuous-Time Signals \(x(t)\)
Discrete-Time Signals \(x[n]\)
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