From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Butterworth Filter

Solved!
Go to solution

I want to build a Butterworth filter with the formula node. what should I do?

Let's do it step by step and if you can correct me.

I saw the formula for the Butterworth is:

 

H(jw)=1/sqrt([1+(f/fc)^2n]) 

 

now I know that the cutoff freq. is fc=1/(2*pi*R*C) where R & C  are variable and choosen by the user (this is what the teacher asked). 

So if i write in the formula node this statments:

 

Tau=R*C;
Fc=1/(2*pi*Tau);

FdT=abs(1/sqrt([1+(f/Fc)**2*n]));

i got error. why? 

 

 

0 Kudos
Message 1 of 4
(3,490 Views)

I tried to do some changes but it seems that doesn't work properly.

Can you give a look and help me plz?

Ty

 

 

0 Kudos
Message 2 of 4
(3,479 Views)
Solution
Accepted by topic author inuyasha84

You were close.  But your little loop inside the formula should look like this.  Notice the perithesis around the 2*n.  You were only squaring.  You should raise to a power of 2*n.  I added an input for the number of poles.

for ( f=0; f<1000;f++)
{
  H[f]=1/sqrt(1+(f/Fc)**(2*n));
}

 Also, there's an Absolute Value in the Numeric palette.  Use that instead of the square and square root.

 


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 4
(3,469 Views)

thank you so much i was going crazy!!!

0 Kudos
Message 4 of 4
(3,465 Views)