MinMah23 / CAS741-Project

This repository includes the artifacts of my project in CAS741.
MIT License
3 stars 0 forks source link

Some questions about the VnV #29

Closed MinMah23 closed 1 year ago

MinMah23 commented 1 year ago

Dear Prof. @smiths, Thank you for your time and valuable feedback. I have some questions that need your help.

I put MIS in the related documents as the unit test section (section 6) is dependent on it and MIS itself is related to MG file. I also mention SRS in “SRS Verification Plan”, so the verification of SRS is a part of VnV process and is related to it. Am I wrong?

smiths commented 1 year ago

@MinMah23 my comment about the relevance of the SRS, MG and MIS was a request for you to say in the "Relevant Documentation" section why these documents are relevant for VnV. You use the other documents in the right way in your VnV plan. The comment is just about the presentation of the information in Section 3.3.

With respect to the real values for the expected output, finding a way to get these is the purpose of the VnV plan. If you cannot find a pseudo-oracle, then you cannot have test cases that look at whether the values are correct. In that case, you will need to find other ways to build confidence in your software.

One approach to finding the expected output is to select a problem that is so simple that the answer is relatively easy to find in closed-form. For instance, if you have a massless pendulum and no force, I'm fairly sure the solution for your problem should be 0 for everything. I have a feeling that a non-zero mass would not result in a solution of 0, even if the force is zero. (Your problem is very unstable after all.) I might be wrong though, a zero force might be all you need to get a zero solution.

I still think your mathematics won't technically support large angles (I think you created a separate issue to discuss this), but if you can let your inverted pendulum swing down 180 degrees, you could solve a regular pendulum problem. There are plenty of online calculators for that problem.

I believe you are solving your problem in Python. Another test would be to solve it in Matlab too (just for the ODE) and verify that the two solvers give the same solution. This isn't definitive proof, because it doesn't verify that you have the right model, or that you haven't made the same typo twice, but it would still help build confidence.

The static analysis techniques we discussed in class are an option, including code walkthroughs, code inspection, and static analysis (linters).

You also have the option of the method of manufactured solutions. You pick a solution for your ODE and then use this to obtain a modified problem where you know the analytic solution should match your assumed solution. You can find some information on the method of manufactured solutions here:

https://www.personal.psu.edu/jhm/ME540/lectures/VandV/MMS_summary.pdf

https://mae.ufl.edu/haftka/vvuq/lectures/Method%20of%20manufactured%20solutions.pptx