RME40002
Mechatronics Systems Design
Portfolio Tasks Description
Semester 2, 2022
Instructions
- The portfolio is individual assessment. You must complete the tasks by your own. Read the RME40002 Assessment Criteria document in Canvas for details.
- You could get feedback from your tutor in class on your solution prior to the submission due date.
- Use the Portfolio Template provided in Canvas for your submission.
- You do not need to copy the task questions into your portfolio, but clearly label
the task number you are answering.
- For MATLAB questions, include all source codes and commands as text in the
portfolio. If a question asks you to plot or display something to the screen, also include the screenshots of plot and screen output your code generates. Include results and sufficient comments if required.
- For LabVIEW questions, provide screenshots of both front panel and block diagram with sufficient resolution for readability.
- For non-programming questions, you may type in your answers or scan your handwritten answers to include in the portfolio.
- You should submit two separate portfolios for the tasks required in this document. Each portfolio must be a single electronic file in PDF format or Word document.
- The file name and deadline of your portfolio submission requirement:
First Portfolio – Answers to tasks from Week 1 to 4
File name [Your student ID]-[PF1]
For example, 12345678-PF1.pdf
Submission deadline Sunday, August 28, 2022 by 23.59pm
Second Portfolio – Answers to tasks from Week 5 to 8
File name [Your student ID]-[PF2]
For example, 12345678-PF2.pdf
Submission deadline Sunday, October 2, 2022 by 23.59pm
Penalty will be applied for late submission (see Unit Outline for details).
- The only way to submit your portfolio for assessment is uploading through Canvas>>Assignment>>Portfolio Submission. Submissions by using other methods such as through Email would not be accepted.
11. Submissions failing to satisfy the above requirements would NOT be assessed! 12. You also need to keep a record of the source codes of your solution. You may be
asked to provide the source codes during the assessment period.
Week 1
1.1 LabVIEW Basics – Data types, math calculation, and display 1.1.1 Data types
This task is designed to help students get started with LabVIEW, which also helps to familiarize the common data types.
1) Start a new file in the LabVIEW and save it as Week1p1p1.vi
2) Select Window>>Show Block Diagram (Ctrl+E)
3) Create controllers-indicator pairs for different variables such as
- Name (strings),
- Age (doubles),
- LED (Booleans),
- Exam results (array)
- A cluster that contains all variables above
4) Organize components in your front panel and block diagram for readability
5) Provide screenshots of both the front panel and block diagram you have designed in the portfolio report. Your results will be like below.
1.1.2 Math calculation
This task practices how to program a math expression and calculate its result.
Calculate the value of y according to the following expression by using the blocks of numeric palette, formula node and mathscript, respectively.
- 1) Start a new file in the LabVIEW and save it as Week1p1p2.vi
- 2) Select Window>>Show Block Diagram (Ctrl+E)
- 3) In the block diagram, right-click and select Functions>>Numeric.
- Basic math operations can be found in Numeric such as Add, Subtract, Multiply, Divide, Square, and Square root.
- Complete the calculation with basic math blocks.
- 4) In the block diagram, right-click and select Functions>>Structure>>
Mathscript. Complete the same calculation for y with mathscript.
- 5) In the block diagram, right-click and select Functions>>Structure>> Formula
node. Complete the same calculation for y with the formula node.
- 6) Create indicators to display the results as calculated by the above methods.
- 7) Organize components in your front panel and block diagram for readability
- 8) Provide screenshots of both the front panel and block diagram you have
designed in the portfolio report. Your results will be like below.
1.2 Mechatronics Project – Literature review
Peruse the Mechatronics Project Guidelines document and complete a preliminary review on how the pick-and-place robotic arms are used in reality. Briefly introduce the working principles of at least two examples of such existing equipment and their applications. You are suggested to use photo or diagram for clear explanation.
Approximately 300 words exclusive of photo and graph are required in this task.
Week 2
2.1 MATLAB Basics – Script file, if, for, while 2.1.1 The if Construct
The unit price of a product changes according to the number of units purchased, a 10% discount is applied when purchasing over 20 units. A customer could enter the number of units and original unit price in the command window. Then, the overall price is calculated.
- 1) Write a program in a MATLAB script file named as Week2p1p1.m
- 2) The program asks the user to enter the number of units and the unit price in the
command window.
- 3) The program then displays the total price in the command window.
- 4) Provide your script code and the screenshot of the results from your command
window in the portfolio report.
For example:
Please enter the number of units: 21 Please enter the price per unit $: 10 The overall price is $XXXXX
2.1.2 The for Loop
Write a program to calculate the sum of the first 5 terms of the series:
2k + 1 ??=1
- 1) Write a program in a MATLAB script file named as Week2p1p2.m
- 2) Calculate the sum for n = 5 and show the result in the command window.
- 3) Provide your script code and the screenshot of the results from your command
window in the portfolio report.
For example:
The result for n = 5 is XXXXX.
2.1.3 The while Loop
Use the program to create an array consisting of 5 random numbers and display all the elements in the array at the end.
1) Write a program in a MATLAB script file named Week2p1p3.m
2) Generate random numbers using function randn and show the result in the command window.
√5??2
and display the result.
3) Provide your script code and the screenshots of the results from your command window in the portfolio report.
For example:
The array is -1.711516 -0.102242 -0.241447 0.319207 0.312859
2.2 LabVIEW Further – Case, for 2.2.1 The case Structure
The problem is the same as 2.1.1. Whereas, students should use the case structure in LabVIEW to calculate the total price. In addition, students should create two text boxes such as “unit purchased” and “unit price” shown in the following. A user can enter values in the text boxes and the corresponding total price is calculated.
1) Start a new file in the LabVIEW and save it as Week2p2p1.vi
2) Calculate the total price using the case structure
3) Organize components in your front panel and block diagram for readability
4) Provide screenshot of both the front panel and block diagram in the portfolio
report.
2.2.2 The for Loop
The problem is the same as 2.1.2. students are asked to calculate the sum of the first 5 term of the series:
and display the result. Moreover, students should make use of the for loop structure in LabVIEW and display the value of the sum.
- 1) Start a new file in the LabVIEW and save it as Week2p2p2.vi
- 2) Calculate the value of the sum using the for loop
- 3) Organize components in your front panel and block diagram for readability
√5??2 2k + 1
4) Provide screenshot of both the front panel and block diagram in the portfolio report.
2.2.3 The while Loop
The problem is the same as 2.1.3. Students are asked to create an array consisting of 5 random numbers and display all the elements in the array.
Then, display the array in the front panel.
1) Start a new file in the LabVIEW and save it as Week2p2p3.vi
2) Students can use the “Random Number (0-1)” block in Functions>>Numeric and while loop to generate random numbers array.
3) Organize components in your front panel and block diagram for readability
4) Provide screenshot of both the front panel and block diagram in the portfolio
report.
2.3 Mechatronics Project – Design tasks
Refer to Appendix, Section 2: Task Elements in the Mechatronics Project Guidelines document. Answer and explain the following questions:
- 1) What is the task you feel most confident to accomplish; and explain why based on your prior knowledge or practice?
- 2) What are the most challenging tasks for you; and what is your plan to improve yourself in those areas through this project development?
Approximately 200 words are required in this task.
Week 3
3.1 Import MATLAB code in LabVIEW using Mathscript Simulation of throwing a ball
Below are all the steps you need to follow, but you may also add your own meaningful comments to the code as you write it.
1) Start a new file in LabVIEW and save it as Week3p1.vi
2) In the file, define some constants (label the constants for readability)
- h = 1.8, % Initial height of ball at release is 1.8 m
- ?? = 9.8, % Gravitational acceleration is 9.8 m/s2
- ?? = 4, %Velocity of ball at release is 4 m/s
- ?? = 45, % Angle of the velocity vector at time of release is 45 degrees
3) Next, make a time vector ??, that has 1000 linearly spaced values
between 0 and 1, inclusive.
4) In the following figure, x denotes distance and y is height, the
equations below describe their dependence on time and all the other parameters (initial height h, gravitational acceleration g, initial ball velocity v, angle of velocity vector in degrees ??). See the following illustration:
Solve for x and y
i. ??(??) = ????????(?? ?? )??, We multiply ?? by ??
??
ii. ??(??)=h+????????�?? �??−0.5????
to convert degrees to radians.
5) Approximate when the ball hits the ground.
- Find the index when the height first becomes negative (use Threshold 1D
Array Function).
- The distance at which the ball hits the ground is the value of x at that
index
- Display the result in Front Panel: The ball hits the ground at a distance of
X meters. (where X is the distance you found in part ii above)
6) Plot the ball’s trajectory in Front Panel
i. Create a new XY graph which can be found in Modern >> XY Graph Page 9 of 22
- Plot the ball’s height on the y axis and the distance on the x axis using a blue solid line
- Label the axes meaningfully and give the figure a title
- In the same graph, plot the ground as a dashed red line. This should be a
horizontal line going from 0 to the maximum value of x. The height of
this line should be 0.
- 7) Run the program and verify that the ball indeed hits the ground around the
distance you estimated in 5) and create messages in the form “The ball hits the
ground at a distance of x.xxxx meters.”
- 8) Organize components in your front panel and block diagram for readability
- 9) Provide screenshot of both the front panel and block diagram in the portfolio
report.
Example:
3.2 Mechatronics Project – Your individual project plan
You should have formed your project group by this week. In this task, address the following questions:
- 1) Outline the task allocation among your group members.
- 2) Outline your individual project plan according to semester weeks. Use a Gantt
chart with a brief description of each week’s tasks.
Approximately 200 words exclusive of photo and graph are required in this task.