{ Discrete-time Signals & Systems Discrete-Time Signals
Feb 24, 2016
{
Discrete-time Signals & Systems
Discrete-Time Signals
The correct representation of a discrete-time signal in Matlab takes 2 vectors.
One vector is used to indicate the locations of the time samples.
The other vector is used to indicate the amplitude (value) of the signal at the corresponding temporal locations.
How to represent a discrete-time signal in Matlab?
Unit sample sequence:
δ(n) = 1, n = 0 = 0, n ≠ 0
Basic Signals
Unit step sequence:
u(n) = 1, n ≥ 0 = 0, n < 0
Basic Signals
Real-valued exponential sequence:
x(n) = an, a is a real number
Basic Signals
Complex-valued exponential sequence:
x(n) = e(σ + j ω) n
Basic Signals
Sinusoidal sequence:
X(n) = A cos(ω n + θ)
Basic Signals
Random sequences:
rand(1, N)
Basic Signals
Periodic sequence:
x(n) = x(n+N)the smallest integer N is the fundamental period
Basic Signals
Signal addition:
{x1(n)} + {x2(n)} ={x1(n)+x2(n)}
Basic Operations
Signal multiplication
{x1(n)} × {x2(n)} ={x1(n) × x2(n)}
Basic Operations
Scaling:
α {x(n)} ={α x(n)}
Basic Operations
Shifting:
y(n) = { x(n - k) }y(m + k) = { x(m) }
Basic Operations
Folding:
y(n) = {x(-n)}
Basic Operations
Sample Summation:
x(n1)+…+x(n2) = sum(x(n1:n2))
Basic Operations
Sample products
x(n1) × … × x(n2) = prod(x(n1:n2))
Basic Operations
Signal energy:
|x(n1)|2 + … + |x(n2)|2 = sum(abs(x).^2)
Basic Operations
Signal power:
Average power of a periodic signal with fundamental period N1/N (|x(1)|2 +…+|x(N)|2)
Basic Operations
Unit sample synthesis:
Useful Results
Even and odd synthesis Even signal: xe (-n) = xe (n) Odd signal: xo (-n) = - xo(n) x(n) = xe(n) + xo (n),
xe(n) = ½ (x(n) + x(-n))xo(n) = ½ (x(n) - x(-n))
Useful Results
The geometric series
1 + α + α2 + … + α∞ = 1/(1-α) for |α| < 1
1 + α + α2 + … + αN-1 = (1-αN)/(1-α)for any α
Useful Results
Correlation of sequences:
rx,y(m) = sum_n (x(n) y(n-m))
Useful Results
x(n) = 2δ(n+2) – δ(n-4), -5≤n≤5
x(n)=n[u(n)-u(n-10)]+10e-0.3(n-10)
[u(n-10)-u(n-20)], 0≤n≤20x(n)=cos(0.04πn)+0.2w(n), 0≤n≤50, where w(n) is a Gaussian random sequence with zero mean and unit variance
x(n)={…,5,4,3,2,1,5,4,3,2,1,5,4,3,2,1,…}; -10≤n≤9Example 1
Let x(n) = {1,2,3,4,5,6,7,6,5,4,3,2,1}. Determine and plot the following sequences.
x1(n)=2x(n-5)-3x(n+4) x2(n)=x(3-n)+x(n)x(n-2)
Example 2
Generate the complex-valued signal x(n)=e(-0.1+j0.3)n, -10≤n≤10And plot its magnitude, phase, the real part and the imaginary part in four separate subplots.
Example 3
Let x(n)=u(n)-u(n-10). Decompose x(n) into even and odd components.
Example 4
y(n) = T[x(n)]
Discrete Systems
A discrete system L[] is linear, if and only if it satisfies the principle of superposition.
L[a1x1(n)+a2x2(n)]=a1L[x1(n)] + a2L[x2(n)]
Linear Discrete Systems
If y(n) = L[x(n)] then L[x(n-k)]=y(n-k)
Linear time-invariant (LTI) system
Impulse Response
Convolution
{ x(n); nxb ≤ n ≤ nxe } and { h(n); nhb ≤ n ≤ nhe }
nyb = nxb + nhb nye = nxe + nhe
Convolution: Matlab Implementation
Correlation is convolution after folding.
x(n)=[3, 11, 7, 0, -1, 4, 2] y(n)=x(n-2)+w(n), where w(n) is a sequence of random noise
Compute the cross-correlation between y(n) and x(n)
Example 5