Post Lecture Reflection for Lecture 1

Contents

Introduction

We have covered quite a lot of fundamental concepts in our first chapter. Nevertheless, developing some fundamental understanding of discrete time signal processing is essential in developing time-series analysis further. This post-reading note will provide a whistle stop tour on the topic.

Discrete-Time Signals

One can approach discrete-time signal processing from two contrasting perspectives:

  1. Discrete-time signals are generated by sampling of a corresponding continuous time signals, i.e., they represent the sampled values of analog quantities, e.g. voltage, acceleration etc.
  2. Discrete-time signals can be synthesized directly by a system. For instance in case of communication systems, we are often interested in synthesizing the discrete-time signals directly. This will become evident through the progression of this course.

Most of the signal processing books adopt one of these views in dealing with the properties of discrete-time signal processing systems. Many of the properties of discrete-time signal processing system can be derived from its continuous-time counter-part. In fact, one can treat the discrete-time signals as analog signals which have impulses at a certain instance. However, as outlined by the second approach, not all discrete-time signals are generated via sampling of continuous-time signals. Consequently, on many occasions discrete-time systems are not simply approximations of the continuous time system. Furthermore, there are some important fundamental differences between discrete-time and continuous-time systems. To this end, in our discussion we will adopt an abstract perspective similar to [1] and [2]. In other words, we will treat discrete-time systems within a framework which is self-contained without worrying about synthesis or sampling.

Definition

Discrete-time signals are represented as complex-valued sequences. Simply, a discrete-time signal can be represented as a sequence of >complex-valued numbers. A sequence is essentially a complex-valued function of an integer index nZn \in \mathbb{Z}. The nthn^{\textrm{th}} term >of the sequence is often denoted as x[n]x[n]. Mathematically,

x={x[n]}<n<\begin{equation} x=\{x[n]\} \quad -\infty<n<\infty \end{equation}

As such xx is a two-sided, infinite-collection of complex-values.

For the synthetic series, often the nthn^{th} term x[n]x[n] is defined analytically in closed form, e.g.

x[n]=((n+5)mod11)5\begin{equation} x[n]=((n+5) \mod 11) − 5 \end{equation}

or

x[n]=ejπ20n\begin{equation} x[n]=e^{j\frac{\pi}{20}n} \end{equation}

where (2) and (3) respectively correspond to a triangular and complex exponential waveforms. Alternatively, when x[n]x[n] is a discrete-time signal constructed by periodic sampling of an analog signal, the numeric value of x[n]x[n] is equal to the value of analog signal,xa(t)x_a(t), at time nTnT; i.e.,

x[n]=xa(nT)<n<\begin{equation} x[n]=x_a(nT)\quad -\infty<n<\infty \end{equation}

The quantity TT is called sampling-period and is reciprocal of sampling-frequency. To that end, often x[n]x[n] is simply referred as "nth sample" of the sequence. Also while strictly speaking x[n]x[n] denotes the nthn^{\textrm{th}} term of the sequence, often for notational simplification, it is also used to refer to entire sequence.

Let us write code to plot the following discrete-time signal:

x[n]=((n+5)mod11)5x[n] = ((n+5) \quad \text{mod}\quad 11) − 5

Example 1

Loading editor...
No output yet. Click "Run Python" to execute.

Now that we have seen some examples of the discrete signals, we should note that:

  1. While discrete-time signals are plotted on a continuous x-axis, their domain only comprises of Z\mathbb{Z}. In other words, x[n]x[n] is only defined for nZn\in\mathbb{Z} and is undefined for other values of nn. It is not correct to think of x[n]x[n] being zero before other values of nn.
  2. The sequence index nn can be thought of as dimensionless measure of time which does not have one-to-one correspondence of physical unit of measure. However, it does induce logical or chronological order on the values of the sequence. In other words, x[n1]x[n-1] must have been obtained/generated before obtaining/generating x[n]x[n].

Basic Signals and Signal Operations

