DSPRelated.com
Forums

Frecuency shift and resample

Started by JAlbertoDJ September 13, 2009
> >cool. how're you doing your Hilbert Transform? a simple FIR? and >you're delaying your in-phase signal by the same amount of delay you >have in your causal HT? > >just curious. > >r b-j >
I do two BandPass FIR Filters of lenght=37, but shift by 90 degrees. Then, delay is the same in both branchs. ifilter() is the vector of coefficients for real part. qfilter() is the vector of coefficients for imaginary part. This is the Visual Basic Code: Call BandPass_FIR(37, 0, 0.05, 0.45) For I = 0 To longitud - 1 ifilter(I) = fir(I) ' In Phase Next I Call BandPass(37, 1, 0.05, 0.45) For I = 0 To longitud - 1 qfilter(I) = fir(I) ' In Quadrature Next I Private Sub BandPass_FIR(longitud As Integer, Hilbert As Integer, f1 As Single, f2 As Single) Dim t As Single Dim h As Single Dim x As Single Dim I As Integer For I = 0 To longitud - 1 t = I - (longitud - 1#) / 2# h = I * (1# / (longitud - 1#)) If (Hilbert = 0) Then x = (2 * f2 * sinc(2 * f2 * t) - 2 * f1 * sinc(2 * f1 * t)) * hamming(h) Else x = (2 * f2 * cosc(2 * f2 * t) - 2 * f1 * cosc(2 * f1 * t)) * hamming(h) x = -x End If fir(I) = x Next I End Sub
BPF filter from 1khz to 1250khz, then mix with an NCO set to 1khz? 

Chris

>I have a audio signal from 1000Hz to 1250Hz with samplerate of 8000Hz. > >But i want translate the signal to the range: 0-250 Hz. > >Then i could resampling to 1000Hz, for example, with a low pass filter >(antialiasing) with Fc=500Hz. > >¿How can i translate frecuency from 1000Hz to 0Hz? > > >
>BPF filter from 1khz to 1250khz, then mix with an NCO set to 1khz? > >Chris > >>I have a audio signal from 1000Hz to 1250Hz with samplerate of 8000Hz. >> >>But i want translate the signal to the range: 0-250 Hz. >> >>Then i could resampling to 1000Hz, for example, with a low pass filter >>(antialiasing) with Fc=500Hz. >> >>¿How can i translate frecuency from 1000Hz to 0Hz? >>
I tell you what i have done (just this afternoon) and run. Instead of doing Hilbert of halfband, i do Hilbert filtering from 1000 to 1250Hz (but now we need more coefficients in the filter): Call bp_FIR(Longitud, 0, 0.12, 0.16) In Phase Call bp_FIR(Longitud, 1, 0.12, 0.16) In Quadrature After, i do decimation by 8 and then frecuency go from 0 to 250Hz with Fs=1000Hz After, i mix with a NCO, but only for little desviations of the carriers (between 1 to 8Hz, typically).