Discrete-time Systems

What is A System ?

A System Responds to signals and produces new signals.

System Analysis - Basically:

  • Mathematical model - Idealized representation of the system
  • Describing the relationship between the input and output signals
  • 4 main types of input/output representations
    • Time Domain :
      • Input/output differential equation or difference equation
      • Convolution model
    • Frequency Domain :
      • Fourier Transform representation
      • Transfer function representation

Model

MIMO System

Multiple Input, Multiple Output (MIMO) System

SISO System

Single Input, Single Output (SISO) System

E.g. Sampling

x(t)T{}:samplingy[n]=x(nTs)x(t) \rightarrow T\{\}:sampling \rightarrow y[n] = x(nT_s)

E.g. Amplifier

x[n]T{}:amplifiery[n]=c×x[n]x[n] T\{\}:amplifier \rightarrow y[n] = c\times x[n]

Properties of system - Basically:

A System can be:

  • Memoryless - output depends on the current input signal only
  • Causal - output does not depend on future input signal
  • Additive - output for (x1+x2)(x_1 + x_2) = output for x1x_1 + output for x2x_2
  • Homogeneous - output for (cx)(cx) = (output for xx) scaled by cc
  • Linear - Additive + homogeneous
  • Time invariant - its behavior doesn’t change with time
  • ^ cc is a real number, x1,x2,xx_1, x_2, x are inputs.

The properties are not mutually exclusive. (Cannot have >1 different properties)

  • Linear is special case, but still only Additive + homogeneous

System property: Memory

Possess Memory

  • Possess Memory - output does not solely depend on the present value of the input signal
    • Example case: averaging

Example of Averaging

x[n]H{}:averagingy[n]=(x[n]+x[n1])/2x[n] \rightarrow H\{\}:averaging \rightarrow y[n] = (x[n] +x[n-1])/2

Note Here the output is depend on the previous input x[n1]x[n-1] .

Since y[n]y[n] is x[n+k]x[n+k]-dependent where k0k \neq 0, It possess Memory and does not solely depend on the present value of the input signal.

Memoryless

  • Memoryless - output depends only on the present value of the input signal
    • Example case: amplifier

System property: Causality

All real-time system is causal.

In real-time system, It is impossible to get an output before an input is applied to the system

Causal

  • Causal - future input will not be considered
    • Example case: A system that introduces a time delay

Example of Delay

x[n]H{}:delayy[n]=x[n1]x[n] \rightarrow H\{\}:delay \rightarrow y[n] = x[n-1]

Noncausal

  • Noncausal - depends on future system input (contains [x+4][x+4])
    • Example case: averaging

Example of Averaging

Note: An averaging circuit is not necessarily a non- causal system. It depends on how it is realized.

Compare this example and the one in possess Memory example!

x[n]H{}:averagingy[n]=(x[n]+x[n+1])/2x[n] \rightarrow H\{\}:averaging \rightarrow y[n] = (x[n] +x[n+1])/2

Note Here the output is depend on the future input x[n+1]x[n+1] .

System property: Linearity

A system is linear if it is both additive and homogeneous.

Otherwise the System is non-Linear.

Additive

Homogeneous

More Info about Linearity

If the System is Linear, we can derive the output by convolution.

We cannot handle nonlinear system. If the range is small enough, it can be approximated by linear systems.

Nonlinear

Prove a system that is nonlinear.

First Find is it addictive, then is it homogenous.

If it is not addictive or homogenous, the system is nonlinear.

Example:

Is this System Linear or NonLinear?

Firstly, prove if it is additive.

let y1[n]=x12[n]y_1[n] = x^2_1[n], y2[n]=x22[n]y_2[n] = x^2_2[n]

If x3[n]=x1[n]+x2[n]x_3[n] = x_1[n] + x_2[n]

=> y3[n]={x3[n]}2y_3[n] = \{x_3[n]\}^2 =x12[n]+x22[n]+2x1[n]x2[n]= x_1^2[n] + x_2^2[n] + 2x_1[n]x_2[n]

=> y3[n]=y12[n]+y22[n]+2x1[n]x2[n]y1[n]+y2[n]y_3[n] = y_1^2[n] + y_2^2[n] + 2x_1[n]x_2[n] \neq y_1[n] + y_2[n]

Therefore it is not additive => Not Linear

Let’s check homogenous too, Although we knew the system is nonlinear.

