<jupyter_start><jupyter_text>Time-Variant Acoustic Systems*This Jupyter notebook is part of a [collection of notebooks](../index.ipynb) in the masters course Selected Topics in Audio Signal Processing, Communications Engineering, Universität Rostock. Please direct questions and suggestions to [<EMAIL>](mailto:<EMAIL>).*  Example - Moving ScattererAs example for a time-variant acoustic scenario, the influence of a scatter moving through the line-of-sight between a loudspeaker and a microphone is considered. The respective time-varying room impulse response was measured while the experimenter walked through the line-of-sight between the source (loudspeaker) and the receiver (microphone) both placed in room W8202 of the Institute of Communications Engineering. The direct sound and the reflection from the floor were obstructed by the body, causing a low-pass filter-like effect.  Time-Varying Impulse ResponseThe time-varying impulse response $h(t, t-\tau)$ is loaded and plotted. The time $t$ denotes the absolute time the impulse response was captured at.<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
import scipy.io as sio


data = np.load('timevariant_IR_scatterer.npz')
fs = data['fs']
ir = data['ir']
hop = data['hop']

tau = 1/fs * np.arange(ir.shape[0])
t = (hop/fs) * np.arange(ir.shape[1])

plt.figure(figsize=(12, 8))
plt.pcolormesh(t, tau, ir, shading='auto')
plt.xlabel('$t$ in s')
plt.ylabel(r'$\tau$ in s')
plt.axis([t[0], t[-1], 0, 0.05])
plt.clim([-2, 2])
plt.colorbar()<jupyter_output><empty_output><jupyter_text>Now one particular impulse response captured at one particular time-instant is plotted for illustration<jupyter_code>idx = 100

plt.figure(figsize=(10, 10))
plt.plot(tau, ir[:, idx])
plt.title('Impulse response at $t=$ %d s' % (hop/fs*idx))
plt.xlabel(r'$\tau$ in s')
plt.ylabel(r'$h(t, t-\tau)$')
plt.grid()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11919831223628692, 'fraction_numerical': 0.013185654008438819, 'mean_word_length': 5.586805555555555, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '131830', 'license': 'MIT', 'n_tokens_mistral': 650, 'n_tokens_neox': 601, 'n_words': 213, 'path': 'linear_systems/time_variant.ipynb', 'repo_name': 'spatialaudio/-selected-topics-in-audio-signal-processing-lecture-', 'size': '1936'}