# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Butterworth Filter

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?

Message 1 of 4
(2,759 Views)

## Rif.: Butterworth Filter

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

Can you give a look and help me plz?

Ty

Message 2 of 4
(2,748 Views)
Solution
Accepted by topic author inuyasha84

## Re: Butterworth Filter

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.

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
(2,738 Views)

## Re: Butterworth Filter

thank you so much i was going crazy!!!

Message 4 of 4
(2,734 Views)