Professional Documents
Culture Documents
Topic 6 - Implementasi Sistem Waktu Diskret - TPID - 2022-Unlocked
Topic 6 - Implementasi Sistem Waktu Diskret - TPID - 2022-Unlocked
(TE 3325)
© 2022-Teknik Elektro
Topic 6:
Implementation of Discrete-Time
Systems (2)
@2022-Lecture slides prepared by Lasmadi
Deskripsi Topik
• In practice, system design and implementation are usually treated
jointly rather than separately. Often, the system design is driven by the
method of implementation and by implementation constraints, such as
cost, hardware Iimitations, size limitations, and power requirements. At
this point, we have not as yet developed the necessary analysis and
design tools to treat such complex issues. However, we have developed
sufficient background to consider some basic implementation methods
for realizations of LTI systems described by linear constant-coefficient
difference equations.
Capaian Pembelajaran
• Mampu memahami konsep struktur untuk realisasi sistem
LTI (Linear Time-Invariant Systems)
• Mampu memahami konsep realisasi recursive dan
nonrecursive dari FIR Systems.
Contents
• Structures for the Realization of Linear Time-Invariant
Systems
• Recursive and Nonrecursive Realizations of FIR Systems
Pers. Difference Sistem IIR
• Pers. difference (beda) filter IIR:
=− − + ( − ) atau ( )= ( − )− ( − ) (6.1)
( ) ∑ + +. . . +
( )= = =
( ) ∑ + +. . . +
• Dengan bn dan an adalah koefisien filter, dan a0=1. Orde filter IIR sama dg N jika aN
≠ 0.
Pers. Difference Sistem IIR Direct form I structure
( )= ( )+ ( − )+ ( − )+ ( − )+ ( − )
− ( − )− ( − )− ( − )− ( − )
2+2 − −
=
1 − 0.8 + 0.6 − 0.75 + 0.6 + 0.45
2− +2 −
=
1 − 1.55 + 1.26 + 0.45
• Direct form I structure
• …
( )= ( )+ ( − )+. . . + ( − − )
• Bila orde filter = M, maka panjang filter adalah M+1 atau L (= jml koefisien yg ada).
( )= + +. . . + =
_0 ≤ ≤ −1
ℎ[ ] =
0 _
Persamaan Difference Sistem FIR
• Misalkan filter FIR orde 4, mk pers. difference nya mjd:
( )= ( )+ ( − 1) + ( − 2) + ( − 3) + ( − 4)
+ + + +
Example 2
• Filter FIR dinyatakan dengan pers. Difference sbb.
| |
1
( )= ( − )
2
• Misal, ini akan diimplementasikan ke suatu FIR filter dengan koefisien {bk} = {3, -1,
2, 1}, (maka kita memiliki suatu sequen 4 dengan M=3).
• Hal ini dapat diekspansi ke dalam bentuk pers. difference 4-titik menjadi:
• M disebut orde filter dan L disebut koefisien filter atau panjang filter, L=M+1.
Implementasi Persamaan Diff. Sistem FIR
• Bila kita tetapkan bahwa {bk} = {1,1,1}. Untuk y[n], bisa kita tuliskan sebagai
• Sekarang, kita coba untuk mendapatkan jika y[n] sebagai yn[n] secara umum:
Implementasi Persamaan Diff. Sistem FIR
• Bentuk sekuen {bk} “menjadi suatu sekuen h[k]” maka akan didapatkan sebagai:
• Hence the impulse response of the first-order recursive system described by,
The Impulse Response of a LTI Recursive System
• In the general case of an arbitrary, linear time-invariant recursive system, the zero-
state response expressed in terms of the convolution summation is
• In the case where the excitation is an impulse, the particular solution is zero, since
x(n) = 0 for n > 0, that is,
Transformasi–Z
• Konsep pemikiran
“domains of representation”:
Domain-n (discrete time):
Sequence, impulse response, pers.difference (pers.beda).
Domain-w
Freq. Response, spectral representation.
Domain-z
Operator dan pole-zero.
• Apabila suatu kasus sulit dipecahkan pada suatu domain tertentu,
maka transformasi ke domain yang lain akan dimungkinkan dapat
menyelesaikannya.
Transformasi–Z
• Proses pengolahan audio secara digital:
- analisis langsung sulit:
transformasi z untuk mendapat analitis mudah
dengan operasi aljabar (domain-z).
- analisis frekuensinya
dalam domain-w.
- implementasinya:
dalam domain-n.
Transformasi Z
• Persamaan untuk transformasi Z mirip dengan persamaan transf. Fourier,
yaitu:
(1)
(2)
Transformasi Z
• Sebagai contoh, karakteristik transf. Z dapat digunakan untuk proses tunda satu
satuan seperti diperlihatkan pada Gambar 1.
Gambar 1.
• Pada proses yang digambarkan tsb maka output sistem adalah sama dengan
inputnya namun tertunda satu sampel. Atau proses tunda satu satuan yang
menggeser data sebanyak satu data (sampel).
• Pangkat n yang lain dapat digunakan untuk tundaan yang lebih besar.
Transfer Function
• Transfer Function (fungsi tranfer) didefinisikan sebagai,
• Untuk proses yang digambarkan pada Gambar 1, fungsi transfernya adalah H(z) = z-1.
• Namun sebagian besar fungsi transfer mempunyai bentuk yang lebih kompleks,
melibatkan polinomial dalam z pada pembilang dan penyebutnya. Contoh persamaan
berikut.
• Orde penyebut yaitu D dapat kurang/sama/lebih besar daripada orde pembilang yaitu
N. Sistem dengan orde penyebut = 1 akan lebih stabil daripada orde yang lebih tinggi.
Example: x[n] to H[z]
• Temukan bentuk pers. ini dalam domain z:
• Penyel.:
• Ditabelkan;
• Penyel.:
• Dengan cara yang sama akan kita dapatkan bentuk sbb:
Maka:
System Function
Filter
Sehingga:
Example: y[n] – H[z] - Zero
• Suatu filter FIR dinyatakan sebagai:
• Penyel.:
Dengan cara yang sama kita dapatkan bentuk domain-z sebagai:
Example: H[z] – h[n]
• Dapatkan bentuk respon impulse suatu filter FIR dengan fungsi sistem yang
direpresentasikan dalam domain–z sebagai berikut.
• Penyel.:
( )= ( − )− ( − )
Matlab Implementation
• A function called filter is available to solve difference equations numerically, given the input and the
difference equation coefficients. In its simplest form this function is invoked by
y = filter(b,a,x)
where
b = [b0, b1, ..., bM]; a = [a0, a1, ..., aN];
are the coefficient arrays from the difference equation given in (6.1), and x is the input sequence array.
The output y has the same length as input x. One must ensure that the coefficient a0 not be zero.
• To compute and plot impulse response, MATLAB provides the function impz. When invoked by
h = impz(b,a,n);
it computes samples of the impulse response of the filter at the sample indices given in n with
numerator coefficients in b and denominator coefficients in a. When no output arguments are given,
the impz function plots the response in the current figure window using the stem function.
Matlab Implementation
• EXAMPLE 2.11 Given the following difference equation
• Solution: From the given difference equation the coefficient arrays are
b = [1]; a=[1, -1, 0.9];
• …
Matlab Implementation
• a. MATLAB script:
FIGURE 2.9 Impulse response and step response plots in Example 2.11
Matlab Implementation
• c. To determine the stability of the system, we have to determine h(n) for all n. Although we
have not described a method to solve the difference equation, we can use the plot of the
impulse response to observe that h(n) is practically zero for n > 120. Hence the sum |h(n)|
can be determined from MATLAB using
>> sum(abs(h))
ans = 14.8785
• which implies that the system is stable. An alternate approach is to use the stability condition
(2.23) using MATLAB’s roots function. |zk| < 1, k = 1,...,N (2.23)
• Since the magnitudes of both roots are less than one, the system is stable. □
Matlab Implementation
• EX.: 2.12 Let us consider the convolution given in example. The input sequence is of finite
duration
x(n) = u(n) − u(n − 10)
while the impulse response is of infinite duration
h(n) = (0.9)n u(n)
• Determine y(n) = x(n) ∗ h(n).
• Sol. :
If the LTI system, given by the impulse response h(n), can be described by a difference
equation, then y(n) can be obtained from the filter function. From the h(n) expression
(0.9) h(n − 1) = (0.9) (0.9)n−1 u(n − 1) = (0.9)n u(n − 1)
or h(n) − (0.9) h(n − 1) = (0.9)n u(n) − (0.9)n u(n − 1)
= (0.9)n [u(n) − u(n − 1)] = (0.9)n δ(n)
= δ(n)
Matlab Implementation
• The last step follows from the fact that δ(n) is nonzero only at n = 0. By definition h(n) is the
output of an LTI system when the input is δ(n). Hence substituting x(n) for δ(n) and y(n) for
h(n), the difference equation is
y(n) − 0.9y(n − 1) = x(n)
• Now MATLAB’s filter function can be used to compute the convolution indirectly.