Click here to Skip to main content
15,912,069 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Of course I know that there are more detailed information necessary to solve this problem. At first I just wanted to know if somebody already did one of this kind of regression...


Description of the System:

It´s a manipulator with 3 linear cartesian axles (X,Y,Z).

The function of a manipulator consists in positioning of heavy piece parts with variable loads.

Because of load (F) the manipulator will suffer mechanical deflection and torsion, and the result will be positioning inaccurancy (delta_x, delta_y, delta_Z).

The deltas are described as a model function with parameters, and will be used to correct the position. In other words will be used as a feed-forward regulation.

The parameters of the model function will be determined with the help of measurements.


The model functions could be some kind of polynomials in the variables X,Y,Z and F:
delta_x = f_x(X,Y,Z,F)

delta_y = f_y(X,Y,Z,F)

delta_z = f_z(X,Y,Z,F)



If you need further informations, please let me know!

Thank you very much!
Posted
Updated 4-Jun-12 4:54am
v3
Comments
Sergey Alexandrovich Kryukov 1-Jun-12 10:45am    
This is a whole branch in applied mathematics. You need to give us a lot more detail. In particular, you need to tell us something about the class of functions to be fitted. It is theoretically impossible to have one absolutely universal solution (and it's easy to proof). Also, please explain the goal of your application, some key requirements and their motivation.

Before you present all those detail, there is nothing to talk about. But unfortunately, if you do it, we cannot guarantee the solution. Non-linear functions are non-linear functions. Some problems are easy, but some are simply unsolvable.

Please use "Improve question" above.
--SA
Manfred Rudolf Bihy 1-Jun-12 11:36am    
Too bad we can't vote on comments!

Good explanation, solid advice that to see is very nice.
Stefan_Lang 4-Jun-12 6:41am    
I agree with SKryukov.

I'd als like to add that your specification is not only unclear, but also conflicting: In the title you claim to search a curve (a function of 1 variable). But in the body you speak of functions of 3 or 4 variables, which are 3- or 4-dimensional manifolds, not curves. (But I suspect that's not what you mean)

Also variables don't have 'degrees' - polynomials have.

I don't know what you are speaking of as long as you are not able to use the correct terms. Anyway, as SA said, there are many possible solutions. So, without clear specifications and limitations it is impossible to provide a correct and unique solution.

So you have a dependency of 3 values (deviation in x, y, and z) from 4 parameters (position in x, y, and z as well as load F). You might also want to consider the movement vectors (direction and speed) for input, since I suspect that the deviation(x, y, z) will be a swinging motion, not static!

In any case, while approximation algorithms for functions in one (curves) or two variables (surfaces) are fairly well established, I am not aware of a generic algorithm for functions of more than two variables. Of course, mathematically the problem is not that different, and it's possible to generalize from approximation algorithm for functions of two variables to functions of 3 or more, but it may be difficult to find readymade program code for that.

More importantly, if you are not familiar with the required mathematic background, you will have a hard time of setting up a system and fitting it to your requirements.

For these reasons, your best approach may actually be something entirely different: train an Artifical Neural Network (ANN) to the task! An ANN has an arbitrary number of input units (one for each input value) and an equally arbitrary number of output values (one for each required/expected output). There are several articles on ANNs on this site: you may want to search for the keyword "backpropagation" - I think backpropagation networks may be best suited to your problem.

You could set up a network with 3 layers of neurons: the first should contain one unit for each input: x, y, z, and posssibly the 3 components of your movement vector (lenght corresponding to speed). The third layer contains one unit for each output: dx, dy, dz (and maybe 3 more for movement: vx, vy, vz). The second layer can have any number of units, but you need at least as many units as you have either inputs or outputs (i. e. the min of the two numbers) to prevent loss of information (in fact I would advise to use the max of the two numbers or more - IME that provides faster training and better results).

Unfortunately I haven't been using ANNs since the 90s, so I can't offer more advice at this point. But the articles on backpropagation networks on this site may prove to be helpful.