let y1[n]=x12[n]y_1[n] = x^2_1[n]

If x2[n]=ax1[n]x_2[n] = ax_1[n]

=> y2[n]=x2[n]2=a2x12[n]y_2[n] = {x_2[n]}^2 = a^2x_1^2[n]

=> y2[n]=a2y1[n]ay1[n]y_2[n] = a^2 y_1[n] \neq ay_1[n]

Therefore it is not homogeneous! => Not linear.

System property: Time Invariance

Time invariance

If an input is delayed by t0t_0, then the output is also delayed by the same amount.

Additive

Example:

Is this System time invariant or time variant?

let y1[n]=x12[n]y_1[n] = x_1^2[n]

If x2[n]=x1[nm]x_2[n] = x_1[n-m]

=> y2[n]=x2[n]2=x1[nm]2=y1[nm]y_2[n] = {x_2[n]}^2 = {x_1[n-m]}^2 = y_1[n-m]

Therefore it is time invariant.

Warm-up questions

Lets do some questions to warm up.

(i) it is Casual. As the output depends on the past and the current input values only (x[n] and x[n-1])

(ii) It has Memory. As the current output y[n] depends on a past input value x[n-1].

(iii)

Addictive?

Let y1[n]=x1[n]+x1[n1]y_1[n] = x_1[n] + x_1[n-1], y2[n]=x2[n]+x2[n1]y_2[n] = x_2[n] + x_2[n-1]

If y3[n]=y1[n]+y2[n]y_3[n] = y_1[n] + y_2[n]

=> y3[n]=x3[n]+x3[n1]=x1[n]+x1[n1]+x2[n]+x2[n1]y_3[n] = x_3[n] + x_3[n-1] = x_1[n]+x_1[n-1] + x_2[n] + x_2[n-1]

=> y3[n]=y1[n]+y2[n]=x1[n]+x1[n1]+x2[n]+x2[n1]y_3[n] = y_1[n] + y_2[n] = x_1[n]+x_1[n-1] + x_2[n] + x_2[n-1]

Yes it is addictive.

Homogenous?

Let y1[n]=x1[n]+x1[n1]y_1[n] = x_1[n] + x_1[n-1]

If x2[n]=ax1[n]x_2[n] = ax_1[n]

=> y2[n]=x2[n]+x2[n1]y_2[n] = x_2[n] + x_2[n-1]

=> y2[n]=ax1[n]+ax1[n1]=ay1[n]y_2[n] = ax_1[n] + ax_1[n-1] = ay_1[n]

Yes it is homogenous.

Therefore: Linear

(iv)

If y[n]=x1[n]+x1[n1]y[n] = x_1[n] + x_1[n-1]

Then for input x2[n]=x1[nt]x_2[n] = x_1[n-t], we have

y2[n]=x2[n]+x2[n1]y_2[n] = x_2[n] + x_2[n-1]

y2[n]=(x1[nt]+x1[nt1])=y1[nt]y_2[n] = (x_1[n-t] + x_1[n-t-1]) = y_1[n-t]

It is Time-invariant.

Quick Check on System

Properties Contains component / Bookmark
Not Causal Contains x [n+k]x [n+k] where k>0k >0
Not Memoryless Contains x[nk]x[n-k] where k0k \neq 0
Not Time-invariant Contains x[kn]x[kn] where k0k \neq 0
Not Linear Contains 1x[n]\frac{1}{x[n]} or Square or Cubic or any power 0\neq 0
Causal !(Not Casual), All real-time system is casual
Memoryless !(Not Memoryless), depends only on present input
Additive input1 + input2 = output1 + output2
Homogeneous k ×\times input = k ×\times output
Linear output can be derived by convolution (LTI)
Time invariance input delayed by tkt_k -> output also delayed by tkt_k

Time Domain Analysis of Discrete-time Systems

LTI Discrete-time Systems

LTI System

  • A system which is causal + linear + time-invariant
  • when input = unit pulse δ[n]\delta[n], output = unit-pulse response h[n]h[n] (Special Case)
  • unit-pulse response can be measured or derived based on the system model

A LTI system is (time-invariant, homogeneous, additive, linear, usually causal).

General Case:

x[n]SystemH{}y[n]x[n] \rightarrow System H\{\} \rightarrow y[n]

Special Case:

