Complete the code to set the proportional gain (Kp) in the PID controller.
pid_controller.set_kp([1])The proportional gain (Kp) controls how strongly the controller reacts to the current error. Setting it to 1.2 is a common starting point for tuning.
Complete the code to set the integral time (Ti) in seconds for the PID controller.
pid_controller.set_ti([1])The integral time (Ti) helps eliminate steady-state error by integrating the error over time. A value of 10 seconds is a reasonable starting point.
Fix the error in the code to set the derivative time (Td) correctly.
pid_controller.set_td([1])The derivative time (Td) must be a positive number to predict future error trends. Negative or non-numeric values cause errors.
Fill both blanks to create a dictionary with PID parameters for tuning.
pid_params = {'Kp': [1], 'Ti': [2]Setting Kp to 1.5 and Ti to 10 seconds provides balanced proportional and integral control for tuning.
Fill all three blanks to create a PID tuning dictionary with keys and values.
pid_tuning = {'Kp': [1], 'Ti': [2], 'Td': [3]This dictionary sets Kp to 1.5, Ti to 15 seconds, and Td to 0.5 seconds, a common PID tuning setup.