What is a Signal ?

A signal is an entity that carries information.

A signal can be modeled as a function.

Examples :

  • Temperature is a function of time tt (Continuous)
  • hourly average temperature is a function of hour (Discrete)

Classification of a signal

Signal function f(t)f(t)

  • Domain defines the allowable values of the argument of a function (xx in y=f(x)y = f(x))
  • Range defines the allowable values of a function (yy in y=f(x)y = f(x))
  • A signal can be either discrete- or continuous-time
    • Discrete-time function - The number of allowable values in the domain is countable
    • Continuous-time function - The number of allowable values in the domain is not countable

y[n]y[n] denotes a discrete-time signal yy

  • n means particular time instance in the sequence

y(t)y(t) denotes a continuous-time signal yy

  • The argument can be any time-oriented variable

C.T.S. (Continous Time Signal)

C.T.S. is Not good, We cannot use a computer to handle it since there are infinite number of time instance.

Therefore we need to convert it into D.T.S. Through Sampling.

Sampling

Measuring the continuous-time signal to produce a new function whose number of domain values is countable.

D.T.S. (Discrete Time Signal)

Representation of a signal

Time-domain representation - Represented in the original form of the function.

  • Not only apply to functions of time
  • Can apply to a function of any variable as long as the function value changes according to an ordered sequence of time instants.

Any continuous periodic signal can be represented as a sum of scaled sinusoidal signals.

A Time Domain Representation Signal x(t)x(t) is a combination of many sinusoidal signals (Frequency domain):

  • a0a_0 x Sinusoid cos(ω0+ϕ0)cos(\omega_0+\phi_0)
  • a1a_1 x Sinusoid cos(ω1+ϕ1)cos(\omega_1+\phi_1)
  • a2a_2 x Sinusoid cos(ω2+ϕ2)cos(\omega_2+\phi_2)
  • a3a_3 x Sinusoid cos(ω3+ϕ3)cos(\omega_3+\phi_3)
  • a4a_4 x Sinusoid cos(ω4+ϕ4)cos(\omega_4+\phi_4)
  • a5a_5 x Sinusoid cos(ω5+ϕ5)cos(\omega_5+\phi_5)

aia_i is the Scaling factors

ϕi\phi_i is the phase angles

They are unique to a signal. We can use them to represent the signal.

DC coefficient - a0a_0

AC coefficient - aia_i where i > 0

Frequency-domain representation

  • Represented with the set of scaling factors + phase angles

Waveform vs Spectrum

  • Waveform - a plot of a function of time
  • Spectrum - a plot of a function of frequency

Each sinusoid is called a frequency component of the signal

Sinusoid is Identified by its frequency which specifies how many cycles it repeats in a second.

High frequency component

  • repeat quickly

Low frequency component

  • repeat slowly

DC component

  • Don’t change at all (frequency = 0 Hz, change 0 times/s)
  • Average value of the signal
  • is a constant term

AC component

  • Any components other than the DC one
  • AC components cannot share the same frequency

Bandwidth of a signal

The range of frequencies bounded by the DC component and the non-zero frequency component having the maximum frequency.

Bandwidth = fif0f_i - f_0 = Highest frequency - Lowest frequency


Signal Representation

Continuous-time Signals (Analog Signals)

Also known as analog signals.

continuous signals =/= continuous-time signals

  • Domain variable
  • May not be continuous signals
  • Usually decomposed into a combination of basic functions for study.

Note: Vectical Line = Gap = Discontinuous

Basic functions

Impulse Function

It is a continuous-time signal that is not continuous

Unit Step Function

It is a continuous-time signal that is not continuous

Sign Function

It is a continuous-time signal that is not continuous

Ramp Function

Impulse Train Function

It is a continuous-time signal that is not continuous

Rectangle Function

It is a continuous-time signal that is not continuous

Triangle Function

Sinc Function

Dirichlet Function

Continuous Signals

The signal x(t)x(t) is said to be discontinuous at the point t2t_2 if

  • x(t2)x(t2+)x(t_2^-)\neq x(t_2^+)
  • The value of x(t)x(t) jumps at point t2t_2