δ[n]SystemH{}h[n]\delta[n] \rightarrow System H\{\} \rightarrow h[n]

Property of a LTI system’s unit-pulse response

Difference equation

A discrete system can be modeled with a difference equation.

difference equation

iβiy[ni]=jajx[nj]\sum_i \beta_i y[n-i] = \sum_j a_j x[n-j]

where y[ni]y[n-i] is the (ni)th(n-i)^{th} output samples,

x[nj]x[n-j] is the (nj)th(n-j)^{th} input samples

α\alpha and β\beta are the weight.

Example:

y[n]=x[n]+x[n1]+x[n2]y[n] = x[n] + x[n-1] + x[n-2]

i.e. α0=α1=α2=β0=1\alpha_0 = \alpha_1 = \alpha_2 = \beta_0 = 1, other αk=βk=0\alpha_k = \beta_k = 0

get h[n] based on difference equation

When x[n]=δ[n]x[n] = \delta[n] , then y[n]y[n] is the unit-pulse response h[n]h[n].

Example:

Given difference equation: y[n]+y[n1]=x[n]+2x[n1]+x[n2]y[n] + y[n-1] = x[n] + 2x[n-1] + x[n-2]

get h[n].

Solution:

When x[n]=δ[n]x[n] = \delta[n], y[n]y[n] is the unit-pulse response h[n]h[n]

replace x[n]x[n] with δ[n]\delta[n], replace y[n]y[n] with h[n]h[n]

=> h[n]+h[n1]=δ[n]+2δ[n1]+δ[n2]h[n] + h[n-1] = \delta[n] + 2\delta[n-1] + \delta[n-2]

Note: All the values except δ[0]\delta[0] are 0s.

Convolution (in Discrete)

Output response y[n]y[n] is equal to the convolution of the unit-pulse response h[n]h[n] with the input x[n]x[n].

In general, x[n]x[n], y[n]y[n] and h[n]h[n] can be any discrete functions (signals or unit pulse responses of systems).

y[n]=x[n]h[n]i=x[i]h[ni]=i=0h[i]x[ni]y[n]=x[n] \otimes h[n] \triangleq \sum_{i=-\infty}^{\infty} x[i] h[n-i]=\sum_{i=0}^{\infty} h[i] x[n-i]

where h[i]h[i] is the ithi^{th} sample of h[n]h[n] if ii is a constant.

Note: \triangleq means “equal to by definition”

  • The system is determined completely by the unit-pulse response h[n]h[n].

Important things:
h[i]h[-i]: time reflected version of sequence h[i]h[i]

h[ni]h[n-i]: shift the time reflected version h[i]h[-i] to the right by n steps

Length of convolution output: Length of h + Length of x - 1

Example - compute the whole output sequence y[n]y[n] for all n.

Example - focus in individual y[n]y[n] samples and compute those of interest only:

