02-Isyarat Dan Sistem Diskret: Dr. Risanuri Hidayat

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 79

02-Isyarat dan Sistem Diskret

1 Dr. Risanuri Hidayat


2 Isyarat
3
Definisi Dasar

Isyarat dapat dikelompokkan menjadi empat kategori


dilihat dari variabel waktu dan variabel nilai :

•isyarat waktu kontinyu,


•isyarat waktu diskret,
•isyarat dengan nilai kontinyu,
•isyarat dengan nilai diskret
4 Isyarat Waktu kontinyu
:

Waktu : selalu ada nilai setiap waktu, t  R


f (t )
5
: Isyarat Waktu Diskret

Time: hanya ada nilai untuk waktu2 tertentu yang


periodis, t  nT
Descriptions: berupa rentetan nilai seperti vektor,
f (nT )  f (n)
Note B.: merupakan pencuplikan terhadap isyarat
analog,
• sampling rate: jumlah cuplikan per detik,
• sampling frequency (Hz): .
f S  1/ T
6 Isyarat Waktu Diskret
7 Isyarat Nilai kontinyu
:

Nilai isyarat: selalu ada nilai di dalam range

f (t )
8 Isyarat Nilai Diskret
:

Nilai isyarat: ada nilai sesuai kuantisasi data di dalam


range
Discrete-Time Signal Representations

A. Functional representation:
 1 for n  1,3  0 for n  0
 
x(n)   6 for n  0,7 y (n)   0,6 for n  0,1, ,102
n

0 elsewhere  1 n  102
 

B. Graphical x ( n)
representation

n
9
Discrete-time signal

 In Matlab, a finite-duration sequence representation


requires two vectors, and each for x and n.
 Example:
x(n)  {2,1,1,0,1,4,3,7}

n  [3,2,1,0,1,2,3,4];
x  [2,1,1,0,1,4,3,7];
 Question: whether or not an arbitrary infinite-duration sequence
can be represented in MATLAB?
11 Discrete-Time Signal Representations

C. Tabular representation:

n … -2 -1 0 1 2
x(n) … 0.12 2.01 1.78 5.23 0.12

D. Sequence representation:

x(n)    0.12 2.01 1.78 5.23 0.12 


12 Elementary Discrete-Time Signals
A. Unit sample sequence (unit sample, unit impulse,
unit impulse signal)

1, n  0
 ( n)  
0, n  0

  ,0,0, 1,0,0, 


 ( n)

n
Function [x,n]=impseq(n0,n1,n2)

 A: n=[n1:n2];
 x = zeros(1,n2-n1+1); x(n0-n1+1)=1;

 B: n=[n1:n2]; x = [(n-n0)==0]; stem(n,x,’ro’);


1

0.8

0.6
 (n-n0)

-3<n<3

0.4 n0=0

0.2

0
-3 -2 -1 0 1 2 3
n
14 Elementary Discrete-Time Signals

B. Unit step signal (unit step, Heaviside step sequence)


1 for n  0
u ( n)  
0 for n  0

u ( n)

n
Unit step sequence

1, n  0
u ( n)  
0, n  0

 ,0,0, 1,1,1, 


1, n  n0
u (n  n0 )   , n1  n  n2 , n1  n0  n2
0, n  n0
A: n=[n1:n2]; x=zeros(1,n2-n2+1); x(n0-n1+1:end)=1;
B: n=[n1:n2]; x=[(n-n0)>=0];
3. Real-valued exponential sequence

x(n)  a n , n; a  R
For Example: x(n)  (0.9) n , 0  n  10
n=[0:10]; x=(0.9).^n; stem(n,x,’ro’)

0.8

0.6

0.4

0.2

0
0 1 2 3 4 5 6 7 8 9 10
17 Elementary Discrete-Time Signals
C. Complex-valued exponential signal
(complex sinusoidal sequence, complex phasor)

2 f .n
x ( n)  e j nT
, x(n)  1, arg  x(n)   nT  2 f .nT 
fS
where

  R, n  N , j  1 is imaginary unit
and

T is sampling period and f frequency.