If the signal x(t) is continuous at all points tt, x(t)x(t) is said to be a continuous signal.

  • Note this is different from continuous-time signal

Discrete-time Signals

Basically, A Continous Signal will become Discrete Signal after Sampling Process.

Note: Discrete-time Signals can never be a continuous function.

Sample x(t)x(t) @ t=nTst = nT_s to get x[n]=x(nTs)x[n] = x(nT_s)

Note:

TsT_s = Sampling Period

1Ts=fs\frac{1}{T_s} = f_s = Sampling Frequency

t=nTs=nfst = nT_s = \frac{n}{f_s}

Basic discrete functions

Basic discrete functions can be obtained by sampling basic functions.

Like continuous-time function, Discrete functions can also be represented as shifted, reflected, scaled versions of basic discrete functions or combinations of them.

Time-shifting

Given x[n]x[n] and a positive integer rr

  • x[nr]x[n-r]: x[n]x[n] shift to the right by rr step
  • x[n+r]x[n + r]: x[n]x[n] shift to the left by rr step

Time-reflecting

Given x[n]x[n]

  • x[n]x[-n]: a time-reflected version of x[n]x[n] about n=0n = 0.

Time-scaling

Given x[n]x[n]

  • x[kn]x[kn]: a time-scaled version of x[n]x[n] where k is generally an integer.
  • If k>1k>1, It is called Supsampling. All the values of x[n]x[n] will not be retained.
  • If k<1k < 1, The extra values will be filled with 00s since the sample does not exist.

Even Function and Odd Function

Even function : Symmetrical (Mirrored)

Odd function : Not Mirrored

Note:

Sin component is a Odd function

Cos component is a Even function

Periodic Discrete-time Signals

A discrete-time signal x[n] is periodic if there exists a positive integer r such that

x[n+r]=x[n]x[n+r] = x[n]

Fundamental period

smallest value of r

Examples:

A discrete cosine function which repeats every 2 samples: x[n]=Acos(πn)x[n]=Acos(\pi n)

x[n]=Acos(πn)=Acos(π(n+2))=x[n+2]=Acos(π(n+4))=x[n+4]x[n] = Acos(\pi n) = Acos(\pi(n+2)) = x[n+2] = Acos(\pi(n+4)) = x[n+4]

The Fundamental period is 2.

Note: A sampled periodic time-continuous signal may not be a periodic discrete signal.

After sampling, may not be still periodic**


Ex1

Determine whether the following signals are periodic or not. For periodic signals, determine also the fundamental period.

  1. x[n]=sin(nπ/4)x[n] = sin(n\pi/4)
  2. x[n]=sin(n/4)x[n] = sin(n/4)
  3. x[n]=cos(3n)x[n] = cos(3n)
  4. x[n]=cos(πn/10)x[n] = cos(\pi n/10)

Keypoints:

Determine the function cycle

If x[n+r]=x[n]x[n+r] = x[n] it is periodic, otherwise not periodic

rr must be positive integer value.

Q1: x[n]=cos(πn/4)x[n] = cos(\pi n/4)

x[n+r]=x[n]x[n+r] = x[n] if rr is the period

where

x[n+r]=sin(nπ/4+rπ/4)x[n+r] = sin(n\pi/4 + r\pi /4)

x[n]=sin(nπ/4)=sin(nπ/4+2πm)x[n] = sin(n\pi/4) = sin(n\pi/4 + 2\pi m) <- We used 2π2\pi because sin function cycle every 2π2\pi

Therefore, rπ/4=2πmr\pi/4 = 2\pi m

r=8mr = 8m <- mm is any integer value

rr can be a interger -> Valid -> Periodic

To get the Minimizing rr value

By sub m=1m = 1,

Fundamental period = 8×18 \times 1 = 8

Q2: x[n]=sin(n/4)x[n] = sin(n/4)

x[n+r]=sin(n/4+r/4)x[n+r] = sin(n/4 + r/4)

