31
systemidentifikation Piotr Majdak - [email protected] algorithmen in akustik und computermusik 1 Allgemein Device Under Test (DUT): elektroakustische Anlagen Abhör- oder Darbietungssräume Ziele: Erfassung systembeschreibender Parameter Hohe Genauigkeit der Messung (u.a. SNR) kurze Meßzeit Hier: Systemantwort leichtlinearer, zeit- invarianter Systeme (weakly non linear time invariant systems) 2.3.2007

algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

1

Allgemein Device Under Test (DUT):

• elektroakustische Anlagen• Abhör- oder Darbietungssräume

Ziele:• Erfassung systembeschreibender Parameter• Hohe Genauigkeit der Messung (u.a. SNR)• kurze Meßzeit

Hier: Systemantwort leichtlinearer, zeit-invarianter Systeme (weakly non linear time invariant systems) 2.3.2007

Page 2: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

2

Direkte Messung Direkte Messung der Amplitude und Phase:

Einfache Meßsysteme – Stepped Sine Messung nur im stationären Zustand Sehr lange Dauer bei hoher Frequenzauflösung Hohe Energieübertragung

Vanderkooy (1986)

Page 3: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

3

Time-Delay-Spectrometry Signal: Linearer Sweep

Antwort:

Demodulation + Tiefpassfilter:

x t =cos t

y t =∣H ∣cos [ t ]y t =∣H ∣{cos t cos [ ]−sin t sin [ ]}

yRt =12∣H ∣cos [ ] y I t =

12∣H ∣sin [ ]

Vanderkooy (1986)

x y

yR

y I

yR t = y t ⋅cos t y I t = y t ⋅[−sin t ]

yR t =∣H ∣{12 cos [ ] [1cos 2 t ]12sin 2 t sin [ ]}

Page 4: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

4

2 pass TDS TDS mit 2 Durchläufen: 1 pass

2 pass

Vanderkooy (1986)

Vanderkooy (1986)

Vanderkooy (1986)

Page 5: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

5

Impulsmessung Signal: Impuls:

• Impulsantwort direkt verfügbar

• sehr wenig Energie im Signal

AAEFF

=T IR• sehr hoher Crest-Faktor: Mittelung:

• Periodical Impulse Response (PIR)• Periodic Impulse Excitation (PIE)

Verdoppelung der Wiederholungen: +3dB SNR

Müller & Massarani (2001)

schlechte SNR

Page 6: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

6

1-Kanal-FFT Signal: Weißes Rauschen:

• Amplitudenspektrum: DC=0, Rest=1• Phasenspektrum: zufällig (gleichverteilt)• Im Zeitbereich: zufällig, Gauß'sche Verteilung• Crest-Faktor

Mittelung notwendig 1-Kanal-FFT:

• Nur Amplitudengang erfassbar 2-Kanal-FFT: gesamte Identifikation

Crest-Faktor Wahrscheinlichkeit1 32,00%2 4,80%3 0,37%

3,3 0,10%3,9 0,01%4 63 ppm

4,4 10 ppm4,9 1 ppm6 2 ppb

C=AAEFF

Page 7: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

7

2-Kanal-FFT Erfassung der Amplitude und der Phase

H f = Y f X f

Müller & Massarani (2001)

Page 8: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

8

Pseudo-Zufallsfolgen Weisses Rauschen: völlig dekorreliert:

Aus der Systemtheorie:

Mit einem dekorrelierten Signal:• Ersatz für weisses Rauschen: dekorrelierte Signale• Gesucht:

- dekorreliertes Signal- deterministisch- niedriger Crest-Faktor

r xx n=nr xx n=n

r xy n=hn∗r xx n

r xy n=hn

binäre Pseudo-Zufallsfolgen

Page 9: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

9

Golay Codes 2 binäre Pseudozufallsfolgen:

zirkuläre Autokorrelation:

zirkuläre Kreuzkorrelation:

a1=[1,1 ] b1=[1,−1 ]an1=[an , bn ] bn1=[an ,−bn ]a2=[1,1 ,1 ,−1 ] b2=[1,1 ,−1,1 ]

r xx n=raa nrbbn=2LnL ... Länge der Folge, L=2N

ℱ {a n}ℱ * {a n}ℱ {bn}ℱ * {bn}=2L

ℱ {a n}H ℱ * {a n}ℱ {bn}H ℱ * {bn}=2L⋅H

raa n

rbbn

r xx n

Zahorik (2000)

Page 10: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

10

Golay Codes Signal-To-Noise-Ratio (SNR):

• Energie einzelnen Pulses: 1• Energie der Golay Codes: 2L• Erhöhung der SNR in dB:

Wiederholung der Anregung:• Mit jeder Verdoppelung steigt SNR um +3dB

Länge der Codes:• mindestens gleich lang wie die zu erwartete IR

