TF 502 Single-Input-Single-Output Systems SIST, ShanghaiTech Introduction Open-Loop Control-Response Proportional Control General PID Control Boris Houska 1-1
Contents Introduction Open-Loop Control-Response Proportional Control General PID Control Single-Input-Single-Output Systems 1-2
Objectives In this lecture we will learn about Single-Input-Single-Output (SISO) systems Open-loop step response Proportional control of SISO systems Integral control PID control Warning: this lecture explains basic tricks to tune a controller based on physical intuition without using mathematical analysis yet (we ll discuss mathematical models later on in the lecture) Single-Input-Single-Output Systems 1-3
SISO Systems Recall from Lecture 1: 1. u(t) R denotes (scalar) input at time t 2. y(t) R denotes (scalar) output at time t Single-Input-Single-Output Systems 1-4
Example 1: oven SISO system: 1. u(t) R voltage at the heating coil 2. y(t) R temperature in the oven Single-Input-Single-Output Systems 1-5
Example 2: pendulum SISO system: 1. u(t) R force of the motor 2. y(t) R excitation angle of the pendulum Single-Input-Single-Output Systems 1-6
Contents Introduction Open-Loop Control-Response Proportional Control General PID Control Single-Input-Single-Output Systems 1-7
Open-loop control-response Idea: Test basic system behavior by making open-loop experiments Send signal u(t) to actuator and observe y(t) Single-Input-Single-Output Systems 1-8
Parameterization of control functions General affine parameterizations of the control function can be written in the form M u(t) = a i ϕ i (t). i=1 The functions ϕ 1,... ϕ M : R R are given basis functions The scalars a 1, a 2,..., a M R are the control parameterization coefficients Single-Input-Single-Output Systems 1-9
Parameterization of control functions General affine parameterizations of the control function can be written in the form M u(t) = a i ϕ i (t). i=1 The functions ϕ 1,... ϕ M : R R are given basis functions The scalars a 1, a 2,..., a M R are the control parameterization coefficients Single-Input-Single-Output Systems 1-10
Parameterization of control functions General affine parameterizations of the control function can be written in the form M u(t) = a i ϕ i (t). i=1 The functions ϕ 1,... ϕ M : R R are given basis functions The scalars a 1, a 2,..., a M R are the control parameterization coefficients Single-Input-Single-Output Systems 1-11
Open-loop step response Open-loop experiment: Introduce the basis functions 1 if t < 0 ϕ 1 (t) = 0 otherwise 1 if t 0 and ϕ 2 (t) = 0 otherwise Choose control step parameters a 1, a 2 R Send the control input u(t) = a 1 ϕ 1 (t) + a 2 ϕ 2 (t) to actuator Associated output signal y is called step response For a 1 = 0, a 2 = 1: y is called unit step response Single-Input-Single-Output Systems 1-12
Open-loop step response Open-loop experiment: Introduce the basis functions 1 if t < 0 ϕ 1 (t) = 0 otherwise 1 if t 0 and ϕ 2 (t) = 0 otherwise Choose control step parameters a 1, a 2 R Send the control input u(t) = a 1 ϕ 1 (t) + a 2 ϕ 2 (t) to actuator Associated output signal y is called step response For a 1 = 0, a 2 = 1: y is called unit step response Single-Input-Single-Output Systems 1-13
Open-loop step response Open-loop experiment: Introduce the basis functions 1 if t < 0 ϕ 1 (t) = 0 otherwise 1 if t 0 and ϕ 2 (t) = 0 otherwise Choose control step parameters a 1, a 2 R Send the control input u(t) = a 1 ϕ 1 (t) + a 2 ϕ 2 (t) to actuator Associated output signal y is called step response For a 1 = 0, a 2 = 1: y is called unit step response Single-Input-Single-Output Systems 1-14
Open-loop step response Open-loop experiment: Introduce the basis functions 1 if t < 0 ϕ 1 (t) = 0 otherwise 1 if t 0 and ϕ 2 (t) = 0 otherwise Choose control step parameters a 1, a 2 R Send the control input u(t) = a 1 ϕ 1 (t) + a 2 ϕ 2 (t) to actuator Associated output signal y is called step response For a 1 = 0, a 2 = 1: y is called unit step response Single-Input-Single-Output Systems 1-15
Open-loop step response Open-loop experiment: Introduce the basis functions 1 if t < 0 ϕ 1 (t) = 0 otherwise 1 if t 0 and ϕ 2 (t) = 0 otherwise Choose control step parameters a 1, a 2 R Send the control input u(t) = a 1 ϕ 1 (t) + a 2 ϕ 2 (t) to actuator Associated output signal y is called step response For a 1 = 0, a 2 = 1: y is called unit step response Single-Input-Single-Output Systems 1-16
Example 1 Single-Input-Single-Output Systems 1-17
Example 1 Single-Input-Single-Output Systems 1-18
Example 2 Single-Input-Single-Output Systems 1-19
Example 2 Single-Input-Single-Output Systems 1-20
Open-loop frequency response Open-loop experiment: Choose a test frequency ω > 0. Introduce the basis functions 1 if t < 0 ϕ 1 (t) = and ϕ sin(ωt) if t 0 2(t) = 0 otherwise 0 otherwise Choose control step parameters a 1, a 2 R Send the control input u(t) = a 1 ϕ 1 (t) + a 2 ϕ 2 (t) to actuator Associated output signal y is called frequency response Single-Input-Single-Output Systems 1-21
Open-loop frequency response Open-loop experiment: Choose a test frequency ω > 0. Introduce the basis functions 1 if t < 0 ϕ 1 (t) = and ϕ sin(ωt) if t 0 2(t) = 0 otherwise 0 otherwise Choose control step parameters a 1, a 2 R Send the control input u(t) = a 1 ϕ 1 (t) + a 2 ϕ 2 (t) to actuator Associated output signal y is called frequency response Single-Input-Single-Output Systems 1-22
Open-loop frequency response Open-loop experiment: Choose a test frequency ω > 0. Introduce the basis functions 1 if t < 0 ϕ 1 (t) = and ϕ sin(ωt) if t 0 2(t) = 0 otherwise 0 otherwise Choose control step parameters a 1, a 2 R Send the control input u(t) = a 1 ϕ 1 (t) + a 2 ϕ 2 (t) to actuator Associated output signal y is called frequency response Single-Input-Single-Output Systems 1-23
Open-loop frequency response Open-loop experiment: Choose a test frequency ω > 0. Introduce the basis functions 1 if t < 0 ϕ 1 (t) = and ϕ sin(ωt) if t 0 2(t) = 0 otherwise 0 otherwise Choose control step parameters a 1, a 2 R Send the control input u(t) = a 1 ϕ 1 (t) + a 2 ϕ 2 (t) to actuator Associated output signal y is called frequency response Single-Input-Single-Output Systems 1-24
Example 1 Single-Input-Single-Output Systems 1-25
Example 1 no steady state, but periodic limit cycle Single-Input-Single-Output Systems 1-26
Example 2 (resonance effect) Single-Input-Single-Output Systems 1-27
Example 2 (resonance effect) Single-Input-Single-Output Systems 1-28
Bounded-Input-Bounded-Output Systems A system is called a bounded-input-bounded-output (BIBO) system if there exists for every contant C 1 < a constant C 2 < such that u L C 1 y L C 2 In words: if the input is bounded, then the output is bounded Warning: the amplification factor y L u L might be large Single-Input-Single-Output Systems 1-29
Bounded-Input-Bounded-Output Systems A system is called a bounded-input-bounded-output (BIBO) system if there exists for every contant C 1 < a constant C 2 < such that u L C 1 y L C 2 In words: if the input is bounded, then the output is bounded Warning: the amplification factor y L u L might be large Single-Input-Single-Output Systems 1-30
Bounded-Input-Bounded-Output Systems A system is called a bounded-input-bounded-output (BIBO) system if there exists for every contant C 1 < a constant C 2 < such that u L C 1 y L C 2 In words: if the input is bounded, then the output is bounded Warning: the amplification factor y L u L might be large Single-Input-Single-Output Systems 1-31
Resonance catastrophe Small inputs can lead to large outputs... Single-Input-Single-Output Systems 1-32
System Response Norms The largest possible ratio between input and output norm, sup u y u is called system response norm (largest possible amplification factor). Common choices for are L 2 or L -norms Single-Input-Single-Output Systems 1-33
System Response Norms The largest possible ratio between input and output norm, sup u y u is called system response norm (largest possible amplification factor). Common choices for are L 2 or L -norms Single-Input-Single-Output Systems 1-34
Contents Introduction Open-Loop Control-Response Proportional Control General PID Control Single-Input-Single-Output Systems 1-35
Set points Goal: Design the closed-loop system such that y(t ) y ref after a short transient phase T > 0 Notation: The point y ref R is called set point The function e(t) = y(t) y ref is called the tracking error Single-Input-Single-Output Systems 1-36
Set points Goal: Design the closed-loop system such that y(t ) y ref after a short transient phase T > 0 Notation: The point y ref R is called set point The function e(t) = y(t) y ref is called the tracking error Single-Input-Single-Output Systems 1-37
Feedback laws Strategy: If we observe y(t), we set u(t) = µ(y(t)) The function µ : R R is called feedback law Secret assumption : Evaluation of µ is fast compared to the system dynamics Single-Input-Single-Output Systems 1-38
Feedback laws Strategy: If we observe y(t), we set u(t) = µ(y(t)) The function µ : R R is called feedback law Secret assumption : Evaluation of µ is fast compared to the system dynamics Single-Input-Single-Output Systems 1-39
Affine feedback (P-control) Proportional control is based on affine feedback laws, µ(y(t)) = u ref + K(y(t) y ref ) = u ref + K e(t) Constant u ref R is a control offset The constant K R is called the proportional gain Single-Input-Single-Output Systems 1-40
Affine feedback (P-control) Proportional control is based on affine feedback laws, µ(y(t)) = u ref + K(y(t) y ref ) = u ref + K e(t) Constant u ref R is a control offset The constant K R is called the proportional gain Single-Input-Single-Output Systems 1-41
Affine feedback (P-control) Proportional control is based on affine feedback laws, µ(y(t)) = u ref + K(y(t) y ref ) = u ref + K e(t) Constant u ref R is a control offset The constant K R is called the proportional gain Single-Input-Single-Output Systems 1-42
P-control tuning: Step 1 If the system is stable: Play around with the open loop system. Adjust u(t) = u ref such that open-loop system satisfies y(t ) y ref after (a possibly long) time T. Single-Input-Single-Output Systems 1-43
P-control tuning: Step 1 If the system is stable: Play around with the open loop system. Adjust u(t) = u ref such that open-loop system satisfies y(t ) y ref after (a possibly long) time T. Single-Input-Single-Output Systems 1-44
Tuning Step 1 Single-Input-Single-Output Systems 1-45
Tuning Step 1 Single-Input-Single-Output Systems 1-46
Tuning Step 1 Single-Input-Single-Output Systems 1-47
P-control tuning: Step 2 Increase / decrease the control gain K and test the closed-loop behavior of the system Fine-tuning of u ref and K if needed. Single-Input-Single-Output Systems 1-48
P-control tuning: Step 2 Increase / decrease the control gain K and test the closed-loop behavior of the system Fine-tuning of u ref and K if needed. Single-Input-Single-Output Systems 1-49
Tuning Step 2 Single-Input-Single-Output Systems 1-50
Tuning Step 2 K = 0.25 [ ] V C Single-Input-Single-Output Systems 1-51
Tuning Step 2 K = 0.50 [ ] V C Single-Input-Single-Output Systems 1-52
Tuning Step 2 K = 2.00 [ ] V C Single-Input-Single-Output Systems 1-53
Tuning Step 2 K = 1.00 [ ] V C Single-Input-Single-Output Systems 1-54
P-control tuning If the system is unstable at the set-point: open-loop experiments are not possible / difficult pre-stabilize the system with a suitable K Tune u ref (and K) to reduce output error Single-Input-Single-Output Systems 1-55
P-control tuning If the system is unstable at the set-point: open-loop experiments are not possible / difficult pre-stabilize the system with a suitable K Tune u ref (and K) to reduce output error Single-Input-Single-Output Systems 1-56
P-control tuning If the system is unstable at the set-point: open-loop experiments are not possible / difficult pre-stabilize the system with a suitable K Tune u ref (and K) to reduce output error Single-Input-Single-Output Systems 1-57
Inverted pendulum: P-control u ref = 0 K = 0.5 [ ] N rad Single-Input-Single-Output Systems 1-58
Inverted pendulum: P-control u ref = 0 K = 1.0 [ ] N rad Single-Input-Single-Output Systems 1-59
Inverted pendulum: P-control u ref = 0 K = 2.0 [ ] N rad Single-Input-Single-Output Systems 1-60
Inverted pendulum: P-control u ref = 0 K = 4.0 [ ] N rad Single-Input-Single-Output Systems 1-61
Inverted pendulum: P-control u ref = 0 K = 8.0 [ ] N rad Single-Input-Single-Output Systems 1-62
Proportional Control Circuit Replace computer by electrical circuit (e.g. for our oven): (here y(t), y ref and K(y(t) y ref ) are voltages) Use summing amplifier (or modify above circuit) to add offset Single-Input-Single-Output Systems 1-63
Proportional Control Circuit Replace computer by electrical circuit (e.g. for our oven): (here y(t), y ref and K(y(t) y ref ) are voltages) Use summing amplifier (or modify above circuit) to add offset Single-Input-Single-Output Systems 1-64
Contents Introduction Open-Loop Control-Response Proportional Control General PID Control Single-Input-Single-Output Systems 1-65
Affine feedback (PI-control) Proportional-Integral (PI) control uses feedback laws of the form t u(t) = u ref + K(y(t) y ref ) + K I (y(τ) y ref ) dτ t = u ref + Ke(t) + K I e(τ) dτ The constant K I R is called the integral gain For discrete-time systems: replace integral by running sum 0 0 t 0 e(τ) dτ where δ is the samping time t/δ 1 k=0 e(kδ) δ, Single-Input-Single-Output Systems 1-66
Affine feedback (PI-control) Proportional-Integral (PI) control uses feedback laws of the form t u(t) = u ref + K(y(t) y ref ) + K I (y(τ) y ref ) dτ t = u ref + Ke(t) + K I e(τ) dτ The constant K I R is called the integral gain For discrete-time systems: replace integral by running sum 0 0 t 0 e(τ) dτ where δ is the samping time t/δ 1 k=0 e(kδ) δ, Single-Input-Single-Output Systems 1-67
Affine feedback (PI-control) Proportional-Integral (PI) control uses feedback laws of the form t u(t) = u ref + K(y(t) y ref ) + K I (y(τ) y ref ) dτ t = u ref + Ke(t) + K I e(τ) dτ The constant K I R is called the integral gain For discrete-time systems: replace integral by running sum 0 0 t 0 e(τ) dτ where δ is the samping time t/δ 1 k=0 e(kδ) δ, Single-Input-Single-Output Systems 1-68
Integral Gain Tuning K = 1.0 [ ] V C K I = 0.0 [ ] V C s Single-Input-Single-Output Systems 1-69
Integral Gain Tuning K = 1.0 [ ] V C K I = 1.0 [ V C s ] Single-Input-Single-Output Systems 1-70
Integral Gain Tuning K = 1.0 [ ] V C K I = 0.5 [ V C s ] Single-Input-Single-Output Systems 1-71
Integral Gain Tuning K = 1.0 [ ] V C K I = 0.1 [ V C s ] Single-Input-Single-Output Systems 1-72
Integral Gain Circuit Operational amplifier integrator: Needs to be refined for non-ideal op-amps. Single-Input-Single-Output Systems 1-73
Integral Gain Circuit Operational amplifier integrator: Needs to be refined for non-ideal op-amps. Single-Input-Single-Output Systems 1-74
Affine feedback (PD-control) Proportional-Differential (PD) control uses feedback laws of the form u(t) = u ref + Ke(t) + K D ė(τ) The function ė(t) denotes the time derivative of the error function e(t) = y(t) y ref. The constant K D R is called the differential gain Assumes that we can measure ẏ(t) directly ( velocity measurement) Single-Input-Single-Output Systems 1-75
Affine feedback (PD-control) Proportional-Differential (PD) control uses feedback laws of the form u(t) = u ref + Ke(t) + K D ė(τ) The function ė(t) denotes the time derivative of the error function e(t) = y(t) y ref. The constant K D R is called the differential gain Assumes that we can measure ẏ(t) directly ( velocity measurement) Single-Input-Single-Output Systems 1-76
Affine feedback (PD-control) Proportional-Differential (PD) control uses feedback laws of the form u(t) = u ref + Ke(t) + K D ė(τ) The function ė(t) denotes the time derivative of the error function e(t) = y(t) y ref. The constant K D R is called the differential gain Assumes that we can measure ẏ(t) directly ( velocity measurement) Single-Input-Single-Output Systems 1-77
Affine feedback (PD-control) Proportional-Differential (PD) control uses feedback laws of the form u(t) = u ref + Ke(t) + K D ė(τ) The function ė(t) denotes the time derivative of the error function e(t) = y(t) y ref. The constant K D R is called the differential gain Assumes that we can measure ẏ(t) directly ( velocity measurement) Single-Input-Single-Output Systems 1-78
Inverted pendulum: PD-control u ref = 0 K = 2.0 [ ] N rad [ K D = 0.1 N rad/s ] Single-Input-Single-Output Systems 1-79
Inverted pendulum: PD-control u ref = 0 K = 2.0 [ ] N rad [ K D = 0.5 N rad/s ] Single-Input-Single-Output Systems 1-80
Inverted pendulum: PD-control u ref = 0 K = 2.0 [ ] N rad [ K D = 1.0 N rad/s ] Single-Input-Single-Output Systems 1-81
Inverted pendulum: PD-control u ref = 0 K = 2.0 [ ] N rad [ K D = 4.0 N rad/s ] Single-Input-Single-Output Systems 1-82
Affine feedback (PID-control) Proportional-Integral-Differential (PID): t u(t) = u ref + Ke(t) + K I e(τ) dτ + K D ė(τ) 0 Rule-of-the-thumb based PID tuning use K to pre-stabilize system use K I to reduce /eliminate offsets use K D to reduce oscillations/overshoot Warning: there are systems which behave differently; we ll analyze this later in more detail Single-Input-Single-Output Systems 1-83
Affine feedback (PID-control) Proportional-Integral-Differential (PID): t u(t) = u ref + Ke(t) + K I e(τ) dτ + K D ė(τ) 0 Rule-of-the-thumb based PID tuning use K to pre-stabilize system use K I to reduce /eliminate offsets use K D to reduce oscillations/overshoot Warning: there are systems which behave differently; we ll analyze this later in more detail Single-Input-Single-Output Systems 1-84
Affine feedback (PID-control) Proportional-Integral-Differential (PID): t u(t) = u ref + Ke(t) + K I e(τ) dτ + K D ė(τ) 0 Rule-of-the-thumb based PID tuning use K to pre-stabilize system use K I to reduce /eliminate offsets use K D to reduce oscillations/overshoot Warning: there are systems which behave differently; we ll analyze this later in more detail Single-Input-Single-Output Systems 1-85
Affine feedback (PID-control) Proportional-Integral-Differential (PID): t u(t) = u ref + Ke(t) + K I e(τ) dτ + K D ė(τ) 0 Rule-of-the-thumb based PID tuning use K to pre-stabilize system use K I to reduce /eliminate offsets use K D to reduce oscillations/overshoot Warning: there are systems which behave differently; we ll analyze this later in more detail Single-Input-Single-Output Systems 1-86
Affine feedback (PID-control) Proportional-Integral-Differential (PID): t u(t) = u ref + Ke(t) + K I e(τ) dτ + K D ė(τ) 0 Rule-of-the-thumb based PID tuning use K to pre-stabilize system use K I to reduce /eliminate offsets use K D to reduce oscillations/overshoot Warning: there are systems which behave differently; we ll analyze this later in more detail Single-Input-Single-Output Systems 1-87
PID-control circuit (many variants exist) Single-Input-Single-Output Systems 1-88
Summary / Keywords SISO systems (without using models) Control parameterization Open-loop response, step response, frequency response Steady state / periodic limit cycle BIBO systems, system response norm P, PI, PD, PID control + tuning by hand basic electrical circuits for PID control Single-Input-Single-Output Systems 1-89