is sampling
S
For Example: n=[0:10]; x=exp((2+3j)*n);
22 Discrete-Time Systems
 A discrete-time system is a device or algorithm that
operates on a discrete-time signal called the input or
excitation (e.g. x(n)), according to some rule (e.g. H[.])
to produce another discrete-time signal called the output
or response (e.g. y(n)).

y ( n)  H  x ( n) 

This expression denotes also the transformation H[.]


(also called operator or mapping) or processing
performed by the system on x(n) to produce y(n).
23 Discrete-Time Systems
Input-Output Model of Discrete-Time System
(input-output relationship description)

x ( n) discrete-time y ( n)
system
input signal H  . output signal
excitation response
y ( n)  H  x ( n) 

x(n) 
H
 y ( n)
24 Classification.
Static vs. Dynamic Systems
A discrete-time system is called static or memoryless if its output at any time instant n
depends on the input sample at the same time, but not on the past or future samples of
the input. In the other case, the system is said to be dynamic or to have memory.
If the output of a system at time n is completly determined by the input samples in the
interval from n-N to n ( ), the system is said to have memory of duration N.
If , the system is static or memoryless.
If , the system is said to have finite memory. N 0
If , the system is said to have infinite memory.

N 0
0 N 
N 
Examples:
25 The static (memoryless) systems:
 
y (n)  nx(n)  bx 3 (n)
The dynamic systems with finite memory:
 
 
  N
y (ndynamic
The 
)  system
h(k )with
k 0
 k )memory:
