SPEAKER AS RLC CIRCUIT
I read this article here which demonstrates a simulation of a speaker as a simple RLC circuit where the RLC components are in parallel:
MY GOAL
I am interested in creating a sample domain C++ script that can take audio input samples at a given sample rate and return the processed audio "output" by the "speaker".
I understand the R1 & L1 in series just create some phase rotation and nothing else (correct?) and if so, I have no interest in these components. Thus what I would want to simulate would be for example with rough values as shown here:
I believe the two capacitors C1 and C2 in parallel simply add together to make a new C value (summed values?), in which case it is then just a Resistor $R$, Inductor $L$, and Capacitor $C$ in parallel.
MY PROBLEM
I would think this would be easy but I can't find any simple example online of this system solved in a Laplace function.
I believe what I need to do is solve the Laplace transfer function. Then I can use a reference like this one for substituting terms of z.
Or I think I'm supposed to do a substitution as I was instructed previously here, substituting one of:
- Backward Euler: $s≃\frac{1−z^{−1}}{T}$
- Forward Euler: $s≃\frac{z−1}{T}$
- Tustin transformation: $s≃\frac{2(z−1)}{T(z+1)}$
where $T$ equals 1/sampleRate.
Then I need to convert this into n domain of samples for C++ coding (or any other simple language I can rewrite to C++), where n is the current sample, n_1 is the last output, and n_2 is the output two samples prior.
I have no formal education in this though and it has been 3-5 years since the last time I did this (and I have only done it a few times).
Do I have the right idea? Any help with how this would work?