- sonst Time-Aliasing in der IR• mind. 2 Wiederholungen

10 log 2L

Page 11: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

11

Golay Codes Messprozedur:

• Anregung mit Folge a:- k Wiederholungen (k>1)- Aufnahme und Mittelung über die Wiederholungen 2 bis k

• Warten eine Periode• Anregung mit Folge b:

- k Wiederholungen (k>1)- Aufnahme und Mittelung über die Wiederholungen 2 bis k

• Kreuzkorrelation der Antworten mit der Anregungen• Summation der Kreuzkorrelationen: IR

Page 12: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

12

Maximum Length Sequence Probleme der Golay-Codes:

• 2 Messungen notwendig• Probleme bei zeitvarianten

Systemen wie HRTFs MLS:

• eine binäre Pseudo-Zufallsfolge• Autokorrelation:

- Einheitsimpuls- mit einem kleinen Offset

r xx n=n− 1L1

Dunn & Hawksford (1993)

Page 13: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

13

MLS Generierung:

• Schieberegister• Rückkopplung über EX-OR

Länge der Sequenz:• insgesamt 2N Zustände• Zustand “0” nicht zielführend• Nicht geeignet für Radix-2-FFT-

Algorithmus

Z-1 Z-1Z-1

EXOR

x(n)012

Ordnung N Abzapfung bei bit3 27 6

10 315 1423 1831 13

L=2N−1

Page 14: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

14

MLS Berechnung der Impulsantwort:

− 1L1

=−1L 1LL1

r xx n=n− 1L1

r xy n=hn∗r xx n

r xy n=hn−1L1∑n=0

N−1

hn

Mittelwert von h(n) = DC

r xy n=hn−1L∑n=0N−1

hn 1L L1∑n=0

N−1

hn

1L1

⋅DC

r xy n=hn−DC⋅[1−1L1

]

Page 15: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

15

MLS AC-Ankopplung: DC-Ankopplung: Berechnung der Kreuzkorrelation:

• direkte Methode:

• Im Frequenzbereich: FT (nicht FFT!)• Fast Hadamard Transformation:

- Darstellung in Matrizenform- aus x(n) wird eine rechts-zirkuläre Matrix X - aus y(n) und rxy(n) werden Matrizen Y und RXY

r xy n=1L1∑i=0

L−1

x[i−n ]mod L⋅y i

r xy n=hn

r xy n≃hn−DC

RXY=1L1

X⋅Y

Page 16: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

16

Fast Hadamard Transformation (FHT) Algorithmus ähnlich der DFT:

• Butterfly, aber kein Bit-reversal• nur Additionen/Subtraktionen• Operationen

Hadamard-Matrix:

H 1=[1] H 2=[1 11 −1]

H 2n1=[H 2n H 2n

H 2n −H 2n]=H 2n∗H 2n

H 8

H 32

RHY=H 2n⋅Y

L⋅log2 L

Page 17: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

17

MLS Problem: MLS ergibt keine Hadamard-Matrix Umformung Hadamard-Matrix zur MLS-Matrix:

X 2n−1=P 2S2H 2n S1 P1P1, P2S1,S 2

RXY=1L1

P2S2{H 2n [S1P1Y ]} r xy n≃hn

... Permutationsmatrizen... Begrenzungsmatrizen (supress)

S1=[0 0 01 0 00 1 00 0 1]S2=[0 1 0 0

0 0 1 00 0 0 1]

P 1=[1 0 0 0 0 0 00 0 0 0 0 1 00 1 0 0 0 0 00 0 0 0 0 0 10 0 0 0 1 0 00 0 0 1 0 0 00 0 1 0 0 0 0

]

Page 18: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

18

MLS Länge der MLS:

• mindestens gleich lang wie die zu erwartete IR SNR:

• höher als PIE• gleich wie bei Golay-Codes gleicher Länge

Nur eine Folge – Mittelung der IR bei zeitvarianten Systemen

Erhöhung der SNR: • Verdoppelung der Länge: +3dB

10 log L1

Page 19: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

19

Einfluß der Verzerrungen auf MLS MLS-Signal:

LP-Filter, f=1kHz

IR des Filters nach Korrelation:

Mit Verzerrung:

d {x f n}=−10dB⋅[ xn ]3

Dunn & Hawksford (1993)

Dunn & Hawksford (1993)

Dunn & Hawksford (1993)

Dunn & Hawksford (1993)

Page 20: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

20

Einfluß der Verzerrungen auf MLS Fehlersignal e n=hd n−hn

e n=r xd n

hd n=r xy n=r x fd y n

hd n=rx f y nrdy n

[ x n]2 [ x n]5

Fehler:

Energie-verteilung:

Dunn & Hawksford (1993)Dunn & Hawksford (1993)

Page 21: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

21

Einfluß der Verzerrungen auf MLS Immunität gegenüber

Verzerrungen:

Immunität gegenüber Rauschen:

Je nach System: optimale Amplitude!

MLS-Länge verlängern statt Mittelung

L=6dB

L=0dB

L=−6dB

I d=−r−1⋅ A

I n= A

Verzerrungen

OK!

Rauschen

Dunn & Hawksford (1993)

Page 22: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

22

Inverse Repeated Sequence Dämpfung gerader

Verzerrungen: IRS:

x nL=−x n

x n={mn , n gerade ,0≤n2L−mn , n ungerade ,0≤n2L

rxy=1

2L1 ∑k=02L−1

x n x nk

={rmy n , n gerade−rmy n , nungerade

=n−−1n

L1−n−L 0≤n2L

m(n) ... MLS

Dunn & Hawksford (1993)

Dunn & Hawksford (1993)

Page 23: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

23

PIE, MLS, IRS Distortion Immunity:

Noise Immunity (normalisiert auf distortion immunity):

Filter: LPf = 1kHzDistortion :-20dBLänge: 2047 samples

Dunn & Hawksford (1993)

Dunn & Hawksford (1993)

Page 24: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

24

Exponentielle Sweeps Probleme von MLS/IRS:

• Empfindlichkeit auf Verzerrungen Gesucht:

• Messung des linearen Teils• alle Harmonischen getrennt erfaßbar

Lösung: • Exponentielle Sweeps:

x t =sin [ f t ] f t =A et /−1mit

Page 25: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

25

Exponentielle Sweeps linearer Sweep

exponentieller Sweep

System: leicht nichtlinear

Farina (2000)

Farina (2000)

Konstanter Abstandzu den Harmonischen! T=konst

T=konst

Page 26: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

26

Exponentielle Sweeps Sweep: Randbedingungen:

Lösungen:

Abstand zur N-ten Harmonischen:

x t =sin [A e t /−1]

∂ [A et /−1 ]∂ t ∣

t=0=1

∂ [A et /−1 ]∂ t ∣

t=T=2

A=T 1

ln 2/1 = Tln 2/1

t= T⋅ln N ln 2/1

N=1,2 , ...

Page 27: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

27

Exponentielle Sweeps Gewinnung der Impulsantwort:

mit:

SNR: um 1.5dB niedriger als MLS gleicher Länge

Y =X ⋅H

H =Y ⋅X −1

X−1=ℱ {x −t }∣X ∣2

Sweep:

InverserSweep:

Page 28: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

28

Messung: THD und IRImpulsantwort:

Amplitudenspektrumeinzelner IR-Teile:

THD-Messung: (1kHz)

Page 29: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

29

Vergleich TDS: Delay, Frequenzbereich, Meßdauer PIE MLS / IRS / Golay Codes:

• sehr hohe SNR möglich• Empfindlichkeit: Verzerrungen

Exp. Sweep:• hohe SNR möglich• Empfindlichkeit: transiente Störungen, Zeitvarianz• Unempflindlichkeit: Verzerrungen

Page 30: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

30

Weiterführende Literatur Vanderkooy, J. (1986). “Another Approach to Time-Delay-

Spectrometry,” J. Audio Eng. Soc., 34(7/8): 523-538

Zhou, B., Green, D.M. (1992). “Characterization of external ear impulse responses using Golay codes,” J. Acoust. Soc. Am. 92(2 Pt 1):1169-71

Zahorik, P. (2000). “Limitations in using Golay codes for head-related transfer function measurement”, J. Acoust. Soc. Am. 107(3):1793-6

Dunn, C., Hawksford, M.O. (1993). “Distortion Immunity of MLS-Derived Impulse Response Measurements”, J. Audio Eng. Soc., 41(5):314-35

Borish, J., Angell, J.B. (1983). “An Efficient Algorithm for Measuring the Impulse Response Using Pseudorandom Noise”, J. Audio Eng. Soc. 31(7):478-488

Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge U. Press, Cambridge, U.K.

Page 31: algorithmen in akustik und computermusik Piotr Majdak ...iem.at/~majdak/alg/VO/sysid.pdf · Terras, A. (1999). “Fourier Analysis on Finite Groups and Applications”, Cambridge

systemidentifikationPiotr Majdak - [email protected] in akustik und computermusik

31

Weiterführende Literatur Farina, A. (2000). “Simultanous Measurement of Impulse Response

and Distortion with a Swept-Sine Technique”, Presented at the 108th Convention, 2000 February 19-22, Paris, France

Stan, G-B., Embrechts, J-J., Archambeau, D. (2002). “Comparison of Different Impulse Response Measurement Techniques”, J. Audio Eng. Soc., 50(4)

Müller, S., Massarani, P. (2001). “Transfer function measurement with sweeps”, J. Audio Eng. Soc. 49(6):443-471