stiffness matrix is not positive definite
stiffness matrix is not positive definite
(OP)
Hello,
I am working on optimizing a compliant gripper. I use 2d plane frame static analysis code.
I have around 50 elements, and I am using Genetic Algorithms with thickness as the variable to be optimized. So, the code will find the best 50 thicknesses for my best gripper design.
After I get the thicknesses, elements having a very low thickness(near zero) can be eliminated since they have negligible effect.
When specifying the lower bound (least allowable value) for thickness, I obviously cant choose 0 as the lower bound since there would be parts in the finite code where division by zero would occur.
Therefore I usually choose something like 1e-7 meters as my lower bound, and my upper bound is 3 mm.
Now my problem occurs when I try to use 1e-10 for example as my lower bound. The finite element code gives me the following warnings:
* stiffness matrix is not positive definite
* nonpositive pivot for equation X
I read that this occurs when the system is improperly constrained, or when a 5m beam is connected to a 5mm beam for example.
My system is properly constrained, so im assuming it is the second case.
I still get a good result in the end, so I want to know what effect does it have on my design ?
Thank you for your help.
I am working on optimizing a compliant gripper. I use 2d plane frame static analysis code.
I have around 50 elements, and I am using Genetic Algorithms with thickness as the variable to be optimized. So, the code will find the best 50 thicknesses for my best gripper design.
After I get the thicknesses, elements having a very low thickness(near zero) can be eliminated since they have negligible effect.
When specifying the lower bound (least allowable value) for thickness, I obviously cant choose 0 as the lower bound since there would be parts in the finite code where division by zero would occur.
Therefore I usually choose something like 1e-7 meters as my lower bound, and my upper bound is 3 mm.
Now my problem occurs when I try to use 1e-10 for example as my lower bound. The finite element code gives me the following warnings:
* stiffness matrix is not positive definite
* nonpositive pivot for equation X
I read that this occurs when the system is improperly constrained, or when a 5m beam is connected to a 5mm beam for example.
My system is properly constrained, so im assuming it is the second case.
I still get a good result in the end, so I want to know what effect does it have on my design ?
Thank you for your help.





RE: stiffness matrix is not positive definite
You are doing computations "in the weeds" with very small numbers (based on the 1e-10) and I would be highly suspect of any results without detailed knowledge of how the code handles these types of situations....
Ed.R.
RE: stiffness matrix is not positive definite
what are the details of your floating point procedures, i.e. how many bytes represent a floating point number
RE: stiffness matrix is not positive definite
It cannot affect any rational design, strengthwise, or weightwise.
Therefore you gain nothing in any practical sense by setting the lower limit at 1e-10 m
When I run optimisations I use 5 or 10% density as my cutoff - I really don't know the loads any better than that.
Cheers
Greg Locock
SIG:Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.
RE: stiffness matrix is not positive definite
First, I am saying I still get good results because the objective of my optimization is to maximize my output displacement and minimize the input displacement of my compliant gripper (Maximize Dout/Din). I get a larger ratio when I use 1e-10 as my lower bound than when I use 1e-7, but I get the warnings. Therefore, my objective has been reached, but Im thinking there should be something that gets affected and I dont know what it is.
As for the data type, I work on MATLAB and the data type is DOUBLE.
Finally, the purpose of using 1e-10 is to be able at the end of optimization to eliminate elements whose thickness is below a certain threshold (ex: eliminate all elements having thickness = 1e-10 m) since it cannot affect the design like what GregLocock said.
When using 1e-7 as my lower bound, if I try to eliminate elements having a thickness equal to 1e-7, my design would be ruined (the shape of the deformation would become distorted, so my gripper design becomes useless). Thats why I thought elements having a thickness of 1e-7 are a bit useful, and I should still decrease my lower bound to 1e-10 for example to reach the point where elements having insignificant thinknesses can be eliminated without affecting the design.
Thanks again for your help.
RE: stiffness matrix is not positive definite
there are some simple tests to evaluate your numerical routines are treating "zero" but as Greg points out your cut-off points are driven by other factors
RE: stiffness matrix is not positive definite
2nd, could the error be due to an optimisation cycle that's gone "a bridge too far"? (and so it's not a symptom of a bigger problem, 'cause the optimiser realises this and recovers back to a real solution)
3rd ... "When using 1e-7 as my lower bound, if I try to eliminate elements having a thickness equal to 1e-7, my design would be ruined (the shape of the deformation would become distorted, so my gripper design becomes useless). Thats why I thought elements having a thickness of 1e-7 are a bit useful, and I should still decrease my lower bound to 1e-10 for example to reach the point where elements having insignificant thinknesses can be eliminated without affecting the design."
... are you saying tha with 1E-7 as a lower bound you get different set of minimum elements than when you use 1E-10 ? and that if you delete the 1E-10 elements you have a sensible structure, but not if you delete the 1E-7 ones ?? that sounds "odd" ... what do you plan to do with the 1E-5 elements ? practically what is your minimum gauge 0.1mm ? what is the practicality of elements less than this ??
sorry, but i think this is a problem where the optisation has gone "a bridge too far" and practical real world limits trump the mathematical ones.
RE: stiffness matrix is not positive definite
The warnings appears once in a while after several generation runs, and therefore it must be the case that the optimizer is going too far, but then it is discarding those results. If this is truly the case, then I think there should be no problem since those warnings wont affect my final results.
As for the elements considered practical, I was using the lower bound which is 1e-7 or 1e-10 as the unacceptable thickness. I mentioned earlier that my lower bound should be theoretically as near to 0 as possible to eliminate ONLY the useless elements. I dont know how accurate this is. GregLocock already mentioned that he usually uses 5 or 10% density as his cutoff.
Therefore, if the optimizer was allowed to go below lets say 1e-7, I would have found elements less than 1e-7 for sure. Therefore, when Im eliminating elements by using 1e-7 cutoff, it is as if Im eliminating all thicknesses less than or equal 1e-7.
I have one final question: If I eliminate thicknesses and my design works fine, but after elimination I have an element or two that are connected from one node only. In other words, as if they are hanging from another element and therefore they wont carry any load and are useless, yet their thickness was higher than the threshold. I can just remove them manually and continue.
But my question is: If they are useless, and Im assuming they are, shouldnt the optimizer reduce their thickness to the lower bound ?
1) Either they didnt have any impact on the design so the value was left as is.
2) The optimizer didnt finish completely optimizing the design.
I am right in any of the above statements ?
Thank you.
RE: stiffness matrix is not positive definite
RE: stiffness matrix is not positive definite
I run Gradient methods and simplex methods in Matlab, they sometimes give warnings, but most of the time I find that they can be neglected.
Another thing, make sure the results of the optimization make sense, if you are getting some crazy numbers check the feasibility of the design variables.
Fe
RE: stiffness matrix is not positive definite
Fe
RE: stiffness matrix is not positive definite
Why is it not practical ? I want something that resembles 0 and has no effect on my design.
Thank you.
RE: stiffness matrix is not positive definite
I was under the impression that you wrote your own codes.
I just thought from my experience that a convergence value of 1e-10 would take a while to 'converge' depending on the problem you have. But, if your design variables make sense in the end and it doesn't take 2 days to compute then you should be fine.
Does it really make a huge difference 1e-10 as opposed to 1e-5 or 1e-7.
just a thought,
Fe
RE: stiffness matrix is not positive definite
Thank you.
RE: stiffness matrix is not positive definite
Cheers
Greg Locock
SIG:Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.
RE: stiffness matrix is not positive definite
Fe