nicolejess
Newbie level 1
digital resonator matlab
Hi,
I am dealing with a digital resonator filter in Matlab.
The transfer function is K (z^2 / (z-p1)(z-p1*) ) where K is the gain.
It is simplified to K / (1 - 2 r cos 2pi f0 z^-1 + r^2 z^-2)
Given that samplig rate = 128kHz, resonant peak at f0 = 48kHz and 3dB bandwidth is 4kHz with unity gain at its resonant peak. I was asked to plot the magnitude and phase of the freq respone of this filter. This is the part that I need help.
I have found out that the filter coefficients are, K is 0.1322 and 2 r cos 2pi f0 = -1.2754 and -r^2 = -0.8133
What command should I use to plot the freq response ?
I have tried to look at freqz in Matlab but it says [h,w] = freqz(b,a,p)
where b, and a are the coefficients vector and p is the no. of points.
This confuses me because i don have any vector values for my coefficients. This filter is a digital resonator with 2 pole bandpass filter with a pair of complex poles near unit circle and resonates at f0.
I am basically just following my textbook to get the transfer function H(z) and the coefficients and gain K. Not so sure how to plot this freq response in Matlab.
Any help would be appreciated.
Thankyou.
Regards,
Nicole
Hi,
I am dealing with a digital resonator filter in Matlab.
The transfer function is K (z^2 / (z-p1)(z-p1*) ) where K is the gain.
It is simplified to K / (1 - 2 r cos 2pi f0 z^-1 + r^2 z^-2)
Given that samplig rate = 128kHz, resonant peak at f0 = 48kHz and 3dB bandwidth is 4kHz with unity gain at its resonant peak. I was asked to plot the magnitude and phase of the freq respone of this filter. This is the part that I need help.
I have found out that the filter coefficients are, K is 0.1322 and 2 r cos 2pi f0 = -1.2754 and -r^2 = -0.8133
What command should I use to plot the freq response ?
I have tried to look at freqz in Matlab but it says [h,w] = freqz(b,a,p)
where b, and a are the coefficients vector and p is the no. of points.
This confuses me because i don have any vector values for my coefficients. This filter is a digital resonator with 2 pole bandpass filter with a pair of complex poles near unit circle and resonates at f0.
I am basically just following my textbook to get the transfer function H(z) and the coefficients and gain K. Not so sure how to plot this freq response in Matlab.
Any help would be appreciated.
Thankyou.
Regards,
Nicole