build details

Show: section status errors & todos local changes recent changes last change in-page changes feedback controls

Assignment: PID Theory

Modified 2020-09-24 by Seiji Shaw

The True Value and Error Curves

Modified 2020-09-15 by NishanthJKumar

The figure below shows a true value curve for a PID controller. Draw the corresponding error curve for this graph. You can draw by hand and upload the picture. (Hint: refer to the error definition equation from before)

true value curve
True Value Curve for A PID Controller. The orange dot line indicates the setpoint and the black line is the true value curve.

Explain an Effect

Modified 2020-09-23 by NishanthJKumar

  1. Answer the following questions (3-5 sentences each):
    1. What will happen when the absolute value of K_{p} is very large? What will happen when the absolute value of K_{p} is very small?
    2. Can K_{p} be tuned such that the P term stops oscillations? Why or why not?
    3. Can the process variable stabilize at the setpoint (i.e. zero steady-state error) with only the P term and the D term? Why or why not?
  2. Explain the following effects caused by K_{p} , K_{i} and K_{d} (3-5 sentences each). For example, here is a sample answer (though you do not need to follow the pattern):
    • [Q:] *The rise time decreases when K_{d} increases.*
    • [A:] *When K_{d} increases, the error at time step t+1 decreases. This is because larger and larger K_{d} results in larger and larger control signals at time step t . This drives the system to achieve a lower error at time step t+1 . As the error at time step t+1 decreases, the slope of the true value curve increases. Since the slope increases, the rising time towards the setpoint should decrease (slightly).*
    1. The rise time decreases when K_{p} increases.
    2. The settling time increases when K_{i} increases.
    3. The overshoot decreases when K_{d} increases.

Start Tuning

Modified 2020-09-23 by NishanthJKumar

When designing a PID controller, it is important to choose a good set of K_{p} , K_{i} , and K_{d} ; poor choices can result in undesirable behavior. The graphs in the figure below illustrate behavior resulting from unknown sets of K_{p} , K_{i} , and K_{d} . In each graph, the orange dot line indicates the setpoint and the black line is the true value curve. For each graph, answer the following (1-2 sentences each):

  1. Which term(s) went wrong, if any? In other words, which term(s) are too high or too low?
  2. How can you correct the behavior?

tuning curve 1 tuning curve 2 tuning curve 3 tuning curve 4

PID on the PiDrone

Modified 2020-09-15 by NishanthJKumar

Sometimes a PID controller will have an extra offset/bias term K in the control function (see the equation below). For the drone, this K is the base throttle needed to get the drone off the ground.

u\left ( t_k \right ) = K_{p}e\left ( t_{k} \right )+K_{i}\sum_{i=0}^{k}e\left ( t_{i} \right )\Delta t+K_{d}\frac{e\left ( t_{k} \right )-e\left ( t_{k-1} \right )}{\Delta t}+K

Altitude Control

Modified 2020-09-23 by NishanthJKumar

Suppose you are implementing an altitude PID controller for your drone (i.e. up/down movement).

  1. If the setpoint is the desired height of the drone, then what is the process variable, the error and the control variable for the altitude PID controller?
  2. What could happen if K is set too high?

Note: We are looking only for a higher level description to demonstrate understanding of the PID controllers.

Velocity Control

Modified 2020-10-05 by sageshoyu

Suppose you are implementing a velocity PID controller for your drone. In this case, the drone only moves forward/backward and left/right. Your (hypothetical) controller is implemented so that when ‘L’ is pressed, the drone moves left at a constant velocity, and when ‘L’ is released, the drone stops moving.

  1. What is the setpoint, process variable, error and control variable for the velocity PID controller?
  2. How do these key terms change to cause the drone to move when you press ‘L’?

Note: We are looking only for a higher level description to demonstrate understanding of the PID controllers.

Handin

Modified 2020-09-24 by Seiji Shaw

Use this link to access the assignment on Github classroom. Commit the files to hand in, as you did in the Introduction assignment. You’ll find a template ‘answers.tex’ files for your answers.

Your handin should contain the following files:

  • answers.tex
  • answers.pdf