Lab 2 - Process Modelling and PID Controller Design
Due14 Feb by
The lab will be carried out remotely and you will preform all experiments at home on your own time. You perform the lab simply by reading the manual, available here Labb 2 - Svenska and here Lab 2 - English, and solving the assignments in it.
To pass the lab you will need to pass two quizzes and a verbal examination discussing the findings, more information below. We encourage you to discuss and work with other students on the assignments. However, note that the quizzes should be done individually. You are of course also welcome to ask questions and discuss the lab with us at the exercise sessions.
Note, normally we run the lab on a real process so the manual contains instructions for how to handle this process (login, start, restarts etc.). To run the lab on your own, you ignore all these instructions and instead run a Matlab simulation of the process on your own computer, see below for instructions. Also, the manual may contain references to parts of the real process that are not present in the simulated process, these can be safely ignored.
Note, this lab, especially the preparatory assignments, require substantially more work compared to the first lab.
The examination of the lab consists of three parts. You are required to pass all three parts in order to get a passing grade on the lab.
Preparatory Quiz. This is quiz is done individually and covers the Preparatory Assignments and the Knowledge Review (sv: Frågor vid kunskapskontroll) at the end of the lab manual. The preparatory assignments are all marked with Preparation (sv: Förberedelseuppgift) in the lab manual and we recommend that you have your solutions to these assignments and the review questions with you when you take the quiz. Deadline: 14 Feb. To pass you need 7/10 correct answers.
Summary Quiz. This quiz is done individually and covers Assignments 4.3, 4.4, and 4.6 in the manual. Deadline: 14 Feb. To pass you need 7/10 correct answers.
A final 15-minute discussion session with a TA on Zoom. These are done in groups of three and are meant to summarize and discuss the results from the lab. The discussion will cover the Summary section in the manual. You sign-up for the discussion sessions by going to the Calendar, clicking on "Find Appointment" to the right and selecting one of the available "Lab 2 Discussion Session" appointments. Sign-up Deadline: 14 Feb. Note, there will be a few discussion sessions scheduled before the deadline of the Quizzes (and Sign-up). If you choose to attend these you need to have passed both quizzes before the session instead of the normal quiz deadline.
In order to complete the lab you will need these three Matlab scripts.
The first is the process simulation, it is the same simulation that was used in the first lab. The other two will simplify the lab by calculating the PI and PID parameters you should use in the assignments. The manual will instruct you on how and when to use these two scripts.
In order to perform the lab you need to download the three scripts and make it so that you can run them from Matlab. If you don't know how to do this, see the following instructions.
If you don't have access to Matlab, install it on your computer. As a LTH student you can download it here: Software LTH.
Download the three scrips above and place them in a directory of your choice.
Open the tank_sim.m script in Matlab.
Make sure that the current directory is set to where you saved the script, i.e., the field displays the directory of the scripts.
Click the "Run" button or type tank_sim in the Matlab command window and hit enter. This should start the simulation GUI, see below for an example.
You should also be able to run the calcpi.m and calcpid.m scripts. Try typing calcpi in the Matlab command window and hit enter. You should now get an error saying Error using calcpi (line 9) gamma1, delta, omega, and zeta must be defined first. This is as it should and the error is because calcpi was called without the correct parameters set. The lab manual explains how to call it correctly when it is needed.
If tank_sim doesn't start, or you get a Unrecognized function or variable 'calcpi' error when trying calcpi, make sure the current directory is set correctly and you have all scripts in the same directory.
We provide the following (low quality) video demonstration mainly as a backup to the simulation if you for some reason can't get the simulation to work or don't understand how it relates to the real process. It contains all experiments outlined in the lab manual so it is possible to complete all assignments in the manual with only this video, but we highly recommend you use the simulation. You should never compare experiments from the video with experiments done in the simulation since there is no guarantee that the process parameters are the same.
Can't change a rubric once you've started using it.