cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

11-Garnet

## how to detect envelop of signal ?

How to find upper and lower envelop of the signal ? please check my mathcad file !

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby V

ok got it! in your file('WE_20180526_mathcad_ques-1') you have used 't' (which is basically belongs to transmitter end) but in the receiver side i don't have any idea about the time, for example if i know the exact time than i could able to find the frequency and i can used to reconstruct the 'Tx' signal, but the problem is, i don't know the exact time. could you able to do without the 'Transmitter time 't' '  (like approximation of that time).

As long as your data is sampled in equidistant time steps it should not matter what the vector t is as long as its values are equidistant and ist the same size as your data vector. But I guess it could be difficult to find working guess values.

25 REPLIES 25
21-Topaz II

Hi,

The noise's maximum amplitude is ten times higher than that of the signal. How to distinguish a signal from such noise? it's impossible!

23-Emerald III
(To:-MFra-)

It's not entirely impossible. A lock-in amplifier will allow to detect signals that are below the noise level. Problem is you have to know the frequency you want to detect.

The OP's problem is extremely simple as posed, but I guess he's got a more fundamental problem (doesn't know his signal and which part of it is noise).

Luc

21-Topaz II
(To:LucMeekes)

If the given signal is sampled, a digital notch filter tuned to the frequency of the signal should be used in such a way as to attenuate only the carrier while the noise is emitted at the output. To have the envelope a peak detector is added with a capacity ...........

20-Turquoise

Hi,

You must break the signal into segments and find minimum and maximum of each segment.

20-Turquoise

Hi,

Sorry a mistake in the lower envelope is corrected here.

23-Emerald III

That's extremely simple. For the problem as posed the lower enevlope is XT, the upper is XT+1.

But I guess that's not what you're after. What do you know about your signal, and what exactly are you after?

Note that Terry showed a way to estimate the envelopes, but do you need the envelopes, or are the envelopes just part of your way of what you really want to know about the signal?

Success!

Luc

24-Ruby V

Would this help?

You may play with the windows size (I have chosen 😎 and may notice some sensibility wrt the guess values of genfit.

24-Ruby V
(To:Werner_E)

You may also use your way of defining the signal for genfit.

The sensibility wrt the guesses and the window size remains though.

24-Ruby V
(To:Werner_E)
11-Garnet
(To:Werner_E)

yes it's interesting but it shows some error  " D=READFILE(files, "delimited") " is not working !

24-Ruby V

You would have to download the data files from the OP as well and put them in the correct subdirectory.

11-Garnet
(To:Werner_E)

ok got it! in your file('WE_20180526_mathcad_ques-1') you have used 't' (which is basically belongs to transmitter end) but in the receiver side i don't have any idea about the time, for example if i know the exact time than i could able to find the frequency and i can used to reconstruct the 'Tx' signal, but the problem is, i don't know the exact time. could you able to do without the 'Transmitter time 't' '  (like approximation of that time).

24-Ruby V

ok got it! in your file('WE_20180526_mathcad_ques-1') you have used 't' (which is basically belongs to transmitter end) but in the receiver side i don't have any idea about the time, for example if i know the exact time than i could able to find the frequency and i can used to reconstruct the 'Tx' signal, but the problem is, i don't know the exact time. could you able to do without the 'Transmitter time 't' '  (like approximation of that time).

As long as your data is sampled in equidistant time steps it should not matter what the vector t is as long as its values are equidistant and ist the same size as your data vector. But I guess it could be difficult to find working guess values.

11-Garnet
(To:Werner_E)

Thank you for reply,could you please explain bit more about what you doing (p1, p2) and i have posted some question regarding noise value please check my mathcad file once !

24-Ruby V

Thank you for reply,could you please explain bit more about what you doing (p1, p2) and i have posted some question regarding noise value please check my mathcad file once !

OK, lets deal with the upper envelop.

1) determine the peaks of the noisy signal using "localmax". The lower the window size (I had chosen 8 in the sheet) the less peaks were found.

2) Try to fit a function to those peaks. As the envelop obviously should be a sine, I defined a general sine function f(t,p) with four parameters (vector p). "genfit" needs guess values for the four values in p and the result is quite sensitive wrt to those guess values and I think that finding appropriate guesses automatically for various data sets is the challenge. Because I knew what the upper envelop should be (TX+100) it was easy to chose appropriate guesses 😉 In the screenshot I posted above you see the comparison between the calculated values and the expected ones.

3) define result function f.max using the parameters calculated by "genfit".

If I change in noise rnd(100) to rnd(10), the upper envelop still works, but the lower fails because local min finds not enough peaks (minima) for a decent fit. Changing the window size from 8 to 4 cures that.

But I understand that automatically chosing an optimal window size for localmax/min and optimal guess values for genfit can be quite a challange.

21-Topaz II

11-Garnet
(To:-MFra-)

21-Topaz II

Hi,

Attached is the file with the graph with three cursors to read the values of the frequencies and the amplitude in dB

11-Garnet
(To:-MFra-)

thank for the file, but is it possible without the help of cff or fft ? and please consider this, in receiver side, i have no idea about the freq of the signal and time too what i have is only the data (like RX=[2,3,4.5,...so on])!

21-Topaz II

cfft calculates the discrete Fourier transform of the signal placed as its argument. Obviously it does not know the frequency of the sinusoidal signal that you add up. Even the spectrum graph does not depend on f, in fact, as you can see in the following figure, I have set f = fr = 1MHz.

Since the amplitude of the noise is too high, the signal is indistinguishable, even with a PLL you will not be able to find it.

11-Garnet
(To:-MFra-)

Yes i understand that but how to calculate without CFFT ?

21-Topaz II

It is not clear what you want. Do you need a program that calculates the Fourier transform of a time signal equal to cfft?

21-Topaz II