- Parent Category: Programming Assignments' Solutions
We Helped With This MATLAB Programming Homework: Have A Similar One?
|More Info||Do My Signal Processing Homework Online|
Mathematical Modelling For Engineers
Study Period 3, 2017
Due Date: 10/11/2017
PROJECT SP5 2017
Ground Rules for All Students
1. This is a group project, and each group has exactly two students.
2. The two students must share the work equally between them.
3. We can’t have a group where one student works in EXCEL and the other in MATLAB. Students in the same group must be learning the same platform. (This is the only unbreakable rule. All other rules are, to a certain extent, negotiable.)
4. If at all possible, you should partner with someone from your same Computer Practical. The reason for this is that we will be using the pracs to work on the project. If a group has two partners in different pracs, things get considerably more complicated.
5. As soon as you form a group, inform the instructor in your prac. We will keep a list of all the groups.
6. Troubleshooting. It sometimes happens that a student will come to me close to the end of the project, and say oh, I don’t have a group yet. Don’t be that person. It is in your best interest to find a partner in good time.
7. Troubleshooting. It sometimes happens that one partner feels that they are carrying the group, and that the second partner is not contributing. When that happens, I need to be informed immediately.
8. Troubleshooting. It sometimes happens that two partners do not get along, even though both are contributing to the project. If you feel uncomfortable in your group, let me know as soon as possible.
9. Under exceptional circumstances we can allow a student to carry out the project individually. If this is due to external factors and against the student’s wishes, then we will take that into account when marking the project. However, if a student elects to do the project individually, then that student takes full responsibility for the extra workload. The same applies to students who, through their own actions, end up doing the project on their own.
This project is about tracking the position of a moving object P from three tracking devices A, B, and C. All objects are located on a flat field. The tracking devices are not very sophisticated: All a tracking device can do is measure the distance from itself to the moving object P.
The picture below shows the field, the tracking devices A, B, C, and the moving object P. The lines from P to each device are merely representing the distances from P to each device.
All our measurements are in kilometres. We introduce coordinates into the problem. The lower left corner of the field will be the origin (0,0); point A has coordinates (6,5); point B has coordinates (12,15); point C has coordinates (28,10). Point P has coordinates (x,y), which are variable. The field itself measures 50 kilometres by 20 kilometres.
This project has three parts. In Part A we will explore some theoretical aspects of the tracking problem. In Part B you will implement, in either Excel or Matlab, theoretical formulas obtained in Part A, in order to locate P. In Part C, once again using either Excel or Matlab, you will implement a brute force method for locating not P, but a point Q that is close to P. This method is inexact, but it has the advantage of not requiring large amounts of theory.
Part A: Theory
1. Let dA, dB, and dC be the distances from P to A, B, and C, respectively. Write down formulas for dA, dB, and dC, depending on the coordinates (x,y) of P.
2. Consider the statement:
As a rule, knowing only the values dA and dB will not be enough to determine the position (x,y) without ambiguity.
Is this statement true, or false? Justify without using formulas.
3. Suppose dA, dB, and dC are given. Solve the equations in the first item for x and y. 4. Suppose the object P moves according to the parametric equations
P = (x,y) = (5t,16 − 4t).
Here, time t is measured in minutes.
(a) This object is describing a straight line. Find the cartesian equation ax + by = c representing this line.
(b) At what time does the object enter the field? At what time dos the object leave the field?
(c) What is the (constant) speed of the object? (Rather fast!)
(d) At what time is the object closest to A? Where is the object at that moment? (Use calculus.)
Part B: First implementation, in Excel or Matlab
If you are working in MATLAB, please write your code in M-files. If you are working in Excel, you have the option of writing VBA files, or working directly from the spreadsheet.
5. Write a short code to implement the formulas for x and y that you obtained in item (3). Your code should take the values dA, dB, and dC as input, and output the values x and y corresponding to the position P.
Part C: Second implementation, in Excel or Matlab
Even though we have exact formulas to find x and y given dA, dB, and dC, it is good to have alternative methods at hand.
The first alternative we present is not very efficient, but it is worth implementing nonetheless.
6. Write a code to list all points with coordinates (m,n), where m and n are integers, with domains 0 ≤ m ≤ 50, 0 ≤ n ≤ 20. Let’s call these points Q. (There are 1071 such points.)
7. For each of the points Q you obtained above, your code should compute the distances from Q to the points A, B, and C. You will obtain a list of distances, three distances for each of the points Q.
8. Finally your code must choose the point Q such that the distances obtained best resemble the distances dA, dB, and dC. (What’s best? It is up to you to decide.)
9. What does it mean, for you, to be best in this context? Explain in words.
10. If all went well, your code will have chosen the best Q, from among the available choices, and this Q will be less than 1 kilometre from P. Explain in words how can this code be improved to obtain a Q that is less than 50 metres close to P. (You don’t need to implement the code.)
• Each member of your group will hand up through learnonline a copy of the project report. These two copies must be identical to each other, and must contain the names and student IDs of both two group members.
• Neatness and clarity counts. You will be marked not only on the correctness of your work, but also on your presentation of results. Ten percent of your mark will be for presentation.
• From Part A your document must include the required formulas, explanations, and results.
• From Parts B and C your document must include a printout of the code you used. Under absolutely no circumstances you should include tables with thousands and thousands of numbers. You should, however, include a printout of the code that allowed you to generate these tables. If you so desire, you may include a few dozen lines of the tables, to illustrate what the code is doing, but no more than that.
• Your code should include comments to help the reader understand what your code is doing. It is not enough to have a working code, you must also make it a clear code. Documentation is important!
• Don’t be limited by the scope of the questions that were asked. For example, if you think that adding a picture to your document will make the results more understandable, then you should add the picture, even if it was not asked for.