Professional Documents
Culture Documents
02-Isyarat Dan Sistem Diskret: Dr. Risanuri Hidayat
02-Isyarat Dan Sistem Diskret: Dr. Risanuri Hidayat
02-Isyarat Dan Sistem Diskret: Dr. Risanuri Hidayat
f (t )
8 Isyarat Nilai Diskret
:
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
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:
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;
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
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
y ( n) H x ( n)
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
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
N
y (n) h(k ) x(n k ) y (n) x(n 2 ) bx(n k )
k 0
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(nissome
(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
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
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
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
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
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)
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
x(p-t) h(t)
1
p-2.5 p-1.5 t
y( p) 0
Konvolusi
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
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
p-2.5 p-1.5t
y ( p) 0
Konvolusi
y(t) menjadi
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
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
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
C xh ( p) 0
Korelasi
h(t) x(t-p)
1
1.5+p 2.5+p t
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
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
y(p)
1
p+2.5 -p-0.5
-2.5 -0.5 p
Korelasi
x(t) h(t)
1 1
Chx ( p ) h(t p ) x(t )dt
Chx ( p ) 0
Korelasi
h(t-p) x(t)
1
p 1+p t
1.5
x(t) h(t-p)
1
p 1+p t
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
Chh ( p ) 1 p
Autokorelasi
h(t-p) 1 h(t)
p 1+p t
Chh ( p ) 1.1dt t
1 p
0
0
Chh ( p ) 1 p
Autokorelasi
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
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;
}