From: Andreas Bauer on
Hello,

a b c
fx 0,639242 0,032636 19,819060
fy 0,003413 -0,646874 273,495500


MustBe x MustBe y Measure X Measure Y
173,000 12,500 130,816 266,000
275,500 28,500 196,860 256,000
139,500 153,000 113,987 175,000


a) How can I calculate it with C#?
b) How is the correct algorithm? If I make it by hand.
Have somebody a good instruction?
c) Maybe I can use Excel, or?

It is Taylor?


Thanks. Regards Andreas
From: Arne Vajhøj on
On 08-06-2010 03:34, Andreas Bauer wrote:
> a b c
> fx 0,639242 0,032636 19,819060
> fy 0,003413 -0,646874 273,495500
>
>
> MustBe x MustBe y Measure X Measure Y
> 173,000 12,500 130,816 266,000
> 275,500 28,500 196,860 256,000
> 139,500 153,000 113,987 175,000
>
>
> a) How can I calculate it with C#?
> b) How is the correct algorithm? If I make it by hand.
> Have somebody a good instruction?
> c) Maybe I can use Excel, or?
>
> It is Taylor?

Maybe you should start by explaining in more detail
what this is.

It is not obvious what the data represents nor what you
want to calculate.

Arne
From: Andreas Bauer on
Hello Giovanni,
here I send more details and hope is clear.
I need more informations, it is not so easy.

I hope the pictures are clear.
http://www1.minpic.de/bild_anzeigen.php?id=114414&key=77476860&ende

http://www1.minpic.de/bild_anzeigen.php?id=114415&key=92154987&ende


First, I measure my 3 or more points.
Second, I check the units(steps) to the axis. (Step motor)
Third, I should calculate the coefficient.

How is the best, easiest way?

Thanks for tipps.

--Simple linear regression, or?

http://www1.minpic.de/bild_anzeigen.php?id=114417&key=82156785&ende


Greeting Andreas.
From: Arne Vajhøj on
On 10-06-2010 05:50, Andreas Bauer wrote:
> I hope the pictures are clear.
> http://www1.minpic.de/bild_anzeigen.php?id=114414&key=77476860&ende
>
> http://www1.minpic.de/bild_anzeigen.php?id=114415&key=92154987&ende
>
> First, I measure my 3 or more points.
> Second, I check the units(steps) to the axis. (Step motor)
> Third, I should calculate the coefficient.
>
> How is the best, easiest way?
>
> Thanks for tipps.
>
> --Simple linear regression, or?

Yes.

Simple linear regression.

http://www.mathdotnet.com/

can do it.

Some old code from the shelf:

private static void Solve(double[] y, out double[] b, double[] x)
{
Vector one = Vector.Ones(x.Length);
Vector x2 = Vector.Create(x);
Matrix x3 = Matrix.CreateFromColumns(new List<Vector> {
one, x2 });
Vector y2 = Vector.Create(y);
Matrix y3 = Matrix.CreateFromColumns(new List<Vector> { y2 });
Matrix b3 = x3.Solve(y3);
Vector b2 = b3.GetColumnVector(0);
b = b2.CopyToArray();
}

Arne

From: Andreas Bauer on
Hello Arne,
>> --Simple linear regression, or?
>
> Yes.
>
> Simple linear regression.
>
> http://www.mathdotnet.com/
>
> can do it.
>
> Some old code from the shelf:
>
> private static void Solve(double[] y, out double[] b, double[] x)
> {
> Vector one = Vector.Ones(x.Length);
> Vector x2 = Vector.Create(x);
> Matrix x3 = Matrix.CreateFromColumns(new List<Vector> { one,
> x2 });
> Vector y2 = Vector.Create(y);
> Matrix y3 = Matrix.CreateFromColumns(new List<Vector> { y2 });
> Matrix b3 = x3.Solve(y3);
> Vector b2 = b3.GetColumnVector(0);
> b = b2.CopyToArray();
> }
it is not clear.
On my Excel sheet, you see may problem

Two axis

x
y

Customer insert the values in mm, axis controller needs steps.
First I should calibrate the system.
http://www.fileuploadx.de/49586

How?
How I get a,b and the offset c?

Thanks.
Regards Andreas