x[n]=sin(n/4)=sin(n/4+2πm)x[n] = sin(n/4) = sin(n/4 + 2\pi m) <- We used 2π2\pi because sin function cycle every 2π2\pi

r=8πmr = 8\pi m <- mm is any integer value

rr cannot be a interger -> invalid -> Not Periodic

Q3: x[n]=cos(3n)x[n] = cos(3n)

x[n+r]=cos(3n+3r)x[n+r] = cos(3n + 3r)

x[n]=cos(3n)=cos(3n+2πm)x[n] = cos(3n) = cos (3n + 2\pi m) <- We used 2π2\pi because cos function cycle every 2π2\pi

r=23πmr = \frac{2}{3}\pi m <- mm is any integer value

rr cannot be a interger -> invalid -> Not Periodic

Q4: x[n]=cos(πn/10)x[n] = cos(\pi n/10)

x[n+r]=cos(πn/10+πr/10)x[n+r] = cos(\pi n/10 + \pi r/10)

x[n]=cos(πn/10)=cos(πn/10+2πm)x[n] = cos(\pi n/10) = cos(\pi n/10 + 2\pi m) <- We used 2π2\pi because cos function cycle every 2π2\pi

r=20mr = 20m <- mm is any integer value

rr can be a interger -> Valid -> Periodic

To get the Minimizing rr value

By sub m=1m =1,

Fundamental period = 20×120 \times 1 = 20

Note: Since rr must be a positive integer, you might encounter situations like

r=m3r = \frac{m}{3}

In this case, You should sub m=3m = 3 instead of m=1m = 1 to get the positive integer rr value.

Discrete-time signal (DTS) x[n]=cos(πn/10)x[n] = cos(\pi n / 10) is obtained by sampling Continous-time signal (CTS) x(t)=cos(5πt/2)x(t) = cos(5\pi t / 2). Determine the sampling frequency and the sampling period of x[n]x[n]. (By default, unit of t is second unless specified otherwise.)

Keypoints:

x(t)x(t) -> x[n]=x(nTs)x[n] = x(nT_s)

nn = Sample

TsT_s = Sampling Period (TsT_s time for 1 sample)

1Ts=fs\frac{1}{T_s} = f_s = Sampling Frequency

t=nTs=nfst = nT_s = \frac{n}{f_s}

First you get the frequency from the continous-time signal (CTS):

cos(5πt/2)=cos(2π×54t)cos(5\pi t / 2) = cos(2\pi \times \frac{5}{4}t)

Frequency = 54\frac{5}{4}Hz

Period = 0.8 sec

Radian frequency = 2πf2\pi f = 2.5π2.5\pi

For discrete-time signal (DTS):

x[n]=cos(πn/10)=x(nTs)=cos(5π×nTs2])x[n] = cos(\pi n / 10) = x(nT_s) = cos(5\pi \times \frac{nT_s}{2}])

πn/10=5π×nTs2\pi n/10 = 5\pi \times \frac{nT_s}{2}

Ts=125T_s = \frac{1}{25}

Sampling Period = 0.04 sec

Sampling Frequency = 1Ts=fs=25\frac{1}{T_s} = f_s = 25 Samples per second

Note: With x[n]=cos(πn/10)x[n] = cos(\pi n / 10),

now you know the fundamental period of x[n]=20x[n] = 20 samples.

If you want to represent it in unit seconds:

t=nTst = nT_s

2020 samples ×Ts\times T_s = 45\frac{4}{5} = 0.8 seconds


Ex 2

(a)

Sampling period = 1f=0.2\frac{1}{f} = 0.2 sec

(b)

Yes. x(t) is continuous.

©

Note : x[n]=x(Tsn)x[n] = x(T_sn).

Therefore x[n]=x(0.2n)=3+2sin(0.8nπ)cos(0.1nπ)x[n] = x(0.2n) = 3 + 2sin(0.8n\pi) - cos(0.1n\pi)

(d)

Look at sin(0.8nπ)sin(0.8n\pi) first.

