1
$\begingroup$

I am simulating an FM radio signal in order to use it as a waveform in passive radar; for this purpose I'm following an article: Analysis and Emulation of FM Radio Signals for Passive Radar

In a certain step, I need to design an emphasis filter for the rdiophonic signal, the filter has these characteristics:

  • a gain of -5.4 dB ?(is it the gain at half of sampling frequency?)
  • a zero imposed by international standards (can't find the zero)and a pole - to make it physically realizable - at 40 kHz. I know the response function of the Pre-emphasis filter

$$ H(j \omega) = 1 + \frac{j \omega}{\omega_0} $$

or in z domain:

$$H(z) = 1-B \cdot z $$

, can't understand where is the pole? Of course i will use a FIR filter ,but how to find the coefficient $B$.

thanks for all

$\endgroup$
1
$\begingroup$

Traditionally, these filters were implemented as analog filters, and they are different from the usual discrete-time first-order FIR pre-emphasis filter used in speech processing.

The transfer function of such an analog pre-emphasis filter is

$$H(s)=g\frac{1+s\tau_1}{1+s\tau_2},\qquad\tau_1\gt\tau_2,\tag{1}$$

where $g$ is the DC gain, and $\tau_1$ and $\tau_2$ are two time constants determining the locations of the zero and the pole:

$$s_0=-\frac{1}{\tau_1}\\s_{\infty}=-\frac{1}{\tau_2}\tag{2}$$

If the pole (or the zero) are given in terms of frequencies $f_i$, then the following relation holds:

$$\tau_i=\frac{1}{2\pi f_i},\qquad i\in\{1,2\}\tag{3}$$

So for a given frequency $f_i$ you can use $(3)$ to determine the corresponding time constant, from which you obtain the desired transfer function $(1)$.

If you want to implement that filter in discrete time, the most common option is to use the bilinear transform:

$$s=\frac{2}{T}\frac{z-1}{z+1}\tag{4}$$

where $T$ is the sampling period, i.e., the inverse of the sampling frequency. Note that $(2)$ is the bilinear transform without pre-warping, which means that the frequency axis will be warped, so neither the pole frequency nor the zero frequency of the analog filter will be exactly realized in the discrete-time domain. You can pre-warp the analog frequencies (or time constants) to make sure that the resulting discrete-time filter has the desired pole and zero frequencies. In order to realize a (pole or zero) frequency $f_i$ in the discrete-time domain, you need to use the following time constant in the analog filter transfer function $(1)$:

$$\tau_i=\frac{T}{2\tan\left(\frac{\pi f_i}{f_s}\right)}\tag{5}$$

where $f_s=1/T$ is the sampling frequency.

You can find more information on pre-warping in this answer.

$\endgroup$
  • 1
    $\begingroup$ To see an implementation of this, look at the comments and the function I implemented at the end of this file: github.com/gnuradio/gnuradio/blob/master/gr-analog/python/… $\endgroup$ – Andy Walls Dec 27 '17 at 12:56
  • $\begingroup$ Thanks for the answer and the link ! just to say that from the literrature I read, the pre-emphasis filter is designed with a constant time fixed at the value of 50micros or (75microsec) according to the region you are. I will read more deeply your response and try to undestand some new concepts for me ! $\endgroup$ – Linda bendjama Dec 27 '17 at 13:08
  • $\begingroup$ Hello ! the code @Andy Walls is really helpful for implementing in matlab the pre-emphasis filter I'v 2 issues: don't understand the calculation of the gain at dc (line 295), for me I would calculate the final gain as g*bo (g of eq1) ,g equal to -5.4dB (from my specifications). the 2nd issue: since the pole is at 40khz >fs/2 (24khz) should I do a conversion of sampling rate or take it as 0.925*fs/2.just to say that the final FM complex envelop should have a sampling rate of 200 khz according to literarture. I've an audio signal of 48khz sample rate . $\endgroup$ – Linda bendjama Dec 31 '17 at 16:16
  • $\begingroup$ ...after calculation of z1, p1 and bo as in the code , I use the bilinear transformation of matlab to make the coversion to digital, but the result is bad since I obtain an horizontal line for the magnitude trasform at -17dB. sure I'm missing something, thanks in advance ,for your comments $\endgroup$ – Linda bendjama Dec 31 '17 at 16:23
  • $\begingroup$ here is the bilinear transformation of matlab: mathworks.com/help/signal/ref/bilinear.html $\endgroup$ – Linda bendjama Dec 31 '17 at 16:30
1
$\begingroup$

I want to post the code of the pre-emphasis filter, a matlab transtlation od the code shared by Andy Walls. I think it works perfectly,well I think...

%This code is a succint translation to matlab of the code shared by Andy Walls
%pre-emphasis filter with a gain of -5.4dB, a pole at 40khZ and a constant
%time of 50 µs

%---------Specifications---------------------------------------------------

fs=48000;
to=50e-6;
w_cl=1/to;
f_cl=w_cl/(2*pi);
f_ch=40e3;
g_dc=10^(-5.4/20);

if f_ch >= fs/2 % In my case f_ch=40000 hZ
    f_ch=0.925*fs/2;
end 

w_ch=2*pi*f_ch;

%------use of bilinear transformation for disigning digital filter---------

%Convert digitial specifications into the analog domain, by prewarping
% digital frequency specifications into analog frequencies.

w_cla = (2*fs)*tan(w_cl/(2*fs));
w_cha = (2*fs)*tan(w_ch/(2*fs));

%---------------------Calculation Of poles and zeros for digital filter
%------using the bilinear transformation -----------------------------------

% H(z) = H(s)|s = (2/T)(1-z^-1)/(1+z^-1)
kl=-w_cla/(2*fs);
kh=-w_cha/(2*fs);
z1 = (1.0 + kl) / (1.0 - kl);
p1 = (1.0 + kh) / (1.0 - kh);
b0 = (1.0 - kl) / (1.0 - kh);

%Since  this filter  has a Dc gain of -5.4 dB gain 
% i have to correct with a gain g given as follows

g=(abs(1.0-p1)/(bo*abs(1-z1)))*g_dc;
b=[g*bo -g*bo*z1];
a=[1 -p1];
freqz(b,a);

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.