辅导案例-ENGR10003

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
ENGR10003 Engineering Systems Design 2, November 2014 SID:
PART B - extended answer (60 marks)
Answer all Part B questions in the spaces provided on this paper.
Question 1 (20 marks)
1. [3 marks] Explain how analog signals are represented in digital circuits by binary numbers
using the techniques of sampling and quantisation, and argue that digital circuits are more
immune to noise than analog circuits.
Page 18 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
2. [2 marks] Use the theorems of Boolean algebra to simplify the expression F = XY Z+XY Z+
X for the Boolean variables X, Y and Z.
3. [2 marks] Convert the hexadecimal number FACE16 to decimal.
Page 19 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
4. [3 marks] The (7,4) Hamming code takes four information bits (b4 b3 b2 b1) and adds three
parity check bits (p3 p2 p1) to give a codeword
(c7 c6 c5 c4 c3 c2 c1) = (b4 b3 b2 p3 b1 p2 p1).
The check bits (p3 p2 p1) are chosen as follows:
• p3 is chosen so as to give an even number of 1s in the group (c7 c6 c5 c4) = (b4 b3 b2 p3);
• p2 is chosen so as to give an even number of 1s in the group (c7 c6 c3 c2) = (b4 b3 b1 p2); and
• p1 is chosen so as to give an even number of 1s in the group (c7 c5 c3 c1) = (b4 b2 b1 p1).
After transmission across a communications channel, a single error occurs in a transmitted
codeword leading to the 7-bit string 1100111 being received.
(a) [2 marks] Calculate the parity of each of the three code groups listed above for the
received codeword 1100111 and use this to form the 3-bit syndrome (s3s2s1).
(b) [1 mark] What was the codeword that was transmitted?
Page 20 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
5. [10 marks] You are to design a circuit, called a BCD checker, that takes a 4-bit number
A3A2A1A0 as input and determines whether it is a valid Binary Coded Decimal (BCD) code.
It can be represented by the logic block:
The output BCDout is 1 if the 4-bit input number is a valid BCD code and 0 otherwise. For
example:
• If the input number is 0111 then the output would be 1 as 0111 is a valid BCD code.
• If the input number is 1100 then the output would be 0 as 1100 is not a valid BCD code.
(a) [3 marks] Construct the truth table for the output BCDout of the BCD checker.
Page 21 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
(b) [3 marks] Use a Karnaugh map to obtain a minimal sum of products expression for the
output BCDout.
(c) [1 marks] Draw a circuit diagram for the BCD checker.
Page 22 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
(d) [3 marks] Now suppose that the BCD checker circuit is to be modified to be used as a
module in a larger n-bit BCD checker design capable of checking if the input of an n-bit
number is a valid BCD code, where n is a multiple of 4.
Modify the circuit in part (c) using additional logic gates to yield a new module that has
an additional input BCDin as shown in the figure below
such that the output BCDout is 1 if and only if the 4-bit input A3A2A1A0 is a valid BCD
code AND the input BCDin is 1. Show how several of these new modules could be used
to check the validity of an 8-bit BCD code X7X6X5X4X3X2X1X0.
More space is provided for your answer on the following page.
Page 23 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
Page 24 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
Question 2 (20 marks)
1. [10 marks] The Euclidean distance between any two points (x1, y1) and (x2, y2) is given by
d =

(x1 − x2)2 + (y1 − y2)2
The area of a triangle can be calculated based on the lengths of its sides as follows
area =