P.S. - my reasons for suggesting an ANN:
As mentioned above, you could probably find an optimized algorithm for this kind of problem, if you search for it long and hard enough. However, I am often confronted with similarly hard problems and my experience is that (a) what you find never really fits your problem (so you have to work to make it fit), (b) obtaining the actual code either requires payment (usually not a big problem unless we're talking of full blown math libraries), licensing (more often a problem than not, especially because many 'open' licenses are incompatible with use in industrial environments), or you get only the binaries rather than the source code (which makes it a lot harder to adapt according to (a)), or (c) isn't described sufficently to tell if it even solves your problem. More often than not it's all three.

The benefits of ANNs are:
1. Plenty of free implementations around
2. Requires little knowledge of math
3. can be easily adapted to changing requirements or new inputs and insights

All these appear to be relvant in your case.

The disadvantages are
1. Takes a lot of input data and time to train properly
2. You have very little influence over the shape of the solution space

The first may not be very important to you, as you can take an arbitrary number of input samples, and you only have to train once. It would be a problem if generating the input takes a lot of time or is costly.

The second is not a problem if you don't even know about how to influence the solution shape in other algorithms (e. g. spline approximation), or what would be a good shape in the first place. In my experience ANNs provide rather smooth shapes, and I believe that's good for you.
 
Share this answer
 
v3
Comments
Andreas Gieriet 6-Jun-12 11:41am    
Good answer. My 5.
Cheers
Andi
A shot into the dark:
1) build the physical machinery
2) make sure you can move to all needed positions
3) make sure you can measure accurately enough the controlled position
4) make sure you can measure accurately enough the actual position
5) calibrate that system with a bunch of loads from a feather to the max load
5.1) take a load
5.2) move to all possible positions within a grid of suitable granularity
5.3) measure the deviation from the ideal position
5.4) store that x,y,z,F --> delty_x, delta_y, delta_z tables
6) once you have accurate enough data, interpolate between the measured points
while on duty

If this is any good solution for your problem is completely unclear to me. You have to decide if such an approach is feasible at all.

Please state your problem more clearly as Sergey, Manfred, and Stefan already pointed out.

Cheers
Andi

PS: It does not calculate any analytical curve or shape, though.
 
Share this answer
 
v3
Comments
atsbibi 5-Jun-12 3:03am    
I already built a physical machinery and there are different model functions for the different deltas!

All the others steps writen above are according to my plan.


Summary:

I have the model function of each Delta --> f_x, f_y, f_z which are all functions depending on the variables X,Y,Z and F

We are targetting fitting (regression) of the functions f_x, f_y, f_z.The parameters of the fitted/regressed functions will be determined experimentally as Andreas described.
Andreas Gieriet 5-Jun-12 14:40pm    
It's not clear what you are asking? Do you want to show what you have?
Do you want to hear that for my described procedure a patent is pending? ;-)
Cheers
Andi
PS: Why do you want to have a "function"? A lookup table is usually sufficient enough. Reason, the problem is expected to be a smooth shape, i.e. no steps or "singularities" within the targeted range. So, (linear) interpolation between grid points will result in good enaough approximation.
atsbibi 6-Jun-12 7:32am    
You are right, it is a smooth function and no discret one!!!

Example:

f_x(X,Y,Z,F)= [a0 + a1*X + a2*X^2 + a3*X^3]*[b0 + b1*Y + b2*Y^2 + b3*Y^3]*
[c0 + c1*Z + c2*Z^2 + c3*Z^3]*[alpa*F + beta]

(ai, bi, ci, alpha, beta) will be determined experimentally:

The manipulator will be moved to n positions (n>= 20 for instance)compared with theoretical positions and using a least square minimization to determine the coefficients (ai, bi, ci, alpha, beta)

Andreas Gieriet 6-Jun-12 8:07am    
Seems over-complicated to me. Why do you need a polynom if linear interpolation looks sufficient? You try to fit the polynoms into the measured values - which will not work. You have measured points that do not fit into your once measured polynoms. You would have to make decisions (least square distance, etc.) and get approximations again. If you have linear interpolation between the points, you get probably a good enough approximation.
So, my suggestion:
1) have each function being a lookup table of measured deviations
2) positions between the lookup positions are linearily interpolated
Cheers
Andi
Cheers
Andi
atsbibi 6-Jun-12 9:23am    
Linear interpolation will not be sufficient because the regulations of the Deltas will be done continously, not static, that means you can not just interpolate between two defined points, not exactly enough!Don´t forget about that there are 4 variables which influence the system --> a lot of effort!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900