Skip to content

Signals 1: Introduction

In computer engineering, we are interested in two different kinds of signals: Continuous signals and discrete signals. A continuous signal is defined at all times. A discrete signal is defined only at integer times. For example, daily sales of a company is a discrete signal. Atmospheric pressure at a given location is a continuous signal. Signals can also have more than one dimension. A digital photograph is a two dimensional discrete signal, formed of pixels. Total atmospheric pressure P(x,y,z,t) is a four dimensional continuous signal (we can measure the pressure at every latitude, longitude, height, and time). Some signals are inherently discrete, like the daily sales of a company, mentioned above. Some other signals are inherently continuous, but we convert them into discrete format for storing and processing as our computers (and our brains) are not capable to deal with the infinite amount of information associated with a continuous signal. In this and the next chapters, we will consider some important Continuous Signals.

0. What is a signal?

A signal is a function of time or space. It can be positive or negative, continuous or discontinuous, slow or fast changing.

1. Continuous Exponential Signals

Dividing $Ae^{\lambda t}$ where $A$ , $\lambda$ $\in$ $\mathbb{R}$. If $\lambda < 0$ the signal will decay as $t \rightarrow \infty$ and it will decay faster as $|\lambda|$ becomes larger. Conversely, If $\lambda > 0$ , the signal will grow as $t \rightarrow \infty$, and it will grow faster as $|\lambda|$ becomes larger. At $\lambda = 0$ , the signal will become constant (ie, $A$) , A useful concept in understanding exponential signals is the concept of half life. A decaying exponential function’s value will be divided by half at every $\frac{1}{|\lambda|} \ln(\frac{1}{2}$) units of time.

Taylor series corresponding to $e^x$ is

\begin{eqnarray}
e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x^4}{4!}+\frac{x^5}{5!}+\ldots
\end{eqnarray}

2. Continuous Trigonometric Signals

Continuous trigonometric signals has three properties: frequency, amplitude and phase.

$x(t) = A \sin(\omega t + \varphi) = A \sin(2 \pi ft + \varphi)$
$y(t) = A \cos(\omega t + \varphi) = A \cos(2 \pi ft + \varphi)$

Here $A$ is the amplitude, $\omega$ is the angular frequency,  $f$ is the frequency, and $\varphi$ is the phase.

 

sin( t + )

Frequency:

Phase:

Amplitude:

 

The frequency $f$ denotes how many times the signal $x(t)$  oscillates per second. There is a related quantity, called period (T), which indicates how long it takes for  $x(t)$ to complete one oscillation. Naturally

T = $\frac{1}{f}$

The unit of $f$ is 1/second, which is known as “Hertz”.

Taylor series corresponding to $\sin(\theta)$

\begin{eqnarray}
\sin(\theta)=\theta-\frac{\theta^3}{3!}+\frac{\theta^5}{5!}-\frac{\theta^7}{7!}+\ldots\\
\cos(\theta)=1-\frac{\theta^2}{2!}+\frac{\theta^4}{4!}-\frac{\theta^6}{6!}+\ldots
\end{eqnarray}

— Explain orthogonality relations here..

3. Indicator Function

Indicator function $\chi_{[a,b]}(t)$ is defined by

\[
\chi_{[a,b]}(t) =
\begin{cases}
1, & a \leq t < b \\ 0, & \mathrm{elsewhere}
\end{cases}
\]

Plot of (a)$X_{(-2,3)}(t)$ (above), (b)$X_{(2,4)}(t)$ (middle), (c)$U(t)$ (below).

4. Unit Step Function

Unit step function $U(t)$ is defined by

\[
U(t) =
\begin{cases}
0, & t < 0 \\ 1, & 0 < t
\end{cases}
\]

Note that unit step function is a special case of the indicator function

$U(x) = \chi_{(0,\infty)}(t)$

Conversely, indicator function can be written in terms of unit step functions:

$\chi_{(a,b)}(t) = U(a) – U(b)$

5. Transformations of Continuous Signals

We will first consider two different kinds of continuous signal transformations separately: shifting (delaying or advancing a signal) and scaling. Then we will consider the cases when these two transformations are applied together to the same signal.

– Shifting of continuous signal

Let us have a signal $f(t)$ . It is easy to see that if $t_0 > 0$ is any constant number, $f(t – t_0)$ is the $t_0$ seconds delayed version of $f(t)$. Or, expressed in words, whatever value $f(t)$ takes, that value will also be taken by $f(t – t_0)$ in exactly $t_0$ seconds later. This delay will appear as a “shift to the right” in plots.

