Looking for resources to find an algorithm to solve a problem

Started by TimB, Mar 29, 2021, 11:20 AM

Previous topic - Next topic

TimB

Hi,

Just a quick one. I am rubbish at maths and never got any qualifications at all in maths at school. But I muddle my way through stuff with excel and a calculator.

I have now a set of values that I'm looking to find an algo to solve. There is a very complex formula that a site uses that I'm trying to base my ref numbers off

For example

Val A   Val B   Const z      Result
3       2       0.8          0.733093
3.1     2.1     0.8          0.744104
3.2     2.2     0.8          0.754945

The graph of the results is almost but not quite a straight line
I'm looking to find an algo that will enable me to input a fixed value for z and vary values for A and B to produce the result.

It's the name or description of what my search terms should be to read up on the what type of Algo I need

top204

Depending on how long the slope is (the amount of values required in a single event), why not use a flash memory table of a "set" slope pattern, then use this as the template to alter linear values. Something like Gamma correction with LEDs and Envelope shaping with sound. etc...

Peform the calculation based upon linear values, then go through the table, element by element and alter the linear values to match the slope. Can be something as simple as adding and subtracting the template values to the linear values.

I've done similar things in the past with LEDs and sound, and implemented a similar mechanism with interpolation on PCB carving, and seen other similar methods for S sloping etc...

Can't you get the formula written in a computer language? Because sometimes, the mathematical formulas look so complex, or written down so complex, it is hard to see the pattern of them, but when they are laid out as standard expressions, the pattern can be seen, regardles of the computer language, and can be converted. I was never very good at advanced mathematics at school because I never saw the point in them, and always said "as long as I know the basics of mathematics, the more complex parts of it can be learned, if and when required" At school I didn't bother with trigonometry, or calculus, or matrices, but when I needed them later in life, I had the basis for learning them... Then forgetting how they worked when I didn't need them again. LOL



TimB


Hi les

Attached is an image of the algo. It has been converted already but the issue was that it uses values that are part of another algo and we could not match the results.

X and Y can vary between 1.000 and 4.500 and the constant Z between 0.810 and 0.790. The Z value will need to be characterised by other means but should be constant.


Long and short is It would be a very big table. Not that I'm against it mind.
I would love to build a massive excel sheet and graph it all. Seeing it can give you an idea on how they interact. There may be a very simple connection. Hence my desire to work out an algo.

The calcs or done on a website but I have no idea how to copy the code.

BTW just about nobody I know could write floating point maths compilers. You know more than the basics...

BTW 11230_m.png

m.kaviani

hi Tim,
do you want to calculate the line slope?
what do you want to calculate?

TimB


Unfortunately it's more than a line slope

A colleague has sent me an excel sheet that enabled "multiple regression two two variables"
The more data points you add the better but even so its not accurate enough.

I really need to spend a few hours collecting data and build a massive excel sheet to see patterns

Then find an algo that will work.

top204

Does the algorithm have a name Tim? So I can look it up and see if I can find some more details?

trastikata

I am not sure I understand what exactly is that you need Tim, but to me it looks like that all you need is the Excel's brute-force solver.

gtvpic

Hello
When I have a series of values and I need to know the formula that generates them, I use a software called EUREQA FORMULIZE. It is paid but have a demo that you can use and locate the formula that gives off those values.
Years ago this software was free and you could use it freely but as always things change and now it is paid.
Its operation is very simple, you enter the values you have, define which of the columns you want to calculate and execute it. After some time in software it begins to give results and the errors of each of the formulas, if you give it enough time, it will give a 100% correct result on the given data.
The software started being called EUREQA, then EUREQA FORMULIZE and now you can find it on the page:
http://formulize.nutonian.com/documentation/eureqa/user-guide/set-target/

TimB


Answering the posts in turn

The algo is for working out the flow rate of steam through an orifice.
You enter pre orifice pressure, post pressure and the orifice size.

https://www.tlv.com/global/TI/calculator/steam-flow-rate-through-orifice.html

"Excel's brute-force solver." Hmm never heard of that will have to look into it

Thanks gtvpic
I will check that out. I do not mind spending out on software.

trastikata

Quote from: TimB on Mar 29, 2021, 08:06 PM"Excel's brute-force solver." Hmm never heard of that will have to look into it

Excel options --> add-ins --> look for solver (probably inactive) --> at the bottom select Excel Add-ins --> Go -->Select solver --> ok. It should appear under Data menu in the Analyze ribbon.

You can set specific cells as variable (you can specify limitations, such as > 0, within a range, etc.), and then a target solve to solve, either for the max or min or equal to a specific target, and it brute forces the variables for you.