Previous section-----Next section

9.2.2 Solving for Multiple Parameters

It is possible to specify any number of geometric conditions to be satisfied at any number of different mechanism configurations, however, it is certainly not possible to satisfy any arbitrary set of conditions. A CoupleSystem object built by SetCouple may have no solution, or it may have stiff singularities at points very close to a valid solution, making it difficult to converge the model. The following example demonstrates a useful technique for slowly coaxing a model towards a desired solution with SolveCouple.
In the following example, a coupled system is used to find the values of bar2, bar3, bar4, and T that satisfy four different geometric conditions at two different points in time. The X and Y coordinates of point 3 on the center bar are specified at T = 0.1, and the X and Y coordinates of point 3 on the center bar are specified at an arbitrary time T > 0.1, effectively specifying that point 3 on the center bar must pass through a given point in the global reference frame.

Here is the current location of point 3 at T = 0.1 and T = 0.3.

First, a CoupleSystem object is built that has very unambitious goals. This system simply tries to satisfy a set of conditions that are already approximately satisfied. Then, the coordinate goals k1, k2, k3, and k4 are changed, slowly pulling the solution of the model away from its original configuration.

The new parameters, k1 to k4, are added to the parameters list.

Note that the parameters bar2, bar3, and bar4 are approximately equal to their original values.

When SolveCouple is called with a symbol that evaluates to a CoupleSystem object as its first argument, SolveCouple updates the initial guesses contained within the CoupleSystem object to the new values found to be the solution. Therefore, independent parameters can be slightly tweaked between successive runs of SolveCouple, with each run nudging the model slightly closer to the desired solution.

The parameters are repeatedly changed and the model is re-solved.

Here is the four-bar mechanism at T = 0.1 and T = 0.396, with the locus of point 3 on the center bar.

The k1-k4 parameters are removed from the parameters list.