Similarly $f(t + t_0)$ will appear as $t_0$ seconds earlier than $f(t)$ This earliness will appear as a “shift to the left” in plots.

Example 1: Consider the signal $y = 3t + 2$, $y = 3(t-1) + 2$ shifts that signal 1 units to left, while $y = 3(t + 1.5) + 2$ shifts it 1.5 units to right.

Example 2: Consider the signal $f(t)$, shown in Fig ?. Fig ? depicts $f(t-4)$, which is $f(t)$ shifted to the left by 4. Fig ? depicts $f(t + 6)$, which is $f(t)$ shifted to the right by 6.

Example 3: When we shift the indicator functions, the rule is

$\chi_{(a,b)}{(t-k)} = \chi_{(a+k,b+k)}(t)$

Example 4Unit step functions can also be shifted to right and left. Fig ? shows $U(t)$, $U(t-2)$ and $U(t+3)$ Plot of (a)$f(t)$ (above) (b)$f(t-4)$ (middle), (c)$f(t+6)$ (below Coming Soon)

– Scaling of continous signal

Given a signal $f(x)$, $f(ax)$ is its scaled version. For $|a| > 1$ , the signal will “expand”. For $|a| < 1$ , the signal will “contract”. For $a$ negative, the signal will also “reflect around the origin”. For examples, see Fig. scale

Plot (a) $f(2t)$  (above), (b) $f(\frac{t}{2})$, (c) $f(-t)$, (d) $f(-\frac{t}{3})$ (below Coming Soon). $f(t)  is taken as in Fig. ? shift

Note that scaling the unit step $U(t)$  will not generate a change. Scaling of indicator functions act as

$\chi_{(p,g)}(at) = \chi_{(\frac{p}{a},\frac{q}{a})}(t)$

A good visual aid to keep the operarion of scaling in mind is accordeon. If the function $f(t)$ is imagined as an accordeon, $f(at)$ will expand if for $0 < a < 1$ and contract if for $a > 1$.

– Scaling and shifting applied together

In a transformation of the form $f(at – b)$ we have reflection, scaling and shifting appear together. This can be done in two ways:

  1. Shift the signal $b$ units first, then scale it with $a$.
  2. Scale the signals $a$ units, then shift it $\frac{b}{a}$

For examples, see Figure shift_and_scale.

Plot (a)$f(2t-4)$ (above), (b) $f(\frac{t}{2} + 2)$, (c)$f(- t – 4)$, (d)$f(-\frac{t}{3} + 1)$ (below). $f(t)$ is taken as in Fig. shift_a above. .. label{fig:shift_and_scale}

6. Addition of continuous signals

As this topic must be well known by the student, we will only provide an example without any explanations: See Fig.

Plot (a) $f(t)$ above, (b)$g(t)$, (c)$2f(t) – g(t)$, (d)$3\chi_{[1,5]}(t) + 2\chi_{[4,7]}(t) – \chi_{[5,6]}(t)$ (below Coming Soon.)

7. Multiplication of a signal with a scalar

 

8. Linear combination of two signals.

 

9. Multiplication of continuous signals

Again, we will be content with providing examples.

Example 1: $f(t) = sin(t)U(t)$ is plotted in fig multiplication_of_functions_a

Example 2: The function $f(t) = tU(t)$ is plotted in fig multiplication_of_functions_b. This function is known as the “unit ramp”.

Plot(a) $sin(t)U(t)$ above, (b) $tU(t)$ (below).

9.5 Periodicidy and periodic signals

One way to generate a periodic signal is to shift and add a fast-decaying non-periodic signal infinite times.

\begin{eqnarray}
\sum_{k=-\infty}^{\infty} f(t+kT)
\end{eqnarray}

10. Some complicated examples involving addition, subtraction, shifting and scaling of continuous signals

In this subsection we provide some complicated examples. The student must make sure to be able to go both ways: by looking at the plots, he must be able to write the associated equation, and by looking at the equations, he must be able to plot them.

a. $2(x-2)\chi_{(2,4)}(t) + 4\chi_{(4,5)}(t) + 2(12-2t)\chi_{(5,6)}(t)$ (above),
b. $2(t-1)^4\chi_{(1,2)}(t) + 2(3-t)\chi_{(2,4)}(t)$
c. $(4-t)\chi_{(1,2)}(t) + (2t – 1)\chi_{(2,3)}(t) + 2\chi_{(4,5)}(t)$
d. $(2+3sin(t))\chi_{(\frac{\pi}{2},\frac{3\pi}{2})}(t)$ (below). …

