# Optimisation Of The Slider Crank Mechanism English Language Essay

**Published:** **Last Edited:**

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

The slider-crank mechanism is a four bar linkage which can transform the circular motion of the crank in a linear motion of the slider block. This mechanism is used in many real systems like automobile sector and mechatronic applications. The optimization of the design of any mechanism represents one of the most important steps in the application of the mechanism itself. The research in the optimal design of mechanisms is not restricted to mechanical systems but rather to electro mechanical or mechatronic systems. These optimization methods are employed in the design of rigid-body systems, compliant mechanisms, and robotic functionalities, which are adopted from linear programming and interior point systems. In this technical paper the Simplex algorithm is adopted to perform this optimization for the mechanical benefit on an inline slider-crank mechanism. Whether there is the need to optimize whatever kind of system, an objective function to optimize has to be determined, through an investigation, together with the adoption of a certain number of fixed parameters called 'constraints'. Results showing the optimal solution are computed and compared with those obtained by the implementation of the method in Computer Aided Engineering (CAE).

1. Introduction {word count= 1009/1000}

The Simplex method represents the most popular way for solve Linear Programming Problems (LPP). In order to better understand how this method works, it is helpful to imagine a feasible region, like a volume, bounded by several surfaces. It is possible to imagine that every vertex of the volume is in contact with other 3 neighbour vertices thanks to a line. Each of these vertices represents a basic feasible solution and, staying at any of them, the Simplex method provides an aid to go from the starting vertex to one of the neighbours which is the closest, among the three, to the optimal solution. In this way, the Simplex algorithm provides the shortest route in order to achieve the optimal solution (Simplex Method-Lecture Notes 3.3).

Figure 1 - Basic concept of a simplex algorithm for a 3-D case (Simplex Method-Lecture Notes 3.3)

In light of what has been shown up to this point, it can be affirmed that the Simplex method consists in a series of iterations which allows to move from one basic feasible solution to another until the optimal basic feasible solution is reached. In order to obtain it, the 'canonical augmented matrix' has a very important role (Bertsimas & Tsitsiklis, 1997).

Suppose to have the following basic feasible solution: (Edwin and Stanislaw, 2006)

or equivalently

Assuming that each basic feasible solution of Ax=b, xâ‰¥0 is a "non-degenerate" basic feasible solution. As mentioned, the aim is to move from one basic feasible solution to another which has the same meaning in changing basic columns in a way that "the last column of the canonical augmented matrix is nonnegative" (Edwin and Stanislaw, 2006).

For this purpose can be considered the basic columns a1,â€¦,am and can be assumed that x=[y10,â€¦,ym0,0,â€¦,0 ]T is the corresponding basic feasible (i.e. values of the last column are positive) solution. A further step is to make of a vector aq a basic column (q>m) (Edwin and Stanislaw, 2006):

This can be multiplied by Îµ > 0:

and, subsequently, combined with in order to obtain the following (Edwin and Stanislaw, 2006):

The following vector:

represents a suitable solution for Ax=b (Edwin and Stanislaw, 2006). In particular, if Îµ = 0, the old basic feasible solution is obtained. As soon as Îµ > 0, then all other values of the above vector will increase or decrease, but with linearity. In case of very small Îµ, which can be chosen when any of the vector components decreases when Îµ increases due to do not make these components become insignificants, a nonbasic feasible solution is obtained (Edwin and Stanislaw, 2006):

It is obtained, with this Îµ, a new basic feasible solution in which the vector aq is replacing the vector ap, where . Thus, the new basis is a1,â€¦,ap-1,ap+1,â€¦,am,aq where aq 'enters' the basis and ap 'leaves' it. In the particular case that no one of the yiq are positive, then happens that all components of the above vector increase together with Îµ and the result is that is not possible to obtain a new basic feasible solution (Edwin and Stanislaw, 2006).

