Complete the code to set the proportional gain (Kp) in a PID controller block.
pidBlock.P = [1];The proportional gain (Kp) is set to 10 to start manual tuning.
Complete the code to set the integral time (Ti) in the PID controller.
pidBlock.I = 1 / [1];
Integral time Ti is set as the inverse of 10 to tune the integral action.
Fix the error in setting the derivative gain (Kd) to avoid instability.
pidBlock.D = [1];Derivative gain should be small and positive to avoid noise amplification and instability.
Fill both blanks to create a loop that increases Kp until the system overshoots.
while error > 0 and pidBlock.P [1] 20: pidBlock.P [2]= pidBlock.P + 1
The loop increases Kp by 1 while it is less than 20 and error is positive.
Fill all three blanks to create a dictionary of PID parameters with keys 'Kp', 'Ti', and 'Td'.
pid_params = {'Kp': [1], 'Ti': [2], 'Td': [3]The dictionary maps each PID parameter key to the corresponding block property.
