Question #183050

Design a FIR Hilbert transformer. Arbitrarily choose the window function and number of samples. Plot the magnitude response.

Expert's answer

Matlab commands for window functions:

hamming(M), hanning(M), blackman(M), kaiser(M, beta)

clc;close all;clear all;

%Hilbert transformer

M=24

n=0:1:M-1

alpha=(M/2)-1

w1=0:pi/1000:pi

Hd1=-j*exp(-j*alpha*w1)

w2=-pi:pi/1000:0

Hd2=j*exp(-j*alpha*w2)

%impulse response

k=0

for n=0:1:M-1

k=k+1

hd(k)=(trapz(w1,Hd1.*exp(j*w1*n)))+(trapz(w2,Hd2.*exp(j*w1*n)))

endfor

n=0:1:M-1

%kaiser window

beta =0.25

wk=kaiser(M,beta)

h=hd.*wk'

subplot(211)

stem(n,h,'r')

xlabel('n')

ylabel('hd(n)')

title('Impulse response using kaiser window for M=24')

grid on;

subplot(212)

w=0:pi/1000:pi

H=freqz(h,1,w)

plot(w/pi,abs(H),'m')

xlabel('w/pi')

ylabel('|Hd(w)|')

title('Amplitude response of Hilbert transformer')

grid on;

Learn more about our help with Assignments: Electrical Engineering

## Comments

## Leave a comment