What it was done until this point was to show how to go from one basis to another and to keep the solution feasible. Two more steps have to be analysed in order to complete the explanation of the Simplex method. Firstly about the choice of which nonbasic column should enter the basis and secondly to find a condition which will stop the iteration i.e. to determine if a basic feasible solution can be accepted as optimal solution. For this purpose should be reminded that the basic concept of the Simplex method is to go from one basic feasible solution to another at which the value of the objective function is smaller which means, to move from one vertex to the one of the 3 adjacent which is the closest to the optimal solution (Edwin and Stanislaw, 2006). It was also said that the Simplex is an iterative method and, since the considered polyhedron is formed by a finite number of vertices, the optimal solution will be found after a finite number of iterations. For understand to which of the neighbour vertices to move, it is interesting to consider the following basic feasible solution (Edwin and Stanislaw, 2006):

For any solution the value of the objective function is: . For the above basic solution the value of this function is:

Where

It is possible to appreciate how the objective function changes its value when moving from one basic feasible solution to another. For this, imagine to choose the qth column, m<qâ‰¤n, to 'enter' the basis. In order to change the canonical augmented matrix, assume and :

In this vector Îµ appears in the qth component while the pth component is zero (Edwin and Stanislaw, 2006).

The cost for this new basic feasible solution is:

Where z0 is represented by (c1y10+â€¦+cmym0).

Calling, then:

When

The value of objective function at the new basic feasible solution is smaller than the value of the objective function at the previous solution. Hence, the new basic feasible solution has a smaller value of the objective function (Edwin and Stanislaw, 2006).

Moreover, it is possible to say that the solution obtained represents the optimum if the given basic feasible solution is such that for all q=m+1,â€¦,n

To better understand this, can be useful to analyse the following representation of the solution:

Where zi=c1y1i+â€¦+cmymi, i=m+1,â€¦,n. In case of feasible solution xiâ‰¥0, i=1,â€¦,n.

Hence, when ci-ziâ‰¥0, i=m+1,â€¦,n, than every other feasible solution x will be represented by a value cTx of the object function which is not small than z0 (Edwin and Stanislaw, 2006).

Being all these steps demonstrated and better identified and summarised in the flowchart of Figure 2.1 in the next section, they led to the following Theorem: "A basic feasible solution is optimal if and only if the corresponding reduced cost coefficients are all nonnegative" (Edwin and Stanislaw, 2006).

As previously said, the Simplex method is an excellent solution to the LPP. Linear Programming (LP), in turn, represents the most useful optimisation technique to solve engineering problems. Thus, in order to apply the Simplex method to a general engineering problem, the following 4 steps should be taken (Simplex Method-Lecture Notes 3.3):

Convert the common form of a LPP to its canonical form.

Find a basic feasible solution of the LPP.

Move from the starting basic feasible solution to the closest solution, among the neighbours, to the optimum.

Follow the iterations until the optimal solution is finally reached.

2. The Method {word count= 907/1000}

Simplex search method invented by George Dantzig in 1947, this search method is a method used to solve and optimise problems in linear programming. This method based on testing the adjacent vertices of a polyhedron which provide realistic set of solutions, with the intention that at each vertex the objective function improves or is unaffected. Simplex method is finite method because the number of polyhedron vertices is limited. (Klee & Mintv, 1972)

In order to clarify the method, general description for the procedure is mentioned followed by the flowchart (Fig 2.1) to illuminate it. To start with, the LPP (linear programming problem) is transformed to the standard form, and then the canonical improved matrix is formed corresponding to the standard form. After that, the first vertex set is created and the initial values are noted down then, each equation is symbolised and the reduced cost coefficients is calculated corresponding to the non-basic variables. This completes first step of computation.

After finishing each step of the algorithm, two things should be checked. The first one is the possibility of father augmentation in case of negative cost coefficients exist, otherwise the solution obtained for the basic feasible is optimum. And the second thing, is selecting non-basic variable is determined such that the change generated from this variable should have maximum effect on the objective function. For that reason, the variable with the minimum coefficient has to be selected from the group of cost coefficients.