x(ninfinite
 


y ( n)   h( k ) x ( n  k )
k 0
.
Time-Invariant vs. Time-Variable
26
.
A discrete-time system is called time-invariant if its input-output
characteristics do not change with time. In the other case, the
system is called time-variable.
Definition. A relaxed system H [.] is time- or shift-invariant if
only if
 y ( n)  H  x (n)  x(n)   y ( n)
H

implies that
 y ( n  k )  H  x (n  k )  x(n  k )   y (n  k )
H

for every input signal x( n) and every time shift k .


Examples:
27 The time-invariant systems:
 
  y ( n)  x(n)  bx 3 (n)
N
y ( n)   h( k ) x ( n  k )
The time-variable systems:
k 0
 

y (n)  nx(n)  bx 3 ( n  1)
N
y ( n)   h N  n ( k ) x ( n  k )
k 0
Linear vs. Non-linear Systems
28 A discrete-time system is called linear if only if it satisfies the linear superposition
principle. In the other case, the system is called non-linear.
 Definition. A relaxed system is linear if only if
 
H [.]
for any arbitrary input sequences and , and any arbitrary constants and .

H a(scaling)
The multiplicative 1 x1 ( n ) property 
 a2 x2of(na )linear
 asystem: 
1H x1 ( n )   a 2 H  x2 ( n ) 
 
The additivity property of a linear system:
x1 (n) x2 (n)
a1 a2

H  a1 x1 (n)   a1H  x1 (n) 

H  x1 (n)  x2 (n)   H  x1 (n)   H  x2 (n) 


Examples:
29 The linear systems:

 
N
 y (n)   h(k ) x(n  k ) y (n)  x(n 2 )  bx(n  k )
k 0

The non-linear systems:

 
  N
y (n)  nx(n)  bx 3 (n  1) y (n)   h(k ) x(n  k ) x(n  k  1)
k 0
30 Causal vs. Non-causal
Definition. A system is said to be causal if the output of the system at any time n (i.e.,
y(n)) depends only on present and past inputs (i.e., x(n), x(n-1), x(n-2), … ). In
mathematical terms, the output of a causal system satisfies an equation of the form

 
where
 
is some arbitrary function. If a system does not satisfy this definition, it is
)  F x(n), x(n  1), x(n  2), 
y (nnon-causal.
called

F [.]
Examples:
31 The causal system:
 
  N
y ( n)   h( k ) x ( n  k ) y (n)  x (n)  bx(n  k )
2

k 0 system:
The non-causal
 

 
10
y (n)  nx(n  1)  bx 3 (n  1) y (n)   h( k ) x ( n  k )
k 10
32 Stable vs. Unstable
An arbitrary relaxed system is said to be bounded input - bounded output (BIBO) stable if
and only if every bounded input produces the bounded output. It means, that there exist
some finite numbers say and , such that
 
 
Mx My
for all n. If for some bounded input sequence x(n) , the output y(n) is unbounded (infinite),
n)  isMclassified
x(system
the x  as y ( n)  M y  
unstable.
Examples: 
33 The stable systems:

  N
 y ( n)   h( k ) x ( n  k ) y ( n)  x ( n 2 )  3 x ( n  k )
k system:
The unstable 0

 
 
y (n)  3n x 3 (n  1)
Recursive vs. Non-recursive
34
A system whose output y(n) at time n depends on any number of the past outputs values
( e.g. y(n-1), y(n-2), … ), is called a recursive system. Then, the output of a causal recursive
system can be expressed in general as
 

ywhere  y(nissome
(n)  FF[.] 1), y (arbitrary
present and past inputs
n  2),  ,function.
y(n  N ),Inxcontrast,
(n), x(n if1),y(n)  M n)  depends only on the
 , xat(ntime

then such a system is called nonrecursive.

y (n)  F  x(n), x(n  1),  , x (n  M ) 


35 Examples: 
The nonrecursive system:
 
  N
y ( n)   h( k ) x ( n  k )
k 0system:
The recursive

N N
y ( n)   b( k ) x ( n  k )   a ( k ) y ( n  k )
k 0 k 1
Systems (LTI Systems)
36
Time-Domain Representation
Impulse Response
Step Response

 n
g ( n)   h(k )u (n  k )   h(k )
k  k 
Step Response
40 Impulse Response and Convolution

x[n] LTI system y[n]


input h[n] output

Keluaran sistem merupakan hasil dari proses konvolusi antara isyarat input x[n]
dengan watak sistem yang dinyatakan dengan impulse response h[n]

 
y ( n)   h( k ) x ( n  k )   x ( k ) h( n  k )  h ( n ) * x ( n )  x ( n ) * h ( n )
k  k 
41 Classification of LTI Systems.
Causal LTI Systems
A relaxed LTI system is causal if and only if its impulse response is
zero for negative values of n , i.e.
 
h(n)  0 for n  0
 
Then, the two equivalent forms of the convolution formula can be
obtained for the causal LTI system:
 n
y ( n)   h( k ) x ( n  k )   x (k )h(n  k )
k 0 k 
42 Stable LTI Systems

 A LTI system is stable if its impulse response is absolutely


summable, i.e.
  

 h( k )
2

  k 
43 Finite Impulse Response (FIR) & Infinite
 
Impulse Response (IIR)
N
Causal FIR LTI systems: y ( n)   h( k ) x ( n  k )
k 0

IIR LTI systems: y ( n)   h( k ) x ( n  k )
k 0
 
Digital filter

 Discrete-time LTI systems are also called digital filter.


 Classification
 FIR filter & IIR filter
 FIR filter
 Finite-duration impulse response filter
 Causal FIR filter
M
y ( n)   bm x(n  m)
m0
 h(0)=b0,…,h(M)=bM
 Nonrecursive or moving average (MA) filter
 Difference equation coefficients, {bm} and {a0=1}
 Implementation in Matlab: Conv(x,h); filter(b,1,x)
IIR filter

 Infinite-duration impulse response filter


N
 Difference equation å ak y(n - k) =x(n)
k=0

 Recursive filter, in which the output y(n) is recursively


computed from its previously computed values
 Autoregressive (AR) filter
ARMA filter

 Generalized IIR filter

M N
y ( n)   bm x(n  m)   a k y(n  k ), n  0
m 0 k 1
 It has two parts: MA part and AR part
 Autoregressive moving average filter, ARMA
 Solution
 filter(b,a,x); %{bm}, {ak}
47  
Recursive and Nonrecursive
N
Causal nonrecursive LTI:
y ( n)   h( k ) x ( n  k )
k 0
Causal recursive LTI:
 

N M

 
LTI systems:
y ( n )  b ( k ) x ( n 
characterized by constant-coefficient difference equations
k )  a ( k ) y ( n  k )
k 0 k 1
Difference Equation

 An LTI discrete system can also be described by a linear constant


coefficient difference equation of the form
N M
 ak y(n  k )   bm x(n  m), n
k 0 m 0

 If aN ~= 0, then the difference equation is of order N


 It describes a recursive approach for computing the current
output,given the input values and previously computed output
values. M N
y (n)   bm x(n  m)   a k y (n  k )
m 0 k 1
Konvolusi
Konvolusi

 Persamaan :

x(t ) * h(t )   x( )h(t   )d

• Sifat-sifat :
1. Commutative
x(t ) * h(t )  h(t ) * x(t )
2. Associative
x(t ) *  y (t ) * z (t )    x(t ) * y (t )  z (t )
3. Distributive
x(t ) *  y (t )  z (t )    x(t ) * y (t )    x(t ) * z (t ) 
Konvolusi
 Contoh isyarat

X(t)
1
1-0.5t
 
-1 2

X(-t)
1
1-0.5t
 
-2 1
X(p-t)
1

 
p-2 p+1
Konvolusi
 Sistem LTI dengan tanggapan impuls h(t)

x(t) h(t) y(t)

• Keluaran sistem y(t) mempunyai fungsi

y (t )  x(t ) * h(t )  h(t ) * x(t )



y (t )   x( )h(t   )d


y (t )   h( ) x(t   )d

Konvolusi
 Contoh
x(t) h(t) y(t)= ?

x(t) h(t)
1 1

1.5 2.5 t 0 1 t
x(-t)
1

-2.5 -1.5 t
x(p-t)
1

p-2.5 p-1.5 t
Konvolusi
 y(t) dicari dengan persamaan

y ( p )   h(t ) x( p  t )dt


1. Untuk p-1.5<0 atau p<1.5

x(p-t) h(t)
1

p-2.5 p-1.5 t

y( p)  0
Konvolusi

2. Untuk p-1.5>0 dan p-2.5<0, atau 1.5<p<2.5


x(p-t) 1 h(t)

p-2.5 p-1.5 t


y ( p )   h(t ) x( p  t )dt , y ( p )  0 untuk 0  t  p  1.5

p 1.5

y ( p)   h(t ) x( p  t )dt
0
p 1.5

y ( p)   1.1dt
0

y ( p)   t 
p 1.5
0  p  1. 5
Konvolusi

3. Untuk p-1.5>1 dan p-2.5<1, atau 2.5<p<3.5


h(t) x(p-t)
1

p-2.5 p-1.5 t


y ( p )   h(t ) x( p  t )dt , y ( p )  0 untuk p  2.5  t  1

1
y ( p)   h(t ) x( p  t )dt
p  2. 5
1
y ( p)   1.1dt
p  2. 5

y ( p )   t  p  2.5  1  ( p  2.5)  3.5  p


1
Konvolusi
4. Untuk p-2.5>1, p>3.5
h(t) x(p-t)
1

p-2.5 p-1.5t

y ( p)  0
Konvolusi
 y(t) menjadi

x(t) h(t) y(t)= ?

y(p)
1
p-1.5 3.5-p

1.5 2.5 p
x(t) h(t) y(t)

1 1 1
t-1.5 3.5-t

1.5 2.5 t 0 1 t 1.5 2.5 3.5 t


Korelasi
Korelasi

 Korelasi antara x(t) dan y(t) dinamakan dengan cross-correlation, dirumuskan dengan


C xy (t )  x(t )  y (t )   x( ) y(t   )d


atau

C xy (t )  x(t )  y (t )   x(  t ) y( )d

Auto-korelasi

 Korelasi x(t) dengan dirinya sendiri disebut auto-korelasi


C xx (t )  x(t )  x(t )   x( ) x(t   )d

Korelasi

 Contoh
x(t) h(t)
1 1

1.5 2.5 t 0 1 t

C xh ( p )   x(t  p)h(t )dt

Korelasi
x(t) h(t)
1 1

1.5+p 2.5+p t 0 1 t

1. Untuk 1.5+p>1 atau p>-0.5

C xh ( p)  0
Korelasi
h(t) x(t-p)
1

1.5+p 2.5+p t

2. Untuk 1.5+p<1 dan 1.5+p>0, atau -1.5<p<-0.5



C xh ( p )   x(t  p)h(t )dt

1

 1.1dt   t 
1
C xh ( p )  1 .5  p
1.5  p

C xh ( p )  1  1.5  p  0.5  p
Korelasi

x(t-p) 1 h(t)

1.5+p 2.5+p t

3. Untuk 1.5+p<0 dan 2.5+p>1, atau -1.5<p<1.5



C xh ( p )   x(t  p)h(t )dt

2.5 p

 1.1dt   t 
2.5  p
C xh ( p )  0
0

C xh ( p )  2.5  p
Korelasi
x(t-p) h(t)
1

2.5+p t
1.5+p

4. Untuk 2.5+p<0 atau p<-2.5


C xh ( p)  0

y(p)
1
p+2.5 -p-0.5

-2.5 -0.5 p
Korelasi
x(t) h(t)
1 1

1.5 2.5 t p 1+p t


Chx ( p )   h(t  p ) x(t )dt


1. Untuk 1+p<1.5 atau p<0.5

Chx ( p )  0
Korelasi

h(t-p) x(t)
1

p 1+p t

2. Untuk 1+p>1.5 dan


 1+p<2.5, atau 0.5<p<1.5
Chx ( p )   h(t  p ) x(t )dt

1 p

Chx ( p )   1.1dt   t 1.5


1 p

1.5

Chx ( p )  1  p  1.5  p  0.5


Korelasi

x(t) h(t-p)
1

p 1+p t

3. Untuk p<2.5 dan 1+p>2.5, atau 1.5<p<2.5



Chx ( p )   h(t  p ) x(t )dt

2.5
Chx ( p )   1.1dt   t 
2.5
p
p

Chx ( p )  2.5  p
Korelasi
x(t) h(t-p)
1

p 1+p t

4. Untuk p>2.5

C xh ( p)  0

y(p)
1
p-0.5 -p+2.5

0.5 2.5 p
Autokorelasi

h(t) h(t-p)
1

p 1+p t

1. Untuk 0<p<1, maka


Chh ( p )   h(t  p )h(t )dt

1
Chh ( p )   1.1dt   t 
1
p
p

Chh ( p )  1  p
Autokorelasi

h(t-p) 1 h(t)

p 1+p t

2. Untuk 0>p>-1, karena p negatif, maka geser kiri



Chh ( p )   h(t  p )h(t )dt

1 p

Chh ( p )   1.1dt   t 
1 p
0
0

Chh ( p )  1  p
Autokorelasi

3. Untuk p>1 dan p<-1,

Chh ( p )  0
y(p)
1
1+p 1-p

-1 +1 p
Korelasi

C xx (t )  C xx (t )
C xx (t )   x( ) x(t   )d x(t )  x(t )
 C xx (0)  C xx (t )
 x(t )  y (t )  y (t )  x(t )
C xy (t )   x(  t ) y( )d

x(t )  y (t )
x(t )   y (t )  z (t )  

x(t )  y (t )  x(t )  z (t )
C yx (t )   y(  t ) x( )d

y (t )  x(t )
x(t )   y (t )  z (t )  
 x(t )  y (t )   z (t )
C xy (t )  C yx (t )
g(x) f(x)
1 1

a 1+a x 1.5 2.5 x


g(x-a) f(x)
1

a 1+a x

f(x) g(x-a)
1

a 1+a x

f(x) g(x-a)
1

a 1+a x
y(a)
1
a-0.5 -a+2.5
Live show
Program C

 Hasil
Source Code
PR
#include<stdio.h>
float masukan(???)  Buat
Buat program
program didi
float konvo( ???)
int main() { atas
atas menjadi
menjadi
??????; struktur
struktur di
di samping
samping
printf("Masukkan nilai x(n):");
??? masukan(???);
 Berikan
Berikan komentar
komentar
printf("Masukkan nilai h(n):"); untuk
untuk setiap
setiap baris
baris
f??? konvo(???);
printf("Hasilnya \n");  Beri
Beri nama
nama sdr
sdr di
di
??????;
dalam
dalam program
program
return 0;
}

You might also like