label{fig:complicated_examples_2} (a) Rectangular vawe, (b) Sawtooth (c) Stairway to heaven (d) Stairway from hell to heaven (below). .. label{fig:complicated_examples_1}

Example 1:  $2(x-2)\chi_{(2,4)}(t) + 4\chi_{(4,5)}(t) + 2(12-2t)\chi_{(5,6)}(t)$ is plotted at complicated_examples_2a

Example 2: $2(t-1)^4\chi_{(1,2)}(t) + 2(3-t)\chi_{(2,4)}(t)$ is plotted at complicated_examples_2b

Example 3: $(4-t)\chi_{(1,2)}(t) + (2t – 1)\chi_{(2,3)}(t) + 2\chi_{(4,5)}(t)$ complicated_examples_2c

Example 4: $(2 + 3sin(t))\chi_{(\frac{\pi}{2},\frac{3\pi}{2})}(t)$  complicated_examples_2d

Example 5: The function

$f(t) = \sum_{i=-\infty}^{\infty}\chi_{[-1,1]}(t-4i)$

is plotted in Fig complicated_examples_1a. Such functions are known as “square wave train”.

Exercise: Express the square wave train function given above by using unit step $U(t)$

Example 6: The function

$f(t) = \sum_{i=-\infty}^{\infty}(t-4i)\chi_{[-1,1]}(t-4i)$

is plotted in complicated_examples_1b. It is known as “sawtooth” for obvious reasons.

Example 7: The function

$f(t) = \sum_{i=0}^{\infty}U(t-i)$

is plotted in complicated_examples_1c. This function is known as “the infinite staircase”. We may also call it as the “stairway to heaven”.

Example 8The Function

$f(t) = \sum_{i=0}^{\infty}U(t-i) + (-1)\sum_{i=1}{\infty}U(-t -i)$

forms an infinite staircase which extends both ways. It is plotted in Fig. complicated_examples_1d.

With such a staircase, it is possible to go to both heaven and hell.

11. Darboux Approximations

Any smooth function can be approximated by a linear combination of shifted and scaled indicator functions. Left-Darboux approximation is given by

$$\begin{eqnarray}
f(t)=\sum_{k=-\infty}^{\infty}f(k \Delta)\chi_{[0,\Delta]}(t-k \Delta)
\end{eqnarray}$$

import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0,1.5,0.01);
z = np.square(5*x);
delta = 0.1;
y = 0;
for k in np.arange(0,1.5,delta):
    y = y + np.square(5*k)*((x-k>0) & (x-k-0.001 <= delta));
plt.plot(x,z,x,y)

12. Multiplication of the Exponential and Trigonometric Signals

Consider the function $f(t) = e^{at}sin(\omega t)$. Note that

  • At points $t = k\pi , k \in \parallel , f(t) = 0$.
  • At points $t = 2k + \frac{1}{2}\pi , k \in \parallel , f(t) = e^{at}$
  • At points $t = 2k + \frac{3}{2}\pi , k \in \parallel , f(t) = -e^{at}$

This suggests an approximate method to plot $f(t)$:

  • Draw the curve $e^{at}$ and its “shodow” curve $-e^{at}$
  • Draw an apptoximate curve which
    — Crosses the t-axis at points $t = k\pi , k \in \parallel , f(t) = 0$
    — Touches the curve $f(t) = e^{at}$ , at points $t = 2k + \frac{1}{2}\pi , k \in \parallel$
    — Touches the curve $f(t) = -e^{at}$ , at points $t = 2k + \frac{3}{2}\pi , k \in \parallel$

The function $f(t) = Acos(\omega t)$ can also be plotted in exactly the same way. See figure …

Plot (a)$e^{-0.3t}$ (above), (b)$sin(4t)$ , (c)$e^{-0.3t}sin(4t)$ (below).

13. Multiplication of any Continuous signal with a Trigonometric Signals

In most cases, the aprproximate method we have used when we multiplied a sinusoid with an exponential signal can be extended to the much broader case of multiplying a sinusoid with an arbitrary signal. The only restriction is that the period of oscillation must be shorter than “the change distance” of the function. In other words, the signal must be “almost constant” during a single oscillation of the sine signal.

For example, consider the signal

$f(t) = (t+2)\chi_{(-2,1)} – (1-t)\chi_{(1,3)}(t) + t\chi_{(3,4)}(t)$

if we multiply this with $sin(2\pi t)$, we get

Amplitude modulation.

14. Odd-Even Decomposition