In order to start new step (iteration), a new vertex obtained after crossing over with the new current adaptation, then the analysis is performed and the set is updated again. A crossing over function is applied and each set is changes after the process of updating the optimality ratio. After this procedure the solution area gets smaller to a certain number of optimum values and a new set of vertices are selected (Edwin and Stanislaw, 2006). From this the best slider crank positional individual vertex value is found out and also we have a set of constraints for the values to fit.

Calculate

p = arg min {yi0/yiq : yiq > 0}

Stop - the current basic feasible solution is optimal

Select a q such that rq < 0

NO

The canonical augmented matrix is formed corresponding to an initial basic feasible solution

The reduced cost coefficients is Calculated corresponding to the non-basic variables

If r > 0 for all j

If no yiq > 0

Stop - the problem is unbounded

Update the canonical augmented matrix by pivoting about the (p, q)th element

Figure 2.1 -The following flowchart shows simplex method algorithm.

Source (Edwin and Stanislaw, 2006)

## 2.1 Slider Crank Mechanism

Slider crank is a mechanism that commonly used as a part in the internal combustion engines. This mechanism produce a translation motion which is generated by the energy released from the combustion that generated by burning a little amount of a high energy fuel inside the piston, and this liner translation motion converts to a rotating motion delivered to the crank shaft (Fig 2.2). Engines are used in several applications, for some applications the size of the engine is significant. Consequently, for the need the optimum fitting of this mechanism within engine with specific dimensions optimisation design was used.

Figure 2.2 - Slider Crank Mechanism - source (Erkaya & Uzmay, 2009)

In this assignment the aim of this optimisation is to obtain slider crank mechanism with specified dimension length for the crank shaft and the connect rod. For that reason, the principles of slider crank mechanism are discussed.

In slider crank mechanism (shown in fig 2.3), the maximum value for stroke length is reached when the slider lies to the position (C2) distant from the crank centre of rotation (A), and the minimum is when it reached the position (C1) which is the closest distance to the centre of rotation (A). In (fig.1) h means the offset distance between the centre of rotation and the centre of sliding block. In the case when (h) equal to zero, this mechanism called in-line slider crank and the maximum stroke length is equal to the length of the crank shaft added to the length of the connecting rod, conversely, the minimum length is the difference between them and the stroke length itself is equal to the difference between the maximum and the minimum stroke length.

Figure 2.3 - Offset Slider Crank Mechanism

In this assignment, there is no offset length therefore, the piston is sliding on the same axis that passing the centre of rotation as shown in (Fig 2.4).

Figure 2.4 - In-line Slider Crank Mechanism

In order to find the maximum length for (r1) shown in (Fig 2.4), the vectors lope and vectors chain equations (Gardner, 2001) are performed:

Where,

= is the length of the furthest position for the piston from the center of rotation.

= is the length of the crank shaft.

= is the length of the connecting rod.

## 2.2The Design Constraints

The required from this function is the maximum length of (r1). There are some constraints in this function. Fristly, the stroke length (S) which is twice the crank shaft (r2) must be less than or equal to 15 cm. Secondly, since the size of the engine is determened, the maximum span for the mechanism which is (r1+r2 or 2 r2+r3) must be less than or equal to 45cm.

As a result ,these are the design constraints:

â‰¤ 15 cm

â‰¤ 45 cm

3. The Results {word count= 206/200}

In order to obtain the optimum values by using semplex method, the objective function is used with the given constraints to perform the simplex algorithm.

The objective function

Maximum

The design constraints

â‰¤ 15

â‰¤ 45

First, constraints should be transformed to its standard form as shown.

= 15

= 45

The equations above in addition to The objective function are transformed as following.

(1)

= 15 (2)

= 45 (3)

It can be said that, are recognized as basic variables and are known as nonbasic variables . Now the coffictint are symbolized

