If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
hilbert transform in green array (for statistics)
14 posts
• Page 1 of 2 • 1, 2
hilbert transform in green array (for statistics)
I have an equation that looks like this:
"function" + iH("function")
where "function" is a green array of data, triggered from time to time. In the schematic this part will occur multiple times, so I guess I should avoid too many ruby windows, that's why I want to make it in green.
While I see there is a hilbert transform described as a set of allpass filters in blue - I'm not sure how to convert it into static greens. Or is there another way? If I understand, hilbert processor is an approximation. I need it for statistical equations, so I'm guessing it has to be relatively accurate (at least matlab level or so).
Can someone post how it should looks like?
Martin? KG?
"function" + iH("function")
where "function" is a green array of data, triggered from time to time. In the schematic this part will occur multiple times, so I guess I should avoid too many ruby windows, that's why I want to make it in green.
While I see there is a hilbert transform described as a set of allpass filters in blue - I'm not sure how to convert it into static greens. Or is there another way? If I understand, hilbert processor is an approximation. I need it for statistical equations, so I'm guessing it has to be relatively accurate (at least matlab level or so).
Can someone post how it should looks like?
Martin? KG?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: hilbert transform in green array (for statistics)
Following this topic:
viewtopic.php?f=3&t=3175&start=10#p17132
I created something like this, but I have no idea whether this is correct or not. Did I created sort of green hilbert transform here?
Help please.
viewtopic.php?f=3&t=3175&start=10#p17132
I created something like this, but I have no idea whether this is correct or not. Did I created sort of green hilbert transform here?
Help please.
- Attachments
-
- Hilbert - green.fsm
- (7.75 KiB) Downloaded 1191 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: hilbert transform in green array (for statistics)
Hmm... it's possible that it's not correct...
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: hilbert transform in green array (for statistics)
Yess! Works.
The above scchematic, despite minor error (1 sample earlier missing in size) - works correctly. But - the array is in reversed order. so the impulse array should have number 1 at the end.
So, final question - is the above schematic - proper hilbert transform for statistics?
...Martin?
The above scchematic, despite minor error (1 sample earlier missing in size) - works correctly. But - the array is in reversed order. so the impulse array should have number 1 at the end.
So, final question - is the above schematic - proper hilbert transform for statistics?
...Martin?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: hilbert transform in green array (for statistics)
tester wrote:So, final question - is the above schematic - proper hilbert transform for statistics?
You can easily check yourself: If you feed the Hilbert transformer with a cosine of arbitrary frequency, the result is a sine (90 degrees phase shift). Same amplitude, same frequency.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: hilbert transform in green array (for statistics)
Martin, I actually did this in the meantime (I connected sine osc and played with the frequency), and... there are some problems.
While my array conversion works correctly, there is a problem with reference setup(s).
The reference setup does not keeps equal amplitude in regards to unprocessed sine. As far I remember from my second computer, the amplitude change is 2x per 2x frequency change, so this appears to be log curve in freq domain. I''m guessing, that I could use some correction green filter, but I don't know what one. Plus, there is a problem, i.e. it isn't keeping 90-degree shift across the spectra, but I'm not sure to what degree (need to re-check it). I don't know if this is acceptable for signal statistics.
So I tested your setup with paired 2-pole filters. I'm not sure how to interpret it in green, but I'm guessing these "in2 to in1 to in" and "out2 to out1 to out" relationships - represent 2-sample delay (2 value shift in array used with itself). But your setup creates hilbert transform and it affects input signal on first channel, so the first channel maybe keeps 90-degree difference to hilbertian, but has also a shift in regards to unprocessed input at certain frequencies, and again - it's probably not good for statistics made on green static data.
Can you shed some light on it?
While my array conversion works correctly, there is a problem with reference setup(s).
The reference setup does not keeps equal amplitude in regards to unprocessed sine. As far I remember from my second computer, the amplitude change is 2x per 2x frequency change, so this appears to be log curve in freq domain. I''m guessing, that I could use some correction green filter, but I don't know what one. Plus, there is a problem, i.e. it isn't keeping 90-degree shift across the spectra, but I'm not sure to what degree (need to re-check it). I don't know if this is acceptable for signal statistics.
So I tested your setup with paired 2-pole filters. I'm not sure how to interpret it in green, but I'm guessing these "in2 to in1 to in" and "out2 to out1 to out" relationships - represent 2-sample delay (2 value shift in array used with itself). But your setup creates hilbert transform and it affects input signal on first channel, so the first channel maybe keeps 90-degree difference to hilbertian, but has also a shift in regards to unprocessed input at certain frequencies, and again - it's probably not good for statistics made on green static data.
Can you shed some light on it?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: hilbert transform in green array (for statistics)
You could actually use the stream hilbert transformer with a signal analyzer at its output. You need to convert the input as well: green array to mem, then wave read.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: hilbert transform in green array (for statistics)
Could you post a scheme? Also, what would be important - is proper boundary handling (since there is some delay), to avoid artifacts in resulting statistical data.
But anyway, what I'm not sure about - is whether what fits here acoustic needs - is appropriate enough for statistics. I don't have a background for an opinion. Guys from the paper used some matlab default approximation if I understand correctly.
*
Martin, I also need some hints on how to solve these equations related to resulting hilbert:
download/file.php?id=5919
There is a sentence that says that real and imaginary part must be calculated separately, so I'm guessing this says that two arrays should be processed independently, somehow.
There is this "d" parameter calculated (not sure if "a" = "alpha", or whether this is something else somehow related to alpha), and in the context of above - the only thing that comes to my mind, is that both arrays - should be just moved through abs primitive, to have all values positive inside the array. If not - then I don't know how to mix it and still have 2 arrays.
In last equation (C2), "d" is used as "complex conjugate", so if I understand it correctly - sign for data in imaginary array is just changed to minus?
Then if I understand correctly, "d*" is multiplied by "a" (and some other stuff), so it will produce two arrays, so the sum is made on two arrays separately, and then divided by what's on the bottom?
But anyway, what I'm not sure about - is whether what fits here acoustic needs - is appropriate enough for statistics. I don't have a background for an opinion. Guys from the paper used some matlab default approximation if I understand correctly.
*
Martin, I also need some hints on how to solve these equations related to resulting hilbert:
download/file.php?id=5919
There is a sentence that says that real and imaginary part must be calculated separately, so I'm guessing this says that two arrays should be processed independently, somehow.
There is this "d" parameter calculated (not sure if "a" = "alpha", or whether this is something else somehow related to alpha), and in the context of above - the only thing that comes to my mind, is that both arrays - should be just moved through abs primitive, to have all values positive inside the array. If not - then I don't know how to mix it and still have 2 arrays.
In last equation (C2), "d" is used as "complex conjugate", so if I understand it correctly - sign for data in imaginary array is just changed to minus?
Then if I understand correctly, "d*" is multiplied by "a" (and some other stuff), so it will produce two arrays, so the sum is made on two arrays separately, and then divided by what's on the bottom?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: hilbert transform in green array (for statistics)
attaching some reference schematics, fixed version (works in terms of reference filter) and some signal tests on blue.
- Attachments
-
- hilbert-reference-tests001.fsm
- (13.32 KiB) Downloaded 959 times
-
- Hilbert - green - works.fsm
- (10.1 KiB) Downloaded 944 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: hilbert transform in green array (for statistics)
As for these complex numbers, I made some assumptions, so correct me.
the "a" refers to filter 1, and "d" is used for filter 2, anc cross-correlations are calculated.
I assumed that a = x1 + iy1, where x1 and iy1 are simply these two arrays coming out of hilbert transform.
I assumed, that d for x2,iy2 is calculated as:
(x + iy)^2 / (x^2 + y^2)^0.5
thus we get:
(x^2 - y^2) /(x^2 + y^2)^0.5 for the real array
plus
i2xy / /(x^2 + y^2)^0.5 for the imaginary array
and the sign for second d-array is changed to minus, to get teh complex conjugate part (x+iy to x-iy) for second equation.
As for the second equation, first let's calculate
a1 * 'd2
where
a1 are (x1 + iy1) arrays from filter 1
'd2 are (x2 - iy2) arrays from filter 2 (sign change because the complex conjugate is used)
thus
(x1 + iy1)(x2 - iy2) =
(x1x2 + y1y2) for the real part array
plus i(x2y1 - x1y2) for the imaginary part array
then both arrays multiplied by w(t) factor
then both arrays pushed through sum array primitive
then both arrays divided by multiplication of sigmas which is also a real number.
.....is this correct?
above equations are in last section of attached schematics.
hilbert part requires rewrite, and I need few seconds to describe for what frequency ranges it is needed.
the "a" refers to filter 1, and "d" is used for filter 2, anc cross-correlations are calculated.
I assumed that a = x1 + iy1, where x1 and iy1 are simply these two arrays coming out of hilbert transform.
I assumed, that d for x2,iy2 is calculated as:
(x + iy)^2 / (x^2 + y^2)^0.5
thus we get:
(x^2 - y^2) /(x^2 + y^2)^0.5 for the real array
plus
i2xy / /(x^2 + y^2)^0.5 for the imaginary array
and the sign for second d-array is changed to minus, to get teh complex conjugate part (x+iy to x-iy) for second equation.
As for the second equation, first let's calculate
a1 * 'd2
where
a1 are (x1 + iy1) arrays from filter 1
'd2 are (x2 - iy2) arrays from filter 2 (sign change because the complex conjugate is used)
thus
(x1 + iy1)(x2 - iy2) =
(x1x2 + y1y2) for the real part array
plus i(x2y1 - x1y2) for the imaginary part array
then both arrays multiplied by w(t) factor
then both arrays pushed through sum array primitive
then both arrays divided by multiplication of sigmas which is also a real number.
.....is this correct?
above equations are in last section of attached schematics.
hilbert part requires rewrite, and I need few seconds to describe for what frequency ranges it is needed.
- Attachments
-
- generalized-equations-003.fsm
- (6.08 KiB) Downloaded 940 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
14 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 30 guests