Let period of sin(0.8πn)sin(0.8\pi n) be T1T_1 samples <- It is basically rr in our previous questions

sin(0.8π(n+T1))=sin(0.8πn+2πm)sin(0.8\pi(n+T_1)) = sin(0.8\pi n + 2\pi m) <- We used 2π2\pi because sin function cycle every 2π2\pi

0.8T1π=2mπ0.8T_1\pi = 2m\pi

T1=2.5mT_1 = 2.5m <-- m is any integer value

Note : T1T_1 needs to be integer.

T1=2.5×2=5T_1 = 2.5 \times 2 = 5

Fundamental period of sin(0.8nπ)sin(0.8n\pi) is 5 samples.

Now look after cos(0.1nπ)cos(0.1n\pi)

Let period of cos(0.1nπ)cos(0.1n\pi) be T2T_2 samples <- It is basically rr in our previous questions

cos(0.1π(n+T2))=cos(0.1π+2πm)cos(0.1\pi(n+T_2)) = cos(0.1\pi + 2\pi m) <- We used 2π2\pi because sin function cycle every 2π2\pi

0.1πT2=2πm0.1\pi T_2 = 2\pi m

T2=20mT_2 = 20m <-- m is any integer value

T2=20×1=20T_2 = 20 \times 1 = 20

Fundamental period of cos(0.1nπ)cos(0.1n\pi) is 20 samples.

LCM(T1,T2)=LCM(5,20)=20LCM(T_1,T_2) = LCM(5, 20) = 20

Therefore the period of x[n]x[n] is 20 samples.

(e)

The fundamental period in terms of second = sample times sampling period = 20×0.220 \times 0.2s =4= 4 sec


Digital Signals

A digital signal x[n]x[n] is a discrete-time signal whose values belong to the finite set {a1,a2,,aN}\left\{ a_1,a_2,\cdots,a_N\right\}.

  • A digital signal can have only a finite number of different values

After Quantization,

Discrete-time signal -> Digital signal

Full Picture:

Continous sign —Sampling—> Discrete-time signal —Quantization—> Digital signal

This is what digital signal looks like.


Ex 3

(a)

The ans is 1. Dc is the constant term. it does not change with time.

(b)

The ans is 2. In Frequency domain analysis, we decompose a signal into sinosoids. Each contributes 1 ac component.

Note: Ac components cannot share the same frequency.

for example. if x(t)=cos(2πt)+cos(2πt)x(t)=cos(2\pi t)+cos(2\pi t), we consider 1 ac component only, because both cos function have the same frequency.

©

The ans is 3.

(d)

The ans is 20=2Hz2 - 0 = 2Hz.

Note: Bandwidth = fif0f_i - f_0 = Highest frequency - Lowest frequency

Find their highest frequency and lowest frequency.

x(t)=3+2sin(4πt)cos(0.5πt)x(t) = 3 + 2sin(4\pi t) - cos(0.5\pi t)

Frequency of 33 : f=0f = 0 (DC component)

Frequency of 2sin(4πt)2sin(4\pi t) : 2sin(4πt)=2sin(2π×2t)f=22sin(4\pi t) = 2sin(2\pi \times 2t) \rightarrow f = 2

Frequency of cos(0.5πt)cos(0.5\pi t) : cos(0.5πt)=cos(2pi×14t)f=14cos(0.5\pi t) = cos(2pi \times \frac{1}{4}t) \rightarrow f = \frac{1}{4}

Highest = 2, Lowest = 0.

(e)

Note: Sin component is a Odd function, Cos component is a Even function

x(t)=3+2sin(4πt)cos(0.5πt)x(t) = 3 + 2sin(4\pi t) - cos(0.5\pi t) contains both sin component and cos component.

Therefore x(t)x(t) is neither even or odd function.

(f)

Note: we ignore DC term when finding fundamental period.

Period of 33 : T=0T = 0 (DC component)

Period of 2sin(4πt)2sin(4\pi t) : 0.50.5

Period of cos(0.5πt)cos(0.5\pi t) : 44 