Discrete-time signal processing employs several operations and manipulations of the sequences. Moreover, often sequences can be expressed in terms of other fundamental sequences for which several properties are well-established. To this end, this section is geared towards exploring these aspects in details. To begin with, let us consider two sequences say x[n]x[n] and y[n]y[n], the operations on these sequences can be defined as:

  • Addition: Let z[n]=x[n]+y[n]z[n]=x[n]+y[n] then {z[n]}={x[j]+y[j],....,x[0]+y[0],x[1]+y[1],....,x[n]+y[n]}\{z[n]\} = \{x[-j]+y[-j],...., x[0]+y[0], x[1]+y[1],....,x[n]+y[n]\} with jj being smallest index and nn being the highest index in x[n]x[n] and y[n]y[n].
  • Product: Similar to addition, let us consider the product z[n]=x[n]y[n]z[n]=x[n]*y[n] then {z[n]}={x[j]y[j],....,x[0]y[0],x[1]y[1],....,x[n]y[n]}\{z[n]\} = \{x[-j]*y[-j],...., x[0]*y[0], x[1]*y[1],....,x[n]*y[n]\} with jj being smallest index and nn being the highest index in x[n]x[n] and y[n]y[n].
  • Scaling: Let α\alpha be some constant number (which can be complex), then multiplication of x[n]x[n] with α\alpha yields y[n]={αx[n]}y[n]=\{\alpha * x[n]\} where each sample of the sequence x[n]x[n] is multiplied by α\alpha.
  • Shifting: A sequence y[n]y[n] is said to be delayed or shifted version of x[n]x[n] if y[n]=x[nno]y[n]=x[n-n_o] where non_o is integer. A sequence is said to be delayed (lag) if non_o is positive. Alternatively, if non_o is negative, the signal is said to be time-advanced.
  • Reversal: A sequence y[n]y[n] is said to be reversed if y[n]=x[n]y[n]=x[-n].
  • Expansion and Compression: A sequence y[n]y[n] is said to be compressed in time if y[n]=x[kn]y[n]=x[kn], where kk is a positive number. Similarly, the sequence y[n]=x[n/m]y[n]=x[n/m] is said to be expanded version of x[n]x[n] for a positive mm.

Notice that these operations can be combined together to describe a resulting sequence, e.g. y[n]=x[2(n1)]y[n]=x[2(n-1)] is the sequence which results from delaying and compressing x[n]x[n].

Basic Signals

The following signals provide foundations or building blocks for the theory of discrete-time signal processing:

Unit Sample Sequence or Impulse

The discrete-time unit sample sequence is also known as a unit-impulse sequence or a discrete-time delta function (due to its similarity with the Dirac Delta function). It is potentially one of the most simplest, yet most powerful discrete-time signals. It is often denoted as δ[n]\delta[n] and is mathematically defined as:

