×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

stiffness matrix is not positive definite
2

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.

RE: stiffness matrix is not positive definite

Since we have no knowledge of the code being used and how it handles non-positive definite stiffness matricies it is not possible to say much, however I would be highly skeptical of any results and would question your assertion that you still get good results.......

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

Could we perhaps put our engineering hats on and say if the plastic is only 1 /10000 mm thick then to all intents and purposes it does not exist, if a typical thickness is 3mm?

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

(OP)
Thank you all for your replies.

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

double precision only covers 15-16 significant digits, that sounds like alot but you are defining "zero" elements to 10 digits, that does not leave much room for accumulated errors over repeated operations.

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

1st, i wouldn't rely on a model that gives me these warnngs. (unless i understood what the error meant)

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

(OP)
To think of it now, I think you are right rb1957.

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

maybe your optimiser is "only" looking at the design gradient ... so that a member with zero gradient wouldn't change (without detecting that the member has zero load) ?
  

RE: stiffness matrix is not positive definite

What kind of optimization code are you using? Warnings in Matlab could be something as simple as a growing loop.
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.

peace

Fe

RE: stiffness matrix is not positive definite

btw, 1e-10 is not such a practical lower bound.  

Fe

RE: stiffness matrix is not positive definite

(OP)
I am using the MATLAB function FMINCON for optimization. As I mentioned earlier, upper bound is 3mm. Lower bound is 1e-7m or 1e-10m.

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

Oh I see. I have never used that function in Matlab.
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,

peace

Fe

RE: stiffness matrix is not positive definite

(OP)
yes it does because my upper bound is 3mm which isnt huge. So im dealing with small numbers. 1e-7 gives me a very good ratio of Output displacement/Input displacement which is around 14, 1e-10 gives me approx. dout/din = 22 which is much better than 14, if it wasnt for the warnings. Still 14 is a very good ratio and ill just probably stick to it in case I cant solve the warnings.

Thank you.  

RE: stiffness matrix is not positive definite

The point is that in the context of a structure with a general  3mm wall thickness, anything less than (say) 0.1 mm wall thickness is there for the ride. There are exceptions, I agree. But making a load bearing surface that is only 4 thou thick is pushing it.


 

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

Star for Greg.

peace

Fe

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources