Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MCD4140 Computing for Engineers

Self Study Exercise 10

Note: Tasks below can use for both hand calculation practice and programming practice.

Note: You might want to use extra sheet for hand calculation practice.

Task 1

Write the following set of equations in matrix form:

50 = 5x3 − 7x2

4x2 + 7x3 + 30 = 0

x1 − 7x3  = 40 − 3x2  + 5x1

Use MATLAB to solve for the unknowns. In addition, use it to compute the transpose and the inverse of the coefficient matrix.

Task 2

Considered a simplified electrical circuit and showed how we can apply Kirchoff’s law to derive a set of linear algebraic equations describing the current through each segment. Apply this methodology to the circuit below and  write  out  the  set  of  linear  algebraic  equations.  Arrange  these equations in matrix form.

 

Task 3

Consider now the slightly more complicated electrical circuit below. Apply the same methodology as for tutorial question 4 and write out the set of linear algebraic equations. Arrange these equations in matrix form.

 

Task 4

 

Figure above shows three reactors linked by pipes. The rate of transfer of chemicals through each pipe is equal to a flow rate (Q, m3/s) multiplied by the concentration of the reactor from which the flow originates (c, mg/m3).

 Qxi   = Qxi

一軒一          一軒一

input  mass       output  mass

If  the  system  is  at  a  steady  state,  the  transfer  into  each  reactor  will balance the transfer out. Develop mass-balance equations for the reactors and represents the equations in matrix form, Ax = b.

Task 5

Continue from task 4, solve for the concentrations of each reactor using Naïve  Gauss  Elimination.  Show  all  steps  of  the  computation.  Substitute your results into the original equations to check your answers.

Task 6

Given the equations

「0

8

3

3

L3

Solve by Gauss elimination with partial  pivoting.  Show all steps of the

computation. Substitute your results into the original equations to check your answers.

Task 7

A  builder  goes to work very early  but  he  encountered  a  problem.   He forgot  the  five  digit  access  code,  [n1    n2   n3   n4    n5],  to  his  high-tech workshop.   However,  he  remembered the five clues to  get the  access code.  Hereunder are the clues:

1.  The 5th number plus the 3rd number of the access code equals 14.

2.  The 4th number is one more than the 2nd number.

3.  The 1st number is one more than twice the 2nd number.

4.  The 2nd plus the 3rd number equals 10.

5.  The total of all the five numbers is 32.

(a) Derive a set of equations to compute n 1, n2, n3, n4, and n5. (b) Write this set of equations in matrix form.

(c) Use Gauss Elimination to solve this problem. Examine the numerical values for the coefficient matrix. Consider whether you need to include the capability of partial pivoting in your code. Write a MATLAB to solve this   problem   using   GaussNaive()   or   GaussPivot()   (whichever appropriate). Explain your choice.

Task 8

The torque equations of a robot manipulator are given below:

Torque for Joint 1: τ1  = (  )fz  −  2fz  2fz

Torque for Joint 2:  τ2  = fy  + fx  +  3fy

Torque for Joint 3: τ3  = fy

Use MATLAB command window only to solve this problem. Remember to

express the set of equations above in the matrix form, [A]{f } = {τ} , where A is the matrix of coefficient,  τ = [τ1      τ2      τ3 ]T  , f = fx       fy        fz T  .

(a) What is the torques experience by each joint, when the load on the end effector is f = [20N    10N    60N]T ?

(b) Given the maximum allowable torque for each joint are

τ = [60Nm   50Nm   75Nm]T , solve for the maximum allowable force, f .

Task 9

Consider  the  triple  mass-spring  system  shown  in  the  figure  below. Determining the equations of motion from Newton’s second law for each mass  using  its  free-body  diagram  results  in  the  following  differential equations:

x..1 + |  1           2    |x1 − |   2     | x2  = 0

(   m1       )       (m1 )

( k  )      (  k  + k  )      ( k  )

(m2 )      (   m2       )      (m2 )

( k  )      (  k  + k  )

(m3 )      (   m3       )

where k1 = k2 = k3 = k4 = 40 N/m, and m1 = m2 = m3 = m4 = 1 kg. The three equations can be written in matrix form:

0 = {Acceleration Vector} + [k/m matrix] [dispalcement vector x]

At a specific time when x1 = 0.05m, x2 = 0.04m, and x3 = 0.03m, this forms a tri-diagonal matrix. Use MATLAB to solve for the acceleration of each mass.

 

Task 10

Consider the truss shown below. In civil engineering it is very important to understand well the forces in such a static truss. The sum of the forces in both the horizontal and vertical directions must be zero at each node, for the system to be in static equilibrium.

 

For example,

FH  = 0 = − F1 cos (30) + F3 cos(60) + F1,h

 FV  = 0 =  F1 sin (30) + F3 sin(60) + F1,v

FH  = 0 = F2 + F1 cos (30) + F2,h  + H2

 FV  = 0 = F1 sin (30) + F2,v  + V2

FH  = 0 = − F2  + F3 cos (60) + F3,h

 FV  = 0 = F3 sin (60) + F3,v  + V3

where Fi,h  and Fi,v are the external horizontal and vertical forces applied at node i.  Positive sign convention is left to right for horizontal forces and upwards for vertical forces. In the above example, F1,v  = -1000lb. All other Fi,h  and Fi,v  = 0. Express this set of linear algebraic equations in matrix form. Use MATLAB command window to solve for the unknown forces.