Fundamental period = 4 second (LCM of both periods)

(g)

f=1T=14f = \frac{1}{T} = \frac{1}{4}


Ex 4

Keypoint : Basic discrete functions.

Note They both have the height of 1 and stands at 0.

δ[n]\delta[n] Looks like this:

u[n]u[n] Looks like this:

(a) g[n]=5δ[n2]+3δ[n+1]g[n]=5 \delta[n-2]+3 \delta[n+1]

This is a easy one.

First, Look at δ[n2]\delta[n-2].

δ[n2]\delta[n-2] is basically δ[n]\delta[n] but shifted to right by 2 units.

Now Look at δ[n+1]\delta[n+1].

δ[n+1]\delta[n+1] is basically δ[n]\delta[n] but shifted to left by 1 unit.

Therefore, after multiply the height, this is how 5δ[n2]+3δ[n+1]5 \delta[n-2]+3 \delta[n+1] looks like:

(b) g[n]=5n(u[n2]u[n5])+(8n)(u[n6]u[n8])g[n]=5 n \cdot(u[n-2]-u[n-5])+(8-n) \cdot(u[n-6]-u[n-8])

First, Look at (u[n2]u[n5])(u[n-2]-u[n-5]).

u[n2]u[n-2] and u[n5]u[n-5] are basically u[n]u[n] with right shift of 2 and 5 units respectively.

(u[n2]u[n5])(u[n-2]-u[n-5]) means the u[n]u[n] starts from 2 and stop at 4. (2n<52 \leq n < 5)

Next, Look at (u[n6]u[n8])(u[n-6]-u[n-8]).

u[n6]u[n-6] and u[n8]u[n-8] are basically u[n]u[n] with right shift of 6 and 8 units respectively.

(u[n6]u[n8])(u[n-6]-u[n-8]) means the u[n]u[n] starts from 6 and stop at 7. (6n<86 \leq n < 8)

Multiply the height and join them together.

Since it is not easy to visualize like impulse functions, We can draw a table to plot it out.

n 1 2 3 4 5 6 7 8
5n 10 15 20
8-n 2 1
g[n] 0 10 15 20 0 2 1 0

you will get this graph.


Ex 5

This is a easy one. We break it into segments.

We can clearly see there is 2 operated u[n]u[n] function there. the second one is fliped with x axis (times -1).

So we can interprete that the function look like this : (I denote the function with x1[n]x_1[n] and x2[n]x_2[n])

x1[n]+(1)x2[n]x_1[n] + (-1)x_2[n]

First, Look at x1[n]x_1[n].

It is a operated u[n]u[n] function. 0n<20 \leq n < 2 thus it is (u[n]u[n2])(u[n] - u[n-2]).

Now Look at x2[n]x_2[n].

It is a operated u[n]u[n] function. 3n<63 \leq n < 6 thus it is (u[n3]u[n6])(u[n - 3] - u[n-6]).

Therefore, x1[n]+(1)x2[n]x_1[n] + (-1)x_2[n] = (u[n]u[n2])+(1)(u[n3]u[n6])(u[n] - u[n-2]) + (-1)(u[n - 3] - u[n-6])

= (u[n]u[n2])(u[n3]u[n6])(u[n] - u[n-2]) - (u[n - 3] - u[n-6])


Ex 6

Keypoint : Ramp Function.

Important thing to remember : in ramp function , f(n)=nf(n) = n . You might say the height of ramp[n] = n.

In this question, we can break it into two segment.

First look at the first segment.

2n<2-2 \leq n < 2 , Thus it is u[n+2]u[n2]u[n+2] - u[n-2].

Note: since it is a ramp function, remember to times nn.

So it is n(u[n+2]u[n2])n(u[n+2] - u[n-2]).

Second segment is only a impulse function with half height.

So it is 0.5δ[n2]0.5 \delta[n-2].

Therefore:

x[n]=n(u[n+2]u[n2])+0.5δ[n2]x[n] = n(u[n+2] - u[n-2]) + 0.5 \delta[n-2]