I was just working on my thesis project, in which I have to make a convolution between two discrete real signals (one is the signal to be transformed, and tho other the Hilbert function), in order to get the Hilbert Transform. The thing is that I have two arrays of real signals, and I have to make the convolution. One array contains the signal (this signal contains real values in each position) I want to transform into Hilbert, and the other contains the Hilbert function, which is defined by defined by: 1/(pi*t)... Pi = 3.14, t = time... Or in my particular case, "n", since it is a discrete signal. So my problem is in generating the discrete Hilbert function: - How long should it be??? (as long as the signal I want to transform??) - If I generate a vector containing the Hilbert function, should I calculate several values with the same length the signal has (if the signal to be transformed has 20 samples, then the Hilbert function has to have 20 samples)??? (ts: sampling time) Supposing a ts = 1, in this case, does the Hilbert function go something like: [1/(pi*0); 1/(pi*1); 1/(pi*2); 1/(pi*3); 1/(pi*4);...... 1/(pi*19)] - If I do what I was just telling you, what happens when n = 0??? should I redefine that value??? what real number should I assign to it??? Thanks in advance
Discrete Real Hilbert function
Started by ●April 16, 2008
Reply by ●April 16, 20082008-04-16
amyanes wrote:> > - How long should it be??? (as long as the signal I want to transform??) > - If I generate a vector containing the Hilbert function, should I > calculate several values with the same length the signal has (if the signal > to be transformed has 20 samples, then the Hilbert function has to have 20 > samples)??? (ts: sampling time) Supposing a ts = 1, in this case, does the > Hilbert function go something like: [1/(pi*0); 1/(pi*1); 1/(pi*2); > 1/(pi*3); 1/(pi*4);...... 1/(pi*19)] > - If I do what I was just telling you, what happens when n = 0??? should I > redefine that value??? what real number should I assign to it??? > > Thanks in advance > >I am not an expert on the Hilbert transform and it's been a while, but I think you are skipping a step in jumping to the discrete case from the continuous case. The only answer to your questions about the order of the kernel is that it depends. It depends on the application and what parameters are important. In the end you may want to avoid convolution completely and use Fourier domain techniques. I would suggest reading up on "discrete Hilbert transform". Even the Wikipedia article on the "Hilbert transform" has some basic information about the discrete version. Cheers, J.Elms
Reply by ●April 16, 20082008-04-16
amyanes wrote:> I was just working on my thesis project, in which I have to make a > convolution between two discrete real signals (one is the signal to be > transformed, and tho other the Hilbert function), in order to get the > Hilbert Transform. > > The thing is that I have two arrays of real signals, and I have to make > the convolution. One array contains the signal (this signal contains real > values in each position) I want to transform into Hilbert, and the other > contains the Hilbert function, which is defined by defined by: 1/(pi*t)... > Pi = 3.14, t = time... Or in my particular case, "n", since it is a > discrete signal. > > So my problem is in generating the discrete Hilbert function: > > - How long should it be??? (as long as the signal I want to transform??) > - If I generate a vector containing the Hilbert function, should I > calculate several values with the same length the signal has (if the signal > to be transformed has 20 samples, then the Hilbert function has to have 20 > samples)??? (ts: sampling time) Supposing a ts = 1, in this case, does the > Hilbert function go something like: [1/(pi*0); 1/(pi*1); 1/(pi*2); > 1/(pi*3); 1/(pi*4);...... 1/(pi*19)] > - If I do what I was just telling you, what happens when n = 0??? should I > redefine that value??? what real number should I assign to it???A Hilbert transformer is a transversal (the usual kind of) FIR. It's all-pass characteristic with 90-degree phase is achieved by anti-symmetry and tap weights that vary inversely with distance from the center, slightly modified by a window function (or by successive approximation) to reduce ripple. Its anti-symmetric impulse response prevents it from having response at DC. A rough idea of the length of the filter you need -- in other words, the length of the impulse response -- is the number of sample times needed to achieve 90-degree phase shift at the lowest frequency to be passed. The quadrature signal is necessarily delayed by half the filter's length less one. If the length is odd, then the delay is an integer number of samples. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●April 16, 20082008-04-16
On Wed, 16 Apr 2008 06:47:29 -0500, "amyanes" <amyanes@gmail.com> wrote: (Snipped by Lyons) Hello amyanes, J. Elms and Jerry Avins gave you good advice. Here's some more advice. Let's assume your original real-valued signal is called "X_real". 1] Perform a DFT on your X_real signal. Notice that that the positive- and negative-frequency spectral components of your signal have equal magnitudes. 2] Pass your orignal real signal through a seven-tap (seven-coefficient) FIR Hilbert transformer, and let's call that output sequence the "X_imag" signal. 3] Create a complex-valued sequence where X_real is the sequence's real part and X_imag is the complex sequence's imaginary part. Call the new sequence "C_cmplx". 4] Perform a DFT on the X_cmplx signal. Notice that that the positive-freq spec magnitude is higher in value than the negative-freq spectral magnitude. 5] Go back and perform Steps 2-4, only this time use an eleven-tap FIR Hilbert transformer in Step 2. Notice that the *difference* between the magnitudes of your positive-freq and negative-freq spec components is greater than before. Using more and more taps in your FIR Hilbert filter will further reduce the level of the negative-freq spec components. Ideally you want your Hilbert transformer to totally eliminate the negative-freq spec components in the X_cmplx sequence. That is, you want an X_cmplx signal that has only positive-frequency spectral energy. Good Luck, [-Rick-]
Reply by ●April 16, 20082008-04-16
On Apr 16, 7:47 am, "amyanes" <amya...@gmail.com> wrote:> I was just working on my thesis project, in which I have to make a > convolution between two discrete real signals (one is the signal to be > transformed, and tho other the Hilbert function), in order to get the > Hilbert Transform. > > The thing is that I have two arrays of real signals, and I have to make > the convolution. One array contains the signal (this signal contains real > values in each position) I want to transform into Hilbert, and the other > contains the Hilbert function, which is defined by defined by: 1/(pi*t)... > Pi = 3.14, t = time... Or in my particular case, "n", since it is a > discrete signal. > > So my problem is in generating the discrete Hilbert function: > > - How long should it be??? (as long as the signal I want to transform??) > - If I generate a vector containing the Hilbert function, should I > calculate several values with the same length the signal has (if the signal > to be transformed has 20 samples, then the Hilbert function has to have 20 > samples)??? (ts: sampling time) Supposing a ts = 1, in this case, does the > Hilbert function go something like: [1/(pi*0); 1/(pi*1); 1/(pi*2); > 1/(pi*3); 1/(pi*4);...... 1/(pi*19)] > - If I do what I was just telling you, what happens when n = 0??? should I > redefine that value??? what real number should I assign to it???my $0.02. the discrete-time impulse response for the Hilbert transformer is: h[n] = (2/pi)*(sin(pi*n/2))^2 * n^(-1) otherwize known as h[n] = (2/pi)*(1 - cos(pi*n)) * n^(-1) when n=0, it's a "removable singularity", you can apply L'Hopitals rule and h[0] = 0. note that every even sample is zero. windowing this (to get you a finite length) gives you half-band symmetry which is consistent with having every even indexed sample equal to zero. r b-j