So basically, for computing output y[n] with input x[n] and system h[n] by convolution:

  1. Initialize n=0n = 0
  2. Flip h[i]h[i] to get h[i]h[-i]
  3. Shift h[i]h[-i] to the right by nn to get h[ni]h[n-i]
  4. Pointwise multiply h[ni]h[n-i] and x[i]x[i] to get x[i]h[ni]x[i]h[n-i]
  5. Sum up x[i]h[ni]x[i]h[n-i] for all ii to get y[n]y[n]
  6. If Got all y[n]y[n], end. Else n=n+1n = n+1 (and go back to step 3.

Properties of Convolution

Associativity

x[n](v[n]w[n])=(x[n]v[n])w[n]x[n] \otimes(v[n] \otimes w[n])=(x[n] \otimes v[n]) \otimes w[n]

Commutativity

x[n]v[n]=v[n]x[n],i=x[i]v[ni]=i=v[i]x[ni]x[n] \otimes v[n]=v[n] \otimes x[n], \quad \sum_{i=-\infty}^{\infty} x[i] v[n-i]=\sum_{i=-\infty}^{\infty} v[i] x[n-i]

Distributivity with Addition

x[n](v[n]+w[n])=x[n]v[n]+x[n]w[n]x[n] \otimes(v[n]+w[n])=x[n] \otimes v[n]+x[n] \otimes w[n]

Shift property

w[n]=x[n]v[n]w[n]=x[n] \otimes v[n] \quad \Rightarrow

w[nq]=x[nq]v[n] or w[nq]=x[n]v[nq]w[n-q]=x[n-q] \otimes v[n] \quad \text { or } \quad w[n-q]=x[n] \otimes v[n-q]

LTI system is time invariant.

Convolution with the unit pulse

x[n]δ[n]=i=x[i]δ[ni]=x[n]x[n] \otimes \delta[n]=\sum_{i=-\infty}^{\infty} x[i] \delta[n-i]=x[n]

LTI system is time invariant.

Convolution with the shifted unit pulse

x[n]δ[nq]=x[i]δ[nqi]=x[nq]x[n] \otimes \delta[n-q]=\sum x[i] \delta[n-q-i]=x[n-q]

LTI system is time invariant.

Self convolution

x[n]x[n]=i=0x[i]x[ni]x[n] \otimes x[n]=\sum_{i=0}^{\infty} x[i] x[n-i]

Where x[n]x[n] is the sequence.

Warm-up Questions

Lets do some questions to warm up.

y[n]=x[n]h[n]i=x[i]h[ni]=i=0h[i]x[ni]y[n]=x[n] \otimes h[n] \triangleq \sum_{i=-\infty}^{\infty} x[i] h[n-i]=\sum_{i=0}^{\infty} h[i] x[n-i]

  1. Initialize n=0n = 0
  2. Flip h[i]h[i] to get h[i]h[-i]
  3. Shift h[i]h[-i] to the right by nn to get h[ni]h[n-i]
  4. Pointwise multiply h[ni]h[n-i] and x[i]x[i] to get x[i]h[ni]x[i]h[n-i]
  5. Sum up x[i]h[ni]x[i]h[n-i] for all ii to get y[n]y[n]
  6. If Got all y[n]y[n], end. Else n=n+1n = n+1 (and go back to step 3.
  1. x[n]={2,4,6,4,2}x[n] = \{2, 4, 6, 4, 2\} h[n]={3,1,2,1}h[n] = \{3, -1, 2, 1\} (unit pulse response) What will be the output?

Therefore y[n]={6,10,18,16,18,12,8,2}y[n] = \{6,10,18,16,18,12,8,2\}.

Impulse response h[n]h[n] is the output when input is δ[n]\delta[n].

if x[n]=δ[n]x[n] = \delta[n] , then y[n]=h[n]y[n] = h[n].

h[n]=2δ[n]+3δ[n1]4δ[n2]h[n] = 2\delta[n] + 3\delta[n-1] - 4\delta[n-2]

y[n]=1,2,5,13,2,3y[n] = {1,2,-5,13,-2,3}

x[n]={1,2,1,1,2}x[n] = \{1,2,-1,1,2\}

h[n]={1,1,0,2,2,1}h[n] = \{1,1,0,2,-2,-1\}

y[n]={1,3,1,2,5,5,2,3,5,2}y[n] = \{1,3,1,2,5,-5,2,3,-5,-2\}

y[n]=δ[n+5]+3δ[n+4]+δ[n+3]+2δ[n+2]+5δ[n+1]5δ[n]+2δ[n1]+3δ[n2]5δ[n3]2δ[n4]y[n] = \delta[n+5] + 3\delta[n+4] + \delta[n+3] + 2\delta[n+2] + 5\delta[n+1] - 5\delta[n] + 2\delta[n-1] + 3\delta[n-2] - 5\delta[n-3] - 2\delta[n-4]

h[n]=k=nδ[k]h[n] = \sum^n_{k=-\infty}\delta[k]

h[n]=δ[n]+δ[n1]+δ[n2]+=u[n]h[n] = \delta[n] + \delta[n-1] + \delta[n-2]+\cdots = u[n]

graph of output y[n]y[n]

Keynote Summary

LTI System

A LTI system is (time-invariant, homogeneous, additive, linear, usually causal).

Pulse Response

The definition of unit pulse response of a system is the system output when the input is when input is δ[n]\delta[n].

  • Output : h[n]h[n] <- pulse response
  • Input : δ[n]\delta[n]

Convolution

Formula : y[n]=x[n]h[n]=i=0h[i]x[ni]y[n]=x[n] \otimes h[n] =\sum_{i=0}^{\infty} h[i] x[n-i]

  • Number of terms in y[n]
    • = Range of non-zero terms of x[n]x[n] + Range of non-zero terms of h[n]h[n] and then - 1