LOWPASS Forumla

More
07 Jul 2018 13:38 - 07 Jul 2018 14:33 #113666 by BigJohnT
LOWPASS Forumla was created by BigJohnT
In the 2.8 docs for lowpass the following formula is given when you paste the formula into a spreadsheet.
( 1-e^(-2*pi*70*.001) )

However no explanation of what e^ is so I can't complete the formula and match the example so I know if I'm correct or not.

Also on the man page it shows up like this:
( 1-e**(-2*pi*70*.001) )
I assume that is a man page issue and I'll look into that when I return home.

Thanks to who added the examples but I wonder why the examples were not added to the 2.7 documents?

JT
Last edit: 07 Jul 2018 14:33 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
07 Jul 2018 14:15 #113669 by PCW
Replied by PCW on topic LOWPASS Forumla
the ^ and ** are both exponentiation operators
so e**n and e^n mean the same thing
( the constant e (2.71828...) raised to the power n )

Please Log in or Create an account to join the conversation.

More
07 Jul 2018 14:38 - 07 Jul 2018 14:41 #113673 by BigJohnT
Replied by BigJohnT on topic LOWPASS Forumla
Ah Ha, a little googling and I found this page on e



And now with that bit of information I'm able to complete the equation and it matches Deweys examples.

Thanks Peter

JT
Last edit: 07 Jul 2018 14:41 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
07 Jul 2018 20:38 - 07 Jul 2018 20:39 #113716 by rodw
Replied by rodw on topic LOWPASS Forumla
Funny, we were both struggling with this at the same time. On another thread, Peter said for a 70 Hz filter the gain was:

Rod:

0.355849556024592

( 1-e^(-2*pi*70*.001) )

(assuming 1 KHz sampling)


In my case, I had correctly assumed e = 2.718 but was let down by a crappy calculator on my Chromebook. Once I moved to Google Sheets, it was perfect! Thanks for the tip on spreadsheets John!

It would be good if the docs were updated to state:
where:
e = the mathematical constant 2.71828
and the more normal ^ symbol was used for yn instead of ** (which I've never seen in use)
Last edit: 07 Jul 2018 20:39 by rodw.

Please Log in or Create an account to join the conversation.

More
08 Jul 2018 00:10 #113737 by andypugh
Replied by andypugh on topic LOWPASS Forumla
I found this interesting:
softwareengineering.stackexchange.com/qu...ad-of-exponentiation

I think that it was ** in Sinclair basic because the Sinclair character set didn't have ^

If I was in charge I think I might commonise on ** (super-multiplication).

Though that wouldn't work with C, it would have no way to know if a ** b meant "a to the power of b" or "a • the contents of b"

Please Log in or Create an account to join the conversation.

More
08 Jul 2018 00:21 - 08 Jul 2018 00:21 #113739 by andypugh
Replied by andypugh on topic LOWPASS Forumla
Pi has an infinite number of non-repeating decimal places.

e has an infinite number of non-repeating decimal places.

i is an imaginary number.

Yet e^i.pi = -1

Which is remarkable.
en.wikipedia.org/wiki/Euler's_identity
Last edit: 08 Jul 2018 00:21 by andypugh.

Please Log in or Create an account to join the conversation.

More
08 Jul 2018 02:37 #113762 by BigJohnT
Replied by BigJohnT on topic LOWPASS Forumla
Actually after reading your question in the other thread I was trying to improve the documents so a non math major could recreate the formula. I figured if I could understand it then most could.

JT

Please Log in or Create an account to join the conversation.

More
08 Jul 2018 02:39 #113763 by BigJohnT
Replied by BigJohnT on topic LOWPASS Forumla

Funny, we were both struggling with this at the same time. On another thread, Peter said for a 70 Hz filter the gain was:

Rod:

0.355849556024592

( 1-e^(-2*pi*70*.001) )

(assuming 1 KHz sampling)


In my case, I had correctly assumed e = 2.718 but was let down by a crappy calculator on my Chromebook. Once I moved to Google Sheets, it was perfect! Thanks for the tip on spreadsheets John!

It would be good if the docs were updated to state:
where:
e = the mathematical constant 2.71828
and the more normal ^ symbol was used for yn instead of ** (which I've never seen in use)


That is my plan when I return from holiday.

JT

Please Log in or Create an account to join the conversation.

More
08 Jul 2018 02:46 #113764 by rodw
Replied by rodw on topic LOWPASS Forumla
Andy, most users are not C programmers but most would be familiar with spreadsheet syntax. I've used a lot of programming languages over the years and I never came up against that one. The two languages this project use are C and Python. Neither use **. Both use pow() instead. So maybe that is an option for the programmers immersed in bitwise operations on a daily basis..

Either way, in my day it was normal to add a definition clause for maths equations as follows:

Where:
a ** b means "a to the power of b eg. same as the pow() function in C or Python";
e = the mathematical constant 2.71828 See


And yes I know these natural ratios often have an infinite number of decimal places.

Please Log in or Create an account to join the conversation.

More
08 Jul 2018 03:23 - 08 Jul 2018 03:27 #113767 by PCW
Replied by PCW on topic LOWPASS Forumla
e^n is often represented with exp(n)

For example, SpeedCrunch likes this:

1 - exp(-2*pi*70*.001)

I guess its arguable that the lowpass filter should have done this internally so you just specify the corner frequency

(as long as it doesn't waste time recalculating the 'gain' unless the corner frequency changes)
Last edit: 08 Jul 2018 03:27 by PCW.

Please Log in or Create an account to join the conversation.

Moderators: HansU
Time to create page: 0.157 seconds
Powered by Kunena Forum