s× (s− a)× (s− b)× (s− c)
where a, b, and c are the lengths of the sides and s is equal to half the sum of the lengths of
the three sides of the triangle, i.e. s = (a+ b+ c)/2.
(a) [2 marks] Write a MATLAB function side_length that calculates and returns the length
of the side formed by any two points x1, y1 and x2, y2 (i.e. the distance between them).
(b) [5 marks] Write a MATLAB function triangle_area that takes three coordinates of
three points x1, y1, x2, y2, x3, y3 that determine a triangle (i.e. the x and y components of
each of the three points in order) and returns the area of a triangle and is calculated by
calling your side_length function from part (a).
Page 25 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
(c) [3 marks] Write a MATLAB script that prompts a user to enter the coordinates of three
points that determine a triangle (i.e. the x and y components of each point entered as
[x1, y1, x2, y2, x3, y3]), calculates the area of the triangle and prints it to the screen. You
may use your triangle_area function from part (b).
For example, running your script and providing it with some example input should yield:
Enter triangle coordinates [x1, y1, x2, y2, x3, y3] : [1, 2, 1, 6, 4, 2]
The area of the triangle is : 6
Hint : The MATLAB function to prompt for user input is input
Page 26 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
2. [10 marks] In this question you must write a MATLAB function that finds duplicated elements
in a vector. The output of the function must result in a new vector containing only unique
instances of the duplicated values.
For example, the duplicated element vector E of the vector x=[2 3 2 4 5 6 5 2 1 1] is
E = [2 5 1]
Note that the duplicated element vector does not need to be sorted in any particular order,
however it must contain only one of every duplicated value of the input vector.
Write a MATLAB function find_duplicates(x) that computes and returns the duplicated
elements vector of the vector x. You must make sure that the vector x contains only numbers
and if not return an appropriate error message.
NOTE : You may NOT use the MATLAB functions unique or find in your answer.
Hints :
• The MATLAB function isnumeric(A) returns 1 if A is a numeric array and 0 otherwise.
• The MATLAB function ismember(A,B) where A is a number and B is a vector, returns 1
if A is contained in B and 0 otherwise.
More space is provided for your answer on the following page.
Page 27 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
Page 28 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
Question 3 (20 marks)
1. [10 marks] A cable between points E and F is raising a drawbridge as shown in the diagram
below. The weight of the drawbridge is assumed to be a series of point loads acting at pin
joints A, B, C and D with the forces as indicated.
(a) [2 marks] Sketch the free body diagram of the system described above.
Page 29 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
(b) [8 marks] Using the ‘Method of Joints’, evaluate the force in each of the truss members
EG, DE, DG, CD and GH. In order to get full marks, you need to specify whether each
member is in ‘Compression’ or in ‘Tension’.
Page 30 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
2. [10 marks] The School of Engineering is organising an end-of-year fishing trip. Prof. Andrew
Ooi and Dr. Gavin Buskes have decided to compete with each other and see who can catch
the most fish for the day. In order to ensure victory, Andrew needs to calculate the distance
that the fishing spear travels given an initial velocity and angle so that he can achieve a 100%
chance of hitting the fish. To simplify his calculation, the fishing spear is modelled as a spherical
particle as shown in the figure below.
The aerodynamic drag of the spherical particle is
F =
CD
2
ρV 2A (1)
where V is the velocity of the spherical particle, CD is the coefficient of fluid/air drag, ρ is the
density of the fluid/air and A is the spherical particle’s frontal surface area. The mass of the
object is m.
Page 31 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
(a) [4 marks] Derive the governing equations that define the 2-dimensional motion of the
spherical particle under the effect of fluid/air dynamic drag and gravity. Assume that the
drag coefficients in air and sea water are the same and there is no effect as the spherical
particle enters the sea water from air.
Page 32 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
(b) [4 marks] Assume ZERO fluid/air dynamic drag in the set of ordinary differential equa-
tions that you derived in part (a). Further assume that the fish is modelled as a single
point located H = 10m below the lauch location, and let the spear be fired at an initial
velocity of 6m/s at an angle of 45◦ to the horizontal.
Determine the flight time tflight ( i.e. how long it would take for the spear to hit the fish),
the distance L the fish must be located at in order to hit it and the maximum height,
ymax, that the particle reaches after being launched in the air.
More space is provided for your answer on the following page.
Page 33 of 34
ENGR10003 Engineering Systems Design 2, November 2014 SID:
(c) [2 marks] Is it possible to point the spear gun downward and still able to catch the fish?
Explain your answer.
END OF EXAMINATION
Page 34 of 34

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468