Question: using basic C ++ skills answer the question Rudder control Consider a ship that is steered in a particular direction but has wind, current and

 using basic C ++ skills answer the question Rudder control Consider

using basic C ++ skills answer the question

Rudder control Consider a ship that is steered in a particular direction but has wind, current and other forces pushing it off course. It is possible to automatically steer the ship with software, compensating for the effects of wind, etc., using control theory ( this is, in fact, one of the earliest motivations for the formal study of PID controllers in control theory). Assume that you are contributing to the design of such a control system Note: you do not need to implement anything in this question Part A (8 marks) Write contracts (comment and prototype) for functions that your code could use to query the ship's current heading and change the rudder's angular speed. Part B (12 marks) One type of control system that can be used for such an application is the proportional-integral-derivative (PID) controller. It works by repeatedly measuring a value (in this case, the ship's heading), calculating error (the difference between the actual and desired headings and then minimizing that error: 1. as measured as this moment (using a proportional term) 2. as accummulated over time (using an integral term) and 3. as predicted in the future given the current change in value (using a derivative term) If e(t) is the error at a given time and Kp, Ki and Kd are constants that give different "weights" to the three terms described above, we can choose a rudder angular speed u(t) using the following equation: de (t) When implemented in software, a PID controller's integration is replaced by summation () and differentiation is replaced by the difference with the previous error value. Describe the algorithm for such a software PID controller, assuming that Kp, K, and Ka have already been determined for you. You may also assume that the functions that you described in the previous part are available for your use Rudder control Consider a ship that is steered in a particular direction but has wind, current and other forces pushing it off course. It is possible to automatically steer the ship with software, compensating for the effects of wind, etc., using control theory ( this is, in fact, one of the earliest motivations for the formal study of PID controllers in control theory). Assume that you are contributing to the design of such a control system Note: you do not need to implement anything in this question Part A (8 marks) Write contracts (comment and prototype) for functions that your code could use to query the ship's current heading and change the rudder's angular speed. Part B (12 marks) One type of control system that can be used for such an application is the proportional-integral-derivative (PID) controller. It works by repeatedly measuring a value (in this case, the ship's heading), calculating error (the difference between the actual and desired headings and then minimizing that error: 1. as measured as this moment (using a proportional term) 2. as accummulated over time (using an integral term) and 3. as predicted in the future given the current change in value (using a derivative term) If e(t) is the error at a given time and Kp, Ki and Kd are constants that give different "weights" to the three terms described above, we can choose a rudder angular speed u(t) using the following equation: de (t) When implemented in software, a PID controller's integration is replaced by summation () and differentiation is replaced by the difference with the previous error value. Describe the algorithm for such a software PID controller, assuming that Kp, K, and Ka have already been determined for you. You may also assume that the functions that you described in the previous part are available for your use

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!