Skip to content

GiulianoDiLorenzo/SSSP_Assignment

Repository files navigation

Wave Digital Filter (WDF) Modeling of a Piezoelectric MEMS Loudspeaker

Course: Sound Synthesis and Spatial Processing

Programme: MSc in Music and Acoustic Engineering, Politecnico di Milano

Work Team: Giuliano Di Lorenzo, Nicola Mugnaini

Overview

This project implements a Wave Digital Filter (WDF) that simulates the electro-mechano-acoustic behaviour of a piezoelectric MEMS loudspeaker. The starting point is a linear lumped-element model (LEM) of the device, which spans three physical domains (electrical, mechanical, and acoustic) coupled through ideal transformers. The WDF is derived from an equivalent reference circuit in which all three domains are mapped into the mechanical domain, eliminating the ideal transformers entirely.

The implementation is validated against a ground-truth signal produced by a Simscape circuit simulation of the same model, both in the time domain and in the frequency domain (Sound Pressure Level).

Physical Model

The loudspeaker is described by the following elements across three domains:

  • Electrical domain: input voltage source $V_\text{in}$, electrical resistance $R_e$, and piezoelectric static capacitance $C_p$. Electro-mechanical coupling is modelled by an ideal transformer with turns ratio $1:\alpha$.

  • Mechanical domain: the vibrating diaphragm is modelled as a single-degree-of-freedom oscillator with damping $R_m$, mass $M_m$, and compliance $C_m$. Coupling to the acoustic domain is through a second transformer with ratio $S_\text{eff}:1$.

  • Acoustic domain: back-chamber acoustic compliance $C_\text{bc}$, short-tube inductances $L_\text{tube1}$ and $L_\text{tube2}$, tube capacitance $C_\text{tube}$, and acoustic radiation resistance $R_\text{ac}$.

By mapping all elements into the mechanical domain via the transformer constitutive equations, the reference circuit reduces to a single-domain network with components $R_1$ - $R_3$, $C_1$ - $C_4$, and $L_1$ - $L_3$, driven by a force source $F_\text{in}(t) = \alpha V_\text{in}(t)$.

WDF Structure

The WDF is built as a binary connection tree with:

  • Root: the ideal force source $F_\text{in}$ (non-adaptable element)
  • Nodes: nine adaptors (A through I), alternating series and parallel junctions to match the topology of the reference circuit
  • Leaves: all passive one-port elements (resistors, capacitors, inductors)

Port reference impedances are set according to standard WD adaptation conditions:

$$ Z_R = R, \quad Z_C = \frac{T_s}{2C}, \quad Z_L = \frac{2L}{T_s} $$

Each adaptor port is made reflection-free by setting the left-port impedance equal to the combination of the remaining ports:

$$ Z_\text{series} = Z_\text{bottom} + Z_\text{right}, \quad Z_\text{parallel} = Z_\text{bottom} // Z_\text{right} $$

This guarantees that the entire structure is computable in a fully explicit, non-iterative fashion.

Implementation

The simulation loop iterates over all input samples and proceeds in three steps per sample:

  1. State update: incident wave coefficients $a_k$ are updated from the previous reflected waves according to element type: resistors are set to zero, capacitors copy the previous reflected wave, inductors negate it.

  2. Forward scan: starting from the load $R_3$ (alst element from the source), reflected waves are propagated leftward through adaptors $\mathrm{I} \rightarrow \mathrm{A}$ using the scattering relation $\mathbf{b}_K = \mathbf{S}_K\mathbf{a}_K$, where $K=\mathrm{A},\mathrm{B},\cdots,\mathrm{I}$ indexes the adaptor and $\mathbf{S}_K$ denotes the scattering matrix.

  3. Local root scattering: the ideal voltage generator scatters as $b_g = 2F_\text{in}[n] - a_g$, which seeds the backward scan.

  4. Backward scan: reflected waves at all remaining ports are computed rightward through adaptors $\mathrm{A} \rightarrow \mathrm{I}$.

The acoustic output pressure is recovered from the voltage across $R_3$ as:

$$p_\text{out} = \frac{F_\text{out}}{S_\text{eff}}$$

About

Assignment for "Sound Analysis Synthesis and Processing - Module 2" exam @ Politecnico di Milano

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages