# need to visualise this comb filter

조회 수: 5 (최근 30일)
Tom 2012년 5월 20일
I need to visualise this schroeder comb filter - y_n=x_(n-tau)+g*y(n-tau). I have that the z-transfer function is H(z)=1/(z^tau - g).
I don't really know how to do this - any help would be greatly appreciated.
Many thanks
##### 댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
Matt Fig 2012년 11월 2일
Tom's question
I need to visualise this schroeder comb filter - y_n=x_(n-tau)+g*y(n-tau). I have that the z-transfer function is H(z)=1/(z^tau - g).
I don't really know how to do this - any help would be greatly appreciated.
Many thanks

댓글을 달려면 로그인하십시오.

### 채택된 답변

Wayne King 2012년 5월 20일
You can visualize it in pole-zero form, or the phase, magnitude etc, which evaluates it on the unit circle.
However, you should rewrite it in the form:
H(z) = z^{-\tau}/1-gz^{-\tau}
I'll assume tau = 3 here and g = 1/2. The actual value of g will determine whether the filter is stable and therefore whether it has a Fourier transform. The first element of the numerator, B, and denominator, A, coefficient vectors is the 0-th order term in the Z-transform.
g = 1/2;
B = [0 0 0 1];
A = [1 0 0 -g];
%pole-zero plot
zplane(B,A)
% magnitude and phase response
freqz(B,A)

댓글을 달려면 로그인하십시오.

### 추가 답변 (1개)

Wayne King 2012년 5월 20일
You have to know tau. In your example, tau is 1, just as long as that is correct. Also, the sign on g is incorrect and you don't need to feed freqz a frequency vector. Finally, h is complex-valued, so you want to plot the magnitude or phase.
fs = 11025;
g = 0.8;
b = [0 1];
a = [1 -g];
[h,f] = freqz(b,a,fs);
plot(f,abs(h)); grid on;
xlabel('Hz');
The b values are the coefficients on the x-side of the difference equation. The a's are the coefficients on the y-side
y(n)-g y(n-1) = x(n-tau)
1 and -g are the only nonzero a coefficients, 1 is the only nonzero b coefficient. To use freqz(), you want the power of z to be negative.

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 z-transforms에 대해 자세히 알아보기

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by