キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Problem with DFD Build Filter from Transfer Function VI

Hello,

 

Attached is my program, which takes in two input signals, first is "In Phase" or "Corrupted" signal -C-, and second is "Out of Phase" or "Noise" signal -N-.

 

First, since the In Phase signal contains a DC component, I extract it.

 

Now I want to implement Wiener Filetr, which has the following simple Transfer Function:

 

TF = ( |C(f)|^2 + |N(f)|^2 ) /  |C(f)|^2.

 

Problem is that it takes too long to run, and even worse it does not work.

 

Any ideas?

 

I couldn't attach the two .csv files so I uploaded them on my 4shared account:

 

http://www.4shared.com/file/WkqABLwG/Vx_t.html

http://www.4shared.com/file/WzzhV3rf/Vy_t.html

0 件の賞賛
メッセージ1/9
143,003件の閲覧回数

I hope the idea is clear, sorry I am not a native speaker.

0 件の賞賛
メッセージ2/9
142,968件の閲覧回数

Hello again,

 

could the problem be possible related to using the express Vi curve fitting? 

0 件の賞賛
メッセージ3/9
142,956件の閲覧回数

1. You can change the file extension to .txt and attach them, or combine the files in a zip archive and attach that.

 

2. The files appear to have only one non-zero value each, row 3768, column 0. Values 54 and 51.  Filtering or curve fitting on such data does not seem to make much sense.  In the image below the top graph is the input to the curve fitting and the bottom graph has the output. Other than the peaks being close the the same x-axis values, the two curves do not resemble each other very well.

 

Curve fit.png

 

Subtracting that does not remove the DC component. Using the Mean.vi is the typical way of removing a DC component.  Either way the spectrum seems to have very little of interest.  Its variations are a few parts in 10^15.  That is almost certainly numeric round off in the calculations rather than anything meaningful in the data.

 

I do not have the Filter Design toolkit so I cannot comment on the filter.

 

If speed is an issue, do not use the Express VI for curve fitting. Express VIs tend to have a lot of overhead which makes them slower.  I have not checked this one against the conventional curve fitting VIs. Also converting to waveforms before wiring to the FFT is wasted because the FFT converts back to array.  Just use the array directly or use one of the waveform spectral VIs.

 

Lynn

メッセージ4/9
142,948件の閲覧回数

Hi,

 

The data are OK, I am attaching the two files as .txt here:

すべてをダウンロード
0 件の賞賛
メッセージ5/9
142,944件の閲覧回数

BTW, your suggestion about using MEan.vi did not work. Because the drifting is changing in time.

0 件の賞賛
メッセージ6/9
142,911件の閲覧回数

Hi Ali8,

 

Could you explain further what you mean when you say it doesn't work?  What are you expecting to see in your results?

 

Have you been able to identify a place in the code where the result is not what you'd expect?  I'd recommend tracing it through to see where the value deviates from what it should be.

Dave C.

Applications Engineer
National Instruments
0 件の賞賛
メッセージ7/9
142,832件の閲覧回数

One of your problems seems to be calculations resulting in NAN (see attached photo)...

 

However, there is something else that is quite strange and I'm not sure if it is related to the above problem: I probed your data and I just can't tell why there is such a huge lag between probe# 32 and 33 - there is nothing between them!!  This seems a bit tricky, unless if someone else knows what would cause that!?

 

(your input data look fine, but it seems like your implemented math has issues - data in probe 33 do not look right.)

 

-DP

 

Untitled.png

--------------------------------------------------------

New Controls & Indicators made using vector graphics & animations? Click below for Pebbles UI


0 件の賞賛
メッセージ8/9
142,824件の閲覧回数

@Dave.C:

 

Here since I provided only a sample of the data, it may not show clearly, but look at the following snapshot taken with the full data used:

 

dc.png

 

As you can see, the data has an almost linear DC bias, using mean.vi I wasn't able to get rid of it. My implementation is fine as it get rid of the bias, as shown above.

 

Anyway this is not the issue here. Our problem is with the TF implementation.

 

@BTC_admin: I have no idea why, but I am looking at it.

0 件の賞賛
メッセージ9/9
142,814件の閲覧回数