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,469 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,458 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,448 Views)

thank you so much i was going crazy!!!

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