(f)

(x4) = b4

(x5) = b5

It is obvious that equation (1) has the minimum coffitiont value of x2 which is (-1).so, x2 is the entering variable to calculate b/c values.

## &

As, the value of is minimum, r value = 7.5 and the pivotal element and x4 is replaced by x2 in the basis.

Now , the pivotal row divided by the Pivotal element.

= 0

Now subtracting above row from rows gain,

(f)

(x2) = 7.5

(x3) = 30

The basic solution for the above form is,

x2=7.5, x3= 30, x4,x5= 0

Where, x2=r2 and x3=r3

Figure 3.1- Offset Slider Crank Mechanism

As a result, the obtined lengths for the crank shaft (r2) and the connecting rod (r3) (shown in Fig 3.1) were 7.5 cm and 30 cm, respectively. In which, these results are within the constraints range. Therefore, the maximum length of (r1) obtained from the optimisaition method is 37.5 cm.

4. Disscussion {word count= 1311/1500}

## 4.1 Evaluation of the method and discussion of the results

In the previous sections was shown the background theory and the basic concepts of the Simplex method. In addition, it was also shown how this method can fit and be applied to the optimisation of an engineering problem. At this point it is clear that the optimum is reached, thanks to this method, moving from a basic feasible solution to another one adjacent, along the edges of the feasible set, always in a cost reducing direction. However, it is not always possible to achieve a reduction of the cost. In the eventuality that a basic feasible solution is reached, but none of the available directions to take leads to a cost reduction, this basic feasible solution represents also an optimal solution and the iteration terminates (Bertsimas & Tsitsiklis, 1997).

It can be summarised that at a high level, the method does what was just said, i.e. to move from one solution to another, reducing the cost, until an optimal solution is found. Moreover, the analysis of the method done in this paper was based on the assumption that all basic feasible solutions are 'non-degenerate'. Eventually, being in degeneracy presence, it is possible to meet some serious difficulties such as an infinite number of iterations which will cause a so called 'cycling'. This phenomenon, which appears when it is not possible to reach a cost reduction, may be avoided thanks to the use of some particular rules (Bertsimas & Tsitsiklis, 1997).

However, the overall evaluation of the Simplex method is excellent. It is a robust and highly efficient algorithm for the resolution of linear programming and for this purpose it is adopted in the majority of the commercial codes.

The results obtained in the previous section represent the outcome of an analytical calculation. In order to provide a further evaluation of the method, for compare the results obtained and for show how this method can be applied to the Computer Aided Engineering (CAE), the following MATLAB code has been customized to the current engineering problem (Simplex Method-Lecture Notes 4.1):

clear all

f=[-1 -1]; %Converted to minimization problem

A=[2 0;2 1;0 1];

b=[15 45 30];

lb=[0 0];

options = optimset('LargeScale', 'off', 'Simplex', 'on');

[x,fval]=linprog(f,A,b,[],[],lb);

z=-fval; %Multiplied by -1

As it was illustrated in the previous sections, the aim is to apply the Simplex method in order to maximize the length r1 of the furthest position of the piston from the center of rotation given some constraints. At this purpose, for an easier understanding of how the parameters of the optimization are related to the MATLAB code, the objective function to maximize and the relative constraints are reported as follows:

Maximize

Subject to

When entering these expressions in the MATLAB code shown above, the objective function to maximize has to be converted into a minimization problem as it is suggested by the comment written in green at the second line of the code. In the end, as it is done at the last instruction of the code, the result should be multiplied by '-1' in order to optimize (in this case to maximize) the solution (Simplex Method-Lecture Notes 4.1). The optimal solution achieved by the code, of which in Figure 4.1.1 is provided the screenshot, is represented by the following values of Z=37.5, x2=7.5 and x3=30. These values are exactly the same of the values computed in the previous section. This shows the reliability and high efficiency of the Simplex method in solving linear programming problems.