15. Riemann-Lebesgue Lemma

If a signal $f(x)$, is bounded on an interval $[a,b]$ footnote {If we want to be mathematically rigorous, we must say that $f(x)$ must be “absolutely integrable”, ie, it must satisfy

$\int_{-\infty}^{\infty}|f(x)|dx < \infty$

but “$f(x)$ bounded” is also acceptable. Then,

$\lim_{\omega \to \infty}\int_{-\infty}^{\infty}f(x)sin(\omega x)dx = 0$

Remark: It is intuitively simple to see why this theorem holds true. As the period of $sin(\omega x)$ get smaller and smaller, $f(x)$ will become approximately constant over a single oscillation. Hence the neighbouring positive and negative cycles of $sin(\omega x)$ will have the same amplitude and cancel each other.

Proof: See Proofwiki.

16. Sinc Function

One of the most frequently encountered functions in signal processing is sinc(.), defined as

$sinc(x) = \frac{sin(x)}{x}$

If we are not close to origin, sinc(.) function will behave just as expected: $\frac{1}{x}$ amplitude modulated by sin(x). For example, a plot of this function is shown in fig ? for $x = 3.14$ to $x = 30$. But, around origin, $sin(x) \rightarrow 0$ and $\frac{1}{x} \rightarrow \infty$, hence this picture becomes inadequate. There, we have to use l’hospital’s rule to find the value of the sinc function around $x = 0$:

$\lim_{x \to 0}sinc(x) = \lim_{x \to 0}\frac{sin(x)}{x} = \lim_{x \to 0}\frac{cos(x)}{1} = 1$

The zeros of the sinc function are at $k\pi , k \in I$ . Note that as both $x$ and $sin(x)$ are antisymmetric, $sinc(x)$ is symmetric. Hence, when plotted, this function looks like (fig xyz).

Scaling works in the usual way. If we denote the scaling factor with $a$ the scaled sinc function is

$sinc(ax) = \frac{sin(ax)}{ax}$

which is $\frac{1}{ax}$, amplitude modulated by $sin(ax)$. As $sin(ax)$ oscillates with frequency $\frac{a}{2\pi}$, thescaled sinc function has zeros at $\frac{k\pi}{a}$ ie, it oscillates faster as $a$ increases, while amplitude of the oscillations decrease.

Plot of sinc(ax) for a=2.5 (above) and a=6 (below). Note that as a increases, central lobe narrows, but its height does not change. Sidelobes, on the other hand, decrease in height and oscillate faster. The envelope curves $\frac{1}{ax}$ are indicated by green dots. sinc(ax) itself is plotted in blue color. .. label{fig:sinc}

Lastly, consider the function

$asinc(ax) = \frac{sin(ax)}{x}$

which is $\frac{1}{x}$, amplitude modulated by $sin(ax)$. As $sin(ax)$ oscillates with frequency $\frac{a}{2\pi}$ this function has zeros at at $\frac{k\pi}{a}$, ie, it oscillates faster as $a$ increases, but the amplitude of the oscillations remain constant. Instead,$asinc(0) = a$ blows to infinity as $a$ increases. As we will see in the next chapter, $lim_{a \to \infty}asinc(ax)$ converges to the all-important dirac-delta function.

sinc function do not have a closed-form indefinite integral. Its definite integral is

$\int_{0}^{\infty} sinc(x)dx = \int_{0}^{\infty} \frac{sin(x)}{x}dx = \frac{\pi}{2}$

This integral is known as the Dirichlet integral. It is not possible to take it via elementary methods. A special technique from complex analysis, known as residue integration, is required. Hence, for the purposes of this course, we will just accept this result without proof.

Note that as the $sinc(x)$ function is even, we can write

$\int_{-\infty}^{\infty} sinc(x)dx = \pi$

For scaled sinc function, $sinc(ax)$, the integral is

$\int_{0}^{\infty}sinc(ax)dx = \int_{0}^{\infty}\frac{sin(ax)}{ax}dx = \frac{1}{a}\int_{0}^{\infty}\frac{sin(ax)}{ax}(adx) = \frac{pi}{2a}$

Hence, the area under $sinc(ax)$ decreases as $a$ increases.

Lastly, it is easy to show that the area under the curve $asinc(ax)$ does not depend on a.

$\int_{0}^{\infty}asinc(ax)dx = a\frac{\pi}{2a} = \frac{\pi}{2}$

The indicates

$\int_{-\infty}^{\infty}\frac{a}{\pi}sinc(ax)dx = 1$