0
$\begingroup$

A basic model of coupled strings (eg. piano) is provided here as:

enter image description here

The principle is that it has two identical string simulations each formed by a delay line and LPF. The outputs of these are summed at the "bridge" in the center. The sum is multiplied by $-Hb(z)$ to get the bridge output, which is then subtracted from each of the string loops to simulate damping from energy lost to the bridge.

The bridge equations are:

enter image description here

enter image description here

Where $Rb(s)$ is the impedance of the bridge and $R$ is the impedance of the string.

Assuming I got that right, here's what I don't understand:

  • If you are taking the summed output of the two string sims and multiplying them by a certain constant $Hb(s)$, then subtracting this from the string loops every sample, how is time or sample rate being accounted for? Ie. If you run it at 96 kHz wouldn't you do the subtraction twice as often as if you run it at 48 kHz doubling the damping? Or otherwise at what interval are you supposed to perform the subtraction?
  • What does it mean when an expression uses $(s)$ vs. $(z)$? Eg. $Hb(s)$ vs. $Hb(z)$?

Thanks.

$\endgroup$
1
$\begingroup$

Units of s represent the Laplace transform while units of z represent the z transform. It is often much easier to transform a time domain (units of t) signal to Laplace given that it translates integro-differential equations into simple algebra. The z transform does the same thing, but takes advantage of the repetition from sampling to make the transform even easier.

"s" is any complex variable (with real and imaginary values), usually expressed $s=\sigma + j\omega$. When you limit s to only be imaginary ($s=j\omega$), the result is the Fourier Transform, which is a single-valued function versus frequency. Thus for a system, $H(s)$ would be the general transfer function of s and $H(j\omega)$ is the frequency response.

Similary "z" is any complex variable, but due to the mapping from analog to digital in the construction of the z -transform, what is the frequency axis in the s-plane (the $j\omega$ axis) becomes the unit circle in the z plane ($e^{j\omega}$), where $\omega$ here is typically normalized radian frequency (see What is normalized frequency) with a unique range of $0$ to $2\pi$. Thus a digital system would have a general transfer function given as $H(z)$ while the frequency response would be $H(e^{j\omega}$). Conveniently, the z transform of one sample delay is simply $z^{-1}$, which hints at the great utility of using the z-transform for discrete time systems rather than the Laplace transform (which you could certainly still do instead if you want to take a mathematical beating!).

(Note: The mapping from $j\omega$ to the unit circle applies to many but not all mapping techniques: see z-Transform Methods: Definition vs. Integration Rule)

That said, to model the complete system digitally as a discrete system, you would translate the blocks that are functions of s to be functions of z. It is the process of translating, or mapping, from s to z where the sampling rate comes into play. There are several mapping techniques to choose from and a few popular ones are the matched-z transform, the method of impulse invariance and the bilinear transform. (For more on that see How/why are the $\mathcal Z$-transform and unit delays related? ) A simple example of this is the mapping of integration and differentiation operations from s to z using the matched-z transform (which by the way is identical to the method of impulse invariance for an all pole system):

Integration in time is equivalent to multiplying by $\frac{1}{s}$ in Laplace (there we see the conversion to simple algebra!). This is mapped to the following in the z domain: $$\frac{T}{1-z^{-1}}$$

Differentiation in time is equivalent to multiplying by $s$ in Laplace (along with subtracting the initial condition which I didn't include). This is mapped to the following in the z-domain: $$\frac{1-z^{-1}}{T}$$

where $T$ represents the time of one sample period.

Notice the factor of $T$ which is the sample period. The differentiation example is very easy to see what is going on: $1-z^{-1}$ is a simple difference of two successive samples:

$$H(z) = 1 - z^{-1}$$ $$\frac{Y(z)}{X(z)} = 1 - z^{-1}$$ $$Y(z) = X(z) - X(z)z^{-1}$$

Which is a (not the only) discrete approximation of a continuous time domain derivative. Consider taking the derivative of any time domain function: as we sample at higher and higher rates, the difference between two successive samples will get smaller, thus by dividing by the sample duration for the case of the derivative which is also getting smaller, we normalize the result to be independent of the sampling rate.

In your case specifically, this would occur in the mapping from s to z for the continuous time transfer function given by $H_b(s)$.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks Dan. Can you provide the equation for $Hb(z)$ then? In a simple case, let's say both $R$ and $Rb(s)$ are constant frequency independent numbers. I understand most of what you said but I'm not sure how to apply it. $\endgroup$ – mike Nov 30 '19 at 17:24
  • $\begingroup$ Well there is no equation given for Rb(s), you need that first $\endgroup$ – Dan Boschen Nov 30 '19 at 17:24
  • $\begingroup$ But the matched z transform is one approach that is very easy as long as the sampling rate is high enough (to prevent aliasing). For that one map all your poles and zeros in s to poles and zeros in z by using $z=e^{sT}$. $\endgroup$ – Dan Boschen Nov 30 '19 at 17:26
0
$\begingroup$

The answer was there is no need to incorporate sample rate at all. Since I am using the simple case where Hb(s) is a constant, I just had to multiply that against the summed samples and subtract the result from both delay lines. It works irrespective of sample rate. I tried it with sampling at 11 kHz and 96 kHz and it sounds the same.

I don't really understand why. I would have thought if I was subtracting a percent of the sum every sample from the loops, then I would be subtracting it more often at higher sampling and thus damping the loops faster, but it doesn't seem to work this way. It's somehow all completely sample rate independent in this simple case.

Anyway thanks for all answers. I learned a lot about DSP basics which I needed to know anyway. It's been educational.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.