δ[n]={0,n0,1,n=0.\begin{equation} \delta[n]= \begin{cases} 0,\quad n\neq0,\\ 1, \quad n=0.\\ \end{cases} \end{equation}

For convenience, through out this course, we will refer to δ[n]\delta[n] as an impulse. As we deep dive into linear systems, we will observe that any arbitrary sequence can be represented as a sum, scaled, and delayed impulses. For e.g.

x[n]=a3δ[n+3]+a1δ[n1]+a2δ[n2]+a7δ[n7]\begin{equation} x[n]= a_{-3}\delta[n+3]+a_{1}\delta[n-1]+a_{2}\delta[n-2]+a_{7}\delta[n-7] \end{equation}

More generally, any sequence can be expressed as

x[n]=k=x[k]δ[nk]\begin{equation} x[n]= \sum_{k=-\infty}^{\infty} x[k]\delta[n-k] \end{equation}

Unit Step Sequence

You have already seen the example of a discrete-time unit step function in the shifting example above. Mathematically, the discrete-time unit step sequence is given by

u[n]={1,n0,0,n<0.\begin{equation} u[n]= \begin{cases} 1,\quad n\geq0,\\ 0, \quad n<0.\\ \end{cases} \end{equation}

The unit-step sequence can also be expressed in the form of the impulse by:

u[n]=k=nδ[k],\begin{equation} u[n]= \sum_{k=-\infty}^{n} \delta[k], \end{equation}

that is, the value of unit step sequence at index nn is accumulated sum of the value at index nn and all previous values of the impulse sequence. The equation can be expanded as:

u[n]=δ[k]+δ[(k+1)]+...+δ[0]+δ[1]+...+δ[n]\begin{equation} u[n]= \delta[-k]+\delta[-(k+1)]+... + \delta[0] + \delta[1] + ... +\delta[n] \end{equation}

The above expansion can also be written as

u[n]=δ[n]+δ[n1]+...+δ[0]+δ[n(k1)]+...+δ[nk]\begin{equation} u[n]= \delta[n]+\delta[n-1]+... + \delta[0] + \delta[n-(k-1)] + ... +\delta[n-k]\\ \end{equation} u[n]=k=0δ[nk],\begin{equation} u[n] = \sum_{k=0}^{\infty} \delta[n-k], \end{equation}

Using the relationship, we can also define δ[n]\delta[n] in terms of u[n]u[n] as

δ[n]=u[n]u[n1].\begin{equation} \delta[n] = u[n]-u[n-1]. \end{equation}

Exponential Sequence

Exponential sequences are extremely important in analyzing the linear-time invariant discrete-time systems. The general form of an exponential sequence is given by:

x[n]={Aαn,n0,0,n<0.\begin{equation} x[n]= \begin{cases} A\alpha^n,\quad n\geq0,\\ 0, \quad n<0.\\ \end{cases} \end{equation}

One can make following observations from the above equation:

  1. When both AA and α\alpha are real, then the sequence is real. Alternatively, when either is complex, the resulting sequence is complex.
  2. If 0<α<10 < \alpha < 1 and A>0A>0 then the sequence values are positive and decrease with increasing nn.
  3. For 1<α<0-1 < \alpha < 0, the sequence values alternate in sign, but again decrease in magnitude.
  4. For α>1 |\alpha| > 1, then the sequence grows in magnitude as nn increases.

If α\alpha is complex, it can be expressed as α=rexp(jω)\alpha=r\exp(j\omega). Changing rr and ω\omega defines different points in the complex plane which is equivalent to the expression of the form z=a+jbz=a+jb.

Essentially, then we can write

x[n]=Aαn=A(rejω)n=Arn(cos(ωn)+jsin(ωn)),\begin{equation} x[n]= A\alpha^n = A(re^{j\omega})^n = Ar^n (\cos(\omega n)+j\sin(\omega n)), \end{equation}

Notice that the amplitude follows same properties as for the real signal above, α\alpha has now transformed into rr. The exp(jθn)\exp(j\theta n) introduces the oscillations.The oscillation frequency is determined by ω\omega, which corresponds to the angular frequency in radians/sample. Finally, let us consider the case where AA is also complex and therefore can be expressed as A=Aexp(jϕ)A=|A|\exp(j\phi), then we can express x[n]x[n] as

x[n]=Aαn=A(rejω)n=Aejϕ(rejω)n,\begin{equation} x[n]= A\alpha^n = A(re^{j\omega})^n = |A|e^{j\phi}(re^{j\omega})^n, \end{equation} x[n]=Arnej(ωn+ϕ)=Arn(cos(ωn+ϕ)+jsin(ωn+ϕ)),\begin{equation} x[n]= |A|r^n e^{j(\omega n +\phi)} = |A|r^n (\cos(\omega n +\phi)+j\sin(\omega n +\phi)), \end{equation}

The sequence oscillates with the growing envelope when α>1|\alpha|>1 and with the decaying envelope when α<1|\alpha|<1. When, |\alpha=1|, the sequence is referred to as a complex exponential sequence. The term ω\omega is considered as the frequency of complex sinusoid and ϕ\phi is considered as the phase.

Digital Frequency

Notice that, the ω\omega which is often dubbed as digital frequency must be in radians (which is technically a dimensionless quantity), as nn is a dimensionless measure of time. The fact that nn is always an integer and ω\omega is in radians lead to some interesting properties of discrete-time complex exponential signals. In particular, consider ωo=ω+2π\omega_o =\omega+2\pi, then

x[n]=Aej(ωon+ϕ)=Aej(ωn+2πn+ϕ)=Aej(ωn+ϕ),\begin{equation} x[n]= |A| e^{j(\omega_o n +\phi)} = |A| e^{j(\omega n +2\pi n +\phi)} =|A| e^{j(\omega n +\phi)}, \end{equation}

that is the frequency ωo\omega_o is in-distinguishable from the frequency ω\omega. In general, ωo=ω+2πr\omega_o = \omega+2 \pi r, where, rr is integer, are all in-distinguishable from each other. Similar principle holds for sinusoidal sequences:

x[n]=Acos(ωon+ϕ)=Acos(ωn+2πrn+ϕ)=Acos(ωn+ϕ).\begin{equation} x[n]= |A| \cos(\omega_o n +\phi) = |A| \cos(\omega n +2\pi r n +\phi) =|A| \cos(\omega n +\phi). \end{equation}

Essentially, implying that the highest frequency possible for discrete-time sinusoid is ω=2π\omega=2\pi, therefore, it is sufficient to consider the interval π<ωπ-\pi<\omega\leq\pi or 0ω<2π0\leq\omega<2\pi.

Periodicity

Another implication of nn being integer can be understood by considering the continuous-time sinusoidal signal, given by:

x(t)=Asin(2πft)=Asin(ωt),\begin{equation} x(t)=A\sin(2\pi f t)=A \sin(\omega t), \end{equation}

this sinusoidal signal is always periodic, i.e., x(t+kT)=x(t)x(t+kT)=x(t) for kZ\forall k \in \mathbb{Z} with T=2πωT= \frac{2 \pi}{\omega}. In discrete-time case, a periodic sequence is a sequence for which

x[n]=x[n+N],n,\begin{equation} x[n] = x[n + N], \quad \forall n, \end{equation}

where the period NN is an integer. Applying this condition to discrete-time sinusoid signal yields:

Acos(ωn+ϕ)=Acos(ωn+ωN+ϕ),\begin{equation} A\cos(\omega n + \phi) = A \cos(\omega n + \omega N +\phi), \end{equation}

which requires that,

ωN=2πk,kZ\begin{equation} \omega N = 2 \pi k, \quad \forall k \in \mathbb{Z} \end{equation}

this also holds for the complex exponential sequence and one can verify this quickly. Consequently, complex exponential and sinusoid sequences are not periodic in nn with period 2πω\frac{2 \pi}{\omega}, and depending on the value of ω\omega may not be periodic at all. To verify, let us consider x[n]=sin[2n]x[n]=\sin[2n] where ω=2\omega=2. T As can be seen from above, the signal is non-periodic. One can easily verify that π=N/k\pi =N/k which requires rational representation of π\pi which does not exist. Contrary, to this consider x[n]=sin[nπ/8]x[n]=\sin[n\pi/8] as another discrete sinusoid signal.

It is obvious that the signal is periodic, in this case with the period:

π8N=2πk=N=16k\begin{equation} \frac{\pi}{8} N = 2 \pi k = N=16k \end{equation}

Setting k=1k=1 will yield N=16N=16, you can verify that this is indeed the period by hovering over the 16th16^{th} sample on the plot.

:::tip[Condition for periodicity] For discrete-time complex exponential and sinusoid sequence, the condition for periodicity can be stated as

ω=2πkN,\begin{equation} \omega = 2\pi \frac{k}{N}, \end{equation}

where kk and NN are smallest possible integers. Moreover, in continuous-time sinusoid the period of the signal is inversely proportional to the frequency. However, this does not hold in discrete time systems. You can verify this by considering, two example signals, e.g. x1[n]=cos(nπ8)x_1[n]=\cos(\frac{n\pi}{8}) and x2[n]=cos(3nπ16)x_2[n]=\cos(\frac{3n\pi}{16}). :::

Classes of Discrete-time Signals

There are numerous ways for classifying the discrete-time signals. One way of classifying is based on the length of samples in the sequence.

Finite-Length Signals

A finite-length discrete time signal is a complex sequence of length NN. In other words, it can be represented as a vector xCN\boldsymbol{x}\in \mathbb{C}^N. Such representation allows us to readily employ tools and techniques from linear algebra. Mathematically, it is convenient to denote x\boldsymbol{x} as:

x=[x0,x1,.....xN]T\begin{equation} \boldsymbol{x} = [x_0,x_1,.....x_N]^T \end{equation}

where TT denotes transpose of the vector, i.e. xC1×N\boldsymbol{x}\in \mathbb{C}^{1\times N} is a column vector. We often are required to expand finite-signals into infinite sequences. This is of practical importance, as often infinite-sequences do not suffer from border effects. For instance, operators such as translation/shifting may complicate analysis of a finite-length sequence depending on the actual value of different shifts. However, treating a finite-sequence as infinite-sequence with certain properties can often circumvent this. More over, for time-series data often such methods are useful as shown in [3]. In [3], authors also present some preliminary methods for expansion of finite-length sequences. These include:

  1. Ordinary Extension: This is extension of finite-dimension sequence on either side by adding zeros. Mathematically,
xˉ[n]={x[n],0n<N,0,otherwise.\begin{equation} \bar{x}[n] = \begin{cases} x[n],\quad 0\leq n< N, \\ 0, \quad \textrm{otherwise}. \end{cases} \end{equation}
  1. Periodic Extension: A periodic extension of finite-sequence can be obtained by replicating it. Mathematically,
x^[n]={x[n],0n<N,x[i],imod(N).\begin{equation} \hat{x}[n] = \begin{cases} x[n],\quad 0\leq n< N, \\ x[i], \quad i\mod(N). \end{cases} \end{equation}

where mod(.)\mod(.) is a modulus operator, i.e., the operator gives remainder of the division of ii with (N+1)(N+1).

Infinite-Length Signals

We have already encountered examples of infinite-length signals. Among these, the infinite-length complex sequence serves as the most general representation of discrete-time signals. Such sequences can be either aperiodic or periodic in nature. The summability of these sequences, or alternatively their square summability, is often a critical factor in determining their associated power and energy. For periodic sequences, the power is finite because all the information about the sequence is contained within a single period. Furthermore, any ordinary shift operation applied to a periodic infinite sequence results in a circular shift. You can think of the sequence as being stored in an array: when applying a shift by kk, the kk rightmost values "wrap around" and are reinserted at the start of the array. This behavior is analogous to that of a linear shift register, and if you're familiar with such registers, this concept should feel quite intuitive.

Energy and Power

The energy of a discrete-time signal can be quantified by:

Ex=x[n]2,\begin{equation} E_{x} = \sum_{-\infty}^{\infty}|x[n]|^{2}, \end{equation}

You can notice the analogy of the discrete-time signal's energy to its continuous-time counter part. The energy is only finite, if x[n]x[n] is square summable, i.e, the summation converges to a finite value. Signals which satisfy this property are called finite energy signals. The power for discrete-time signals is defined as:

Px=limN12NNN1x[n]2,\begin{equation} P_{x} = \lim_{N\rightarrow \infty} \frac{1}{2N}\sum_{-N}^{N-1}|x[n]|^{2}, \end{equation}

Finite-energy signals have essentially zero power (i.e., over infinite time horizon the energy dilutes). For periodic-signals it is convenient to quantify power as

Px=limN1N0N1x[n]2,\begin{equation} P_{x} = \lim_{N\rightarrow \infty} \frac{1}{N}\sum_{0}^{N-1}|x[n]|^{2}, \end{equation}

where NN is the period for the signal. In other words, power is simply average energy over a period. A signal which has finite power is called finite power signal. A signal can be either power signal or energy signal but not both. However, it is possible for a signal to have neither the finite energy or the power.

Properties of Discrete Sequences: Energy and Power

Sequence TypeEnergyPower
Finite-lengthFiniteUndefined
Infinite-length PeriodicInfiniteFinite (constant across one period)
Infinite-length Non-periodicMay or may not be finite (depends on summability)Zero (typically undefined for energy-only sequences)

References

[1] Paolo Prandoni and Martin Vetterli, "Signal Processing for Communications", EPFL Press, 2008.
[2] A. V. Oppenheim and R. W. Schafer, "Discrete-Time Signal Processing", Prentice-Hall, 1999.
[3] D.S.G. Pollock, "A Handbook of Time-Series Analysis,Signal Processing and Dynamics", Academic Press, 1999.