Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

What is this sin-based transfer function called?

For general discussion related FlowStone

What is this sin-based transfer function called?

Postby Spogg » Tue Dec 29, 2020 9:19 am

I needed a 0-1 mapper to increase output steeply for low values and reduce the rate of change as an input value of 1 is approached. To help visualise this, it’s kind of the opposite of a “log” potentiometer or exponential function (e.g. squaring).

The solution I came up with involves using the first quadrant of a sin function which employs the transfer function of 1 to 90 degrees mapped to 0-1.

It’s a simple solution and works well for me in stream and green, plus you can cascade the modules for an even steeper slope, as in the attached schematic.

Not being much use at maths I tried to find the correct name for such a curve, but failed. Does anyone here know what I should call the modules?

Also are there alternative methods available maybe where the slope can be adjusted? In my project it actually needed to be a stream version (velocity processing).

Cheers!
Attachments
Sin1(x) mapper.fsm
FS 3.06
(64.12 KiB) Downloaded 815 times
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: What is this sin-based transfer function called?

Postby martinvicanek » Tue Dec 29, 2020 12:31 pm

Sine is somewhat expensive, have you tried
Out = in*(2 - in)
?
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: What is this sin-based transfer function called?

Postby adamszabo » Tue Dec 29, 2020 12:47 pm

I dont know the name of it, but you are essentially taking the top half of a Sine. You can also try a rational function to get a curve that you like
Attachments
rationalfunction_3.0.6.fsm
(10.41 KiB) Downloaded 835 times
adamszabo
 
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: What is this sin-based transfer function called?

Postby Spogg » Tue Dec 29, 2020 1:26 pm

That’s absolutely brilliant guys, thank you both so much. :D

Just what my toolbox was crying out for.

Cheers!
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: What is this sin-based transfer function called?

Postby RJHollins » Tue Dec 29, 2020 6:59 pm

is it like a Rectifier ?
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: What is this sin-based transfer function called?

Postby HughBanton » Wed Dec 30, 2020 12:07 pm

MV's formula is great, I didnt know of that one.

I'm not good at sums, haven't done algebra since I was 17, which must be several weeks ago now :lol: . So my attempts at 'generalising' Martin's formula with numbers other than 2 produced some very strange (useless) results wot I don't understand.

However, fwiw, I know you can get similar results with square roots etc, as per the attached.
spogg_function.fsm
(38.89 KiB) Downloaded 854 times

HYN to all when it comes, reckon we'll be glad to see the back of 2020!

H
User avatar
HughBanton
 
Posts: 265
Joined: Sat Apr 12, 2008 3:10 pm
Location: Evesham, Worcestershire

Re: What is this sin-based transfer function called?

Postby HughBanton » Wed Dec 30, 2020 12:16 pm

HYN indeed! Well you knew I really meant YNH .. can't type either :roll:

It's actually Yoda Speak - "mmm, new year happy you must!"

H
User avatar
HughBanton
 
Posts: 265
Joined: Sat Apr 12, 2008 3:10 pm
Location: Evesham, Worcestershire

Re: What is this sin-based transfer function called?

Postby trogluddite » Wed Dec 30, 2020 4:39 pm

HughBanton wrote:reckon we'll be glad to see the back of 2020 [...] I really meant YNH .. can't type either

It has been suggested in some quarters that exactly this kind of transposition error by a Mayan cleric may explain why the end-of-all-time didn't occur as they predicted in.... 2012! :o

HughBanton wrote:HYN [...] It's actually Yoda Speak

Or maybe a Spoonerific prayer for the end of social distancing: Happy You Near! :lol:
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: What is this sin-based transfer function called?

Postby billv » Wed Dec 30, 2020 9:18 pm

trogluddite wrote:why the end-of-all-time didn't occur as they predicted in.... 2012!

Maybe there is an end to time , and were not looking at it the right way.
What if time was finished just after it was created, and naturally then went into a never-ending loop.(like a pattern Sequencer)
Just like the day ends at the 24 hour mark, and the just loops over again.
This is a very real construct. :geek:
So you can say that the “end of time” is “embedded” in the normal clock cycle.
Humans fail to see this because their stuck in the loop and are usually to
Busy. :lol:
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: What is this sin-based transfer function called?

Postby RJHollins » Thu Dec 31, 2020 4:15 am

are you saying ....

We just don't have Time for this ?
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Next

Return to General

Who is online

Users browsing this forum: No registered users and 69 guests