The code shown has been written in MATLAB and run thanks to the 'optimization toolbox', which is a MATLAB tool and includes a lot of different optimization methods. To use this optimization toolbox, it was used the instruction written at the sixth line of the code:

options = optimset('LargeScale', 'off', 'Simplex', 'on');

Additionally, it was used the function 'linprog' which allows to solve linear programming problems (MATLAB - User's Manual).

Figure 4.1.1 - MATLAB results

## 4.2 Implementation of Simplex method in CAE

The most common way to implement the Simplex method is the so called full tableau. An iteration of the mechanism of this implementation can be summarised as follows (Bertsimas & Tsitsiklis, 1997):

The tableau, which is a matrix, is associated with a matrix B and its corresponding basic feasible solution x.

An examination of the reduced costs in the zeroth raw of the tableau is done:

If all the costs are nonnegative then the actual basic feasible solution is also the optimal solution;

Otherwise choose a j such as cj<0.

The jth column (pivot column) of the tableau is examined. If none of the components of this column is positive then the optimal cost is -âˆž and the loop terminates.

For any i such as ui>0, calculate the ratio xB(i)/ui. The column AB(l) leaves the basis and the column Aj enters it (l is the index of the row with the most little ratio xB(i)/ui).

To all the rows of the tableau matrix should be added a multiple of the lth row, which is the pivot row, in the way that ul, which is called the pivot element, is one and the rest of the entries of the pivot column are all zero.

Being the Simplex method, as mentioned, used for the solution of Linear Programming Problems and consisting in a finite number of iterations, its implementation can be performed, as proved, by the use of softwares like MATLAB. This is a well known computer program which allows a fourth generation programming language, matrix manipulation, algorithm implementation, etc. Among its tools a particular attention may be paid to the Simulink through which is possible to run simulation for the analysis of dynamic systems, i.e. the slider-crank mechanism. Thus, it is possible to write a computer code, which may be composed by several loops (iterations), to optimize a datum engineering problem. Relating to the in-line slider-crank optimized in this paper, could be written a MATLAB code, developed on the objective function r2+r3=r1, which would have as inputs the assigned constraints and as output the value which maximize the length of the furthest position of piston from the center of rotation, i.e. the optimal solution.

Another route for the CAE implementation of the Simplex method is represented by the software C++ which, as well as MATLAB, is nothing but a programming language able to develop iterative codes and to provide a specific solution. Moreover, solving a system of n linear equations in the n unknowns, the simplex algorithm may be computed also in Microsoft Excel.

## 4.3 Effect on design process

Nowadays, one of the main problems which companies have to face is represented by saving money. Many companies, for achieve this saving, make cuts on the production, work hours and, unfortunately also on the employees. Engineers, for help the company to save the money, have to face many problems in order to achieve optimal solutions for them. To reach these optimal solutions they have to use some particular algorithms and one of them is represented by the Simplex method which allows the company saving money and time. In relation to the current paper, it can be imagined that an engineering company has to design an inline slider-crank mechanism which will be used as component of an automobile engine for another customer company. Being the company producer of the mechanism a supplier, it will need to respect the deadline imposed by the customer. The Simplex method will allow the company to save time in the production of the mechanism especially if the objective function is particularly difficult to optimize. Moreover, adopting this method would also correspond in saving of money since, as it was exposed, the algorithm will proceed by iterations and at each of them, and the cost will be reduced until an optimal feasible solution has been reached.

5. Conclusion {word count= 96/100}

In this paper, the simplex optimisation design method was applied to the in-line slider crank mechanism, and formulated to obtain the optimum lengths for the crack shaft and the connecting rod with constraints of the piston stroke length and the total engine size.

Moreover, some implementations of the simplex method has been discussed and it has been proved, by the use of a MATLAB code, that the results provided by the studied method are reliable. Therefore, it is clearly understandable the high popularity that the Simplex algorithm has gained in order to solve linear programming problems.