ABabcdfghiejkl
Applications of Passivity Theory to the ActiveControl of Acoustic Musical Instruments
Edgar Berdahl, Gunter Niemeyer, and Julius O. Smith III
Acoustics ’08 Conference, Paris, France
June 29th-July 4th, 2008
ABabcdfghiejkl
Outline
Introduction
Passivity For Linear Systems
PID Control
Other Passive Linear Controllers
Nonlinear PID Control
ABabcdfghiejkl
Introduction
◮ Project goal: To make the acoustics of a musical instrumentprogrammable while the instrument retains its tangible form.
ABabcdfghiejkl
Introduction
◮ Project goal: To make the acoustics of a musical instrumentprogrammable while the instrument retains its tangible form.
◮ We use a digital feedback controller.
ABabcdfghiejkl
Introduction
◮ Project goal: To make the acoustics of a musical instrumentprogrammable while the instrument retains its tangible form.
◮ We use a digital feedback controller.◮ The resulting instrument is like a haptic musical instrument
whose interface is the whole acoustical medium.
ABabcdfghiejkl
Introduction
◮ Project goal: To make the acoustics of a musical instrumentprogrammable while the instrument retains its tangible form.
◮ We use a digital feedback controller.◮ The resulting instrument is like a haptic musical instrument
whose interface is the whole acoustical medium.◮ We apply the technology to a vibrating string, but the
controllers are applicable to any passive musical instrument.
ABabcdfghiejkl
System Block Diagram
−+r
parameters
musical instrument
Controller
G(s)
u
F v
Figure: System block diagram for active feedback control
◮ We would like the controller to be robust to changesin G(s).
ABabcdfghiejkl
Outline
Introduction
Passivity For Linear Systems
PID Control
Other Passive Linear Controllers
Nonlinear PID Control
ABabcdfghiejkl
s-Domain Positive Real Functions
◮ We operate in the Laplace s-domain.
ABabcdfghiejkl
s-Domain Positive Real Functions
◮ We operate in the Laplace s-domain.◮ A function G(s) is positive real if
1. G(s) is real when s is real.
ABabcdfghiejkl
s-Domain Positive Real Functions
◮ We operate in the Laplace s-domain.◮ A function G(s) is positive real if
1. G(s) is real when s is real.2. Re{G(s)} ≥ 0 for all s such that Re{s} ≥ 0.
ABabcdfghiejkl
s-Domain Positive Real Functions
◮ We operate in the Laplace s-domain.◮ A function G(s) is positive real if
1. G(s) is real when s is real.2. Re{G(s)} ≥ 0 for all s such that Re{s} ≥ 0.
◮ Some consequences are1. |∠G(jω)| ≤ π
2 for all ω.
ABabcdfghiejkl
s-Domain Positive Real Functions
◮ We operate in the Laplace s-domain.◮ A function G(s) is positive real if
1. G(s) is real when s is real.2. Re{G(s)} ≥ 0 for all s such that Re{s} ≥ 0.
◮ Some consequences are1. |∠G(jω)| ≤ π
2 for all ω.2. 1/G(s) is positive real.
ABabcdfghiejkl
s-Domain Positive Real Functions
◮ We operate in the Laplace s-domain.◮ A function G(s) is positive real if
1. G(s) is real when s is real.2. Re{G(s)} ≥ 0 for all s such that Re{s} ≥ 0.
◮ Some consequences are1. |∠G(jω)| ≤ π
2 for all ω.2. 1/G(s) is positive real.3. If G(s) represents either the driving-point impedance or
driving-point mobility of a system, then the system is passiveas seen from the driving point.
ABabcdfghiejkl
s-Domain Positive Real Functions
◮ We operate in the Laplace s-domain.◮ A function G(s) is positive real if
1. G(s) is real when s is real.2. Re{G(s)} ≥ 0 for all s such that Re{s} ≥ 0.
◮ Some consequences are1. |∠G(jω)| ≤ π
2 for all ω.2. 1/G(s) is positive real.3. If G(s) represents either the driving-point impedance or
driving-point mobility of a system, then the system is passiveas seen from the driving point.
4. G(s) is stable.
ABabcdfghiejkl
s-Domain Positive Real Functions
◮ We operate in the Laplace s-domain.◮ A function G(s) is positive real if
1. G(s) is real when s is real.2. Re{G(s)} ≥ 0 for all s such that Re{s} ≥ 0.
◮ Some consequences are1. |∠G(jω)| ≤ π
2 for all ω.2. 1/G(s) is positive real.3. If G(s) represents either the driving-point impedance or
driving-point mobility of a system, then the system is passiveas seen from the driving point.
4. G(s) is stable.5. G(s) is minimum phase.
ABabcdfghiejkl
s-Domain Positive Real Functions
◮ We operate in the Laplace s-domain.◮ A function G(s) is positive real if
1. G(s) is real when s is real.2. Re{G(s)} ≥ 0 for all s such that Re{s} ≥ 0.
◮ Some consequences are1. |∠G(jω)| ≤ π
2 for all ω.2. 1/G(s) is positive real.3. If G(s) represents either the driving-point impedance or
driving-point mobility of a system, then the system is passiveas seen from the driving point.
4. G(s) is stable.5. G(s) is minimum phase.
◮ Note: The bilinear transform preserves s-domain andz-domain sense positive realness.
ABabcdfghiejkl
Interpretation
◮ If the sensor and actuator are not collocated, then there is apropagation delay between them.
ABabcdfghiejkl
Interpretation
◮ If the sensor and actuator are not collocated, then there is apropagation delay between them.
◮ To minimize the delay (phase lag), we should collocate thesensor and actuator.
ABabcdfghiejkl
Interpretation
◮ If the sensor and actuator are not collocated, then there is apropagation delay between them.
◮ To minimize the delay (phase lag), we should collocate thesensor and actuator.
◮ |∠G(jω)| < π
2 for all ω.
ABabcdfghiejkl
Interpretation
◮ If the sensor and actuator are not collocated, then there is apropagation delay between them.
◮ To minimize the delay (phase lag), we should collocate thesensor and actuator.
◮ |∠G(jω)| < π
2 for all ω.◮ If |∠K (jω)| ≤ π
2 for all ω, then no matter how large the loopgain K0 ≥ 0 is, the controlled system will be stable.
ABabcdfghiejkl
Interpretation
◮ If the sensor and actuator are not collocated, then there is apropagation delay between them.
◮ To minimize the delay (phase lag), we should collocate thesensor and actuator.
◮ |∠G(jω)| < π
2 for all ω.◮ If |∠K (jω)| ≤ π
2 for all ω, then no matter how large the loopgain K0 ≥ 0 is, the controlled system will be stable.
◮ If we choose a positive real controller K (s), then we can turnup the loop gain K0 ≥ 0 as much as we want.
ABabcdfghiejkl
Interpretation
◮ If the sensor and actuator are not collocated, then there is apropagation delay between them.
◮ To minimize the delay (phase lag), we should collocate thesensor and actuator.
◮ |∠G(jω)| < π
2 for all ω.◮ If |∠K (jω)| ≤ π
2 for all ω, then no matter how large the loopgain K0 ≥ 0 is, the controlled system will be stable.
◮ If we choose a positive real controller K (s), then we can turnup the loop gain K0 ≥ 0 as much as we want.
◮ This property is known as unconditional stability.
ABabcdfghiejkl
Simplest Useful Model
◮ We first model a single resonance.
ABabcdfghiejkl
Simplest Useful Model
◮ We first model a single resonance.◮ Given a mass m, damping parameter R, and spring with
parameter k , we have
mx + Rx + kx = −F (1)
ABabcdfghiejkl
Simplest Useful Model
◮ We first model a single resonance.◮ Given a mass m, damping parameter R, and spring with
parameter k , we have
mx + Rx + kx = −F (1)
◮ For F = 0, fundamental frequency f0 ≈ 12π
√
km ,
ABabcdfghiejkl
Simplest Useful Model
◮ We first model a single resonance.◮ Given a mass m, damping parameter R, and spring with
parameter k , we have
mx + Rx + kx = −F (1)
◮ For F = 0, fundamental frequency f0 ≈ 12π
√
km ,
◮ and the envelope of the impulse response decaysexponentially with time constant τ = 2m/R.
ABabcdfghiejkl
Outline
Introduction
Passivity For Linear Systems
PID Control
Other Passive Linear Controllers
Nonlinear PID Control
ABabcdfghiejkl
PID Control
F ∆= PDD x + PD x + PPx (2)
ABabcdfghiejkl
PID Control
F ∆= PDD x + PD x + PPx (2)
(m + PDD)x + (R + PD)x + (k + PP)x = 0 (3)
ABabcdfghiejkl
PID Control
F ∆= PDD x + PD x + PPx (2)
(m + PDD)x + (R + PD)x + (k + PP)x = 0 (3)
◮ With control we have
τ =2(m + PDD)
R + PD(4)
ABabcdfghiejkl
PID Control
F ∆= PDD x + PD x + PPx (2)
(m + PDD)x + (R + PD)x + (k + PP)x = 0 (3)
◮ With control we have
τ =2(m + PDD)
R + PD(4)
f0 ≈1
2π
√
k + PP
m + PDD(5)
ABabcdfghiejkl
PID Control Mechanical Equivalent
PDPP
PDD
−K(s)
ABabcdfghiejkl
Outline
Introduction
Passivity For Linear Systems
PID Control
Other Passive Linear Controllers
Nonlinear PID Control
ABabcdfghiejkl
Other Passive Linear Controllers
◮ Observations:1. Feedback signal leads by π/2 radians
⇒ resonance frequency increases
ABabcdfghiejkl
Other Passive Linear Controllers
◮ Observations:1. Feedback signal leads by π/2 radians
⇒ resonance frequency increases2. Feedback signal lags by π/2 radians
⇒ resonance frequency decreases
ABabcdfghiejkl
Other Passive Linear Controllers
◮ Observations:1. Feedback signal leads by π/2 radians
⇒ resonance frequency increases2. Feedback signal lags by π/2 radians
⇒ resonance frequency decreases3. Feedback signal is out of phase
⇒ resonance is damped
ABabcdfghiejkl
Other Passive Linear Controllers
◮ Observations:1. Feedback signal leads by π/2 radians
⇒ resonance frequency increases2. Feedback signal lags by π/2 radians
⇒ resonance frequency decreases3. Feedback signal is out of phase
⇒ resonance is damped◮ Other positive real controllers:
1. Leads and lags
ABabcdfghiejkl
Other Passive Linear Controllers
◮ Observations:1. Feedback signal leads by π/2 radians
⇒ resonance frequency increases2. Feedback signal lags by π/2 radians
⇒ resonance frequency decreases3. Feedback signal is out of phase
⇒ resonance is damped◮ Other positive real controllers:
1. Leads and lags2. Band pass filter
ABabcdfghiejkl
Other Passive Linear Controllers
◮ Observations:1. Feedback signal leads by π/2 radians
⇒ resonance frequency increases2. Feedback signal lags by π/2 radians
⇒ resonance frequency decreases3. Feedback signal is out of phase
⇒ resonance is damped◮ Other positive real controllers:
1. Leads and lags2. Band pass filter3. Band stop filter
ABabcdfghiejkl
Other Passive Linear Controllers
◮ Observations:1. Feedback signal leads by π/2 radians
⇒ resonance frequency increases2. Feedback signal lags by π/2 radians
⇒ resonance frequency decreases3. Feedback signal is out of phase
⇒ resonance is damped◮ Other positive real controllers:
1. Leads and lags2. Band pass filter3. Band stop filter4. Feedforward comb filters
ABabcdfghiejkl
Other Passive Linear Controllers
◮ Observations:1. Feedback signal leads by π/2 radians
⇒ resonance frequency increases2. Feedback signal lags by π/2 radians
⇒ resonance frequency decreases3. Feedback signal is out of phase
⇒ resonance is damped◮ Other positive real controllers:
1. Leads and lags2. Band pass filter3. Band stop filter4. Feedforward comb filters5. Filter alternating between ±π/2 radians
ABabcdfghiejkl
Bandpass Control
◮ We limit the control energy to a small frequency region.
ABabcdfghiejkl
Bandpass Control
◮ We limit the control energy to a small frequency region.◮ If the Q is large and the center frequency ωc is aligned with
an instrument partial, this partial is damped, while otherpartials are left unmodified.
ABabcdfghiejkl
Bandpass Control
◮ We limit the control energy to a small frequency region.◮ If the Q is large and the center frequency ωc is aligned with
an instrument partial, this partial is damped, while otherpartials are left unmodified.
◮ If we invert the loop gain, then we can selectively applynegative damping.
ABabcdfghiejkl
Bandpass Control
◮ We limit the control energy to a small frequency region.◮ If the Q is large and the center frequency ωc is aligned with
an instrument partial, this partial is damped, while otherpartials are left unmodified.
◮ If we invert the loop gain, then we can selectively applynegative damping.
◮ Multiple bandpass filters may placed in parallel in the signalprocessing chain.
ABabcdfghiejkl
Bandpass Control
◮ We limit the control energy to a small frequency region.◮ If the Q is large and the center frequency ωc is aligned with
an instrument partial, this partial is damped, while otherpartials are left unmodified.
◮ If we invert the loop gain, then we can selectively applynegative damping.
◮ Multiple bandpass filters may placed in parallel in the signalprocessing chain.
◮ Kbp(s) =ωcs
Q
s2+ωcs
Q +ω2c
ABabcdfghiejkl
Bandpass Control
◮ We limit the control energy to a small frequency region.◮ If the Q is large and the center frequency ωc is aligned with
an instrument partial, this partial is damped, while otherpartials are left unmodified.
◮ If we invert the loop gain, then we can selectively applynegative damping.
◮ Multiple bandpass filters may placed in parallel in the signalprocessing chain.
◮ Kbp(s) =ωcs
Q
s2+ωcs
Q +ω2c
m
ABabcdfghiejkl
Bandpass Filter
100
101
102
103
104
105
−100
−50
0
50
100
Frequency [Hz]
Mag
nitu
de [d
B]
100
101
102
103
104
105
−2
−1
0
1
2
Frequency [Hz]
Ang
le [r
ad]
ABabcdfghiejkl
Notch Filter Control
◮ We damp over all frequencies except for a small region.
ABabcdfghiejkl
Notch Filter Control
◮ We damp over all frequencies except for a small region.◮ Multiple band stop filters may be placed in series in the
signal processing chain.
ABabcdfghiejkl
Notch Filter Control
◮ We damp over all frequencies except for a small region.◮ Multiple band stop filters may be placed in series in the
signal processing chain.
◮ Knotch(s) =s2+
ωcsαQ +ω
2c
s2+ωcs
Q +ω2c
m
o
o
x
x
ABabcdfghiejkl
Notch Filter
100
101
102
103
104
105
−20
−15
−10
−5
0
Frequency [Hz]
Mag
nitu
de [d
B]
100
101
102
103
104
105
−1
−0.5
0
0.5
1
Frequency [Hz]
Ang
le [r
ad]
ABabcdfghiejkl
Alternating Filter
◮ The frequency response shown below is such that partials atn100Hz (shown by x ’s) will be pushed flat.
0 200 400 600 800 1000−50
0
50
Frequency [Hz]
Mag
nitu
de [d
B]
0 200 400 600 800 1000−2
−1
0
1
2
Frequency [Hz]
Ang
le [r
ad]
ABabcdfghiejkl
Alternating Filter Implementation
−1 −0.5 0 0.5 1−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1Im
agin
ary
axis
Real axis
ABabcdfghiejkl
Alternating Filter Implementation (Zoomed)
0.5 0.6 0.7 0.8 0.9 1−0.3
−0.2
−0.1
0
0.1
0.2
0.3Im
agin
ary
axis
Real axis
ABabcdfghiejkl
Wideband Idealized Frequency Response
100
101
102
103
104
105
−50
0
50
Frequency [Hz]
Mag
nitu
de [d
B]
100
101
102
103
104
105
−2
−1
0
1
2
Frequency [Hz]
Ang
le [r
ad]
ABabcdfghiejkl
Wideband Frequency Response Including Delay
100
101
102
103
104
105
−50
0
50
Frequency [Hz]
Mag
nitu
de [d
B]
100
101
102
103
104
105
−4
−2
0
2
Frequency [Hz]
Ang
le [r
ad]
ABabcdfghiejkl
Outline
Introduction
Passivity For Linear Systems
PID Control
Other Passive Linear Controllers
Nonlinear PID Control
ABabcdfghiejkl
Nonlinear PID Control
◮ Since PID control works so well, let’s try collocated nonlinearPID control by feeding back the displacement and velocity.
ABabcdfghiejkl
Nonlinear PID Control
◮ Since PID control works so well, let’s try collocated nonlinearPID control by feeding back the displacement and velocity.
◮ Given our single-resonance model, we obtain
mx + R(x , x) + K (x) = 0 (6)
ABabcdfghiejkl
Nonlinear PID Control
◮ Since PID control works so well, let’s try collocated nonlinearPID control by feeding back the displacement and velocity.
◮ Given our single-resonance model, we obtain
mx + R(x , x) + K (x) = 0 (6)
◮ There are many methods for analyzing the behavior ofsecond-order nonlinear systems.
ABabcdfghiejkl
Linear Dashpot
R(x)
x.
.
Figure: Linear Dashpot
ABabcdfghiejkl
Linear Dashpot
R(x)
x.
.
Figure: Linear Dashpot
◮ R(x , x) = Rx for some constant R
ABabcdfghiejkl
Saturating Dashpot
.R(x)
x.
Figure: Saturating Dashpot
ABabcdfghiejkl
Saturating Dashpot
.R(x)
x.
Figure: Saturating Dashpot
◮ Damping is passive if xR(x , x) ≥ 0 for all x and x .◮ R(x , x) > 0 for x > 0◮ R(x , x) < 0 for x < 0
ABabcdfghiejkl
Saturating Dashpot
.R(x)
x.
Figure: Saturating Dashpot
◮ Damping is passive if xR(x , x) ≥ 0 for all x and x .◮ R(x , x) > 0 for x > 0◮ R(x , x) < 0 for x < 0
◮ Damping is strictly passive if xR(x , x) > 0 for all x andfor all x 6= 0 (i.e. there is no deadband).
ABabcdfghiejkl
Spring
◮ A linear spring behaves according to K (x) = kx for someconstant k .
ABabcdfghiejkl
Spring
◮ A linear spring behaves according to K (x) = kx for someconstant k .
x
K(x)
Figure: Stiffening Spring
ABabcdfghiejkl
Spring
◮ A linear spring behaves according to K (x) = kx for someconstant k .
x
K(x)
Figure: Stiffening Spring
◮ The spring is strictly locally passive if xK (x) > 0 ∀x 6= 0.
ABabcdfghiejkl
Stability
◮ The system mx + R(x , x) + K (x) = 0 is stable if both thespring and dashpot are strictly locally passive.
ABabcdfghiejkl
Stability
◮ The system mx + R(x , x) + K (x) = 0 is stable if both thespring and dashpot are strictly locally passive.
◮ You can prove this using the Lyapunov function
V =1m
∫ x
0K (σ)dσ +
12
x2 (7)
ABabcdfghiejkl
Stability
◮ The system mx + R(x , x) + K (x) = 0 is stable if both thespring and dashpot are strictly locally passive.
◮ You can prove this using the Lyapunov function
V =1m
∫ x
0K (σ)dσ +
12
x2 (7)
V = −R(x , x)x
m≤ 0 (8)
ABabcdfghiejkl
Nonlinear Dashpot for Bow at Rest
.R(x)
x.
Figure: Bowing Nonlinearity
ABabcdfghiejkl
Nonlinear Dashpot For Moving Bow
bow velocity
R(x)
x.
.
Figure: Bowing Nonlinearity
ABabcdfghiejkl
Nonlinear Dashpot For Moving Bow
bow velocity
R(x)
x.
.
Figure: Bowing Nonlinearity
◮ Now the dashpot is NOT passive.
ABabcdfghiejkl
Nonlinear Dashpot For Moving Bow
bow velocity
R(x)
x.
.
Figure: Bowing Nonlinearity
◮ Now the dashpot is NOT passive.◮ The negative damping region adds energy so that the
bowed instrument can self-oscillate.
ABabcdfghiejkl
Thanks!
◮ Sound examples are on the websitehttp://ccrma.stanford.edu/˜eberdahl/Projects/PassiveControl
ABabcdfghiejkl
Thanks!
◮ Sound examples are on the websitehttp://ccrma.stanford.edu/˜eberdahl/Projects/PassiveControl
◮ Questions?
ABabcdfghiejkl
Bibliography
E. Berdahl and J. O. Smith III, Inducing Unusual Dynamics inAcoustic Musical Instruments, 2007 IEEE Conference onControl Applications, October 1-3, 2007 - Singapore.
H. Boutin, Controle actif sur instruments acoustiques, ATIAMMaster’s Thesis, Laboratoire d’Acoustique Musicale,Universite Pierre et Marie Curie, Paris, France, Sept. 2007.
K. Khalil, Nonlinear Systems, 3rd Edition, Prentice Hall,Upper Saddle River, NJ, 2002.
C. W. Wu, Qualitative Analysis of Dynamic Circuits, WileyEncyclopedia of Electrical and Electronics Engineering, JohnWiley and Songs, Inc., Hoboken, New Jersey, 1999.